Commit aef3fa1f authored by Stavros Sachtouris's avatar Stavros Sachtouris
Browse files

Implement network delete command

Refs: #4563
parent 56f5c6fc
......@@ -340,8 +340,7 @@ class _id_filter(object):
'filter by id suffix (case insensitive)', '--id-suffix'),
'print only if id contains this (case insensitive)',
'print only if id contains this (case insensitive)', '--id-like')
def _non_exact_id_filter(self, items):
......@@ -151,7 +151,6 @@ class network_create(_init_networking, _optional_json):
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()
class network_delete(_init_networking, _optional_output_cmd):
"""Delete a network"""
def _run(self, network_id):
r = self.client.delete_network(network_id)
def main(self, network_id):
super(self.__class__, self)._run()
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