當前位置: 首頁>>代碼示例>>Java>>正文


Java VmCloneTempReq.setIsLinkClone方法代碼示例

本文整理匯總了Java中com.huawei.esdk.fusioncompute.local.model.vm.VmCloneTempReq.setIsLinkClone方法的典型用法代碼示例。如果您正苦於以下問題:Java VmCloneTempReq.setIsLinkClone方法的具體用法?Java VmCloneTempReq.setIsLinkClone怎麽用?Java VmCloneTempReq.setIsLinkClone使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.huawei.esdk.fusioncompute.local.model.vm.VmCloneTempReq的用法示例。


在下文中一共展示了VmCloneTempReq.setIsLinkClone方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: testVmCloneTemp

import com.huawei.esdk.fusioncompute.local.model.vm.VmCloneTempReq; //導入方法依賴的package包/類
@Test
public final void testVmCloneTemp()
{
    //        String vmUri = "/service/sites/3CD306E7/vms/i-00000007";
    
    VmCloneTempReq vmCloneTempReq = new VmCloneTempReq();
    vmCloneTempReq.setName("CloneTest");
    vmCloneTempReq.setDescription("zxc");
    vmCloneTempReq.setGroup(null);
    vmCloneTempReq.setLocation("urn:sites:2DEF0634:clusters:117");
    vmCloneTempReq.setIsBindingHost(null);
    
    vmCloneTempReq.setVmConfig(null);
    vmCloneTempReq.setOsOption(null);
    
    vmCloneTempReq.setIsTemplate(true);
    vmCloneTempReq.setAutoBoot(false);
    vmCloneTempReq.setIsLinkClone(false);
    vmCloneTempReq.setRegionInfo(null);
    
    vmCloneTempReq.setVmCustomization(null);
    
    vmCloneTempReq.setPublickey(null);
    vmCloneTempReq.setVmData(null);
    vmCloneTempReq.setFileName(null);
    vmCloneTempReq.setVncAccessInfo(null);
    vmCloneTempReq.setFileMode(null);
    vmCloneTempReq.setDrDrillOption(null);
    vmCloneTempReq.setUuid(null);
    
    OsOption os = new OsOption();
    os.setPassword("asdasd");
    vmCloneTempReq.setOsOption(os);
    
    instance.vmCloneTemp("/service/sites/2DEF0634/vms/i-0000007E", vmCloneTempReq);
}
 
開發者ID:eSDK,項目名稱:esdk_cloud_fc_cli,代碼行數:37,代碼來源:VmResourceTest.java

示例2: testVmCloneTemp

import com.huawei.esdk.fusioncompute.local.model.vm.VmCloneTempReq; //導入方法依賴的package包/類
@Test
public final void testVmCloneTemp()
{
    String vmUri = "/service/sites/400E07BB/vms/i-00000027";
    
    VmCloneTempReq vmCloneTempReq = new VmCloneTempReq();
    vmCloneTempReq.setName("eSDK_clone_template01");
    vmCloneTempReq.setIsTemplate(true);
    vmCloneTempReq.setDescription("df");
    vmCloneTempReq.setGroup("");
    vmCloneTempReq.setLocation("urn:sites:400E07BB:hosts:119");
    vmCloneTempReq.setIsLinkClone(false);
    vmCloneTempReq.setAutoBoot(true);
    
    VmConfig vmConfig = new VmConfig();
    CPU cpu = new CPU();
    cpu.setQuantity(2);
    cpu.setReservation(0);
    cpu.setWeight(2000);
    cpu.setLimit(0);
    cpu.setCpuHotPlug(0);
    Memory memory = new Memory();
    memory.setQuantityMB(1024);
    memory.setReservation(0);
    memory.setWeight(10240);
    Property properties = new Property();
    properties.setBootOption("disk");
    properties.setIsEnableHa(true);
    properties.setIsAutoUpgrade(true);
    properties.setAttachType(false);
    properties.setIsEnableMemVol(true);
    properties.setVmFaultProcess("notprocess");
    properties.setClockMode("freeClock");
    List<Disk> disks = new ArrayList<Disk>();
    Disk disk1 = new Disk();
    disk1.setQuantityGB(30);
    disk1.setSequenceNum(1);
    disk1.setDatastoreUrn("urn:sites:400E07BB:datastores:2");
    disk1.setIndepDisk(false);
    disk1.setPersistentDisk(true);
    disk1.setIsThin(false);
    disk1.setVolType(1);
    Disk disk2 = new Disk();
    disk2.setQuantityGB(20);
    disk2.setSequenceNum(2);
    disk2.setDatastoreUrn("urn:sites:400E07BB:datastores:2");
    disk2.setIndepDisk(false);
    disk2.setPersistentDisk(true);
    disk2.setIsThin(false);
    disk2.setVolType(1);
    disks.add(disk1);
    disks.add(disk2);
    List<Nic> nics = new ArrayList<Nic>();
    Nic nic = new Nic();
    nic.setSequenceNum(1);
    nic.setName("eth0");
    nic.setPortGroupUrn("urn:sites:400E07BB:dvswitchs:1:portgroups:1");
    nic.setVirtIo(0);
    nics.add(nic);
    vmConfig.setCpu(cpu);
    vmConfig.setMemory(memory);
    vmConfig.setProperties(properties);
    vmConfig.setDisks(disks);
    vmConfig.setNics(nics);
    vmCloneTempReq.setVmConfig(vmConfig);
    
    FCSDKResponse<VRMTask> task = instance.vmCloneTemp(vmUri, vmCloneTempReq);
    System.out.println("error code:" + task.getErrorCode());
    System.out.println("error des:" + task.getErrorDes());
    System.out.println("urn:" + task.getResult().getUrn());
    System.out.println("uri:" + task.getResult().getUri());
    System.out.println("task urn:" + task.getResult().getTaskUrn());
    System.out.println("task uri:" + task.getResult().getTaskUri());
}
 
開發者ID:eSDK,項目名稱:esdk_cloud_fc_cli,代碼行數:75,代碼來源:VmResourceTest.java

示例3: testVmCloneTemp

import com.huawei.esdk.fusioncompute.local.model.vm.VmCloneTempReq; //導入方法依賴的package包/類
@Test
public final void testVmCloneTemp()
{
    String vmUri = "/service/sites/400E07BB/vms/i-00000024";
    //        String vmUri = null;
    
    VmCloneTempReq vmCloneTempReq = new VmCloneTempReq();
    vmCloneTempReq.setName("eSDK_clone_template04");
    vmCloneTempReq.setIsTemplate(true);
    vmCloneTempReq.setDescription("df");
    vmCloneTempReq.setGroup("");
    vmCloneTempReq.setLocation("urn:sites:400E07BB:hosts:119");
    vmCloneTempReq.setIsLinkClone(false);
    vmCloneTempReq.setAutoBoot(true);
    
    VmConfig vmConfig = new VmConfig();
    CPU cpu = new CPU();
    cpu.setQuantity(2);
    cpu.setReservation(0);
    cpu.setWeight(2000);
    cpu.setLimit(0);
    cpu.setCpuHotPlug(0);
    Memory memory = new Memory();
    memory.setQuantityMB(1024);
    memory.setReservation(0);
    memory.setWeight(10240);
    Property properties = new Property();
    properties.setBootOption("disk");
    properties.setIsEnableHa(true);
    properties.setIsAutoUpgrade(true);
    properties.setAttachType(false);
    properties.setIsEnableMemVol(true);
    properties.setVmFaultProcess("notprocess");
    properties.setClockMode("freeClock");
    List<Disk> disks = new ArrayList<Disk>();
    Disk disk1 = new Disk();
    disk1.setQuantityGB(30);
    disk1.setSequenceNum(1);
    disk1.setDatastoreUrn("urn:sites:400E07BB:datastores:2");
    disk1.setIndepDisk(false);
    disk1.setPersistentDisk(true);
    disk1.setIsThin(false);
    disk1.setVolType(1);
    Disk disk2 = new Disk();
    disk2.setQuantityGB(20);
    disk2.setSequenceNum(2);
    disk2.setDatastoreUrn("urn:sites:400E07BB:datastores:2");
    disk2.setIndepDisk(false);
    disk2.setPersistentDisk(true);
    disk2.setIsThin(false);
    disk2.setVolType(1);
    disks.add(disk1);
    disks.add(disk2);
    List<Nic> nics = new ArrayList<Nic>();
    Nic nic = new Nic();
    nic.setSequenceNum(1);
    nic.setName("eth0");
    nic.setPortGroupUrn("urn:sites:400E07BB:dvswitchs:1:portgroups:1");
    nic.setVirtIo(0);
    nics.add(nic);
    vmConfig.setCpu(cpu);
    vmConfig.setMemory(memory);
    vmConfig.setProperties(properties);
    vmConfig.setDisks(disks);
    vmConfig.setNics(nics);
    vmCloneTempReq.setVmConfig(vmConfig);
    
    //        VmCustomization vmCustomization = new VmCustomization();
    //        vmCustomization.setPassword("pwd");
    //        vmCustomization.setDomainPassword("dpwd");
    //        vmCloneTempReq.setVmCustomization(vmCustomization);
    //        
    //        VncAccessInfo vncAccessInfo = new VncAccessInfo();
    //        vncAccessInfo.setVncPassword("vpwd");
    //        vmCloneTempReq.setVncAccessInfo(vncAccessInfo);
    
    instance.vmCloneTemp(vmUri, vmCloneTempReq);
}
 
開發者ID:eSDK,項目名稱:esdk_cloud_fc_native_java,代碼行數:79,代碼來源:VmResourceTest.java


注:本文中的com.huawei.esdk.fusioncompute.local.model.vm.VmCloneTempReq.setIsLinkClone方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。