diff options
| author | Cerberus <matt.dietz@rackspace.com> | 2011-03-10 17:11:03 -0600 |
|---|---|---|
| committer | Cerberus <matt.dietz@rackspace.com> | 2011-03-10 17:11:03 -0600 |
| commit | e1fce3a80e04c75d98e738431ea762e0499351ef (patch) | |
| tree | 5afcba10b38702d763f1f2d8c22aea0fec496cee /nova/compute | |
| parent | 4a9f4f4eef4e6fd6ab84ec2e03437144f9ab62f8 (diff) | |
| parent | 7ca1669603132e3afd14606dda3f95ccbce08a41 (diff) | |
Merge from trunk
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/api.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py index 93f0a12c1..1393c01d5 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -126,9 +126,9 @@ class API(base.Base): image = self.image_service.show(context, image_id) if kernel_id is None: - kernel_id = image.get('kernel_id', None) + kernel_id = image['properties'].get('kernel_id', None) if ramdisk_id is None: - ramdisk_id = image.get('ramdisk_id', None) + ramdisk_id = image['properties'].get('ramdisk_id', None) # FIXME(sirp): is there a way we can remove null_kernel? # No kernel and ramdisk for raw images if kernel_id == str(FLAGS.null_kernel): @@ -165,6 +165,7 @@ class API(base.Base): 'image_id': image_id, 'kernel_id': kernel_id or '', 'ramdisk_id': ramdisk_id or '', + 'state': 0, 'state_description': 'scheduling', 'user_id': context.user_id, 'project_id': context.project_id, @@ -509,9 +510,10 @@ class API(base.Base): """Unrescue the given instance.""" self._cast_compute_message('unrescue_instance', context, instance_id) - def set_admin_password(self, context, instance_id): + def set_admin_password(self, context, instance_id, password=None): """Set the root/admin password for the given instance.""" - self._cast_compute_message('set_admin_password', context, instance_id) + self._cast_compute_message('set_admin_password', context, instance_id, + password) def inject_file(self, context, instance_id): """Write a file to the given instance.""" |
