public static void validateAdd(Nic nic) { if (nic == null) { throw new ValidationException("Parameter 'nic' is mandatory but was not provided."); } if (nic.getName()==null) { throw new ValidationException("Parameter 'nic.name' is mandatory but was not provided."); } }
public static void validateAdd(Nic nic) { if (nic == null) { throw new ValidationException("Parameter 'nic' is mandatory but was not provided."); } if (nic.getName()==null) { throw new ValidationException("Parameter 'nic.name' is mandatory but was not provided."); } }
@Override public Response add(Nic nic) { validateParameters(nic, "name"); return performCreate( ActionType.AddVmInterface, new AddVmInterfaceParameters(vmId, map(nic)), new NicResolver(nic.getName()) ); }
public Response add(Nic nic) { validateParameters(nic, "name"); return performCreate( ActionType.AddVmTemplateInterface, new AddVmTemplateInterfaceParameters(instanceTypeId, map(nic)), new NicResolver(nic.getName()) ); }
public Response add(Nic nic) { validateParameters(nic, "name"); return performCreate( ActionType.AddVmTemplateInterface, new AddVmTemplateInterfaceParameters(templateId, map(nic)), new NicResolver(nic.getName()) ); }
VmInitNetwork vmInitInterface = new VmInitNetwork(); if (iface.isSetName()) { vmInitInterface.setName(iface.getName());
static void verifyModelSpecific(Nic model, int index) { assertEquals(GUIDS[index].toString(), model.getId()); assertEquals(NAMES[index], model.getName()); assertTrue(model.isSetVm()); assertEquals(VM_ID.toString(), model.getVm().getId()); assertTrue(model.isSetMac()); assertEquals(ADDRESSES[2], model.getMac().getAddress()); }
static void verifyModelSpecific(Nic model, int index) { assertEquals(GUIDS[index].toString(), model.getId()); assertEquals(NAMES[index], model.getName()); assertTrue(model.isSetVm()); assertEquals(INSTANCE_TYPE_ID.toString(), model.getVm().getId()); assertTrue(model.isSetMac()); assertEquals(ADDRESSES[2], model.getMac().getAddress()); }
static void verifyModelSpecific(Nic model, int index) { assertEquals(GUIDS[index].toString(), model.getId()); assertEquals(NAMES[index], model.getName()); assertTrue(model.isSetVm()); assertEquals(VM_ID.toString(), model.getVm().getId()); assertTrue(model.isSetMac()); assertEquals(ADDRESSES[2], model.getMac().getAddress()); }
private void verifyModelSpecific(Nic model, int index) { assertEquals(GUIDS[index].toString(), model.getId()); assertEquals(NAMES[index], model.getName()); assertTrue(model.isSetVm()); assertEquals(VM_ID.toString(), model.getVm().getId()); assertTrue(model.isSetMac()); assertEquals(ADDRESSES[2], model.getMac().getAddress()); } }
@Override protected void verify(Nic model, Nic transform) { assertNotNull(transform); assertEquals(model.getName(), transform.getName()); assertEquals(model.getId(), transform.getId()); assertNotNull(transform.getVm()); assertEquals(model.getVm().getId(), transform.getVm().getId()); assertNotNull(transform.getMac()); assertThat(model.getMac().getAddress(), IsEqualIgnoringCase.equalToIgnoringCase(transform.getMac().getAddress())); assertEquals(model.getInterface(), transform.getInterface()); assertEquals(model.isLinked(), transform.isLinked()); assertEquals(model.isPlugged(), transform.isPlugged()); assertNotNull(transform.getVnicProfile()); assertEquals(model.getVnicProfile().getId(), transform.getVnicProfile().getId()); } }
to.setName(from.getName());
entity.setName(model.getName());