#encoding:utf-8 import TestData.VirtualMachine.ITC05_SetUp as ModuleData from TestAPIs.VirtualMachineAPIs import VmSnapshotAPIs from TestData.VirtualMachine.scenarios1_Snapshot import description ''' @note: PreData ''' ''' @note: 创建虚拟机的离线快照 ''' vmsnapshotapi = VmSnapshotAPIs() snapshot_id = vmsnapshotapi.getVmSnapshotIDBydisp(ModuleData.snapshot_name, description) cloneVmname='cloneVM' xml_clone_vm_option= ''' <vm> <name>%s</name> <cluster> <name>%s</name> </cluster> <snapshots> <snapshot id='%s'/> </snapshots> </vm> ''' %(cloneVmname,ModuleData.cluster_nfs_name,snapshot_id) ''' @note: ExpectedData ''' expected_status_code_create_vm = 202
#encoding:utf-8 ''' Created on 2015��8��18�� @author: liuxd ''' from TestAPIs.VirtualMachineAPIs import VirtualMachineAPIs, VmDiskAPIs,VmSnapshotAPIs import TestData.VirtualMachine.ITC05_SetUp as ModuleData from TestData.VirtualMachine.scenarios3_Snapshot import snapshot_description,snapshot_disk_id cloneapi=VmSnapshotAPIs() snapshot_id=cloneapi.getVmSnapshotIDBydisp(ModuleData.snapshot_name, snapshot_description) snapshot_image_id=cloneapi.getVmSnapshot_disk_imageID(ModuleData.snapshot_name, snapshot_id, snapshot_description) ''' --------------------------------------------------------------------------------------------------- @note: Test-Data-clone-onlinesnapshot --------------------------------------------------------------------------------------------------- ''' cloneVmname='cloneOnlineSnapshot' xml_clone_vm_option= ''' <vm> <name>%s</name> <cluster> <name>%s</name> </cluster> <snapshots> <snapshot id='%s'/>
#encoding:utf-8 import TestData.VirtualMachine.ITC05_SetUp as ModuleData from TestAPIs.VirtualMachineAPIs import VmSnapshotAPIs from TestData.VirtualMachine.scenarios1_Snapshot import description ''' @note: PreData ''' ''' @note: 创建虚拟机的离线快照 ''' vmsnapshotapi = VmSnapshotAPIs() snapshot_id = vmsnapshotapi.getVmSnapshotIDBydisp(ModuleData.snapshot_name, description) cloneVmname = 'cloneVM' xml_clone_vm_option = ''' <vm> <name>%s</name> <cluster> <name>%s</name> </cluster> <snapshots> <snapshot id='%s'/> </snapshots> </vm> ''' % (cloneVmname, ModuleData.cluster_nfs_name, snapshot_id) ''' @note: ExpectedData ''' expected_status_code_create_vm = 202
#encoding:utf-8 ''' Created on 2015��8��18�� @author: liuxd ''' from TestAPIs.VirtualMachineAPIs import VirtualMachineAPIs, VmDiskAPIs, VmSnapshotAPIs import TestData.VirtualMachine.ITC05_SetUp as ModuleData from TestData.VirtualMachine.scenarios3_Snapshot import snapshot_description, snapshot_disk_id cloneapi = VmSnapshotAPIs() snapshot_id = cloneapi.getVmSnapshotIDBydisp(ModuleData.snapshot_name, snapshot_description) snapshot_image_id = cloneapi.getVmSnapshot_disk_imageID( ModuleData.snapshot_name, snapshot_id, snapshot_description) ''' --------------------------------------------------------------------------------------------------- @note: Test-Data-clone-onlinesnapshot --------------------------------------------------------------------------------------------------- ''' cloneVmname = 'cloneOnlineSnapshot' xml_clone_vm_option = ''' <vm> <name>%s</name> <cluster> <name>%s</name> </cluster> <snapshots> <snapshot id='%s'/>