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
d19b7ee3
Commit
d19b7ee3
authored
Nov 29, 2013
by
Stavros Sachtouris
Browse files
Remove all traces of networks from cyclades CLI
parent
291cab21
Changes
1
Hide whitespace changes
Inline
Side-by-side
kamaki/cli/commands/cyclades.py
View file @
d19b7ee3
...
...
@@ -877,30 +877,3 @@ def _add_name(self, net):
net
[
'user_id'
]
+=
' (%s)'
%
usernames
[
user_id
]
if
tenant_id
:
net
[
'tenant_id'
]
+=
' (%s)'
%
usernames
[
tenant_id
]
@
command
(
network_cmds
)
class
network_wait
(
_init_cyclades
,
_network_wait
):
"""Wait for server to finish [PENDING, ACTIVE, DELETED]"""
arguments
=
dict
(
timeout
=
IntArgument
(
'Wait limit in seconds (default: 60)'
,
'--timeout'
,
default
=
60
)
)
@
errors
.
generic
.
all
@
errors
.
cyclades
.
connection
@
errors
.
cyclades
.
network_id
def
_run
(
self
,
network_id
,
current_status
):
net
=
self
.
client
.
get_network_details
(
network_id
)
if
net
[
'status'
].
lower
()
==
current_status
.
lower
():
self
.
_wait
(
network_id
,
current_status
,
timeout
=
self
[
'timeout'
])
else
:
self
.
error
(
'Network %s: Cannot wait for status %s, '
'status is already %s'
%
(
network_id
,
current_status
,
net
[
'status'
]))
def
main
(
self
,
network_id
,
current_status
=
'PENDING'
):
super
(
self
.
__class__
,
self
).
_run
()
self
.
_run
(
network_id
=
network_id
,
current_status
=
current_status
)
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