Commit 77bf75fe authored by Stavros Sachtouris's avatar Stavros Sachtouris
Browse files

Add filters in network list

Refs: #4563
parent ccf8b124
......@@ -107,9 +107,10 @@ class network_list(_init_networking, _optional_json, _name_filter, _id_filter):
def _run(self):
nets = self.client.list_networks()
nets = self._filter_by_name(nets)
nets = self._filter_by_id(nets)
if not self['detail']:
for net in nets:
net = dict(id=net['id'], name=net['name'])
nets = [dict(id=net['id'], name=net['name']) for net in nets]
def main(self):
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