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
aef3fa1f
Commit
aef3fa1f
authored
Nov 06, 2013
by
Stavros Sachtouris
Browse files
Implement network delete command
Refs: #4563
parent
56f5c6fc
Changes
2
Show whitespace changes
Inline
Side-by-side
kamaki/cli/commands/__init__.py
View file @
aef3fa1f
...
...
@@ -340,8 +340,7 @@ class _id_filter(object):
id_suff
=
ValueArgument
(
'filter by id suffix (case insensitive)'
,
'--id-suffix'
),
id_like
=
ValueArgument
(
'print only if id contains this (case insensitive)'
,
'--id-like'
)
'print only if id contains this (case insensitive)'
,
'--id-like'
)
)
def
_non_exact_id_filter
(
self
,
items
):
...
...
kamaki/cli/commands/networking.py
View file @
aef3fa1f
...
...
@@ -151,7 +151,6 @@ class network_create(_init_networking, _optional_json):
@
errors
.
cyclades
.
connection
def
_run
(
self
,
name
):
# admin_state_up is not used in Cyclades
print
self
.
client
.
create_network
net
=
self
.
client
.
create_network
(
name
,
admin_state_up
=
True
,
shared
=
self
[
'shared'
])
self
.
_print
(
net
,
self
.
print_dict
)
...
...
@@ -159,3 +158,18 @@ class network_create(_init_networking, _optional_json):
def
main
(
self
,
name
):
super
(
self
.
__class__
,
self
).
_run
()
self
.
_run
(
name
=
name
)
@
command
(
network_cmds
)
class
network_delete
(
_init_networking
,
_optional_output_cmd
):
"""Delete a network"""
@
errors
.
generic
.
all
@
errors
.
cyclades
.
connection
def
_run
(
self
,
network_id
):
r
=
self
.
client
.
delete_network
(
network_id
)
self
.
_optional_output
(
r
)
def
main
(
self
,
network_id
):
super
(
self
.
__class__
,
self
).
_run
()
self
.
_run
(
network_id
=
network_id
)
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