mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
Fix a spelling error
This commit is contained in:
parent
eec74f1346
commit
80e6389b75
@ -1545,7 +1545,7 @@ class vmmDetails(vmmGObjectUI):
|
|||||||
if self.ignorePause:
|
if self.ignorePause:
|
||||||
return
|
return
|
||||||
|
|
||||||
# Let state handler listener change things if necc.
|
# Let state handler listener change things if nec.
|
||||||
self.set_pause_state(not src.get_active())
|
self.set_pause_state(not src.get_active())
|
||||||
|
|
||||||
if not self.vm.is_paused():
|
if not self.vm.is_paused():
|
||||||
|
@ -379,18 +379,18 @@ class vmmDomain(vmmLibvirtObject):
|
|||||||
xml = guest.get_xml_config(install=False)
|
xml = guest.get_xml_config(install=False)
|
||||||
self._redefine_xml(xml)
|
self._redefine_xml(xml)
|
||||||
|
|
||||||
def _get_domain_xml(self, inactive=False, refresh_if_necc=True):
|
def _get_domain_xml(self, inactive=False, refresh_if_nec=True):
|
||||||
return vmmLibvirtObject.get_xml(self,
|
return vmmLibvirtObject.get_xml(self,
|
||||||
inactive=inactive,
|
inactive=inactive,
|
||||||
refresh_if_necc=refresh_if_necc)
|
refresh_if_nec=refresh_if_nec)
|
||||||
|
|
||||||
def get_xml(self, inactive=False, refresh_if_necc=True):
|
def get_xml(self, inactive=False, refresh_if_nec=True):
|
||||||
guest = self._get_guest(inactive=inactive,
|
guest = self._get_guest(inactive=inactive,
|
||||||
refresh_if_necc=refresh_if_necc)
|
refresh_if_nec=refresh_if_nec)
|
||||||
return guest.get_xml_config(install=False)
|
return guest.get_xml_config(install=False)
|
||||||
|
|
||||||
def _get_guest(self, inactive=False, refresh_if_necc=True):
|
def _get_guest(self, inactive=False, refresh_if_nec=True):
|
||||||
xml = self._get_domain_xml(inactive, refresh_if_necc)
|
xml = self._get_domain_xml(inactive, refresh_if_nec)
|
||||||
|
|
||||||
if inactive:
|
if inactive:
|
||||||
# If inactive XML requested, always return a fresh guest even
|
# If inactive XML requested, always return a fresh guest even
|
||||||
@ -1053,8 +1053,8 @@ class vmmDomain(vmmLibvirtObject):
|
|||||||
return devlist
|
return devlist
|
||||||
|
|
||||||
def _build_device_list(self, device_type,
|
def _build_device_list(self, device_type,
|
||||||
refresh_if_necc=True, inactive=False):
|
refresh_if_nec=True, inactive=False):
|
||||||
guest = self._get_guest(refresh_if_necc=refresh_if_necc,
|
guest = self._get_guest(refresh_if_nec=refresh_if_nec,
|
||||||
inactive=inactive)
|
inactive=inactive)
|
||||||
devs = guest.get_devices(device_type)
|
devs = guest.get_devices(device_type)
|
||||||
|
|
||||||
@ -1065,8 +1065,8 @@ class vmmDomain(vmmLibvirtObject):
|
|||||||
|
|
||||||
return devs
|
return devs
|
||||||
|
|
||||||
def get_network_devices(self, refresh_if_necc=True):
|
def get_network_devices(self, refresh_if_nec=True):
|
||||||
return self._build_device_list("interface", refresh_if_necc)
|
return self._build_device_list("interface", refresh_if_nec)
|
||||||
def get_video_devices(self):
|
def get_video_devices(self):
|
||||||
return self._build_device_list("video")
|
return self._build_device_list("video")
|
||||||
def get_hostdev_devices(self):
|
def get_hostdev_devices(self):
|
||||||
@ -1090,8 +1090,8 @@ class vmmDomain(vmmLibvirtObject):
|
|||||||
def get_tpm_devices(self):
|
def get_tpm_devices(self):
|
||||||
return self._build_device_list("tpm")
|
return self._build_device_list("tpm")
|
||||||
|
|
||||||
def get_disk_devices(self, refresh_if_necc=True, inactive=False):
|
def get_disk_devices(self, refresh_if_nec=True, inactive=False):
|
||||||
devs = self._build_device_list("disk", refresh_if_necc, inactive)
|
devs = self._build_device_list("disk", refresh_if_nec, inactive)
|
||||||
|
|
||||||
# Iterate through all disks and calculate what number they are
|
# Iterate through all disks and calculate what number they are
|
||||||
# HACK: We are making a variable in VirtualDisk to store the index
|
# HACK: We are making a variable in VirtualDisk to store the index
|
||||||
@ -1648,7 +1648,7 @@ class vmmDomain(vmmLibvirtObject):
|
|||||||
not self.is_active()):
|
not self.is_active()):
|
||||||
return rx, tx
|
return rx, tx
|
||||||
|
|
||||||
for netdev in self.get_network_devices(refresh_if_necc=False):
|
for netdev in self.get_network_devices(refresh_if_nec=False):
|
||||||
dev = netdev.target_dev
|
dev = netdev.target_dev
|
||||||
if not dev:
|
if not dev:
|
||||||
continue
|
continue
|
||||||
@ -1685,7 +1685,7 @@ class vmmDomain(vmmLibvirtObject):
|
|||||||
not self.is_active()):
|
not self.is_active()):
|
||||||
return rd, wr
|
return rd, wr
|
||||||
|
|
||||||
for disk in self.get_disk_devices(refresh_if_necc=False):
|
for disk in self.get_disk_devices(refresh_if_nec=False):
|
||||||
dev = disk.target
|
dev = disk.target
|
||||||
if not dev:
|
if not dev:
|
||||||
continue
|
continue
|
||||||
@ -1792,9 +1792,9 @@ class vmmDomainVirtinst(vmmDomain):
|
|||||||
def _XMLDesc(self, flags):
|
def _XMLDesc(self, flags):
|
||||||
raise RuntimeError("Shouldn't be called")
|
raise RuntimeError("Shouldn't be called")
|
||||||
|
|
||||||
def get_xml(self, inactive=False, refresh_if_necc=True):
|
def get_xml(self, inactive=False, refresh_if_nec=True):
|
||||||
ignore = inactive
|
ignore = inactive
|
||||||
ignore = refresh_if_necc
|
ignore = refresh_if_nec
|
||||||
|
|
||||||
xml = self._backend.get_xml_config(install=False)
|
xml = self._backend.get_xml_config(install=False)
|
||||||
if not self._orig_xml:
|
if not self._orig_xml:
|
||||||
@ -1802,7 +1802,7 @@ class vmmDomainVirtinst(vmmDomain):
|
|||||||
return xml
|
return xml
|
||||||
|
|
||||||
# Internal XML implementations
|
# Internal XML implementations
|
||||||
def _get_guest(self, inactive=False, refresh_if_necc=True):
|
def _get_guest(self, inactive=False, refresh_if_nec=True):
|
||||||
# Make sure XML is up2date
|
# Make sure XML is up2date
|
||||||
self.get_xml()
|
self.get_xml()
|
||||||
return self._backend
|
return self._backend
|
||||||
|
@ -84,14 +84,14 @@ class vmmLibvirtObject(vmmGObject):
|
|||||||
# Public XML API #
|
# Public XML API #
|
||||||
##################
|
##################
|
||||||
|
|
||||||
def get_xml(self, inactive=False, refresh_if_necc=True):
|
def get_xml(self, inactive=False, refresh_if_nec=True):
|
||||||
"""
|
"""
|
||||||
Get domain xml. If cached xml is invalid, update.
|
Get domain xml. If cached xml is invalid, update.
|
||||||
|
|
||||||
@param inactive: Return persistent XML, not the running config.
|
@param inactive: Return persistent XML, not the running config.
|
||||||
No effect if domain is not running. Use this flag
|
No effect if domain is not running. Use this flag
|
||||||
if the XML will be used for redefining a guest
|
if the XML will be used for redefining a guest
|
||||||
@param refresh_if_necc: Check if XML is out of date, and if so,
|
@param refresh_if_nec: Check if XML is out of date, and if so,
|
||||||
refresh it (default behavior). Skipping a refresh is
|
refresh it (default behavior). Skipping a refresh is
|
||||||
useful to prevent updating xml in the tick loop when
|
useful to prevent updating xml in the tick loop when
|
||||||
it's not that important (disk/net stats)
|
it's not that important (disk/net stats)
|
||||||
@ -101,7 +101,7 @@ class vmmLibvirtObject(vmmGObject):
|
|||||||
|
|
||||||
if self._xml is None:
|
if self._xml is None:
|
||||||
self.refresh_xml()
|
self.refresh_xml()
|
||||||
elif refresh_if_necc and not self._is_xml_valid:
|
elif refresh_if_nec and not self._is_xml_valid:
|
||||||
self.refresh_xml()
|
self.refresh_xml()
|
||||||
|
|
||||||
return self._xml
|
return self._xml
|
||||||
|
@ -613,7 +613,7 @@ def populate_network_list(net_list, conn, show_direct_interfaces=True):
|
|||||||
|
|
||||||
vnet_taps = []
|
vnet_taps = []
|
||||||
for vm in conn.vms.values():
|
for vm in conn.vms.values():
|
||||||
for nic in vm.get_network_devices(refresh_if_necc=False):
|
for nic in vm.get_network_devices(refresh_if_nec=False):
|
||||||
if nic.target_dev and nic.target_dev not in vnet_taps:
|
if nic.target_dev and nic.target_dev not in vnet_taps:
|
||||||
vnet_taps.append(nic.target_dev)
|
vnet_taps.append(nic.target_dev)
|
||||||
|
|
||||||
|
@ -558,7 +558,7 @@ class Capabilities(object):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
# Xen caps have always shown this info, so if we didn't find any
|
# Xen caps have always shown this info, so if we didn't find any
|
||||||
# features, the host really doesn't have the necc support
|
# features, the host really doesn't have the nec support
|
||||||
if self._is_xen():
|
if self._is_xen():
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -386,7 +386,7 @@ class Distro:
|
|||||||
def _kernelFetchHelper(self, fetcher, guest, progresscb, kernelpath,
|
def _kernelFetchHelper(self, fetcher, guest, progresscb, kernelpath,
|
||||||
initrdpath):
|
initrdpath):
|
||||||
# Simple helper for fetching kernel + initrd and performing
|
# Simple helper for fetching kernel + initrd and performing
|
||||||
# cleanup if neccessary
|
# cleanup if necessary
|
||||||
kernel = fetcher.acquireFile(kernelpath, progresscb)
|
kernel = fetcher.acquireFile(kernelpath, progresscb)
|
||||||
args = ''
|
args = ''
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ class VirtualDevice(XMLBuilderDomain):
|
|||||||
Perform potentially hazardous device initialization, like
|
Perform potentially hazardous device initialization, like
|
||||||
storage creation or host device reset
|
storage creation or host device reset
|
||||||
|
|
||||||
@param conn: Optional connection to use if neccessary. If not
|
@param conn: Optional connection to use if necessary. If not
|
||||||
specified, device's 'conn' will be used
|
specified, device's 'conn' will be used
|
||||||
@param meter: Optional progress meter to use
|
@param meter: Optional progress meter to use
|
||||||
"""
|
"""
|
||||||
|
@ -285,7 +285,7 @@ class VirtualDisk(VirtualDevice):
|
|||||||
will be set to the returned virStorageVol. For the last case, 'volInstall'
|
will be set to the returned virStorageVol. For the last case, 'volInstall'
|
||||||
will be populated for a StorageVolume instance. All the above cases also
|
will be populated for a StorageVolume instance. All the above cases also
|
||||||
work on a local connection as well, the only difference being that
|
work on a local connection as well, the only difference being that
|
||||||
option 3 won't neccessarily error out if the volume isn't found.
|
option 3 won't necessarily error out if the volume isn't found.
|
||||||
|
|
||||||
__init__ and setting all properties performs lots of validation,
|
__init__ and setting all properties performs lots of validation,
|
||||||
and will throw ValueError's if problems are found.
|
and will throw ValueError's if problems are found.
|
||||||
|
@ -647,7 +647,7 @@ def disk_prompt(conn, origpath, origsize, origsparse,
|
|||||||
|
|
||||||
def prompt_path(chkpath, chksize):
|
def prompt_path(chkpath, chksize):
|
||||||
"""
|
"""
|
||||||
Prompt for disk path if necc
|
Prompt for disk path if nec
|
||||||
"""
|
"""
|
||||||
msg = None
|
msg = None
|
||||||
patherr = _("A disk path must be specified.")
|
patherr = _("A disk path must be specified.")
|
||||||
@ -670,7 +670,7 @@ def disk_prompt(conn, origpath, origsize, origsparse,
|
|||||||
|
|
||||||
def prompt_size(chkpath, chksize, path_exists):
|
def prompt_size(chkpath, chksize, path_exists):
|
||||||
"""
|
"""
|
||||||
Prompt for disk size if necc.
|
Prompt for disk size if nec.
|
||||||
"""
|
"""
|
||||||
sizeerr = _("A size must be specified for non-existent disks.")
|
sizeerr = _("A size must be specified for non-existent disks.")
|
||||||
size_prompt = _("How large would you like the disk (%s) to "
|
size_prompt = _("How large would you like the disk (%s) to "
|
||||||
|
Loading…
Reference in New Issue
Block a user