← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1528541] [NEW] aggregate-create and aggregate-details return inconsistent result

 

Public bug reported:

aggregate-create and aggregate-details return inconsistent result.

The results the 2 API aggregate-create and aggregate-details return:
1.create(nova aggregate-create agg-1 zone-1):
{"availability_zone": "zone-1", "created_at": "2015-11-26T06:56:17.000000", "deleted": false, "deleted_at": null, "id": 18, "name": "agg-1", "updated_at": null}

2.get(nova aggregate-details agg-1):
{"availability_zone": "zone-1", "created_at": "2015-11-26T06:56:17.000000", "deleted": false, "deleted_at": null, "hosts": [], "id": 18, "metadata": {"availability_zone": "zone-1"}, "name": "agg-1", "updated_at": null}

The result aggregate-create API returns does not contain attributes
'hosts' and 'metadata'.

When we call the following two API[1] in horizon, in order to make the
results consistent, we must call the API 'aggregates.get' again after
'aggregates.create'.

I think aggregates.create API should return result similar to
aggregates.get API (that is to contain attributes 'hosts' and
'metadata').

[1]:
novaclient(request).aggregates.create(name, availability_zone)
https://github.com/openstack/python-novaclient/blob/master/novaclient/v2/aggregates.py#L51

novaclient(request).aggregates.get(aggregate_id)
https://github.com/openstack/python-novaclient/blob/master/novaclient/v2/aggregates.py#L57

** Affects: nova
     Importance: Undecided
     Assignee: javeme (javaloveme)
         Status: New


** Tags: api

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

Title:
  aggregate-create and aggregate-details return inconsistent result

Status in OpenStack Compute (nova):
  New

Bug description:
  aggregate-create and aggregate-details return inconsistent result.

  The results the 2 API aggregate-create and aggregate-details return:
  1.create(nova aggregate-create agg-1 zone-1):
  {"availability_zone": "zone-1", "created_at": "2015-11-26T06:56:17.000000", "deleted": false, "deleted_at": null, "id": 18, "name": "agg-1", "updated_at": null}

  2.get(nova aggregate-details agg-1):
  {"availability_zone": "zone-1", "created_at": "2015-11-26T06:56:17.000000", "deleted": false, "deleted_at": null, "hosts": [], "id": 18, "metadata": {"availability_zone": "zone-1"}, "name": "agg-1", "updated_at": null}

  The result aggregate-create API returns does not contain attributes
  'hosts' and 'metadata'.

  When we call the following two API[1] in horizon, in order to make the
  results consistent, we must call the API 'aggregates.get' again after
  'aggregates.create'.

  I think aggregates.create API should return result similar to
  aggregates.get API (that is to contain attributes 'hosts' and
  'metadata').

  [1]:
  novaclient(request).aggregates.create(name, availability_zone)
  https://github.com/openstack/python-novaclient/blob/master/novaclient/v2/aggregates.py#L51

  novaclient(request).aggregates.get(aggregate_id)
  https://github.com/openstack/python-novaclient/blob/master/novaclient/v2/aggregates.py#L57

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


Follow ups