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()); }
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())); }