diff options
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/contrib/createserverext.py | 11 | ||||
| -rw-r--r-- | nova/api/openstack/create_instance_helper.py | 9 |
2 files changed, 10 insertions, 10 deletions
diff --git a/nova/api/openstack/contrib/createserverext.py b/nova/api/openstack/contrib/createserverext.py index e8fe9afad..78dba425a 100644 --- a/nova/api/openstack/contrib/createserverext.py +++ b/nova/api/openstack/contrib/createserverext.py @@ -137,6 +137,15 @@ class CreateInstanceHelperEx(helper.CreateInstanceHelper): # Let the caller deal with unhandled exceptions.
+ def _validate_fixed_ip(self, value):
+ if not isinstance(value, basestring):
+ msg = _("Fixed IP is not a string or unicode")
+ raise exc.HTTPBadRequest(explanation=msg)
+
+ if value.strip() == '':
+ msg = _("Fixed IP is an empty string")
+ raise exc.HTTPBadRequest(explanation=msg)
+
def _get_requested_networks(self, requested_networks):
"""
Create a list of requested networks from the networks attribute
@@ -202,7 +211,7 @@ class Createserverext(extensions.ExtensionDescriptor): return "Extended support to the Create Server v1.1 API"
def get_namespace(self):
- return "http://docs.openstack.org/ext/serverscreateext/api/v1.1"
+ return "http://docs.openstack.org/ext/createserverext/api/v1.1"
def get_updated(self):
return "2011-07-19T00:00:00+00:00"
diff --git a/nova/api/openstack/create_instance_helper.py b/nova/api/openstack/create_instance_helper.py index 8579c45df..fba0cb8ba 100644 --- a/nova/api/openstack/create_instance_helper.py +++ b/nova/api/openstack/create_instance_helper.py @@ -193,15 +193,6 @@ class CreateInstanceHelper(object): msg = _("Server name is an empty string") raise exc.HTTPBadRequest(explanation=msg) - def _validate_fixed_ip(self, value): - if not isinstance(value, basestring): - msg = _("Fixed IP is not a string or unicode") - raise exc.HTTPBadRequest(explanation=msg) - - if value.strip() == '': - msg = _("Fixed IP is an empty string") - raise exc.HTTPBadRequest(explanation=msg) - def _get_kernel_ramdisk_from_image(self, req, image_id): """Fetch an image from the ImageService, then if present, return the associated kernel and ramdisk image IDs. |
