Package org.apache.cloudstack.network.contrail.model

Examples of org.apache.cloudstack.network.contrail.model.ServiceInstanceModel


    public TreeSet<ServiceInstanceModel> getServiceInstances() {
        return _serviceInstanceTable;
    }

    public ServiceInstanceModel lookupServiceInstance(String fqn) {
        ServiceInstanceModel siKey = new ServiceInstanceModel(fqn);
        ServiceInstanceModel current = _serviceInstanceTable.ceiling(siKey);
        if  (current != null && current.getQualifiedName().equals(fqn)) {
            return current;
        }
        return null;
    }
View Full Code Here


            s_logger.warn("service-instance lookup", ex);
            throw new CloudRuntimeException(ex);
        }

        // 1. Create service-instance.
        ServiceInstanceModel serviceModel = new ServiceInstanceModel(project, name, template, serviceOffering,
                leftModel, rightModel);

        try {
            serviceModel.update(_manager.getModelController());
        } catch (Exception ex) {
            s_logger.warn("service-instance update", ex);
            throw new CloudRuntimeException(ex);
        }

        s_logger.debug("service-instance object created");

        ServiceInstance siObj;
        try {
            _manager.getDatabase().getServiceInstances().add(serviceModel);
            siObj = serviceModel.getServiceInstance();
        } catch (Exception ex) {
            s_logger.warn("DB add", ex);
            throw new CloudRuntimeException(ex);
        }
View Full Code Here

    public TreeSet<ServiceInstanceModel> getServiceInstances() {
        return _serviceInstanceTable;
    }
   
    public ServiceInstanceModel lookupServiceInstance(String fqn) {
        ServiceInstanceModel siKey = new ServiceInstanceModel(fqn);
        ServiceInstanceModel current = _serviceInstanceTable.ceiling(siKey);
        if  (current != null && current.getQualifiedName().equals(fqn)) {
            return current;
        }
        return null;
    }
View Full Code Here

            s_logger.warn("service-instance lookup", ex);
            throw new CloudRuntimeException(ex);
        }
       
        // 1. Create service-instance.
        ServiceInstanceModel serviceModel = new ServiceInstanceModel(project, name, template, serviceOffering,
                leftModel, rightModel);

        try {
            serviceModel.update(_manager.getModelController());
        } catch (Exception ex) {
            s_logger.warn("service-instance update", ex);
            throw new CloudRuntimeException(ex);
        }
       
        s_logger.debug("service-instance object created");
       
        ServiceInstance siObj;
        try {
            _manager.getDatabase().getServiceInstances().add(serviceModel);
            siObj = serviceModel.getServiceInstance();
        } catch (Exception ex){
            s_logger.warn("DB add", ex);
            throw new CloudRuntimeException(ex);
        }
       
View Full Code Here

TOP

Related Classes of org.apache.cloudstack.network.contrail.model.ServiceInstanceModel

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.