Rename "Domain" to "VM" in various class names

The name "Domain", though technically correct from a Libvirt
perspective, was unnecessarily confusing. Call the class instances what
they are, VMs.
This commit is contained in:
Joshua Boniface 2019-07-07 15:20:37 -04:00
parent 4a93945b58
commit 0d398f663b
3 changed files with 8 additions and 8 deletions

View File

@ -49,7 +49,7 @@ import pvcd.zkhandler as zkhandler
import pvcd.fencing as fencing
import pvcd.common as common
import pvcd.DomainInstance as DomainInstance
import pvcd.VMInstance as VMInstance
import pvcd.NodeInstance as NodeInstance
import pvcd.VXNetworkInstance as VXNetworkInstance
import pvcd.DNSAggregatorInstance as DNSAggregatorInstance
@ -779,7 +779,7 @@ if enable_hypervisor:
# Add any missing domains to the list
for domain in new_domain_list:
if not domain in domain_list:
d_domain[domain] = DomainInstance.DomainInstance(domain, zk_conn, config, logger, this_node)
d_domain[domain] = VMInstance.VMInstance(domain, zk_conn, config, logger, this_node)
# Remove any deleted domains from the list
for domain in domain_list:

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python3
# DomainConsoleWatcherInstance.py - Class implementing a console log watcher for PVC domains
# VMConsoleWatcherInstance.py - Class implementing a console log watcher for PVC domains
# Part of the Parallel Virtual Cluster (PVC) system
#
# Copyright (C) 2018 Joshua M. Boniface <joshua@boniface.me>
@ -35,7 +35,7 @@ import signal
import pvcd.log as log
import pvcd.zkhandler as zkhandler
class DomainConsoleWatcherInstance(object):
class VMConsoleWatcherInstance(object):
# Initialization function
def __init__(self, domuuid, domname, zk_conn, config, logger, this_node):
self.domuuid = domuuid

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python3
# DomainInstance.py - Class implementing a PVC virtual machine in pvcd
# VMInstance.py - Class implementing a PVC virtual machine in pvcd
# Part of the Parallel Virtual Cluster (PVC) system
#
# Copyright (C) 2018 Joshua M. Boniface <joshua@boniface.me>
@ -32,9 +32,9 @@ import kazoo.client
import pvcd.log as log
import pvcd.zkhandler as zkhandler
import pvcd.DomainConsoleWatcherInstance as DomainConsoleWatcherInstance
import pvcd.VMConsoleWatcherInstance as VMConsoleWatcherInstance
class DomainInstance(object):
class VMInstance(object):
# Initialization function
def __init__(self, domuuid, zk_conn, config, logger, this_node):
# Passed-in variables on creation
@ -61,7 +61,7 @@ class DomainInstance(object):
self.dom = self.lookupByUUID(self.domuuid)
# Log watcher instance
self.console_log_instance = DomainConsoleWatcherInstance.DomainConsoleWatcherInstance(self.domuuid, self.domname, self.zk_conn, self.config, self.logger, self.this_node)
self.console_log_instance = VMConsoleWatcherInstance.VMConsoleWatcherInstance(self.domuuid, self.domname, self.zk_conn, self.config, self.logger, self.this_node)
# Watch for changes to the state field in Zookeeper
@self.zk_conn.DataWatch('/domains/{}/state'.format(self.domuuid))