@Override public KVMAgentCommands.NicTO completeNicInformation(L2NetworkInventory l2Network, VmNicInventory nic) { VxlanNetworkPoolVO vo = dbf.findByUuid(l2Network.getUuid(), VxlanNetworkPoolVO.class); KVMAgentCommands.NicTO to = new KVMAgentCommands.NicTO(); to.setMac(nic.getMac()); to.setUuid(nic.getUuid()); to.setDeviceId(nic.getDeviceId()); to.setNicInternalName(nic.getInternalName()); return to; }
@Override public KVMAgentCommands.NicTO completeNicInformation(L2NetworkInventory l2Network, VmNicInventory nic) { VxlanNetworkVO vo = dbf.findByUuid(l2Network.getUuid(), VxlanNetworkVO.class); KVMAgentCommands.NicTO to = new KVMAgentCommands.NicTO(); to.setMac(nic.getMac()); to.setUuid(nic.getUuid()); to.setBridgeName(makeBridgeName(vo.getVni())); to.setDeviceId(nic.getDeviceId()); to.setNicInternalName(nic.getInternalName()); to.setMetaData(String.valueOf(vo.getVni())); return to; }
@Override public NicTO completeNicInformation(L2NetworkInventory l2Network, VmNicInventory nic) { L2VlanNetworkVO vo = dbf.findByUuid(l2Network.getUuid(), L2VlanNetworkVO.class); NicTO to = new NicTO(); to.setMac(nic.getMac()); to.setUuid(nic.getUuid()); to.setBridgeName(makeBridgeName(l2Network.getPhysicalInterface(), vo.getVlan())); to.setDeviceId(nic.getDeviceId()); to.setNicInternalName(nic.getInternalName()); to.setMetaData(String.valueOf(vo.getVlan())); return to; }
@Override public NicTO completeNicInformation(L2NetworkInventory l2Network, VmNicInventory nic) { NicTO to = new NicTO(); to.setMac(nic.getMac()); to.setUuid(nic.getUuid()); to.setBridgeName(makeBridgeName(l2Network.getPhysicalInterface())); to.setDeviceId(nic.getDeviceId()); to.setNicInternalName(nic.getInternalName()); return to; } }
@Override protected void scripts() { String acntUuid = Account.getAccountUuidOfResource(spec.getVmInventory().getUuid()); spec.getDestNics().forEach(nic -> { VmNicVO nvo = new VmNicVO(); nvo.setUuid(nic.getUuid()); nvo.setDeviceId(nic.getDeviceId()); nvo.setIp(nic.getIp()); nvo.setL3NetworkUuid(nic.getL3NetworkUuid()); nvo.setMac(nic.getMac()); nvo.setHypervisorType(nic.getHypervisorType()); nvo.setUsedIpUuid(nic.getUsedIpUuid()); nvo.setGateway(nic.getGateway()); nvo.setNetmask(nic.getNetmask()); nvo.setVmInstanceUuid(nic.getVmInstanceUuid()); nvo.setMetaData(nic.getMetaData()); nvo.setInternalName(nic.getInternalName()); nvo.setAccountUuid(acntUuid); nvo.setIpVersion(nic.getIpVersion()); persist(nvo); if (nic.getUsedIpUuid() != null) { SQL.New(UsedIpVO.class).eq(UsedIpVO_.uuid, nic.getUsedIpUuid()).set(UsedIpVO_.vmNicUuid, nvo.getUuid()).update(); } }); ApplianceVmVO apvm = findByUuid(spec.getVmInventory().getUuid(), ApplianceVmVO.class); apvm.setManagementNetworkUuid(mgmtNic.getL3NetworkUuid()); merge(apvm); } }.execute();
to.vmUuid = struct.getNic().getVmInstanceUuid(); to.nicUuid = struct.getNic().getUuid(); to.nicName = struct.getNic().getInternalName(); to.nicMac = struct.getNic().getMac(); if (struct.getGuestIp() != null) {