Skip to content

Commit 1fd44eb

Browse files
committed
trivial: Final cleanup
Remove references to the feature from various comments scattered throughout the code. Change-Id: Ic353a2489389c557859c249218eaf6060974e1a9 Signed-off-by: Stephen Finucane <[email protected]>
1 parent b9fdf09 commit 1fd44eb

File tree

10 files changed

+31
-40
lines changed

10 files changed

+31
-40
lines changed

api-ref/source/servers-admin-action.inc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,7 @@ Resets networking on a server.
179179

180180
.. note::
181181

182-
Only the XenServer driver implements this feature and only if the guest
183-
has the XenAPI agent in the targeted server.
182+
No longer supported by any in-tree virt driver.
184183

185184
Specify the ``resetNetwork`` action in the request body.
186185

nova/api/openstack/compute/agents.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ class AgentController(wsgi.Controller):
3737
3838
You can find the design of agent update in this link:
3939
http://wiki.openstack.org/AgentUpdate
40-
and find the code in nova.virt.xenapi.vmops.VMOps._boot_new_instance.
4140
In this design We need update agent in guest from host, so we need
4241
some interfaces to update the agent info in host.
4342

nova/compute/manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8440,8 +8440,8 @@ def _live_migration_cleanup_flags(self, migrate_data, migr_ctxt=None):
84408440
"""
84418441
# NOTE(pkoniszewski): block migration specific params are set inside
84428442
# migrate_data objects for drivers that expose block live migration
8443-
# information (i.e. Libvirt, Xenapi and HyperV). For other drivers
8444-
# cleanup is not needed.
8443+
# information (i.e. Libvirt, HyperV). For other drivers cleanup is not
8444+
# needed.
84458445
do_cleanup = False
84468446
destroy_disks = False
84478447
if isinstance(migrate_data, migrate_data_obj.LibvirtLiveMigrateData):

nova/conf/netconf.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@
6868
6969
* String with hostname, FQDN or IP address. Default is hostname of this host.
7070
"""),
71-
# TODO(sfinucan): This option is tied into the XenAPI, VMWare and Libvirt
72-
# drivers.
71+
# TODO(sfinucan): This option is tied into the VMWare and Libvirt drivers.
7372
# We should remove this dependency by either adding a new opt for each
7473
# driver or simply removing the offending code. Until then we cannot
7574
# deprecate this option.
@@ -78,10 +77,10 @@
7877
help="""
7978
This option determines whether the network setup information is injected into
8079
the VM before it is booted. While it was originally designed to be used only
81-
by nova-network, it is also used by the vmware and xenapi virt drivers to
82-
control whether network information is injected into a VM. The libvirt virt
83-
driver also uses it when we use config_drive to configure network to control
84-
whether network information is injected into a VM.
80+
by nova-network, it is also used by the vmware virt driver to control whether
81+
network information is injected into a VM. The libvirt virt driver also uses it
82+
when we use config_drive to configure network to control whether network
83+
information is injected into a VM.
8584
"""),
8685
]
8786

nova/image/glance.py

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ def _get_image_create_disk_format_default(self, context):
597597
"""
598598
# These preferred disk formats are in order:
599599
# 1. we want qcow2 if possible (at least for backward compat)
600-
# 2. vhd for xenapi and hyperv
600+
# 2. vhd for hyperv
601601
# 3. vmdk for vmware
602602
# 4. raw should be universally accepted
603603
preferred_disk_formats = (
@@ -1276,20 +1276,19 @@ def download(self, context, id_or_uri, data=None, dest_path=None,
12761276
Note that because of the poor design of the
12771277
`glance.ImageService.download` method, the function returns different
12781278
things depending on what arguments are passed to it. If a data argument
1279-
is supplied but no dest_path is specified (only done in the XenAPI virt
1280-
driver's image.utils module) then None is returned from the method. If
1281-
the data argument is not specified but a destination path *is*
1282-
specified, then a writeable file handle to the destination path is
1283-
constructed in the method and the image bits written to that file, and
1284-
again, None is returned from the method. If no data argument is
1285-
supplied and no dest_path argument is supplied (VMWare and XenAPI virt
1286-
drivers), then the method returns an iterator to the image bits that
1287-
the caller uses to write to wherever location it wants. Finally, if the
1288-
allow_direct_url_schemes CONF option is set to something, then the
1289-
nova.image.download modules are used to attempt to do an SCP copy of
1290-
the image bits from a file location to the dest_path and None is
1291-
returned after retrying one or more download locations (libvirt and
1292-
Hyper-V virt drivers through nova.virt.images.fetch).
1279+
is supplied but no dest_path is specified (not currently done by any
1280+
caller) then None is returned from the method. If the data argument is
1281+
not specified but a destination path *is* specified, then a writeable
1282+
file handle to the destination path is constructed in the method and
1283+
the image bits written to that file, and again, None is returned from
1284+
the method. If no data argument is supplied and no dest_path argument
1285+
is supplied (VMWare virt driver), then the method returns an iterator
1286+
to the image bits that the caller uses to write to wherever location it
1287+
wants. Finally, if the allow_direct_url_schemes CONF option is set to
1288+
something, then the nova.image.download modules are used to attempt to
1289+
do an SCP copy of the image bits from a file location to the dest_path
1290+
and None is returned after retrying one or more download locations
1291+
(libvirt and Hyper-V virt drivers through nova.virt.images.fetch).
12931292
12941293
I think the above points to just how hacky/wacky all of this code is,
12951294
and the reason it needs to be cleaned up and standardized across the

nova/objects/fields.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,7 @@ class HVType(BaseNovaEnum):
382382
Provide the standard names for all known guest virtualization
383383
types. This is not to be confused with the Nova hypervisor driver
384384
types, since one driver may support multiple virtualization types
385-
and one virtualization type (eg 'xen') may be supported by multiple
386-
drivers ('XenAPI' or 'Libvirt-Xen').
385+
and one virtualization type may be supported by multiple drivers.
387386
"""
388387

389388
BAREMETAL = 'baremetal'

nova/tests/unit/test_hacking.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ def test_virt_driver_imports(self):
5757

5858
self.assertEqual(expect, checks.import_no_virt_driver_import_deps(
5959
"from nova.virt.libvirt import utils as libvirt_utils",
60-
"./nova/virt/xenapi/driver.py"))
60+
"./nova/virt/hyperv/driver.py"))
6161

6262
self.assertEqual(expect, checks.import_no_virt_driver_import_deps(
6363
"import nova.virt.libvirt.utils as libvirt_utils",
64-
"./nova/virt/xenapi/driver.py"))
64+
"./nova/virt/hyperv/driver.py"))
6565

6666
self.assertIsNone(checks.import_no_virt_driver_import_deps(
6767
"from nova.virt.libvirt import utils as libvirt_utils",
@@ -71,7 +71,7 @@ def test_virt_driver_config_vars(self):
7171
self.assertIsInstance(checks.import_no_virt_driver_config_deps(
7272
"CONF.import_opt('volume_drivers', "
7373
"'nova.virt.libvirt.driver', group='libvirt')",
74-
"./nova/virt/xenapi/driver.py"), tuple)
74+
"./nova/virt/hyperv/driver.py"), tuple)
7575

7676
self.assertIsNone(checks.import_no_virt_driver_config_deps(
7777
"CONF.import_opt('volume_drivers', "

nova/virt/driver.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ class ComputeDriver(object):
138138
"""Base class for compute drivers.
139139
140140
The interface to this class talks in terms of 'instances' (Amazon EC2 and
141-
internal Nova terminology), by which we mean 'running virtual machine'
142-
(XenAPI terminology) or domain (Xen or libvirt terminology).
141+
internal Nova terminology), by which we mean 'running virtual machine' or
142+
domain (libvirt terminology).
143143
144144
An instance has an ID, which is the identifier chosen by Nova to represent
145145
the instance further up the stack. This is unfortunately also called a
@@ -1526,10 +1526,9 @@ def block_stats(self, instance, disk_id):
15261526
15271527
All counters are long integers.
15281528
1529-
This method is optional. On some platforms (e.g. XenAPI) performance
1530-
statistics can be retrieved directly in aggregate form, without Nova
1531-
having to do the aggregation. On those platforms, this method is
1532-
unused.
1529+
This method is optional. On some platforms performance statistics can
1530+
be retrieved directly in aggregate form, without Nova having to do the
1531+
aggregation. On those platforms, this method is unused.
15331532
15341533
Note that this function takes an instance ID.
15351534

nova/virt/libvirt/driver.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2624,7 +2624,6 @@ def _can_set_admin_password(self, image_meta):
26242624
elif not CONF.libvirt.virt_type == 'parallels':
26252625
raise exception.SetAdminPasswdNotSupported()
26262626

2627-
# TODO(melwitt): Combine this with the similar xenapi code at some point.
26282627
def _save_instance_password_if_sshkey_present(self, instance, new_pass):
26292628
sshkey = instance.key_data if 'key_data' in instance else None
26302629
if sshkey and sshkey.startswith("ssh-rsa"):

nova/virt/powervm/disk/driver.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ class IterableToFileAdapter(object):
4040
4141
The Glance client returns an iterable, but PowerVM requires a file. This
4242
is the adapter between the two.
43-
44-
Taken from xenapi/image/apis.py
4543
"""
4644

4745
def __init__(self, iterable):

0 commit comments

Comments
 (0)