Skip to content

Commit 5f8c1b2

Browse files
committed
Make it possible to list all hosts of an aggregate
Signed-off-by: Christian Berendt <[email protected]>
1 parent 8267c7d commit 5f8c1b2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

osism/commands/compute.py

+8
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ def get_parser(self, prog_name):
9696
type=str,
9797
help="Filter by domain ID",
9898
)
99+
parser.add_argument(
100+
"--aggregate",
101+
default=None,
102+
type=str,
103+
help="Filter by aggregate",
104+
)
99105
parser.add_argument(
100106
"host",
101107
nargs="?",
@@ -110,6 +116,7 @@ def take_action(self, parsed_args):
110116
conn = get_cloud_connection()
111117
domain = parsed_args.domain
112118
project = parsed_args.project
119+
aggregate = parsed_args.aggregate
113120

114121
result = []
115122
if host:
@@ -132,6 +139,7 @@ def take_action(self, parsed_args):
132139
)
133140

134141
else:
142+
hypervisors = conn.compute.hypervisors()
135143
for service in conn.compute.services(**{"binary": "nova-compute"}):
136144
result.append(
137145
[

0 commit comments

Comments
 (0)