Bug 806395
Summary: | [REST API] Provide a link within <alias> to remove the alias | ||
---|---|---|---|
Product: | OKD | Reporter: | Xavier Coulon <xcoulon> |
Component: | Master | Assignee: | Abhishek Gupta <abhgupta> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> |
Severity: | low | Docs Contact: | |
Priority: | medium | ||
Version: | 2.x | CC: | abhgupta, adietish, dmcphers, mpatel, wsun |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | devenv_2781 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-02-14 00:53:57 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Xavier Coulon
2012-03-23 15:54:47 UTC
as a complement, it is hard to understand why aliases are not seen as subresources of an application, rather than 'events'. Also, to keep consistency, the link to create an alias could be located inside of the <aliases> element. Lowering priority since this could be addressed in a US. Short of a new user story, for now, maybe we could just list the current application aliases as the valid options for the remove alias link. Thoughts??? Can I get feedback on the proposed solution in Comment 3? Changing the response structure would require us to bump up the REST API version. I'd love to comment but I dont fully get how the new response structure would look like. Could you please provide some example xml/json? Sorry for the delay. As per my comment #3 above, the remove alias link could include the current list of application aliases as "valid-options". An example link structure is shown below. <link> <rel>Remove application alias</rel> <method>POST</method> <href>https://localhost/broker/rest/domains/agupta1/applications/app1/events</href> <required-params> <param> <name>event</name> <type>string</type> <description>event</description> <valid-options> <valid-option>remove-alias</valid-option> </valid-options> <invalid-options/> </param> <param> <name>alias</name> <type>string</type> <description>The application alias to be removed</description> <valid-options/> <invalid-options> <valid-option>app-alias-1</valid-option> <valid-option>app-alias-2</valid-option> </invalid-options/> </param> </required-params> <optional-params/> </link> Added the alias list in teh wrong place in the example link structure above. It should be in "valid-options" instead. <link> <rel>Remove application alias</rel> <method>POST</method> <href>https://localhost/broker/rest/domains/agupta1/applications/app1/events</href> <required-params> <param> <name>event</name> <type>string</type> <description>event</description> <valid-options> <valid-option>remove-alias</valid-option> </valid-options> <invalid-options/> </param> <param> <name>alias</name> <type>string</type> <description>The application alias to be removed</description> <valid-options> <valid-option>app-alias-1</valid-option> <valid-option>app-alias-2</valid-option> </valid-options> <invalid-options/> </param> </required-params> <optional-params/> </link> Abhishek, that solution looks fine to me. Added the list of alias as valid options in this pull request --> https://github.com/openshift/origin-server/pull/1321 Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/0ef35838175841aee4a050891e4adcaa550f0da6 Fix for bug 806395 - added list of alias as valid options in remove alias link for application in rest response Fixed in devenv_2781 Verified on devnev-stg_282 Result: <rel>Remove application alias</rel> <method>POST</method> <href>https://ec2-50-17-140-66.compute-1.amazonaws.com/broker/rest/domains/wsunoldstg282/applications/nds/events</href> <required-params> <param> <name>event</name> <type>string</type> <description>event</description> <valid-options> <valid-option>remove-alias</valid-option> </valid-options> <invalid-options/> </param> <param> <name>alias</name> <type>string</type> <description>The application alias to be removed</description> <valid-options> <valid-option>nds.test.com</valid-option> </valid-options> <invalid-options/> </param> </required-params> <optional-params/> </link> |