summaryrefslogtreecommitdiffstats
path: root/nova/openstack
diff options
context:
space:
mode:
authorRussell Bryant <rbryant@redhat.com>2012-11-27 17:24:19 -0500
committerRussell Bryant <rbryant@redhat.com>2012-11-28 14:27:16 -0500
commit8c7fe145a76793c42786d9baaea63301c3dd5b6e (patch)
tree2c7ab7bde6643f5d82d76179b2e69366496176d7 /nova/openstack
parentb424512f9f5a7b74103b68c21a48f2ad6b9aa79e (diff)
downloadnova-8c7fe145a76793c42786d9baaea63301c3dd5b6e.tar.gz
nova-8c7fe145a76793c42786d9baaea63301c3dd5b6e.tar.xz
nova-8c7fe145a76793c42786d9baaea63301c3dd5b6e.zip
Include 'hosts' and 'metadetails' in aggregate.
When converting an Aggregate sqlalchemy model to primitive types using jsonutils.to_primitive(), the hosts and metadata were being left out. This is because they are implemented as properties on the model and must be explicitly listed as extra keys to be read. We also want to make sure that the _hosts and _metadata are eager loaded. This patch ensures this gets done by adding it to the _get_aggregate_query() helper, and making sure it is used everywhere that is appropriate. Also, on creation of the aggregate, just manually set _hosts and _metadata to empty lists, since we know they're empty at this point. These changes caused a side effect to the os-aggreages API extension. The result from creating an aggregate started including 'hosts' and 'metadata'. There's a hack in there to maintain the same API result. These don't add any value to this API call anyway, since we know they're blank at this point. Part of blueprint no-db-compute. Change-Id: I4048ea6f477f7a695701eb3ba57f97afca0c0e41
Diffstat (limited to 'nova/openstack')
0 files changed, 0 insertions, 0 deletions