[ 
https://issues.apache.org/jira/browse/KNOX-2144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Philip Zampino updated KNOX-2144:
---------------------------------
    Attachment:     (was: ExampleAliases.groovy)

> 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
>            Priority: Minor
>         Attachments: ExampleAliases.groovy
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> 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()
> json = (new JsonSlurper()).parseText( response.string )
> 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