summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaksim Malchuk <maksim.malchuk@gmail.com>2022-11-09 17:28:28 +0300
committerMaksim Malchuk <maksim.malchuk@gmail.com>2022-11-09 17:38:06 +0300
commitb7d01833d02260006e6d4c6e0a065748ecc8b913 (patch)
tree67b71a97c13e054fef3fdb53d474d7341065657a
parent31881c0b2b6581e16a1d802b01a52d2b2eefb750 (diff)
downloadpython-openstackclient-b7d01833d02260006e6d4c6e0a065748ecc8b913.tar.gz
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>
-rw-r--r--openstackclient/network/v2/network_agent.py7
-rw-r--r--releasenotes/notes/add-baremetal-agent-type-7c46365e8d457ac8.yaml5
2 files changed, 9 insertions, 3 deletions
diff --git a/openstackclient/network/v2/network_agent.py b/openstackclient/network/v2/network_agent.py
index d963b3bf..f67f67bd 100644
--- a/openstackclient/network/v2/network_agent.py
+++ b/openstackclient/network/v2/network_agent.py
@@ -168,11 +168,11 @@ class ListNetworkAgent(command.Lister):
metavar='<agent-type>',
choices=["bgp", "dhcp", "open-vswitch", "linux-bridge", "ofa",
"l3", "loadbalancer", "metering", "metadata", "macvtap",
- "nic"],
+ "nic", "baremetal"],
help=_("List only agents with the specified agent type. "
"The supported agent types are: bgp, dhcp, open-vswitch, "
"linux-bridge, ofa, l3, loadbalancer, metering, "
- "metadata, macvtap, nic.")
+ "metadata, macvtap, nic, baremetal.")
)
parser.add_argument(
'--host',
@@ -231,7 +231,8 @@ class ListNetworkAgent(command.Lister):
'metering': 'Metering agent',
'metadata': 'Metadata agent',
'macvtap': 'Macvtap agent',
- 'nic': 'NIC Switch agent'
+ 'nic': 'NIC Switch agent',
+ 'baremetal': 'Baremetal Node'
}
filters = {}
diff --git a/releasenotes/notes/add-baremetal-agent-type-7c46365e8d457ac8.yaml b/releasenotes/notes/add-baremetal-agent-type-7c46365e8d457ac8.yaml
new file mode 100644
index 00000000..a9a3a0df
--- /dev/null
+++ b/releasenotes/notes/add-baremetal-agent-type-7c46365e8d457ac8.yaml
@@ -0,0 +1,5 @@
+---
+features:
+ - |
+ Add ``baremetal`` agent type to ``--agent-type`` option for
+ ``network agent list`` command.