Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
kamaki
Commits
515634db
Commit
515634db
authored
Nov 14, 2013
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
kamaki/cli/commands/network.py
View file @
515634db
...
...
@@ -456,9 +456,9 @@ class port_create(_init_network, _optional_json):
@
errors
.
cyclades
.
connection
@
errors
.
cyclades
.
network_id
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
=
[
'--subne
d
-id and --ip-address should be used together'
])
'--subne
t
-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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment