Fix duplicate entries in list_columns while extending the list
Closes-Bug: #1561378 Change-Id: I88cfb8f191570a4a34cac54ae872c46b53a3b793
This commit is contained in:
@@ -219,7 +219,8 @@ class ListL3AgentsHostingRouter(neutronV20.ListCommand):
|
||||
# Show the ha_state column only if the server responds with it,
|
||||
# as some plugins do not support HA routers.
|
||||
if any('ha_state' in agent for agent in data):
|
||||
self.list_columns.append('ha_state')
|
||||
if 'ha_state' not in self.list_columns:
|
||||
self.list_columns.append('ha_state')
|
||||
for agent in data:
|
||||
agent['alive'] = ":-)" if agent['alive'] else 'xxx'
|
||||
|
||||
|
Reference in New Issue
Block a user