summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorvaddi-kiran <vaddi_kiran@persistent.co.in>2012-04-09 06:38:54 -0400
committervaddi kiran <vaddi_kiran@persistent.co.in>2012-04-26 05:56:57 -0400
commit6a4c092cb8d9bd2f99a29392bc3b5e566f858b52 (patch)
tree5a44cbc531491e33c9a07179249c28db7f98522d /nova/api
parentcaa1b282c701d5e9b9e02ffdb07d432d9b35ed13 (diff)
downloadnova-6a4c092cb8d9bd2f99a29392bc3b5e566f858b52.tar.gz
nova-6a4c092cb8d9bd2f99a29392bc3b5e566f858b52.tar.xz
nova-6a4c092cb8d9bd2f99a29392bc3b5e566f858b52.zip
Make updating hostId raises BadRequest.
fixes bug 944028 Change-Id: I563f51dd7afea1d0a9c7391c9e641e7c8c493216
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/compute/servers.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py
index ef7e29ac0..6390e8b34 100644
--- a/nova/api/openstack/compute/servers.py
+++ b/nova/api/openstack/compute/servers.py
@@ -800,6 +800,10 @@ class Controller(wsgi.Controller):
body['server']['auto_disk_config'])
update_dict['auto_disk_config'] = auto_disk_config
+ if 'hostId' in body['server']:
+ msg = _("HostId cannot be updated.")
+ raise exc.HTTPBadRequest(explanation=msg)
+
try:
instance = self.compute_api.get(ctxt, id)
self.compute_api.update(ctxt, instance, **update_dict)