Add baremetal agent type list filtering

This change adds and ability to filter out the baremetal nodes in
'network agent list' command.

Related-Story: 2008590
Related-Task: 41746
Related-Bug: #1658964
Change-Id: I01ffbd82662abbc1c2f56eb8f1e700f392bc063c
Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
This commit is contained in:
Maksim Malchuk 2022-11-09 17:28:28 +03:00
parent 31881c0b2b
commit b7d01833d0
2 changed files with 9 additions and 3 deletions

View File

@ -168,11 +168,11 @@ class ListNetworkAgent(command.Lister):
metavar='<agent-type>', metavar='<agent-type>',
choices=["bgp", "dhcp", "open-vswitch", "linux-bridge", "ofa", choices=["bgp", "dhcp", "open-vswitch", "linux-bridge", "ofa",
"l3", "loadbalancer", "metering", "metadata", "macvtap", "l3", "loadbalancer", "metering", "metadata", "macvtap",
"nic"], "nic", "baremetal"],
help=_("List only agents with the specified agent type. " help=_("List only agents with the specified agent type. "
"The supported agent types are: bgp, dhcp, open-vswitch, " "The supported agent types are: bgp, dhcp, open-vswitch, "
"linux-bridge, ofa, l3, loadbalancer, metering, " "linux-bridge, ofa, l3, loadbalancer, metering, "
"metadata, macvtap, nic.") "metadata, macvtap, nic, baremetal.")
) )
parser.add_argument( parser.add_argument(
'--host', '--host',
@ -231,7 +231,8 @@ class ListNetworkAgent(command.Lister):
'metering': 'Metering agent', 'metering': 'Metering agent',
'metadata': 'Metadata agent', 'metadata': 'Metadata agent',
'macvtap': 'Macvtap agent', 'macvtap': 'Macvtap agent',
'nic': 'NIC Switch agent' 'nic': 'NIC Switch agent',
'baremetal': 'Baremetal Node'
} }
filters = {} filters = {}

View File

@ -0,0 +1,5 @@
---
features:
- |
Add ``baremetal`` agent type to ``--agent-type`` option for
``network agent list`` command.