Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
1.3.0
-
None
-
None
Description
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Â
response = Alias.list(session, clusterName).now()
json = (new JsonSlurper()).parseText( response.string )
cluster = json.topology
aliases = json.aliases
the response type would provide methods for getting the response details
response = Alias.list(session, clusterName).now() cluster = response.getCluster() aliases = response.getAliases()
Attachments
Attachments
Issue Links
- links to