[
https://issues.apache.org/jira/browse/KNOX-2144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16989170#comment-16989170
]
ASF subversion and git services commented on KNOX-2144:
-------------------------------------------------------
Commit 6b1898f274b0e8e35b5322cd8900bf8737112d24 in knox's branch
refs/heads/master from Philip Zampino
[ https://gitbox.apache.org/repos/asf?p=knox.git;h=6b1898f ]
KNOX-2144 - Alias API KnoxShell support should provide response types better
than raw JSON (#211)
> 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: 1h
> 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)