Revision 7a29e4ca snf-cyclades-app/synnefo/api/networks.py

b/snf-cyclades-app/synnefo/api/networks.py
117 117
    flavor = api.utils.get_attribute(network_dict, "type",
118 118
                                     attr_type=basestring)
119 119

  
120
    if flavor not in Network.FLAVORS.keys():
121
        raise api.faults.BadRequest("Invalid network type '%s'" % flavor)
120 122
    if flavor not in settings.API_ENABLED_NETWORK_FLAVORS:
121 123
        raise api.faults.Forbidden("Cannot create network of type '%s'." %
122 124
                                   flavor)

Also available in: Unified diff