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

cyclades: Add default owner for port

Consider as default owner for a port the owner of the machine that the
port will be connected to.
parent a2f9842d
......@@ -123,9 +123,6 @@ class Command(BaseCommand):
if not network_id:
raise CommandError("Please specify a 'network'")
if user_id is None:
raise CommandError("Please specify the owner of the port")
vm = None
owner = None
if server_id:
......@@ -139,6 +136,12 @@ class Command(BaseCommand):
if not vm.router:
raise CommandError("Router '%s' does not exist." % router_id)
if user_id is None:
if vm is not None:
user_id = vm.userid
raise CommandError("Please specify the owner of the port.")
# get the network
network = common.get_network(network_id)
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