diff options
| author | Dan Prince <dan.prince@rackspace.com> | 2011-05-31 20:15:52 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-05-31 20:15:52 +0000 |
| commit | 0b7104a8c6b2b2e3fed4a09b239439964aeb2774 (patch) | |
| tree | f410c071f78e397a089bd1befd9a4b2cdce4fa62 /nova/api | |
| parent | 026a331f9e1dd73baa38294d18948dcc37b5ff5c (diff) | |
| parent | 7beafb1aafac97e6dfc28108062785465cc8f577 (diff) | |
Update the rebuild_instance function in the compute manager so that it accepts the arguments that our current compute API sends.
Fixes to the SQLAlchmeny API such that metadata is saved on an instance_update. Added integration test to ensure that instance metadata is updated on a rebuild.
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/servers.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/nova/api/openstack/servers.py b/nova/api/openstack/servers.py index 5c10fc916..8e191c232 100644 --- a/nova/api/openstack/servers.py +++ b/nova/api/openstack/servers.py @@ -708,14 +708,16 @@ class ControllerV11(Controller): image_id = common.get_id_from_href(image_ref) personalities = info["rebuild"].get("personality", []) - metadata = info["rebuild"].get("metadata", {}) + metadata = info["rebuild"].get("metadata") + name = info["rebuild"].get("name") - self._validate_metadata(metadata) + if metadata: + self._validate_metadata(metadata) self._decode_personalities(personalities) try: - self.compute_api.rebuild(context, instance_id, image_id, metadata, - personalities) + self.compute_api.rebuild(context, instance_id, image_id, name, + metadata, personalities) except exception.BuildInProgress: msg = _("Instance %d is currently being rebuilt.") % instance_id LOG.debug(msg) |
