Add hypervisor docs
Change-Id: I444734925316e876afcbfdeffafea9973a837022
This commit is contained in:
parent
5b8f18fe4b
commit
09665052ac
36
doc/source/command-objects/hypervisor.rst
Normal file
36
doc/source/command-objects/hypervisor.rst
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
==========
|
||||||
|
hypervisor
|
||||||
|
==========
|
||||||
|
|
||||||
|
Compute v2
|
||||||
|
|
||||||
|
hypervisor list
|
||||||
|
---------------
|
||||||
|
|
||||||
|
List hypervisors
|
||||||
|
|
||||||
|
.. program:: hypervisor list
|
||||||
|
.. code:: bash
|
||||||
|
|
||||||
|
os hypervisor list
|
||||||
|
[--matching <hostname>]
|
||||||
|
|
||||||
|
.. option:: --matching <hostname>
|
||||||
|
|
||||||
|
Filter hypervisors using <hostname> substring
|
||||||
|
|
||||||
|
hypervisor show
|
||||||
|
---------------
|
||||||
|
|
||||||
|
Display hypervisor details
|
||||||
|
|
||||||
|
.. program:: hypervisor show
|
||||||
|
.. code:: bash
|
||||||
|
|
||||||
|
os hypervisor show
|
||||||
|
<hypervisor>
|
||||||
|
|
||||||
|
.. _hypervisor_show-flavor:
|
||||||
|
.. describe:: <hypervisor>
|
||||||
|
|
||||||
|
Hypervisor to display (name or ID)
|
@ -87,7 +87,7 @@ referring to both Compute and Volume quotas.
|
|||||||
* ``flavor``: (**Compute**) predefined server configurations: ram, root disk, etc
|
* ``flavor``: (**Compute**) predefined server configurations: ram, root disk, etc
|
||||||
* ``group``: (**Identity**) a grouping of users
|
* ``group``: (**Identity**) a grouping of users
|
||||||
* ``host``: Compute - the physical computer running a hypervisor
|
* ``host``: Compute - the physical computer running a hypervisor
|
||||||
* ``hypervisor``: Compute - the virtual machine manager
|
* ``hypervisor``: (**Compute**) the virtual machine manager
|
||||||
* ``identity provider``: (**Identity**) a source of users and authentication
|
* ``identity provider``: (**Identity**) a source of users and authentication
|
||||||
* ``image``: (**Image**) a disk image
|
* ``image``: (**Image**) a disk image
|
||||||
* ``ip fixed``: Compute, Network - an internal IP address assigned to a server
|
* ``ip fixed``: Compute, Network - an internal IP address assigned to a server
|
||||||
|
@ -33,8 +33,8 @@ class ListHypervisor(lister.Lister):
|
|||||||
parser = super(ListHypervisor, self).get_parser(prog_name)
|
parser = super(ListHypervisor, self).get_parser(prog_name)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--matching",
|
"--matching",
|
||||||
metavar="<hostname-str>",
|
metavar="<hostname>",
|
||||||
help="Filter hypervisors using <hostname-str> substring",
|
help="Filter hypervisors using <hostname> substring",
|
||||||
)
|
)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
@ -58,23 +58,23 @@ class ListHypervisor(lister.Lister):
|
|||||||
|
|
||||||
|
|
||||||
class ShowHypervisor(show.ShowOne):
|
class ShowHypervisor(show.ShowOne):
|
||||||
"""Show hypervisor details"""
|
"""Display hypervisor details"""
|
||||||
|
|
||||||
log = logging.getLogger(__name__ + ".ShowHypervisor")
|
log = logging.getLogger(__name__ + ".ShowHypervisor")
|
||||||
|
|
||||||
def get_parser(self, prog_name):
|
def get_parser(self, prog_name):
|
||||||
parser = super(ShowHypervisor, self).get_parser(prog_name)
|
parser = super(ShowHypervisor, self).get_parser(prog_name)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"id",
|
"hypervisor",
|
||||||
metavar="<id>",
|
metavar="<hypervisor>",
|
||||||
help="ID of the hypervisor to display")
|
help="Hypervisor to display (name or ID)")
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
def take_action(self, parsed_args):
|
def take_action(self, parsed_args):
|
||||||
self.log.debug("take_action(%s)", parsed_args)
|
self.log.debug("take_action(%s)", parsed_args)
|
||||||
compute_client = self.app.client_manager.compute
|
compute_client = self.app.client_manager.compute
|
||||||
hypervisor = utils.find_resource(compute_client.hypervisors,
|
hypervisor = utils.find_resource(compute_client.hypervisors,
|
||||||
parsed_args.id)._info.copy()
|
parsed_args.hypervisor)._info.copy()
|
||||||
|
|
||||||
hypervisor["service_id"] = hypervisor["service"]["id"]
|
hypervisor["service_id"] = hypervisor["service"]["id"]
|
||||||
hypervisor["service_host"] = hypervisor["service"]["host"]
|
hypervisor["service_host"] = hypervisor["service"]["host"]
|
||||||
|
Loading…
Reference in New Issue
Block a user