Commit c3c53f5c authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

Wrap network-create command in transaction

parent 1d536a19
class Command(BaseCommand):
can_import_settings = True
output_transaction = True
help = "Create a new network"
......@@ -114,6 +115,8 @@ class Command(BaseCommand):
raise CommandError("Subnet is required")
if public and not backend_id:
raise CommandError("backend-id is required")
if public and not typ=='PUBLIC_ROUTED':
raise CommandError("Invalid type for public network")
if backend_id and not public:
raise CommandError("Private networks must be created to"
" all backends")
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