diff options
| author | Jenkins <jenkins@review.openstack.org> | 2011-12-22 12:59:00 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2011-12-22 12:59:00 +0000 |
| commit | 5bcaecdc7d42b8a4aa2f16e96c064869438d6a12 (patch) | |
| tree | 85cde1b8379e320621a949240d767dfd07e0b17e /nova/compute | |
| parent | b2f36879b0d5f264ae2a9dd49fb893c6fbe25068 (diff) | |
| parent | adcfd491308a98107e82b9f0595e0bf2f37b5a54 (diff) | |
Merge "Allow accessIPv4 and accessIPv6 on rebuild action"
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/api.py | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py index 61394233a..70e9876ae 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -1194,25 +1194,22 @@ class API(base.Base): @check_instance_state(vm_state=[vm_states.ACTIVE], task_state=[None, task_states.RESIZE_VERIFY]) @scheduler_api.reroute_compute("rebuild") - def rebuild(self, context, instance, image_href, admin_password, - name=None, metadata=None, files_to_inject=None): - """Rebuild the given instance with the provided metadata.""" - name = name or instance["display_name"] - - files_to_inject = files_to_inject or [] - metadata = metadata or {} + def rebuild(self, context, instance, image_href, admin_password, **kwargs): + """Rebuild the given instance with the provided attributes.""" + files_to_inject = kwargs.pop('files_to_inject', []) self._check_injected_file_quota(context, files_to_inject) + + metadata = kwargs.get('metadata', {}) self._check_metadata_properties_quota(context, metadata) self.update(context, instance, - metadata=metadata, - display_name=name, image_ref=image_href, vm_state=vm_states.REBUILDING, task_state=None, - progress=0) + progress=0, + **kwargs) rebuild_params = { "new_pass": admin_password, |
