コード例 #1
0
 static void verifyModelSpecific(Nic model, int index) {
   assertEquals(GUIDS[index].toString(), model.getId());
   assertEquals(NAMES[index].toString(), model.getName());
   assertTrue(model.isSetVm());
   assertEquals(INSTANCE_TYPE_ID.toString(), model.getVm().getId());
   assertTrue(model.isSetMac());
   assertEquals(ADDRESSES[2].toString(), model.getMac().getAddress());
 }
コード例 #2
0
 public Response add(Nic nic) {
   validateEnums(Nic.class, nic);
   validateParameters(nic, "name");
   return performCreate(
       VdcActionType.AddVmTemplateInterface,
       new AddVmTemplateInterfaceParameters(instanceTypeId, map(nic)),
       new NicResolver(nic.getName()));
 }