summaryrefslogtreecommitdiff
path: root/openstackclient/compute
diff options
context:
space:
mode:
Diffstat (limited to 'openstackclient/compute')
-rw-r--r--openstackclient/compute/v2/hypervisor.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/openstackclient/compute/v2/hypervisor.py b/openstackclient/compute/v2/hypervisor.py
index 0222e899..69b5d137 100644
--- a/openstackclient/compute/v2/hypervisor.py
+++ b/openstackclient/compute/v2/hypervisor.py
@@ -35,14 +35,24 @@ class ListHypervisor(command.Lister):
metavar="<hostname>",
help=_("Filter hypervisors using <hostname> substring")
)
+ parser.add_argument(
+ '--long',
+ action='store_true',
+ help=_("List additional fields in output")
+ )
return parser
def take_action(self, parsed_args):
compute_client = self.app.client_manager.compute
columns = (
"ID",
- "Hypervisor Hostname"
+ "Hypervisor Hostname",
+ "Hypervisor Type",
+ "Host IP",
+ "State"
)
+ if parsed_args.long:
+ columns += ("vCPUs Used", "vCPUs", "Memory MB Used", "Memory MB")
if parsed_args.matching:
data = compute_client.hypervisors.search(parsed_args.matching)