trivial: Final cleanup

Remove references to the feature from various comments scattered
throughout the code.

Change-Id: Ic353a2489389c557859c249218eaf6060974e1a9
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane 2020-08-31 15:37:40 +01:00
parent b9fdf09a17
commit 1fd44eb56f
10 changed files with 31 additions and 40 deletions
api-ref/source
nova
api/openstack/compute
compute
conf
image
objects
tests/unit
virt
driver.py
libvirt
powervm/disk

@ -179,8 +179,7 @@ Resets networking on a server.
.. note::
Only the XenServer driver implements this feature and only if the guest
has the XenAPI agent in the targeted server.
No longer supported by any in-tree virt driver.
Specify the ``resetNetwork`` action in the request body.

@ -37,7 +37,6 @@ class AgentController(wsgi.Controller):
You can find the design of agent update in this link:
http://wiki.openstack.org/AgentUpdate
and find the code in nova.virt.xenapi.vmops.VMOps._boot_new_instance.
In this design We need update agent in guest from host, so we need
some interfaces to update the agent info in host.

@ -8440,8 +8440,8 @@ class ComputeManager(manager.Manager):
"""
# NOTE(pkoniszewski): block migration specific params are set inside
# migrate_data objects for drivers that expose block live migration
# information (i.e. Libvirt, Xenapi and HyperV). For other drivers
# cleanup is not needed.
# information (i.e. Libvirt, HyperV). For other drivers cleanup is not
# needed.
do_cleanup = False
destroy_disks = False
if isinstance(migrate_data, migrate_data_obj.LibvirtLiveMigrateData):

@ -68,8 +68,7 @@ Possible values:
* String with hostname, FQDN or IP address. Default is hostname of this host.
"""),
# TODO(sfinucan): This option is tied into the XenAPI, VMWare and Libvirt
# drivers.
# TODO(sfinucan): This option is tied into the VMWare and Libvirt drivers.
# We should remove this dependency by either adding a new opt for each
# driver or simply removing the offending code. Until then we cannot
# deprecate this option.
@ -78,10 +77,10 @@ Possible values:
help="""
This option determines whether the network setup information is injected into
the VM before it is booted. While it was originally designed to be used only
by nova-network, it is also used by the vmware and xenapi virt drivers to
control whether network information is injected into a VM. The libvirt virt
driver also uses it when we use config_drive to configure network to control
whether network information is injected into a VM.
by nova-network, it is also used by the vmware virt driver to control whether
network information is injected into a VM. The libvirt virt driver also uses it
when we use config_drive to configure network to control whether network
information is injected into a VM.
"""),
]

@ -597,7 +597,7 @@ class GlanceImageServiceV2(object):
"""
# These preferred disk formats are in order:
# 1. we want qcow2 if possible (at least for backward compat)
# 2. vhd for xenapi and hyperv
# 2. vhd for hyperv
# 3. vmdk for vmware
# 4. raw should be universally accepted
preferred_disk_formats = (
@ -1276,20 +1276,19 @@ class API(object):
Note that because of the poor design of the
`glance.ImageService.download` method, the function returns different
things depending on what arguments are passed to it. If a data argument
is supplied but no dest_path is specified (only done in the XenAPI virt
driver's image.utils module) then None is returned from the method. If
the data argument is not specified but a destination path *is*
specified, then a writeable file handle to the destination path is
constructed in the method and the image bits written to that file, and
again, None is returned from the method. If no data argument is
supplied and no dest_path argument is supplied (VMWare and XenAPI virt
drivers), then the method returns an iterator to the image bits that
the caller uses to write to wherever location it wants. Finally, if the
allow_direct_url_schemes CONF option is set to something, then the
nova.image.download modules are used to attempt to do an SCP copy of
the image bits from a file location to the dest_path and None is
returned after retrying one or more download locations (libvirt and
Hyper-V virt drivers through nova.virt.images.fetch).
is supplied but no dest_path is specified (not currently done by any
caller) then None is returned from the method. If the data argument is
not specified but a destination path *is* specified, then a writeable
file handle to the destination path is constructed in the method and
the image bits written to that file, and again, None is returned from
the method. If no data argument is supplied and no dest_path argument
is supplied (VMWare virt driver), then the method returns an iterator
to the image bits that the caller uses to write to wherever location it
wants. Finally, if the allow_direct_url_schemes CONF option is set to
something, then the nova.image.download modules are used to attempt to
do an SCP copy of the image bits from a file location to the dest_path
and None is returned after retrying one or more download locations
(libvirt and Hyper-V virt drivers through nova.virt.images.fetch).
I think the above points to just how hacky/wacky all of this code is,
and the reason it needs to be cleaned up and standardized across the

@ -382,8 +382,7 @@ class HVType(BaseNovaEnum):
Provide the standard names for all known guest virtualization
types. This is not to be confused with the Nova hypervisor driver
types, since one driver may support multiple virtualization types
and one virtualization type (eg 'xen') may be supported by multiple
drivers ('XenAPI' or 'Libvirt-Xen').
and one virtualization type may be supported by multiple drivers.
"""
BAREMETAL = 'baremetal'

@ -57,11 +57,11 @@ class HackingTestCase(test.NoDBTestCase):
self.assertEqual(expect, checks.import_no_virt_driver_import_deps(
"from nova.virt.libvirt import utils as libvirt_utils",
"./nova/virt/xenapi/driver.py"))
"./nova/virt/hyperv/driver.py"))
self.assertEqual(expect, checks.import_no_virt_driver_import_deps(
"import nova.virt.libvirt.utils as libvirt_utils",
"./nova/virt/xenapi/driver.py"))
"./nova/virt/hyperv/driver.py"))
self.assertIsNone(checks.import_no_virt_driver_import_deps(
"from nova.virt.libvirt import utils as libvirt_utils",
@ -71,7 +71,7 @@ class HackingTestCase(test.NoDBTestCase):
self.assertIsInstance(checks.import_no_virt_driver_config_deps(
"CONF.import_opt('volume_drivers', "
"'nova.virt.libvirt.driver', group='libvirt')",
"./nova/virt/xenapi/driver.py"), tuple)
"./nova/virt/hyperv/driver.py"), tuple)
self.assertIsNone(checks.import_no_virt_driver_config_deps(
"CONF.import_opt('volume_drivers', "

@ -138,8 +138,8 @@ class ComputeDriver(object):
"""Base class for compute drivers.
The interface to this class talks in terms of 'instances' (Amazon EC2 and
internal Nova terminology), by which we mean 'running virtual machine'
(XenAPI terminology) or domain (Xen or libvirt terminology).
internal Nova terminology), by which we mean 'running virtual machine' or
domain (libvirt terminology).
An instance has an ID, which is the identifier chosen by Nova to represent
the instance further up the stack. This is unfortunately also called a
@ -1526,10 +1526,9 @@ class ComputeDriver(object):
All counters are long integers.
This method is optional. On some platforms (e.g. XenAPI) performance
statistics can be retrieved directly in aggregate form, without Nova
having to do the aggregation. On those platforms, this method is
unused.
This method is optional. On some platforms performance statistics can
be retrieved directly in aggregate form, without Nova having to do the
aggregation. On those platforms, this method is unused.
Note that this function takes an instance ID.

@ -2624,7 +2624,6 @@ class LibvirtDriver(driver.ComputeDriver):
elif not CONF.libvirt.virt_type == 'parallels':
raise exception.SetAdminPasswdNotSupported()
# TODO(melwitt): Combine this with the similar xenapi code at some point.
def _save_instance_password_if_sshkey_present(self, instance, new_pass):
sshkey = instance.key_data if 'key_data' in instance else None
if sshkey and sshkey.startswith("ssh-rsa"):

@ -40,8 +40,6 @@ class IterableToFileAdapter(object):
The Glance client returns an iterable, but PowerVM requires a file. This
is the adapter between the two.
Taken from xenapi/image/apis.py
"""
def __init__(self, iterable):