@Override protected void onSaveMAC(VmNetworkInterface nicToSave) { nicToSave.setMacAddress(null); }
@Override protected void updateSingleNic(XmlNode node, VmNetworkInterface iface, int nicIdx) { super.updateSingleNic(node, iface, nicIdx); XmlNode macAddress = selectSingleNode(node, "rasd:MACAddress", _xmlNS); iface.setMacAddress(macAddress != null ? macAddress.innerText : null); }
@Override protected void updateSingleNic(XmlNode node, VmNetworkInterface iface, int nicIdx) { super.updateSingleNic(node, iface, nicIdx); XmlNode macNode = selectSingleNode(node, "rasd:MACAddress", _xmlNS); iface.setMacAddress(macNode != null ? macNode.innerText : null); } }
@Override protected void onSaveMAC(VmNetworkInterface nicToSave) { nicToSave.setMacAddress(getNic().getMacAddress()); }
@Override public VmNetworkInterface mapRow(ResultSet rs, int rowNum) throws SQLException { VmNetworkInterface entity = new VmNetworkInterface(); entity.setId(getGuidDefaultEmpty(rs, "id")); entity.setVmId(getGuid(rs, "vm_guid")); entity.setMacAddress(rs.getString("mac_addr")); entity.setSpeed(rs.getInt("speed")); entity.setStatistics(VmNetworkStatisticsRowMapper.INSTANCE.mapRow(rs, rowNum)); return entity; }
protected void onSaveMAC(VmNetworkInterface nicToSave) { nicToSave.setMacAddress(getMAC().getIsChangable() ? getMAC().getEntity() == null ? null : getMAC().getEntity().toLowerCase() : getDefaultMacAddress()); }
public VmNetworkInterface(VmNetworkInterface iface) { setId(iface.getId()); setMacAddress(iface.getMacAddress()); setName(iface.getName()); setNetworkName(iface.getNetworkName()); setLinked(iface.isLinked()); setSpeed(iface.getSpeed()); setType(iface.getType()); setVmId(iface.getVmId()); setVmName(iface.getVmName()); setVmTemplateId(iface.getVmTemplateId()); setStatistics(new VmNetworkStatistics(iface.getStatistics())); }
@BeforeEach @Override public void setUp() throws Exception { super.setUp(); existingVmInterface = dao.get(FixturesTool.VM_NETWORK_INTERFACE); existingTemplateInterface = dao.get(FixturesTool.TEMPLATE_NETWORK_INTERFACE); newVmInterface = new VmNetworkInterface(); newVmInterface.setStatistics(new VmNetworkStatistics()); newVmInterface.setId(Guid.newGuid()); newVmInterface.setVnicProfileId(FixturesTool.VM_NETWORK_INTERFACE_PROFILE); newVmInterface.setName("eth77"); newVmInterface.setNetworkName("enginet"); newVmInterface.setLinked(true); newVmInterface.setSpeed(1000); newVmInterface.setType(3); newVmInterface.setMacAddress("01:C0:81:21:71:17"); newVmDevice.setType(VmDeviceGeneralType.INTERFACE); newVmDevice.setDevice("bridge"); newVmDevice.setAddress("sample"); newVmDevice.setManaged(true); newVmDevice.setPlugged(true); newVmDevice.setReadOnly(false); Map<String, String> customProp = new LinkedHashMap<>(); customProp.put("prop1", "val1"); newVmDevice.setCustomProperties(customProp); }
entity.setMacAddress(model.getMac().getAddress());