Bug 890329
Summary: | REST-API: adding host specifying cluster by-name is not supported | ||
---|---|---|---|
Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Barak Dagan <bdagan> |
Component: | ovirt-engine-restapi | Assignee: | Ravi Nori <rnori> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Barak Dagan <bdagan> |
Severity: | unspecified | Docs Contact: | |
Priority: | medium | ||
Version: | 3.1.0 | CC: | dyasny, ecohen, iheim, mpastern, oramraz, pstehlik, Rhev-m-bugs, sgrinber, ykaul |
Target Milestone: | --- | ||
Target Release: | 3.2.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | infra | ||
Fixed In Version: | sf9 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | Type: | Bug | |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 915537, 917401 |
Description
Barak Dagan
2012-12-26 12:33:48 UTC
Barak, can you elaborate please, i've failed to understand your comment. (In reply to comment #1) > Barak, can you elaborate please, i've failed to understand your comment. I'm trying to say that in some cases (*) one can use either id or name of higher level object, but in other cases (**) only the id is given or can be used, for example, when adding host - cluster name is not available as a parameter - only cluster id is, which is not as intuitive as the name. I'm sure that there are more examples, which I don't remember at the moment, but will add when I find them. (In reply to comment #2) > (In reply to comment #1) > > Barak, can you elaborate please, i've failed to understand your comment. > > I'm trying to say that in some cases (*) one can use either id or name of > higher level object, but in other cases (**) only the id is given or can be > used, for example, when adding host - cluster name is not available as a > parameter - only cluster id is, which is not as intuitive as the name. I'm > sure that there are more examples, which I don't remember at the moment, but > will add when I find them. this is not related to cli, this is api gaps, you more then welcome file bugs against api on this. link : http://gerrit.ovirt.org/#/c/10726/ change id : I6b8268b016d83f3a963774b097f78f980503e8dd I could not find other cases where we need to expose both name and id. Please lust them if you find any (In reply to comment #5) > I could not find other cases where we need to expose both name and id. > Please lust them if you find any this is basic RESTapi principal that in params resource can be referenced by both id/name, if you see that this is not a case - this is gap. Ravi, Does patch from the Comment 5 covers all mentioned gaps? (In reply to comment #7) > Ravi, > > Does patch from the Comment 5 covers all mentioned gaps? Yes as far I can see this patch closes the mentioned gaps. on sf6. Add host can use cluster name as well. * update host can use cluster id and not cluster name. * update vm can use placement_policy-host-id and not placement_policy-host-name update vm can already use placement_policy host id or name (In reply to comment #10) > update vm can already use placement_policy host id or name Right I missed it in the interface. So we are left with update host Verified on SF9, in both RSDL and CLI: <link href="/api/hosts" rel="add"> <request> <http_method>POST</http_method> <headers>...</headers> <body> <type>Host</type> <parameters_set> ... <parameter required="true" type="xs:string"> <name>host.cluster.id|name</name> <link href="/api/hosts/{host:id}" rel="update"> <request> <http_method>PUT</http_method> <headers>...</headers> <url>...</url> <body> <type>Host</type> <parameters_set> ... <parameter required="false" type="xs:string"> <name>host.cluster.id|name</name> [RHEVM shell (connected)]# add host address name power_management-options-option reboot_after_installation cluster-id port power_management-password root_password cluster-name power_management-address power_management-pm_proxy storage_manager-priority correlation_id power_management-agents-agent power_management-type value expect power_management-enabled power_management-user_name [RHEVM shell (connected)]# update host address port power_management-options-option power_management-user_name cluster-id power_management-address power_management-password root_password correlation_id power_management-agents-agent power_management-pm_proxy storage_manager-priority name power_management-enabled power_management-type value [RHEVM shell (connected)]# update host Verify SF 10.1 (CLI): [RHEVM shell (connected)]# add host address display-address power_management-address power_management-password reboot_after_installation cluster-id expect power_management-agents-agent power_management-pm_proxy root_password cluster-name name power_management-enabled power_management-type storage_manager-priority correlation_id port power_management-options-option power_management-user_name value [RHEVM shell (connected)]# update host address display-address power_management-agents-agent power_management-pm_proxy storage_manager-priority cluster-id name power_management-enabled power_management-type value cluster-name port power_management-options-option power_management-user_name correlation_id power_management-address power_management-password root_password 3.2 has been released 3.2 has been released 3.2 has been released 3.2 has been released 3.2 has been released |