hypervisor support matrix: add CLI commands to features

Some features could be made clearer if the CLI commands which are
related to that feature are listed. This patch set allows to set
CLI commands per feature.
This is an interim solution until the new feature classification
system is established.

Change-Id: If599627187080a8349811f50f6561e9efbc35138
This commit is contained in:
Markus Zoeller 2015-06-25 10:53:36 +02:00 committed by Markus Zoeller (markus_z)
parent 01b3bc3a60
commit 6a6059a9a6
3 changed files with 78 additions and 4 deletions

View File

@ -58,7 +58,7 @@ class SupportMatrixFeature(object):
STATUS_CONDITION, STATUS_OPTIONAL]
def __init__(self, key, title, status=STATUS_OPTIONAL,
group=None, notes=None):
group=None, notes=None, cli=[]):
# A unique key (eg 'foo.bar.wizz') to identify the feature
self.key = key
# A human friendly short title for the feature
@ -74,6 +74,8 @@ class SupportMatrixFeature(object):
# 'name' dict key is the value from SupportMatrixTarget.key
# for the hypervisor in question
self.implementations = {}
# A list of CLI commands which are related to that feature
self.cli = cli
class SupportMatrixImplementation(object):
@ -208,11 +210,15 @@ class SupportMatrixDirective(rst.Directive):
notes = None
if cfg.has_option(section, "notes"):
notes = cfg.get(section, "notes")
cli = []
if cfg.has_option(section, "cli"):
cli = cfg.get(section, "cli")
feature = SupportMatrixFeature(section,
title,
status,
group,
notes)
notes,
cli)
# Now we've got the basic feature details, we must process
# the hypervisor driver implementation for each feature
@ -401,6 +407,11 @@ class SupportMatrixDirective(rst.Directive):
para.append(nodes.inline(text=feature.notes))
item.append(para)
if feature.cli:
item.append(self._create_cli_paragraph(feature))
para_divers = nodes.paragraph()
para_divers.append(nodes.strong(text="drivers:"))
# A sub-list giving details of each hypervisor target
impls = nodes.bullet_list()
for key in feature.implementations:
@ -420,9 +431,25 @@ class SupportMatrixDirective(rst.Directive):
subitem.append(self._create_notes_paragraph(impl.notes))
impls.append(subitem)
item.append(impls)
para_divers.append(impls)
item.append(para_divers)
details.append(item)
def _create_cli_paragraph(self, feature):
''' Create a paragraph which represents the CLI commands of the feature
The paragraph will have a bullet list of CLI commands.
'''
para = nodes.paragraph()
para.append(nodes.strong(text="CLI commands:"))
commands = nodes.bullet_list()
for c in feature.cli.split(";"):
cli_command = nodes.list_item()
cli_command += nodes.literal(text=c, classes=["sp_cli"])
commands.append(cli_command)
para.append(commands)
return para
def _create_notes_paragraph(self, notes):
""" Constructs a paragraph which represents the implementation notes

View File

@ -39,4 +39,9 @@
.sp_impl_summary {
font-size: 2em;
}
.sp_cli {
font-family: monospace;
background-color: #F5F5F5;
}

View File

@ -60,7 +60,11 @@
# 'driver-notes-XXX' entry should be used to explain the caveats
# around the implementation.
#
# The 'cli' field takes a list of nova client commands, separated by semicolon.
# These CLi commands are related to that feature.
# Example:
# cli=nova list;nova show <server>
#
[targets]
# List of driver impls we are going to record info for later
# This list only covers drivers that are in the Nova source
@ -91,6 +95,7 @@ notes=The attach volume operation provides a means to hotplug
hotplug extra storage is for those cases where the instance
is considered to be more of a pet than cattle. Therefore
this operation is not considered to be mandatory to support.
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=complete
@ -108,6 +113,7 @@ driver-impl-libvirt-parallels-ct=missing
title=Detach block volume from instance
status=optional
notes=See notes for attach volume operation.
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=complete
@ -132,6 +138,7 @@ notes=This operation allows a host to be placed into maintenance
The CLI command is "nova host-update <host>".
The driver methods to implement are "host_maintenance_mode" and
"set_host_enabled".
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=missing
driver-impl-libvirt-kvm-ppc64=missing
@ -154,6 +161,7 @@ notes=Provides a quick report on information about the guest instance,
informational, the power state is used by the compute manager for
tracking changes in guests. Therefore this operation is considered
mandatory to support.
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=complete
@ -171,6 +179,7 @@ driver-impl-libvirt-parallels-ct=complete
title=Guest host status
status=optional
notes=Unclear what this refers to
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=complete
@ -198,6 +207,7 @@ notes=Live migration provides a way to move an instance off one
support for the live migration operation, particularly those
built on the container based virtualization. Therefore this
operation is not considered mandatory to support.
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=complete
@ -218,6 +228,7 @@ status=mandatory
notes=Importing pre-existing running virtual machines on a host is
considered out of scope of the cloud paradigm. Therefore this
operation is mandatory to support in drivers.
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=complete
@ -243,6 +254,7 @@ notes=Stopping an instances CPUs can be thought of as roughly
generally discourage use of this feature and some do not even
implement it. Therefore this operation is considered optional
to support in drivers.
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=complete
@ -264,6 +276,7 @@ notes=It is reasonable for a guest OS administrator to trigger a
graceful reboot requires guest co-operation and a non-graceful
reboot can be achieved by a combination of stop+start. Therefore
this operation is considered optional.
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=complete
@ -288,6 +301,7 @@ notes=The rescue operation starts an instance in a special
an instance breaks the general expectation is that it be
thrown away and a new instance created. Therefore this
operation is considered optional to support in drivers.
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=complete
@ -312,6 +326,7 @@ notes=The resize operation allows the user to change a running
support the alteration of all relevant config settings for a
running instance. Therefore this operation is considered
optional to support in drivers.
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=complete
@ -330,6 +345,7 @@ driver-impl-libvirt-parallels-ct=missing
title=Restore instance
status=optional
notes=See notes for the suspend operation
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=complete
@ -350,6 +366,7 @@ notes=Something something, dark side, something something.
Hard to claim this is mandatory when no one seems to know
what "Service control" refers to in the context of virt
drivers.
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=complete
@ -377,6 +394,7 @@ notes=Provides a mechanism to re(set) the password of the administrator
login to the guest and change the password in the normal manner, so
this is just a convenient optimization. Therefore this operation is
not considered mandatory for drivers to support.
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=missing
driver-impl-libvirt-kvm-ppc64=missing
@ -403,6 +421,7 @@ notes=The snapshot operation allows the current state of the
that the root disks are ephemeral so the ability to take a
snapshot cannot be assumed. Therefore this operation is not
considered mandatory to support.
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=complete
@ -434,6 +453,7 @@ notes=Suspending an instance can be thought of as roughly
since with cattle it would be simpler to just terminate
the instance instead of suspending. Therefore this operation
is considered optional to support.
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=complete
@ -457,6 +477,7 @@ notes=The swap volume operation is a mechanism for changing running
new storage. In other words this operation is primarily targeted towards
the pet use case rather than cattle. Therefore this is considered
optional to support.
cli=
driver-impl-xenserver=missing
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=complete
@ -477,6 +498,7 @@ notes=The ability to terminate a virtual machine is required in
order for a cloud user to stop utilizing resources and thus
avoid indefinitely ongoing billing. Therefore this operation
is mandatory to support in drivers.
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=complete
@ -494,6 +516,7 @@ driver-impl-libvirt-parallels-ct=complete
title=Resume instance CPUs
status=optional
notes=See notes for the "Stop instance CPUs" operation
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=complete
@ -512,6 +535,7 @@ title=Auto configure disk
status=optional
notes=something something, dark side, something something.
Unclear just what this is about.
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=missing
driver-impl-libvirt-kvm-ppc64=missing
@ -534,6 +558,7 @@ notes=The ability to set rate limits on virtual disks allows for
operations to the hypervisor with its default settings, instead
of doing fine grained tuning. Therefore this is not considered
to be an mandatory configuration to support.
cli=
driver-impl-xenserver=missing
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=complete
@ -559,6 +584,7 @@ notes=The config drive provides an information channel into
include the metadata service and disk injection. At least one
of the guest setup mechanisms is required to be supported by
drivers, in order to enable login access.
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=missing
@ -584,6 +610,7 @@ notes=This allows for the end user to provide data for multiple
files to a guest OS is better solved by obtaining via the metadata
service or config drive. Therefore this operation is considered
optional to support.
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=missing
@ -610,6 +637,7 @@ notes=This allows for static networking configuration (IP
or by obtaining static config via the metadata service or
config drive. Therefore this operation is considered optional
to support.
cli=
driver-impl-xenserver=partial
driver-notes-xenserver=Only for Debian derived guests
driver-impl-libvirt-kvm-x86=partial
@ -638,6 +666,7 @@ notes=This allows the administrator to interact with the graphical
easier consumption. Therefore support for this operation is not
mandatory, however, a driver is required to support at least one
of the listed console access operations.
cli=
driver-impl-xenserver=missing
driver-impl-libvirt-kvm-x86=missing
driver-impl-libvirt-kvm-ppc64=missing
@ -663,6 +692,7 @@ notes=This allows the administrator to query the logs of data
only support graphical consoles. Therefore support for this
operation is not mandatory, however, a driver is required to
support at least one of the listed console access operations.
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=missing
@ -687,6 +717,7 @@ notes=This allows the administrator to interact with the graphical
easier consumption. Therefore support for this operation is not
mandatory, however, a driver is required to support at least one
of the listed console access operations.
cli=
driver-impl-xenserver=missing
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=missing
@ -711,6 +742,7 @@ notes=This allows the administrator to interact with the graphical
easier consumption. Therefore support for this operation is not
mandatory, however, a driver is required to support at least one
of the listed console access operations.
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=missing
@ -737,6 +769,7 @@ notes=Block storage provides instances with direct attached
processing systems reading requests & sending results to and from
the network. Therefore support for this configuration is not
considered mandatory for drivers to support.
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=complete
@ -757,6 +790,7 @@ notes=To maximise performance of the block storage, it may be desirable
to directly access fibre channel LUNs from the underlying storage
technology on the compute hosts. Since this is just a performance
optimization of the I/O path it is not considered mandatory to support.
cli=
driver-impl-xenserver=missing
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=missing
@ -780,6 +814,7 @@ notes=If the driver wishes to support block storage, it is common to
to the longer I/O path involved. If the driver chooses to support
block storage, then this is considered mandatory to support, otherwise
it is considered optional.
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=complete
@ -800,6 +835,7 @@ notes=If accessing the cinder iSCSI service over an untrusted LAN it
is desirable to be able to enable authentication for the iSCSI
protocol. CHAP is the commonly used authentication protocol for
iSCSI. This is not considered mandatory to support. (?)
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=complete
@ -822,6 +858,7 @@ notes=This refers to the ability to boot an instance from an image
there would be no way to get block volumes populated and reliance
on external PXE servers is out of scope. Therefore this is considered
a mandatory storage feature to support.
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=complete
@ -839,6 +876,7 @@ driver-impl-libvirt-parallels-ct=complete
title=Network firewall rules
status=optional
notes=Unclear how this is different from security groups
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=complete
@ -856,6 +894,7 @@ driver-impl-libvirt-parallels-ct=complete
title=Network routing
status=optional
notes=Unclear what this refers to
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=missing
@ -879,6 +918,7 @@ notes=The security groups feature provides a way to define rules
In a private cloud environment this may be considered to be a
superfluous requirement. Thereforce this is considered to be
an optional configuration to support.
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=complete
@ -900,6 +940,7 @@ notes=Provide network conenctivity to guests using a
flat topology across all compute nodes. At least one
of the networking configurations is mandatory to
support in the drivers.
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=complete
@ -919,6 +960,7 @@ status=choice(networking.topology)
notes=Provide network connectivity to guests using VLANs
to define the topology. At least one of the networking
configurations is mandatory to support in the drivers.
cli=
driver-impl-xenserver=complete
driver-impl-libvirt-kvm-x86=complete
driver-impl-libvirt-kvm-ppc64=complete