Philip Zampino created KNOX-2144:
------------------------------------

             Summary: Alias API KnoxShell support should provide response types 
better than raw JSON
                 Key: KNOX-2144
                 URL: https://issues.apache.org/jira/browse/KNOX-2144
             Project: Apache Knox
          Issue Type: Improvement
          Components: KnoxShell
    Affects Versions: 1.3.0
            Reporter: Philip Zampino
            Assignee: Philip Zampino


Like many of the other KnoxShell classes, the responses are essentially JSON, 
which the client has to process itself. For the Alias API interactions, the 
responses could be processed by the KnoxShell classes themselves, especially 
since it's a Knox API.

So, instead of 
{code:java}
response = Alias.list(session, clusterName).now().string
json = (new JsonSlurper()).parseText( response )
cluster = json.topology
aliases = json.aliases
{code}
the response type would provide methods for getting the response details
{code:java}
response = Alias.list(session, clusterName).now()
cluster = response.getCluster()
aliases = response.getAliases(){code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to