diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-04-27 17:04:22 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-04-27 17:04:22 +0000 |
| commit | f041adaeaec7e746c9b78ae79bc196dfb80d8bfd (patch) | |
| tree | 6f000fa38b0bb1e09c1904f7c8c26dc9f6a22ab5 | |
| parent | 19209a3307afbffbefce207e0cf8f46863e9a2a0 (diff) | |
| parent | 79548ebc7786d8d9d5405fcc5b0be4abb5f5d5c0 (diff) | |
Merge "Added the validation for name check for rebuild of a server"
| -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 5b0301c8e..251ab769f 100644 --- a/nova/api/openstack/compute/servers.py +++ b/nova/api/openstack/compute/servers.py @@ -499,7 +499,7 @@ class Controller(wsgi.Controller): msg = _("Server name is not a string or unicode") raise exc.HTTPBadRequest(explanation=msg) - if value.strip() == '': + if not value.strip(): msg = _("Server name is an empty string") raise exc.HTTPBadRequest(explanation=msg) @@ -1043,6 +1043,9 @@ class Controller(wsgi.Controller): if 'accessIPv6' in body: self._validate_access_ipv6(body['accessIPv6']) + if 'name' in body: + self._validate_server_name(body['name']) + kwargs = {} for request_attribute, instance_attribute in attr_map.items(): |
