Search in sources :

Example 1 with RedundantResource

use of com.cloud.network.element.RedundantResource in project cloudstack by apache.

the class NetworkOrchestrator method getResourceCount.

@Override
public int getResourceCount(Network network) {
    List<Provider> providers = getNetworkProviders(network.getId());
    int resourceCount = 0;
    for (NetworkElement element : networkElements) {
        if (providers.contains(element.getProvider())) {
            //currently only one element implements the redundant resource interface
            if (element instanceof RedundantResource) {
                resourceCount = ((RedundantResource) element).getResourceCount(network);
                break;
            }
        }
    }
    return resourceCount;
}
Also used : NetworkElement(com.cloud.network.element.NetworkElement) RedundantResource(com.cloud.network.element.RedundantResource) DnsServiceProvider(com.cloud.network.element.DnsServiceProvider) UserDataServiceProvider(com.cloud.network.element.UserDataServiceProvider) DhcpServiceProvider(com.cloud.network.element.DhcpServiceProvider) LoadBalancingServiceProvider(com.cloud.network.element.LoadBalancingServiceProvider) StaticNatServiceProvider(com.cloud.network.element.StaticNatServiceProvider) Provider(com.cloud.network.Network.Provider)

Aggregations

Provider (com.cloud.network.Network.Provider)1 DhcpServiceProvider (com.cloud.network.element.DhcpServiceProvider)1 DnsServiceProvider (com.cloud.network.element.DnsServiceProvider)1 LoadBalancingServiceProvider (com.cloud.network.element.LoadBalancingServiceProvider)1 NetworkElement (com.cloud.network.element.NetworkElement)1 RedundantResource (com.cloud.network.element.RedundantResource)1 StaticNatServiceProvider (com.cloud.network.element.StaticNatServiceProvider)1 UserDataServiceProvider (com.cloud.network.element.UserDataServiceProvider)1