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

View File

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

View File

@ -37,7 +37,6 @@ class AgentController(wsgi.Controller):
You can find the design of agent update in this link: You can find the design of agent update in this link:
http://wiki.openstack.org/AgentUpdate 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 In this design We need update agent in guest from host, so we need
some interfaces to update the agent info in host. some interfaces to update the agent info in host.

View File

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

View File

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

View File

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

View File

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

View File

@ -57,11 +57,11 @@ class HackingTestCase(test.NoDBTestCase):
self.assertEqual(expect, checks.import_no_virt_driver_import_deps( self.assertEqual(expect, checks.import_no_virt_driver_import_deps(
"from nova.virt.libvirt import utils as libvirt_utils", "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( self.assertEqual(expect, checks.import_no_virt_driver_import_deps(
"import nova.virt.libvirt.utils as libvirt_utils", "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( self.assertIsNone(checks.import_no_virt_driver_import_deps(
"from nova.virt.libvirt import utils as libvirt_utils", "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( self.assertIsInstance(checks.import_no_virt_driver_config_deps(
"CONF.import_opt('volume_drivers', " "CONF.import_opt('volume_drivers', "
"'nova.virt.libvirt.driver', group='libvirt')", "'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( self.assertIsNone(checks.import_no_virt_driver_config_deps(
"CONF.import_opt('volume_drivers', " "CONF.import_opt('volume_drivers', "

View File

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

View File

@ -2624,7 +2624,6 @@ class LibvirtDriver(driver.ComputeDriver):
elif not CONF.libvirt.virt_type == 'parallels': elif not CONF.libvirt.virt_type == 'parallels':
raise exception.SetAdminPasswdNotSupported() 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): def _save_instance_password_if_sshkey_present(self, instance, new_pass):
sshkey = instance.key_data if 'key_data' in instance else None sshkey = instance.key_data if 'key_data' in instance else None
if sshkey and sshkey.startswith("ssh-rsa"): if sshkey and sshkey.startswith("ssh-rsa"):

View File

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