Commit 7f4eca15 authored by Dionysis Grigoropoulos's avatar Dionysis Grigoropoulos
Browse files

cyclades: Revert some changes from previous commit

Revert removal of duplicate code from commit
35ea7f671f28f4e3fbf4d1a58d32fd04fb5f3140
parent c87eea37
......@@ -117,6 +117,8 @@ def create_network(request):
flavor = api.utils.get_attribute(network_dict, "type",
attr_type=basestring)
if flavor not in Network.FLAVORS.keys():
raise api.faults.BadRequest("Invalid network type '%s'" % flavor)
if flavor not in settings.API_ENABLED_NETWORK_FLAVORS:
raise api.faults.Forbidden("Cannot create network of type '%s'." %
flavor)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment