use of com.cloud.server.ConfigurationServerImpl in project cloudstack by apache.
the class ContrailElementImpl method isReady.
@Override
public boolean isReady(PhysicalNetworkServiceProvider provider) {
Map<String, String> serviceMap = ((ConfigurationServerImpl) _configServer).getServicesAndProvidersForNetwork(_manager.getRouterOffering().getId());
List<TrafficType> types = new ArrayList<TrafficType>();
types.add(TrafficType.Control);
types.add(TrafficType.Management);
types.add(TrafficType.Storage);
List<NetworkVO> systemNets = _manager.findSystemNetworks(types);
if (systemNets != null && !systemNets.isEmpty()) {
for (NetworkVO net : systemNets) {
s_logger.debug("update system network service: " + net.getName() + "; service provider: " + serviceMap);
_networksDao.update(net.getId(), net, serviceMap);
}
} else {
s_logger.debug("no system networks created yet");
}
serviceMap = ((ConfigurationServerImpl) _configServer).getServicesAndProvidersForNetwork(_manager.getPublicRouterOffering().getId());
types = new ArrayList<TrafficType>();
types.add(TrafficType.Public);
systemNets = _manager.findSystemNetworks(types);
if (systemNets != null && !systemNets.isEmpty()) {
for (NetworkVO net : systemNets) {
s_logger.debug("update system network service: " + net.getName() + "; service provider: " + serviceMap);
_networksDao.update(net.getId(), net, serviceMap);
}
} else {
s_logger.debug("no system networks created yet");
}
return true;
}
Aggregations