@Override public Long getDedicatedNetworkDomain(long networkId) { NetworkDomainVO networkMaps = _networkDomainDao.getDomainNetworkMapByNetworkId(networkId); if (networkMaps != null) { return networkMaps.getDomainId(); } else { return null; } }
@Override public boolean isNetworkAvailableInDomain(long networkId, long domainId) { Long networkDomainId = null; Network network = getNetwork(networkId); if (network.getGuestType() != GuestType.Shared && network.getGuestType() != GuestType.L2) { s_logger.trace("Network id=" + networkId + " is not shared or L2"); return false; } NetworkDomainVO networkDomainMap = _networkDomainDao.getDomainNetworkMapByNetworkId(networkId); if (networkDomainMap == null) { s_logger.trace("Network id=" + networkId + " is shared or L2, but not domain specific"); return true; } else { networkDomainId = networkDomainMap.getDomainId(); } if (domainId == networkDomainId.longValue()) { return true; } if (networkDomainMap.subdomainAccess) { Set<Long> parentDomains = _domainMgr.getDomainParentIds(domainId); if (parentDomains.contains(networkDomainId)) { return true; } } return false; }
public static Pair<Long, Boolean> getDomainNetworkDetails(long networkId) { NetworkDomainVO map = s_networkDomainDao.getDomainNetworkMapByNetworkId(networkId); boolean subdomainAccess = (map.isSubdomainAccess() != null) ? map.isSubdomainAccess() : s_networkModel.getAllowSubdomainAccessGlobal(); return new Pair<Long, Boolean>(map.getDomainId(), subdomainAccess); }
NetworkDomainVO domainNetworkMapByNetworkId = _networkDomainDao.getDomainNetworkMapByNetworkId(originalNetworkId); AccountVO networkAccount = _accountDao.findById(network.getAccountId());
final NetworkDomainVO networkDomain = _networkDomainDao.getDomainNetworkMapByNetworkId(networkFinal.getId()); if (networkDomain != null) { _networkDomainDao.remove(networkDomain.getId());