diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-01-10 17:39:26 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-01-10 17:39:26 +0000 |
| commit | 5acc4af6dc17c3124644f69717730015d9e7cdf1 (patch) | |
| tree | 13921798a343cab8bd0c4323ff39bbdddd7ab2c1 /nova/api | |
| parent | 799801f856a0f3e7788e89ecdca02828fd64e6ad (diff) | |
| parent | b99a5b65f75cfd899ee6c4024f7af6242887c093 (diff) | |
Merge "Fix call to compute_api.resize from _migrate"
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() |
