diff options
| author | Alex Meade <alex.meade@rackspace.com> | 2012-04-18 17:39:58 -0400 |
|---|---|---|
| committer | Alex Meade <alex.meade@rackspace.com> | 2012-04-18 17:39:58 -0400 |
| commit | 98b8001407ef06e1cdb8434571288dc56dba7bc0 (patch) | |
| tree | e0e9f84ca3afd5ea5b59d1eca86f99a8040719c0 /nova/api | |
| parent | ab7e5907ff0fdad759d5e00a351c757c1e5de452 (diff) | |
Make rebuilds with an emtpy name raise BadRequest.
Fixes bug 973591
Change-Id: I87f189175c55a6922e7277857b85d526b9bfa6e1
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/servers.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py index 2e7b184c4..26c3b020a 100644 --- a/nova/api/openstack/compute/servers.py +++ b/nova/api/openstack/compute/servers.py @@ -271,7 +271,10 @@ class ActionDeserializer(CommonDeserializer): def _action_rebuild(self, node): rebuild = {} if node.hasAttribute("name"): - rebuild['name'] = node.getAttribute("name") + name = node.getAttribute("name") + if not name: + raise AttributeError("Name cannot be blank") + rebuild['name'] = name if node.hasAttribute("auto_disk_config"): rebuild['auto_disk_config'] = node.getAttribute("auto_disk_config") |
