← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1390498] [NEW] host API has inconsistent host name attribute

 

Public bug reported:

When doing a list with the os-host extension the host name attribute is
host_name in all other cases the host name attribute is host.

E.g. when doing a list operation a result like this is expected:

{"hosts": [
  {"zone": "internal", "host_name": "awesome-node1", "service": "compute"}]}

When doing a describe of the same host:

{"host": [{"resource": {"project": "(total)", "memory_mb": 193278, "host": "awesome-node1", "cpu": 48, "disk_gb": 98}},
          {"resource": {"project": "(used_now)", "memory_mb": 13312, "host": "awesome-node1", "cpu": 6, "disk_gb": 20}},
          {"resource": {"project": "(used_max)", "memory_mb": 12288, "host": "awesome-node1", "cpu": 6, "disk_gb": 20}},
          {"resource": {"project": "de59ee29134b4980bbb77608347ae08a", "memory_mb": 12288, "host": "awesome-node1", "cpu": 6, "disk_gb": 20}}]}

This is confusing at best.

It has already caused some problems in the official client library.

https://github.com/openstack/python-novaclient/commit/9ce03a98eb78652fd3480cb0d8323520fd78064c
https://github.com/openstack/python-novaclient/commit/73a0e7298aeb7ff43e70a865d2350923d269db69

** Affects: nova
     Importance: Undecided
         Status: New

** Description changed:

  When doing a list with the os-host extension the host name attribute is
- host_name in all other cases the host attribute is host.
+ host_name in all other cases the host name attribute is host.
  
  E.g. when doing a list operation a result like this is expected:
  
  {"hosts": [
-   {"zone": "internal", "host_name": "awesome-node1", "service": "compute"}]}
+   {"zone": "internal", "host_name": "awesome-node1", "service": "compute"}]}
  
  When doing a describe of the same host:
  
  {"host": [{"resource": {"project": "(total)", "memory_mb": 193278, "host": "awesome-node1", "cpu": 48, "disk_gb": 98}},
-           {"resource": {"project": "(used_now)", "memory_mb": 13312, "host": "awesome-node1", "cpu": 6, "disk_gb": 20}},
-           {"resource": {"project": "(used_max)", "memory_mb": 12288, "host": "awesome-node1", "cpu": 6, "disk_gb": 20}},
-           {"resource": {"project": "de59ee29134b4980bbb77608347ae08a", "memory_mb": 12288, "host": "awesome-node1", "cpu": 6, "disk_gb": 20}}]}
+           {"resource": {"project": "(used_now)", "memory_mb": 13312, "host": "awesome-node1", "cpu": 6, "disk_gb": 20}},
+           {"resource": {"project": "(used_max)", "memory_mb": 12288, "host": "awesome-node1", "cpu": 6, "disk_gb": 20}},
+           {"resource": {"project": "de59ee29134b4980bbb77608347ae08a", "memory_mb": 12288, "host": "awesome-node1", "cpu": 6, "disk_gb": 20}}]}
  
  This is confusing at best.
  
  It has already caused some problems in the official client library.
  
  https://github.com/openstack/python-novaclient/commit/9ce03a98eb78652fd3480cb0d8323520fd78064c
  https://github.com/openstack/python-novaclient/commit/73a0e7298aeb7ff43e70a865d2350923d269db69

-- 
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/1390498

Title:
  host API has inconsistent host name attribute

Status in OpenStack Compute (Nova):
  New

Bug description:
  When doing a list with the os-host extension the host name attribute
  is host_name in all other cases the host name attribute is host.

  E.g. when doing a list operation a result like this is expected:

  {"hosts": [
    {"zone": "internal", "host_name": "awesome-node1", "service": "compute"}]}

  When doing a describe of the same host:

  {"host": [{"resource": {"project": "(total)", "memory_mb": 193278, "host": "awesome-node1", "cpu": 48, "disk_gb": 98}},
            {"resource": {"project": "(used_now)", "memory_mb": 13312, "host": "awesome-node1", "cpu": 6, "disk_gb": 20}},
            {"resource": {"project": "(used_max)", "memory_mb": 12288, "host": "awesome-node1", "cpu": 6, "disk_gb": 20}},
            {"resource": {"project": "de59ee29134b4980bbb77608347ae08a", "memory_mb": 12288, "host": "awesome-node1", "cpu": 6, "disk_gb": 20}}]}

  This is confusing at best.

  It has already caused some problems in the official client library.

  https://github.com/openstack/python-novaclient/commit/9ce03a98eb78652fd3480cb0d8323520fd78064c
  https://github.com/openstack/python-novaclient/commit/73a0e7298aeb7ff43e70a865d2350923d269db69

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1390498/+subscriptions


Follow ups

References