diff options
| author | François Charlier <francois.charlier@enovance.com> | 2012-01-10 16:58:47 +0100 |
|---|---|---|
| committer | François Charlier <francois.charlier@enovance.com> | 2012-01-10 17:00:57 +0100 |
| commit | b99a5b65f75cfd899ee6c4024f7af6242887c093 (patch) | |
| tree | 78abfd9a431de715d757cdd656774a8b49129dc5 /nova/api | |
| parent | fa43949c05ff4e5165baa2f0a0f1555e94bcf212 (diff) | |
Fix call to compute_api.resize from _migrate
_migrate called compute_api.resize with an instance id,
compute_api.resize expects an instance object.
Change-Id: I0ab9ac48f8d7b4d5d92e0212969cc8febc5cf82b
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/v2/contrib/admin_actions.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nova/api/openstack/v2/contrib/admin_actions.py b/nova/api/openstack/v2/contrib/admin_actions.py index 2120462b9..f4207354c 100644 --- a/nova/api/openstack/v2/contrib/admin_actions.py +++ b/nova/api/openstack/v2/contrib/admin_actions.py @@ -108,8 +108,10 @@ class Admin_actions(extensions.ExtensionDescriptor): @scheduler_api.redirect_handler def _migrate(self, input_dict, req, id): """Permit admins to migrate a server to a new host""" + context = req.environ['nova.context'] try: - self.compute_api.resize(req.environ['nova.context'], id) + instance = self.compute_api.get(context, id) + self.compute_api.resize(req.environ['nova.context'], instance) except Exception, e: LOG.exception(_("Error in migrate %s"), e) raise exc.HTTPBadRequest() |
