summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-06-15 19:45:09 +0000
committerGerrit Code Review <review@openstack.org>2013-06-15 19:45:09 +0000
commit8d5d17cc84416f2eede2bc640f4e2a52e3f27f21 (patch)
treecbaf943b0c421f00999d86651a72705a2baf8943 /nova/api
parente4a22480fbba7d5efb60db82f83a69ccef27f976 (diff)
parent98ff29d13af9e0c1fa96e49e68939634c24ad2c3 (diff)
Merge "Fix to disallow server name with all blank spaces"
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/compute/servers.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py
index 67d64127a..a8e0beec7 100644
--- a/nova/api/openstack/compute/servers.py
+++ b/nova/api/openstack/compute/servers.py
@@ -580,6 +580,8 @@ class Controller(wsgi.Controller):
def _check_string_length(self, value, name, max_length=None):
try:
+ if isinstance(value, basestring):
+ value = value.strip()
utils.check_string_length(value, name, min_length=1,
max_length=max_length)
except exception.InvalidInput as e: