Public bug reported: compute_node_search_by_hypervisor[1] (used by GET http://nova/v2/tenant_id/os-hypervisors/<hypervisor-id>/servers) searchs hypervisor using "like" hypervisor name instead of using hypervisor id.
For example: Lets assume that we have hypervisors hyp1 (with id=9), hyp2 (with id=1), hyp11 (with id=2): http://nova/v2/tenant_id/os-hypervisors/<hypervisor-id> returns information on an hypervisor using its id as key => http://nova/v2/tenant_id/os-hypervisors/1 returns information on hyp2 http://nova/v2/tenant_id/os-hypervisors/<hypervisor-id>/servers returns information on hypervisor(s) using a like query on hypervisor hostname. => http://nova/v2/tenant_id/os-hypervisors/1/servers returns servers on hyp1 and hyp12 (because "hyp1" and "hyp12" contain "1") It seems inconsistent, usually REST APIs use resource ids not resource names (nor even worse like resource names). This trouble affects at least kilo, ocata and queen. According to git it affects every version supporting this feature. [1]https://github.com/openstack/nova/blob/b7f53a33faf6187ad0b16e45cb14ece07892f7bc/nova/db/sqlalchemy/api.py#L737 ** Affects: nova Importance: Undecided Assignee: Forest Romain (romain-forest) Status: New ** Changed in: nova Assignee: (unassigned) => Forest Romain (romain-forest) ** Description changed: compute_node_search_by_hypervisor[1] (used by GET http://nova/v2/tenant_id/os-hypervisors/<hypervisor-id>/servers) searchs hypervisor using "like" hypervisor name instead of using hypervisor id. For example: Lets assume that we have hypervisors hyp1 (with id=9), hyp2 (with id=1), hyp11 (with id=2): - http://nova/v2/tenant_id/os-hypervisors/<hypervisor-id> returns information on an hypervisor using its id as key + http://nova/v2/tenant_id/os-hypervisors/<hypervisor-id> + returns information on an hypervisor using its id as key + => http://nova/v2/tenant_id/os-hypervisors/1 returns information on hyp2 - http://nova/v2/tenant_id/os-hypervisors/<hypervisor-id>/servers returns information on hypervisor(s) using a like query on hypervisor hostname. - => http://nova/v2/tenant_id/os-hypervisors/1/servers returns servers on hyp1 and hyp12 (because "hyp1" and "hyp12" contains "1" + http://nova/v2/tenant_id/os-hypervisors/<hypervisor-id>/servers + returns information on hypervisor(s) using a like query on hypervisor hostname. + + => http://nova/v2/tenant_id/os-hypervisors/1/servers returns servers on + hyp1 and hyp12 (because "hyp1" and "hyp12" contains "1" It seems inconsistent, usually REST APIs use resource ids not resource names (nor even worse like resource names). This trouble affects at least kilo, ocata and queen. According to git it affects every version supporting this feature. [1]https://github.com/openstack/nova/blob/b7f53a33faf6187ad0b16e45cb14ece07892f7bc/nova/db/sqlalchemy/api.py#L737 ** Description changed: compute_node_search_by_hypervisor[1] (used by GET http://nova/v2/tenant_id/os-hypervisors/<hypervisor-id>/servers) searchs hypervisor using "like" hypervisor name instead of using hypervisor id. + For example: Lets assume that we have hypervisors hyp1 (with id=9), hyp2 (with id=1), hyp11 (with id=2): - http://nova/v2/tenant_id/os-hypervisors/<hypervisor-id> + http://nova/v2/tenant_id/os-hypervisors/<hypervisor-id> returns information on an hypervisor using its id as key => http://nova/v2/tenant_id/os-hypervisors/1 returns information on hyp2 - http://nova/v2/tenant_id/os-hypervisors/<hypervisor-id>/servers + + http://nova/v2/tenant_id/os-hypervisors/<hypervisor-id>/servers returns information on hypervisor(s) using a like query on hypervisor hostname. => http://nova/v2/tenant_id/os-hypervisors/1/servers returns servers on hyp1 and hyp12 (because "hyp1" and "hyp12" contains "1" - It seems inconsistent, usually REST APIs use resource ids not resource - names (nor even worse like resource names). + + + It seems inconsistent, usually REST APIs use resource ids not resource names (nor even worse like resource names). This trouble affects at least kilo, ocata and queen. According to git it affects every version supporting this feature. [1]https://github.com/openstack/nova/blob/b7f53a33faf6187ad0b16e45cb14ece07892f7bc/nova/db/sqlalchemy/api.py#L737 ** Description changed: compute_node_search_by_hypervisor[1] (used by GET http://nova/v2/tenant_id/os-hypervisors/<hypervisor-id>/servers) searchs hypervisor using "like" hypervisor name instead of using hypervisor id. - For example: Lets assume that we have hypervisors hyp1 (with id=9), hyp2 (with id=1), hyp11 (with id=2): http://nova/v2/tenant_id/os-hypervisors/<hypervisor-id> returns information on an hypervisor using its id as key - => http://nova/v2/tenant_id/os-hypervisors/1 returns information on hyp2 - http://nova/v2/tenant_id/os-hypervisors/<hypervisor-id>/servers returns information on hypervisor(s) using a like query on hypervisor hostname. + => http://nova/v2/tenant_id/os-hypervisors/1/servers returns servers on hyp1 and hyp12 (because "hyp1" and "hyp12" contains "1" - => http://nova/v2/tenant_id/os-hypervisors/1/servers returns servers on - hyp1 and hyp12 (because "hyp1" and "hyp12" contains "1" - - - - It seems inconsistent, usually REST APIs use resource ids not resource names (nor even worse like resource names). + It seems inconsistent, usually REST APIs use resource ids not resource + names (nor even worse like resource names). This trouble affects at least kilo, ocata and queen. According to git it affects every version supporting this feature. [1]https://github.com/openstack/nova/blob/b7f53a33faf6187ad0b16e45cb14ece07892f7bc/nova/db/sqlalchemy/api.py#L737 ** Description changed: compute_node_search_by_hypervisor[1] (used by GET http://nova/v2/tenant_id/os-hypervisors/<hypervisor-id>/servers) searchs hypervisor using "like" hypervisor name instead of using hypervisor id. For example: Lets assume that we have hypervisors hyp1 (with id=9), hyp2 (with id=1), hyp11 (with id=2): http://nova/v2/tenant_id/os-hypervisors/<hypervisor-id> returns information on an hypervisor using its id as key => http://nova/v2/tenant_id/os-hypervisors/1 returns information on hyp2 http://nova/v2/tenant_id/os-hypervisors/<hypervisor-id>/servers returns information on hypervisor(s) using a like query on hypervisor hostname. - => http://nova/v2/tenant_id/os-hypervisors/1/servers returns servers on hyp1 and hyp12 (because "hyp1" and "hyp12" contains "1" + => http://nova/v2/tenant_id/os-hypervisors/1/servers returns servers on hyp1 and hyp12 (because "hyp1" and "hyp12" contains "1") It seems inconsistent, usually REST APIs use resource ids not resource names (nor even worse like resource names). This trouble affects at least kilo, ocata and queen. According to git it affects every version supporting this feature. [1]https://github.com/openstack/nova/blob/b7f53a33faf6187ad0b16e45cb14ece07892f7bc/nova/db/sqlalchemy/api.py#L737 ** Description changed: compute_node_search_by_hypervisor[1] (used by GET http://nova/v2/tenant_id/os-hypervisors/<hypervisor-id>/servers) searchs hypervisor using "like" hypervisor name instead of using hypervisor id. For example: Lets assume that we have hypervisors hyp1 (with id=9), hyp2 (with id=1), hyp11 (with id=2): http://nova/v2/tenant_id/os-hypervisors/<hypervisor-id> returns information on an hypervisor using its id as key => http://nova/v2/tenant_id/os-hypervisors/1 returns information on hyp2 http://nova/v2/tenant_id/os-hypervisors/<hypervisor-id>/servers returns information on hypervisor(s) using a like query on hypervisor hostname. - => http://nova/v2/tenant_id/os-hypervisors/1/servers returns servers on hyp1 and hyp12 (because "hyp1" and "hyp12" contains "1") + => http://nova/v2/tenant_id/os-hypervisors/1/servers returns servers on hyp1 and hyp12 (because "hyp1" and "hyp12" contain "1") It seems inconsistent, usually REST APIs use resource ids not resource names (nor even worse like resource names). This trouble affects at least kilo, ocata and queen. According to git it affects every version supporting this feature. [1]https://github.com/openstack/nova/blob/b7f53a33faf6187ad0b16e45cb14ece07892f7bc/nova/db/sqlalchemy/api.py#L737 -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1730975 Title: List servers by hypervisor doesn't support ids Status in OpenStack Compute (nova): New Bug description: compute_node_search_by_hypervisor[1] (used by GET http://nova/v2/tenant_id/os-hypervisors/<hypervisor-id>/servers) searchs hypervisor using "like" hypervisor name instead of using hypervisor id. For example: Lets assume that we have hypervisors hyp1 (with id=9), hyp2 (with id=1), hyp11 (with id=2): http://nova/v2/tenant_id/os-hypervisors/<hypervisor-id> returns information on an hypervisor using its id as key => http://nova/v2/tenant_id/os-hypervisors/1 returns information on hyp2 http://nova/v2/tenant_id/os-hypervisors/<hypervisor-id>/servers returns information on hypervisor(s) using a like query on hypervisor hostname. => http://nova/v2/tenant_id/os-hypervisors/1/servers returns servers on hyp1 and hyp12 (because "hyp1" and "hyp12" contain "1") It seems inconsistent, usually REST APIs use resource ids not resource names (nor even worse like resource names). This trouble affects at least kilo, ocata and queen. According to git it affects every version supporting this feature. [1]https://github.com/openstack/nova/blob/b7f53a33faf6187ad0b16e45cb14ece07892f7bc/nova/db/sqlalchemy/api.py#L737 To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1730975/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp