diff options
| author | Jason Kölker <jason@koelker.net> | 2012-07-05 11:21:13 -0500 |
|---|---|---|
| committer | Jason Kölker <jason@koelker.net> | 2012-07-05 12:01:54 -0500 |
| commit | dd0e0ad5942743a434adf36bb91d107ac4e484e9 (patch) | |
| tree | 6f4df1dc22ff8fdb23ed72f0a75acd160ee4570c /nova/api | |
| parent | 8c9539d88fd53cb150dbe41da485ef0bc919b66a (diff) | |
Allow network_uuids that begin with a prefix
* If the bare network_uuid is not uuid-like, attempt to validate
with the first 'prefix-' stripped off
* Fix LP1021370
Change-Id: I4914d4ffcb633aef1c5b7f8abfa0b48eaf4f0cc9
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/servers.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py index ca87f3d4a..1b0ad9463 100644 --- a/nova/api/openstack/compute/servers.py +++ b/nova/api/openstack/compute/servers.py @@ -524,9 +524,12 @@ class Controller(wsgi.Controller): network_uuid = network['uuid'] if not utils.is_uuid_like(network_uuid): - msg = _("Bad networks format: network uuid is not in" - " proper format (%s)") % network_uuid - raise exc.HTTPBadRequest(explanation=msg) + br_uuid = network_uuid.split('-', 1)[-1] + if not utils.is_uuid_like(br_uuid): + msg = _("Bad networks format: network uuid is " + "not in proper format " + "(%s)") % network_uuid + raise exc.HTTPBadRequest(explanation=msg) #fixed IP address is optional #if the fixed IP address is not provided then |
