use of com.cloud.network.element.OvsProviderVO in project cloudstack by apache.
the class NetworkServiceImpl method addDefaultOvsToPhysicalNetwork.
private PhysicalNetworkServiceProvider addDefaultOvsToPhysicalNetwork(long physicalNetworkId) {
PhysicalNetworkServiceProvider nsp = addProviderToPhysicalNetwork(physicalNetworkId, Network.Provider.Ovs.getName(), null, null);
NetworkElement networkElement = _networkModel.getElementImplementingProvider(Network.Provider.Ovs.getName());
if (networkElement == null) {
throw new CloudRuntimeException("Unable to find the Network Element implementing the Ovs Provider");
}
OvsProviderVO element = _ovsProviderDao.findByNspId(nsp.getId());
if (element != null) {
s_logger.debug("There is already a Ovs element with service provider id " + nsp.getId());
return nsp;
}
element = new OvsProviderVO(nsp.getId());
_ovsProviderDao.persist(element);
return nsp;
}
Aggregations