Skip to content

Commit 13a6857

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Use _get_columns() to obtain columns in network.py"
2 parents dcc27fd + 7ba7384 commit 13a6857

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

openstackclient/network/v2/network.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def take_action_network(self, client, parsed_args):
162162
def take_action_compute(self, client, parsed_args):
163163
attrs = _get_attrs_compute(self.app.client_manager, parsed_args)
164164
obj = client.networks.create(**attrs)
165-
columns = tuple(sorted(obj._info.keys()))
165+
columns = _get_columns(obj._info)
166166
data = utils.get_dict_properties(obj._info, columns)
167167
return (columns, data)
168168

@@ -358,10 +358,10 @@ def take_action_network(self, client, parsed_args):
358358
return (columns, data)
359359

360360
def take_action_compute(self, client, parsed_args):
361-
network = utils.find_resource(
361+
obj = utils.find_resource(
362362
client.networks,
363363
parsed_args.network,
364364
)
365-
columns = sorted(network._info.keys())
366-
data = utils.get_dict_properties(network._info, columns)
365+
columns = _get_columns(obj._info)
366+
data = utils.get_dict_properties(obj._info, columns)
367367
return (columns, data)

0 commit comments

Comments
 (0)