本文整理汇总了Python中ovs.dal.hybrids.vmachine.VMachine.name方法的典型用法代码示例。如果您正苦于以下问题:Python VMachine.name方法的具体用法?Python VMachine.name怎么用?Python VMachine.name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ovs.dal.hybrids.vmachine.VMachine
的用法示例。
在下文中一共展示了VMachine.name方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: clone
# 需要导入模块: from ovs.dal.hybrids.vmachine import VMachine [as 别名]
# 或者: from ovs.dal.hybrids.vmachine.VMachine import name [as 别名]
def clone(machineguid, timestamp, name):
"""
Clone a vmachine using the disk snapshot based on a snapshot timestamp
@param machineguid: guid of the machine to clone
@param timestamp: timestamp of the disk snapshots to use for the clone
@param name: name for the new machine
"""
machine = VMachine(machineguid)
disks = {}
for snapshot in machine.snapshots:
if snapshot['timestamp'] == timestamp:
for diskguid, snapshotguid in snapshot['snapshots'].iteritems():
disks[diskguid] = snapshotguid
new_machine = VMachine()
new_machine.copy(machine)
new_machine.name = name
new_machine.pmachine = machine.pmachine
new_machine.save()
new_disk_guids = []
disks_by_order = sorted(machine.vdisks, key=lambda x: x.order)
for currentDisk in disks_by_order:
if machine.is_vtemplate and currentDisk.templatesnapshot:
snapshotid = currentDisk.templatesnapshot
else:
snapshotid = disks[currentDisk.guid]
prefix = '%s-clone' % currentDisk.name
result = VDiskController.clone(diskguid=currentDisk.guid,
snapshotid=snapshotid,
devicename=prefix,
pmachineguid=new_machine.pmachine_guid,
machinename=new_machine.name,
machineguid=new_machine.guid)
new_disk_guids.append(result['diskguid'])
hv = Factory.get(machine.pmachine)
try:
result = hv.clone_vm(machine.hypervisor_id, name, disks, None, True)
except:
VMachineController.delete(machineguid=new_machine.guid)
raise
new_machine.hypervisor_id = result
new_machine.save()
return new_machine.guid
示例2: test_happypath
# 需要导入模块: from ovs.dal.hybrids.vmachine import VMachine [as 别名]
# 或者: from ovs.dal.hybrids.vmachine.VMachine import name [as 别名]
def test_happypath(self):
"""
Validates the happy path; Hourly snapshots are taken with a few manual consistents
every now an then. The delelete policy is exectued every day
"""
# Setup
# There are 2 machines; one with two disks, one with one disk and an additional disk
backend_type = BackendType()
backend_type.name = 'BackendType'
backend_type.code = 'BT'
backend_type.save()
vpool = VPool()
vpool.name = 'vpool'
vpool.backend_type = backend_type
vpool.save()
pmachine = PMachine()
pmachine.name = 'PMachine'
pmachine.username = 'root'
pmachine.ip = '127.0.0.1'
pmachine.hvtype = 'VMWARE'
pmachine.save()
vmachine_1 = VMachine()
vmachine_1.name = 'vmachine_1'
vmachine_1.devicename = 'dummy'
vmachine_1.pmachine = pmachine
vmachine_1.save()
vdisk_1_1 = VDisk()
vdisk_1_1.name = 'vdisk_1_1'
vdisk_1_1.volume_id = 'vdisk_1_1'
vdisk_1_1.vmachine = vmachine_1
vdisk_1_1.vpool = vpool
vdisk_1_1.devicename = 'dummy'
vdisk_1_1.size = 0
vdisk_1_1.save()
vdisk_1_1.reload_client()
vdisk_1_2 = VDisk()
vdisk_1_2.name = 'vdisk_1_2'
vdisk_1_2.volume_id = 'vdisk_1_2'
vdisk_1_2.vmachine = vmachine_1
vdisk_1_2.vpool = vpool
vdisk_1_2.devicename = 'dummy'
vdisk_1_2.size = 0
vdisk_1_2.save()
vdisk_1_2.reload_client()
vmachine_2 = VMachine()
vmachine_2.name = 'vmachine_2'
vmachine_2.devicename = 'dummy'
vmachine_2.pmachine = pmachine
vmachine_2.save()
vdisk_2_1 = VDisk()
vdisk_2_1.name = 'vdisk_2_1'
vdisk_2_1.volume_id = 'vdisk_2_1'
vdisk_2_1.vmachine = vmachine_2
vdisk_2_1.vpool = vpool
vdisk_2_1.devicename = 'dummy'
vdisk_2_1.size = 0
vdisk_2_1.save()
vdisk_2_1.reload_client()
vdisk_3 = VDisk()
vdisk_3.name = 'vdisk_3'
vdisk_3.volume_id = 'vdisk_3'
vdisk_3.vpool = vpool
vdisk_3.devicename = 'dummy'
vdisk_3.size = 0
vdisk_3.save()
vdisk_3.reload_client()
for disk in [vdisk_1_1, vdisk_1_2, vdisk_2_1, vdisk_3]:
[dynamic for dynamic in disk._dynamics if dynamic.name == 'snapshots'][0].timeout = 0
# Run the testing scenario
debug = True
amount_of_days = 50
base = datetime.now().date()
day = timedelta(1)
minute = 60
hour = minute * 60
for d in xrange(0, amount_of_days):
base_timestamp = DeleteSnapshots._make_timestamp(base, day * d)
print ''
print 'Day cycle: {}: {}'.format(
d, datetime.fromtimestamp(base_timestamp).strftime('%Y-%m-%d')
)
# At the start of the day, delete snapshot policy runs at 00:30
print '- Deleting snapshots'
ScheduledTaskController.deletescrubsnapshots(timestamp=base_timestamp + (minute * 30))
# Validate snapshots
print '- Validating snapshots'
for vdisk in [vdisk_1_1, vdisk_1_2, vdisk_2_1, vdisk_3]:
self._validate(vdisk, d, base, amount_of_days, debug)
# During the day, snapshots are taken
# - Create non consistent snapshot every hour, between 2:00 and 22:00
# - Create consistent snapshot at 6:30, 12:30, 18:30
print '- Creating snapshots'
for h in xrange(2, 23):
timestamp = base_timestamp + (hour * h)
#.........这里部分代码省略.........
示例3: create_from_template
# 需要导入模块: from ovs.dal.hybrids.vmachine import VMachine [as 别名]
# 或者: from ovs.dal.hybrids.vmachine.VMachine import name [as 别名]
def create_from_template(name, machineguid, pmachineguid, description=None):
"""
Create a new vmachine using an existing vmachine template
:param machineguid: guid of the template vmachine
:param name: name of new vmachine
:param pmachineguid: guid of hypervisor to create new vmachine on
:param description: Description for the machine
:return: guid of the newly created vmachine | False on any failure
"""
template_vm = VMachine(machineguid)
if not template_vm.is_vtemplate:
return False
target_pm = PMachine(pmachineguid)
target_hypervisor = Factory.get(target_pm)
storagerouters = [sr for sr in StorageRouterList.get_storagerouters() if sr.pmachine_guid == target_pm.guid]
if len(storagerouters) == 1:
target_storagerouter = storagerouters[0]
else:
raise ValueError('Pmachine {0} has no StorageRouter assigned to it'.format(pmachineguid))
routing_key = "sr.{0}".format(target_storagerouter.machine_id)
vpool = None
vpool_guids = set()
if template_vm.vpool is not None:
vpool = template_vm.vpool
vpool_guids.add(vpool.guid)
for disk in template_vm.vdisks:
vpool = disk.vpool
vpool_guids.add(vpool.guid)
if len(vpool_guids) != 1:
raise RuntimeError('Only 1 vpool supported on template disk(s) - {0} found!'.format(len(vpool_guids)))
if not template_vm.pmachine.hvtype == target_pm.hvtype:
raise RuntimeError('Source and target hypervisor not identical')
# Currently, only one vPool is supported, so we can just use whatever the `vpool` variable above
# was set to as 'the' vPool for the code below. This obviously will have to change once vPool mixes
# are supported.
target_storagedriver = None
source_storagedriver = None
for vpool_storagedriver in vpool.storagedrivers:
if vpool_storagedriver.storagerouter.pmachine_guid == target_pm.guid:
target_storagedriver = vpool_storagedriver
if vpool_storagedriver.storagerouter.pmachine_guid == template_vm.pmachine_guid:
source_storagedriver = vpool_storagedriver
if target_storagedriver is None:
raise RuntimeError('Volume not served on target hypervisor')
source_hv = Factory.get(template_vm.pmachine)
target_hv = Factory.get(target_pm)
if not source_hv.is_datastore_available(source_storagedriver.storage_ip, source_storagedriver.mountpoint):
raise RuntimeError('Datastore unavailable on source hypervisor')
if not target_hv.is_datastore_available(target_storagedriver.storage_ip, target_storagedriver.mountpoint):
raise RuntimeError('Datastore unavailable on target hypervisor')
source_vm = source_hv.get_vm_object(template_vm.hypervisor_id)
if not source_vm:
raise RuntimeError('VM with key reference {0} not found'.format(template_vm.hypervisor_id))
name_duplicates = VMachineList.get_vmachine_by_name(name)
if name_duplicates is not None and len(name_duplicates) > 0:
raise RuntimeError('A vMachine with name {0} already exists'.format(name))
vm_path = target_hypervisor.get_vmachine_path(name, target_storagedriver.storagerouter.machine_id)
new_vm = VMachine()
new_vm.copy(template_vm)
new_vm.hypervisor_id = ''
new_vm.vpool = template_vm.vpool
new_vm.pmachine = target_pm
new_vm.name = name
new_vm.description = description
new_vm.is_vtemplate = False
new_vm.devicename = target_hypervisor.clean_vmachine_filename(vm_path)
new_vm.status = 'CREATED'
new_vm.save()
storagedrivers = [storagedriver for storagedriver in vpool.storagedrivers if storagedriver.storagerouter.pmachine_guid == new_vm.pmachine_guid]
if len(storagedrivers) == 0:
raise RuntimeError('Cannot find Storage Driver serving {0} on {1}'.format(vpool.name, new_vm.pmachine.name))
disks = []
disks_by_order = sorted(template_vm.vdisks, key=lambda x: x.order)
for disk in disks_by_order:
try:
prefix = '{0}-clone'.format(disk.name)
result = VDiskController.create_from_template(
diskguid=disk.guid,
devicename=prefix,
pmachineguid=target_pm.guid,
machinename=new_vm.name,
machineguid=new_vm.guid
)
disks.append(result)
VMachineController._logger.debug('Disk appended: {0}'.format(result))
#.........这里部分代码省略.........
示例4: clone
# 需要导入模块: from ovs.dal.hybrids.vmachine import VMachine [as 别名]
# 或者: from ovs.dal.hybrids.vmachine.VMachine import name [as 别名]
def clone(machineguid, timestamp, name):
"""
Clone a vmachine using the disk snapshot based on a snapshot timestamp
@param machineguid: guid of the machine to clone
@param timestamp: timestamp of the disk snapshots to use for the clone
@param name: name for the new machine
"""
machine = VMachine(machineguid)
timestamp = str(timestamp)
if timestamp not in (snap['timestamp'] for snap in machine.snapshots):
raise RuntimeError('Invalid timestamp provided, not a valid snapshot of this vmachine.')
vpool = None
storagerouter = None
if machine.pmachine is not None and machine.pmachine.hvtype == 'VMWARE':
for vdisk in machine.vdisks:
if vdisk.vpool is not None:
vpool = vdisk.vpool
break
for vdisk in machine.vdisks:
if vdisk.storagerouter_guid:
storagerouter = StorageRouter(vdisk.storagerouter_guid)
break
hv = Factory.get(machine.pmachine)
vm_path = hv.get_vmachine_path(name, storagerouter.machine_id if storagerouter is not None else '')
# mutex in sync_with_hypervisor uses "None" for KVM hvtype
mutex = volatile_mutex('{0}_{1}'.format(hv.clean_vmachine_filename(vm_path), vpool.guid if vpool is not None else 'none'))
disks = {}
for snapshot in machine.snapshots:
if snapshot['timestamp'] == timestamp:
for diskguid, snapshotguid in snapshot['snapshots'].iteritems():
disks[diskguid] = snapshotguid
try:
mutex.acquire(wait=120)
new_machine = VMachine()
new_machine.copy(machine)
new_machine.name = name
new_machine.devicename = hv.clean_vmachine_filename(vm_path)
new_machine.pmachine = machine.pmachine
new_machine.save()
finally:
mutex.release()
new_disk_guids = []
vm_disks = []
mountpoint = None
disks_by_order = sorted(machine.vdisks, key=lambda x: x.order)
try:
for currentDisk in disks_by_order:
if machine.is_vtemplate and currentDisk.templatesnapshot:
snapshotid = currentDisk.templatesnapshot
else:
snapshotid = disks[currentDisk.guid]
prefix = '%s-clone' % currentDisk.name
result = VDiskController.clone(diskguid=currentDisk.guid,
snapshotid=snapshotid,
devicename=prefix,
pmachineguid=new_machine.pmachine_guid,
machinename=new_machine.name,
machineguid=new_machine.guid)
new_disk_guids.append(result['diskguid'])
mountpoint = StorageDriverList.get_by_storagedriver_id(currentDisk.storagedriver_id).mountpoint
vm_disks.append(result)
except Exception as ex:
VMachineController._logger.error('Failed to clone disks. {0}'.format(ex))
VMachineController.delete(machineguid=new_machine.guid)
raise
try:
result = hv.clone_vm(machine.hypervisor_id, name, vm_disks, mountpoint)
except Exception as ex:
VMachineController._logger.error('Failed to clone vm. {0}'.format(ex))
VMachineController.delete(machineguid=new_machine.guid)
raise
try:
mutex.acquire(wait=120)
new_machine.hypervisor_id = result
new_machine.save()
finally:
mutex.release()
return new_machine.guid
示例5: test_happypath
# 需要导入模块: from ovs.dal.hybrids.vmachine import VMachine [as 别名]
# 或者: from ovs.dal.hybrids.vmachine.VMachine import name [as 别名]
def test_happypath(self):
"""
Validates the happy path; Hourly snapshots are taken with a few manual consistent
every now an then. The delete policy is executed every day
"""
# Setup
# There are 2 machines; one with two disks, one with one disk and an additional disk
failure_domain = FailureDomain()
failure_domain.name = "Test"
failure_domain.save()
backend_type = BackendType()
backend_type.name = "BackendType"
backend_type.code = "BT"
backend_type.save()
vpool = VPool()
vpool.name = "vpool"
vpool.backend_type = backend_type
vpool.save()
pmachine = PMachine()
pmachine.name = "PMachine"
pmachine.username = "root"
pmachine.ip = "127.0.0.1"
pmachine.hvtype = "VMWARE"
pmachine.save()
storage_router = StorageRouter()
storage_router.name = "storage_router"
storage_router.ip = "127.0.0.1"
storage_router.pmachine = pmachine
storage_router.machine_id = System.get_my_machine_id()
storage_router.rdma_capable = False
storage_router.primary_failure_domain = failure_domain
storage_router.save()
disk = Disk()
disk.name = "physical_disk_1"
disk.path = "/dev/non-existent"
disk.size = 500 * 1024 ** 3
disk.state = "OK"
disk.is_ssd = True
disk.storagerouter = storage_router
disk.save()
disk_partition = DiskPartition()
disk_partition.id = "disk_partition_id"
disk_partition.disk = disk
disk_partition.path = "/dev/disk/non-existent"
disk_partition.size = 400 * 1024 ** 3
disk_partition.state = "OK"
disk_partition.offset = 1024
disk_partition.roles = [DiskPartition.ROLES.SCRUB]
disk_partition.mountpoint = "/var/tmp"
disk_partition.save()
vmachine_1 = VMachine()
vmachine_1.name = "vmachine_1"
vmachine_1.devicename = "dummy"
vmachine_1.pmachine = pmachine
vmachine_1.save()
vdisk_1_1 = VDisk()
vdisk_1_1.name = "vdisk_1_1"
vdisk_1_1.volume_id = "vdisk_1_1"
vdisk_1_1.vmachine = vmachine_1
vdisk_1_1.vpool = vpool
vdisk_1_1.devicename = "dummy"
vdisk_1_1.size = 0
vdisk_1_1.save()
vdisk_1_1.reload_client()
vdisk_1_2 = VDisk()
vdisk_1_2.name = "vdisk_1_2"
vdisk_1_2.volume_id = "vdisk_1_2"
vdisk_1_2.vmachine = vmachine_1
vdisk_1_2.vpool = vpool
vdisk_1_2.devicename = "dummy"
vdisk_1_2.size = 0
vdisk_1_2.save()
vdisk_1_2.reload_client()
vmachine_2 = VMachine()
vmachine_2.name = "vmachine_2"
vmachine_2.devicename = "dummy"
vmachine_2.pmachine = pmachine
vmachine_2.save()
vdisk_2_1 = VDisk()
vdisk_2_1.name = "vdisk_2_1"
vdisk_2_1.volume_id = "vdisk_2_1"
vdisk_2_1.vmachine = vmachine_2
vdisk_2_1.vpool = vpool
vdisk_2_1.devicename = "dummy"
vdisk_2_1.size = 0
vdisk_2_1.save()
vdisk_2_1.reload_client()
vdisk_3 = VDisk()
vdisk_3.name = "vdisk_3"
vdisk_3.volume_id = "vdisk_3"
vdisk_3.vpool = vpool
vdisk_3.devicename = "dummy"
vdisk_3.size = 0
vdisk_3.save()
vdisk_3.reload_client()
for disk in [vdisk_1_1, vdisk_1_2, vdisk_2_1, vdisk_3]:
[dynamic for dynamic in disk._dynamics if dynamic.name == "snapshots"][0].timeout = 0
# Run the testing scenario
#.........这里部分代码省略.........
示例6: test_happypath
# 需要导入模块: from ovs.dal.hybrids.vmachine import VMachine [as 别名]
# 或者: from ovs.dal.hybrids.vmachine.VMachine import name [as 别名]
def test_happypath(self):
"""
Validates the happy path; Hourly snapshots are taken with a few manual consistent
every now an then. The delete policy is executed every day
"""
# Setup
# There are 2 machines; one with two disks, one with one disk and a stand-alone additional disk
failure_domain = FailureDomain()
failure_domain.name = 'Test'
failure_domain.save()
backend_type = BackendType()
backend_type.name = 'BackendType'
backend_type.code = 'BT'
backend_type.save()
vpool = VPool()
vpool.name = 'vpool'
vpool.status = 'RUNNING'
vpool.backend_type = backend_type
vpool.save()
pmachine = PMachine()
pmachine.name = 'PMachine'
pmachine.username = 'root'
pmachine.ip = '127.0.0.1'
pmachine.hvtype = 'VMWARE'
pmachine.save()
storage_router = StorageRouter()
storage_router.name = 'storage_router'
storage_router.ip = '127.0.0.1'
storage_router.pmachine = pmachine
storage_router.machine_id = System.get_my_machine_id()
storage_router.rdma_capable = False
storage_router.primary_failure_domain = failure_domain
storage_router.save()
disk = Disk()
disk.name = 'physical_disk_1'
disk.path = '/dev/non-existent'
disk.size = 500 * 1024 ** 3
disk.state = 'OK'
disk.is_ssd = True
disk.storagerouter = storage_router
disk.save()
disk_partition = DiskPartition()
disk_partition.id = 'disk_partition_id'
disk_partition.disk = disk
disk_partition.path = '/dev/disk/non-existent'
disk_partition.size = 400 * 1024 ** 3
disk_partition.state = 'OK'
disk_partition.offset = 1024
disk_partition.roles = [DiskPartition.ROLES.SCRUB]
disk_partition.mountpoint = '/var/tmp'
disk_partition.save()
vmachine_1 = VMachine()
vmachine_1.name = 'vmachine_1'
vmachine_1.devicename = 'dummy'
vmachine_1.pmachine = pmachine
vmachine_1.save()
vdisk_1_1 = VDisk()
vdisk_1_1.name = 'vdisk_1_1'
vdisk_1_1.volume_id = 'vdisk_1_1'
vdisk_1_1.vmachine = vmachine_1
vdisk_1_1.vpool = vpool
vdisk_1_1.devicename = 'dummy'
vdisk_1_1.size = 0
vdisk_1_1.save()
vdisk_1_1.reload_client()
vdisk_1_2 = VDisk()
vdisk_1_2.name = 'vdisk_1_2'
vdisk_1_2.volume_id = 'vdisk_1_2'
vdisk_1_2.vmachine = vmachine_1
vdisk_1_2.vpool = vpool
vdisk_1_2.devicename = 'dummy'
vdisk_1_2.size = 0
vdisk_1_2.save()
vdisk_1_2.reload_client()
vmachine_2 = VMachine()
vmachine_2.name = 'vmachine_2'
vmachine_2.devicename = 'dummy'
vmachine_2.pmachine = pmachine
vmachine_2.save()
vdisk_2_1 = VDisk()
vdisk_2_1.name = 'vdisk_2_1'
vdisk_2_1.volume_id = 'vdisk_2_1'
vdisk_2_1.vmachine = vmachine_2
vdisk_2_1.vpool = vpool
vdisk_2_1.devicename = 'dummy'
vdisk_2_1.size = 0
vdisk_2_1.save()
vdisk_2_1.reload_client()
vdisk_3 = VDisk()
vdisk_3.name = 'vdisk_3'
vdisk_3.volume_id = 'vdisk_3'
vdisk_3.vpool = vpool
vdisk_3.devicename = 'dummy'
vdisk_3.size = 0
vdisk_3.save()
vdisk_3.reload_client()
for disk in [vdisk_1_1, vdisk_1_2, vdisk_2_1, vdisk_3]:
[dynamic for dynamic in disk._dynamics if dynamic.name == 'snapshots'][0].timeout = 0
#.........这里部分代码省略.........
示例7: _prepare
# 需要导入模块: from ovs.dal.hybrids.vmachine import VMachine [as 别名]
# 或者: from ovs.dal.hybrids.vmachine.VMachine import name [as 别名]
def _prepare(self):
# Setup
failure_domain = FailureDomain()
failure_domain.name = 'Test'
failure_domain.save()
backend_type = BackendType()
backend_type.name = 'BackendType'
backend_type.code = 'BT'
backend_type.save()
vpool = VPool()
vpool.name = 'vpool'
vpool.backend_type = backend_type
vpool.save()
pmachine = PMachine()
pmachine.name = 'PMachine'
pmachine.username = 'root'
pmachine.ip = '127.0.0.1'
pmachine.hvtype = 'KVM'
pmachine.save()
vmachine_1 = VMachine()
vmachine_1.name = 'vmachine_1'
vmachine_1.devicename = 'dummy'
vmachine_1.pmachine = pmachine
vmachine_1.is_vtemplate = True
vmachine_1.save()
vdisk_1_1 = VDisk()
vdisk_1_1.name = 'vdisk_1_1'
vdisk_1_1.volume_id = 'vdisk_1_1'
vdisk_1_1.vmachine = vmachine_1
vdisk_1_1.vpool = vpool
vdisk_1_1.devicename = 'dummy'
vdisk_1_1.size = 0
vdisk_1_1.save()
vdisk_1_1.reload_client()
storage_router = StorageRouter()
storage_router.name = 'storage_router'
storage_router.ip = '127.0.0.1'
storage_router.pmachine = pmachine
storage_router.machine_id = System.get_my_machine_id()
storage_router.rdma_capable = False
storage_router.primary_failure_domain = failure_domain
storage_router.save()
storagedriver = StorageDriver()
storagedriver.vpool = vpool
storagedriver.storagerouter = storage_router
storagedriver.name = '1'
storagedriver.mountpoint = '/'
storagedriver.cluster_ip = storage_router.ip
storagedriver.storage_ip = '127.0.0.1'
storagedriver.storagedriver_id = '1'
storagedriver.ports = [1, 2, 3]
storagedriver.save()
service_type = ServiceType()
service_type.name = 'MetadataServer'
service_type.save()
s_id = '{0}-{1}'.format(storagedriver.storagerouter.name, '1')
service = Service()
service.name = s_id
service.storagerouter = storagedriver.storagerouter
service.ports = [1]
service.type = service_type
service.save()
mds_service = MDSService()
mds_service.service = service
mds_service.number = 0
mds_service.capacity = 10
mds_service.vpool = storagedriver.vpool
mds_service.save()
def ensure_safety(vdisk):
pass
class Dtl_Checkup():
@staticmethod
def delay(vpool_guid=None, vdisk_guid=None, storagerouters_to_exclude=None):
pass
MDSServiceController.ensure_safety = staticmethod(ensure_safety)
VDiskController.dtl_checkup = Dtl_Checkup
return vdisk_1_1, pmachine