Package com.cloud.network.vpc

Examples of com.cloud.network.vpc.VpcServiceMapVO


    public void persistVpcServiceProviders(long vpcId, Map<String, List<String>> serviceProviderMap) {
        Transaction txn = Transaction.currentTxn();
        txn.start();
        for (String service : serviceProviderMap.keySet()) {
            for (String provider : serviceProviderMap.get(service)) {
                VpcServiceMapVO serviceMap = new VpcServiceMapVO(vpcId, Network.Service.getService(service), Network.Provider.getProvider(provider));
                _vpcSvcMap.persist(serviceMap);
            }
        }
        txn.commit();
    }
View Full Code Here


    @Override
    public String getProviderForServiceInVpc(long vpcId, Service service) {
        SearchCriteria<VpcServiceMapVO> sc = AllFieldsSearch.create();
        sc.setParameters("vpcId", vpcId);
        sc.setParameters("service", service.getName());
        VpcServiceMapVO ntwkSvc = findOneBy(sc);
        if (ntwkSvc == null) {
            throw new UnsupportedServiceException("Service " + service.getName() + " is not supported in the vpc id=" + vpcId);
        }

        return ntwkSvc.getProvider();
    }
View Full Code Here

    public void persistVpcServiceProviders(long vpcId, Map<String, List<String>> serviceProviderMap) {
        TransactionLegacy txn = TransactionLegacy.currentTxn();
        txn.start();
        for (String service : serviceProviderMap.keySet()) {
            for (String provider : serviceProviderMap.get(service)) {
                VpcServiceMapVO serviceMap = new VpcServiceMapVO(vpcId, Network.Service.getService(service), Network.Provider.getProvider(provider));
                _vpcSvcMap.persist(serviceMap);
            }
        }
        txn.commit();
    }
View Full Code Here

    @Override
    public String getProviderForServiceInVpc(long vpcId, Service service) {
        SearchCriteria<VpcServiceMapVO> sc = AllFieldsSearch.create();
        sc.setParameters("vpcId", vpcId);
        sc.setParameters("service", service.getName());
        VpcServiceMapVO ntwkSvc = findOneBy(sc);
        if (ntwkSvc == null) {
            throw new UnsupportedServiceException("Service " + service.getName() + " is not supported in the vpc id=" + vpcId);
        }

        return ntwkSvc.getProvider();
    }
View Full Code Here

    public void persistVpcServiceProviders(long vpcId, Map<String, List<String>> serviceProviderMap) {
        Transaction txn = Transaction.currentTxn();
        txn.start();
        for (String service : serviceProviderMap.keySet()) {
            for (String provider : serviceProviderMap.get(service)) {
                VpcServiceMapVO serviceMap = new VpcServiceMapVO(vpcId, Network.Service.getService(service), Network.Provider.getProvider(provider));
                _vpcSvcMap.persist(serviceMap);
            }
        }
        txn.commit();
    }
View Full Code Here

    public void persistVpcServiceProviders(long vpcId, Map<String, List<String>> serviceProviderMap) {
        TransactionLegacy txn = TransactionLegacy.currentTxn();
        txn.start();
        for (String service : serviceProviderMap.keySet()) {
            for (String provider : serviceProviderMap.get(service)) {
                VpcServiceMapVO serviceMap = new VpcServiceMapVO(vpcId, Network.Service.getService(service), Network.Provider.getProvider(provider));
                _vpcSvcMap.persist(serviceMap);
            }
        }
        txn.commit();
    }
View Full Code Here

    @Override
    public String getProviderForServiceInVpc(long vpcId, Service service) {
        SearchCriteria<VpcServiceMapVO> sc = AllFieldsSearch.create();
        sc.setParameters("vpcId", vpcId);
        sc.setParameters("service", service.getName());
        VpcServiceMapVO ntwkSvc = findOneBy(sc);
        if (ntwkSvc == null) {
            throw new UnsupportedServiceException("Service " + service.getName() + " is not supported in the vpc id=" + vpcId);
        }

        return ntwkSvc.getProvider();
    }
View Full Code Here

TOP

Related Classes of com.cloud.network.vpc.VpcServiceMapVO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.