use of com.cloud.dc.DomainVlanMapVO in project cloudstack by apache.
the class ConfigurationManagerImpl method getVlanDomain.
@Override
public Domain getVlanDomain(long vlanId) {
Vlan vlan = _vlanDao.findById(vlanId);
Long domainId = null;
// from the network
if (vlan.getVlanType() == VlanType.VirtualNetwork) {
List<DomainVlanMapVO> maps = _domainVlanMapDao.listDomainVlanMapsByVlan(vlanId);
if (maps != null && !maps.isEmpty()) {
return _domainDao.findById(maps.get(0).getDomainId());
}
}
return null;
}
Aggregations