Skip to content

Commit 0966505

Browse files
committed
Add hypervisor docs
Change-Id: I444734925316e876afcbfdeffafea9973a837022
1 parent 5b8f18f commit 0966505

3 files changed

Lines changed: 44 additions & 8 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
==========
2+
hypervisor
3+
==========
4+
5+
Compute v2
6+
7+
hypervisor list
8+
---------------
9+
10+
List hypervisors
11+
12+
.. program:: hypervisor list
13+
.. code:: bash
14+
15+
os hypervisor list
16+
[--matching <hostname>]
17+
18+
.. option:: --matching <hostname>
19+
20+
Filter hypervisors using <hostname> substring
21+
22+
hypervisor show
23+
---------------
24+
25+
Display hypervisor details
26+
27+
.. program:: hypervisor show
28+
.. code:: bash
29+
30+
os hypervisor show
31+
<hypervisor>
32+
33+
.. _hypervisor_show-flavor:
34+
.. describe:: <hypervisor>
35+
36+
Hypervisor to display (name or ID)

‎doc/source/commands.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ referring to both Compute and Volume quotas.
8787
* ``flavor``: (**Compute**) predefined server configurations: ram, root disk, etc
8888
* ``group``: (**Identity**) a grouping of users
8989
* ``host``: Compute - the physical computer running a hypervisor
90-
* ``hypervisor``: Compute - the virtual machine manager
90+
* ``hypervisor``: (**Compute**) the virtual machine manager
9191
* ``identity provider``: (**Identity**) a source of users and authentication
9292
* ``image``: (**Image**) a disk image
9393
* ``ip fixed``: Compute, Network - an internal IP address assigned to a server

‎openstackclient/compute/v2/hypervisor.py‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ def get_parser(self, prog_name):
3333
parser = super(ListHypervisor, self).get_parser(prog_name)
3434
parser.add_argument(
3535
"--matching",
36-
metavar="<hostname-str>",
37-
help="Filter hypervisors using <hostname-str> substring",
36+
metavar="<hostname>",
37+
help="Filter hypervisors using <hostname> substring",
3838
)
3939
return parser
4040

@@ -58,23 +58,23 @@ def take_action(self, parsed_args):
5858

5959

6060
class ShowHypervisor(show.ShowOne):
61-
"""Show hypervisor details"""
61+
"""Display hypervisor details"""
6262

6363
log = logging.getLogger(__name__ + ".ShowHypervisor")
6464

6565
def get_parser(self, prog_name):
6666
parser = super(ShowHypervisor, self).get_parser(prog_name)
6767
parser.add_argument(
68-
"id",
69-
metavar="<id>",
70-
help="ID of the hypervisor to display")
68+
"hypervisor",
69+
metavar="<hypervisor>",
70+
help="Hypervisor to display (name or ID)")
7171
return parser
7272

7373
def take_action(self, parsed_args):
7474
self.log.debug("take_action(%s)", parsed_args)
7575
compute_client = self.app.client_manager.compute
7676
hypervisor = utils.find_resource(compute_client.hypervisors,
77-
parsed_args.id)._info.copy()
77+
parsed_args.hypervisor)._info.copy()
7878

7979
hypervisor["service_id"] = hypervisor["service"]["id"]
8080
hypervisor["service_host"] = hypervisor["service"]["host"]

0 commit comments

Comments
 (0)