Commit 515634db authored by Dionysis Grigoropoulos's avatar Dionysis Grigoropoulos
Browse files

Fix a bug in port create

* Fix a bug in port create, that prevented the creation of a port
parent 2c3671ff
......@@ -456,9 +456,9 @@ class port_create(_init_network, _optional_json):
def _run(self, network_id, device_id):
if not (bool(self['subnet_id']) ^ bool(self['ip_address'])):
if bool(self['subnet_id']) ^ bool(self['ip_address']):
raise CLIInvalidArgument('Invalid use of arguments', details=[
'--subned-id and --ip-address should be used together'])
'--subnet-id and --ip-address should be used together'])
fixed_ips = dict(
subnet_id=self['subnet_id'], ip_address=self['ip_address']) if (
self['subnet_id']) else None
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