summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Finucane <stephenfin@redhat.com>2020-08-31 15:37:40 +0100
committerStephen Finucane <stephenfin@redhat.com>2020-09-11 14:09:06 +0100
commit1fd44eb56f2f1ea392d7ec89904fe80f6992fe68 (patch)
tree0bc675179c4ca80935184b0dedc775bc3387217d
parentb9fdf09a179f42e857efebc316459ec42fdc9760 (diff)
downloadnova-1fd44eb56f2f1ea392d7ec89904fe80f6992fe68.tar.gz
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>
-rw-r--r--api-ref/source/servers-admin-action.inc3
-rw-r--r--nova/api/openstack/compute/agents.py1
-rw-r--r--nova/compute/manager.py4
-rw-r--r--nova/conf/netconf.py11
-rw-r--r--nova/image/glance.py29
-rw-r--r--nova/objects/fields.py3
-rw-r--r--nova/tests/unit/test_hacking.py6
-rw-r--r--nova/virt/driver.py11
-rw-r--r--nova/virt/libvirt/driver.py1
-rw-r--r--nova/virt/powervm/disk/driver.py2
10 files changed, 31 insertions, 40 deletions
diff --git a/api-ref/source/servers-admin-action.inc b/api-ref/source/servers-admin-action.inc
index 2c99eab68e..bc3f898caa 100644
--- a/api-ref/source/servers-admin-action.inc
+++ b/api-ref/source/servers-admin-action.inc
@@ -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.
diff --git a/nova/api/openstack/compute/agents.py b/nova/api/openstack/compute/agents.py
index 86480b7250..3edc63eb31 100644
--- a/nova/api/openstack/compute/agents.py
+++ b/nova/api/openstack/compute/agents.py
@@ -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.
diff --git a/nova/compute/manager.py b/nova/compute/manager.py
index f9ff9d53d0..60d7c92b30 100644
--- a/nova/compute/manager.py
+++ b/nova/compute/manager.py
@@ -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):
diff --git a/nova/conf/netconf.py b/nova/conf/netconf.py
index 5fe0f909d7..69713bb741 100644
--- a/nova/conf/netconf.py
+++ b/nova/conf/netconf.py
@@ -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.
"""),
]
diff --git a/nova/image/glance.py b/nova/image/glance.py
index 5e72679a2a..11398abc00 100644
--- a/nova/image/glance.py
+++ b/nova/image/glance.py
@@ -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
diff --git a/nova/objects/fields.py b/nova/objects/fields.py
index 0a7881deff..f2f6d988b5 100644
--- a/nova/objects/fields.py
+++ b/nova/objects/fields.py
@@ -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'
diff --git a/nova/tests/unit/test_hacking.py b/nova/tests/unit/test_hacking.py
index c7e52ac12c..9222daa451 100644
--- a/nova/tests/unit/test_hacking.py
+++ b/nova/tests/unit/test_hacking.py
@@ -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', "
diff --git a/nova/virt/driver.py b/nova/virt/driver.py
index 118dc0f8e1..86db4b8bd0 100644
--- a/nova/virt/driver.py
+++ b/nova/virt/driver.py
@@ -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.
diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py
index 7097491301..fa22e55c83 100644
--- a/nova/virt/libvirt/driver.py
+++ b/nova/virt/libvirt/driver.py
@@ -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"):
diff --git a/nova/virt/powervm/disk/driver.py b/nova/virt/powervm/disk/driver.py
index 9e53eff89d..2ba083736e 100644
--- a/nova/virt/powervm/disk/driver.py
+++ b/nova/virt/powervm/disk/driver.py
@@ -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):