private DomainRouterVO getVirtualRouter(Network network) { List<DomainRouterVO> routers = _routerDao.listByNetworkAndRole(network.getId(), VirtualRouter.Role.VIRTUAL_ROUTER); if (routers.isEmpty()) { throw new CloudRuntimeException( String.format( "cannot find any running virtual router on network[id:%s, uuid:%s]", network.getId(), network.getUuid())); } if (routers.size() > 1) { throw new CloudRuntimeException( String.format("baremetal hasn't supported redundant router yet")); } DomainRouterVO vr = routers.get(0); if (!Hypervisor.HypervisorType.VMware.equals(vr.getHypervisorType())) { throw new CloudRuntimeException( String.format( "baremetal only support vmware virtual router, but get %s", vr.getHypervisorType())); } return vr; }
public NetworkProfile(Network network) { this.id = network.getId(); this.uuid = network.getUuid(); this.broadcastUri = network.getBroadcastUri(); this.dataCenterId = network.getDataCenterId(); this.ownerId = network.getAccountId(); this.state = network.getState(); this.name = network.getName(); this.mode = network.getMode(); this.broadcastDomainType = network.getBroadcastDomainType(); this.trafficType = network.getTrafficType(); this.gateway = network.getGateway(); this.cidr = network.getCidr(); this.networkOfferingId = network.getNetworkOfferingId(); this.related = network.getRelated(); this.displayText = network.getDisplayText(); this.reservationId = network.getReservationId(); this.networkDomain = network.getNetworkDomain(); this.domainId = network.getDomainId(); this.guestType = network.getGuestType(); this.physicalNetworkId = network.getPhysicalNetworkId(); this.aclType = network.getAclType(); this.restartRequired = network.isRestartRequired(); this.specifyIpRanges = network.getSpecifyIpRanges(); this.vpcId = network.getVpcId(); }