Skip to content

Commit e814bd2

Browse files
committed
network: Prefer --agent-id to --long
Currently, if a user specifies both the --long and --agent-id args to network list, the latter will be ignored. Invert this, since --long is only a formatting option. Change-Id: I53564c6258ca7c274288d3c0a428cc2c4307f72d Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
1 parent 5355961 commit e814bd2

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

openstackclient/network/v2/network.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,15 @@ def take_action(
576576
'Availability Zones',
577577
'Tags',
578578
)
579-
elif parsed_args.agent_id:
579+
else:
580+
columns = ('id', 'name', 'subnet_ids')
581+
column_headers = (
582+
'ID',
583+
'Name',
584+
'Subnets',
585+
)
586+
587+
if parsed_args.agent_id:
580588
columns = ('id', 'name', 'subnet_ids')
581589
column_headers = (
582590
'ID',
@@ -598,13 +606,6 @@ def take_action(
598606
for s in data
599607
),
600608
)
601-
else:
602-
columns = ('id', 'name', 'subnet_ids')
603-
column_headers = (
604-
'ID',
605-
'Name',
606-
'Subnets',
607-
)
608609

609610
args = {}
610611

0 commit comments

Comments
 (0)