diff options
| author | Brian Waldon <brian.waldon@rackspace.com> | 2011-12-21 11:30:19 -0500 |
|---|---|---|
| committer | Brian Waldon <brian.waldon@rackspace.com> | 2011-12-21 17:03:11 -0500 |
| commit | adcfd491308a98107e82b9f0595e0bf2f37b5a54 (patch) | |
| tree | fc78954c2c49e055d14bfa6b88eec47707307128 /nova/compute | |
| parent | 500da76ab281adc227eb0431ba8e286ca9d2d590 (diff) | |
Allow accessIPv4 and accessIPv6 on rebuild action
Fixes bug 893243
Change-Id: If320ead6f25613725faf6c01c4a87b496ef88961
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 6935a5ece..a4a47bc25 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, |
