[
https://issues.apache.org/jira/browse/KNOX-2144?focusedWorklogId=353749&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-353749
]
ASF GitHub Bot logged work on KNOX-2144:
----------------------------------------
Author: ASF GitHub Bot
Created on: 04/Dec/19 20:29
Start Date: 04/Dec/19 20:29
Worklog Time Spent: 10m
Work Description: pzampino commented on pull request #211: KNOX-2144 -
Alias API KnoxShell support should provide response types…
URL: https://github.com/apache/knox/pull/211
## What changes were proposed in this pull request?
Improve response handling of KnoxShell classes for interacting with the
Alias Service API, such that every client thereof need not parse JSON.
## How was this patch tested?
Unit tests, and manual tests. Attached ExampleAliases.groovy to the JIRA
issue.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 353749)
Remaining Estimate: 0h
Time Spent: 10m
> 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: 10m
> 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)