Package org.apache.stratos.manager.client

Examples of org.apache.stratos.manager.client.CloudControllerServiceClient


    static StratosAdminResponse deployCartridge (CartridgeDefinitionBean cartridgeDefinitionBean, ConfigurationContext ctxt,
        String userName, String tenantDomain) throws RestAPIException {

        log.info("Starting to deploy a Cartridge [type] "+cartridgeDefinitionBean.type);

        CloudControllerServiceClient cloudControllerServiceClient = getCloudControllerServiceClient();
       
        if (cloudControllerServiceClient != null) {

            CartridgeConfig cartridgeConfig = PojoConverter.populateCartridgeConfigPojo(cartridgeDefinitionBean);

            if(cartridgeConfig == null) {
                throw new RestAPIException("Populated CartridgeConfig instance is null, cartridge deployment aborted");
            }

               
      // call CC
      try {
        cloudControllerServiceClient
            .deployCartridgeDefinition(cartridgeConfig);
      } catch (RemoteException e) {
        log.error(e.getMessage(), e);
        throw new RestAPIException(e.getMessage(), e);
      } catch (CloudControllerServiceInvalidCartridgeDefinitionExceptionException e) {
View Full Code Here


        return commonPolicies.toArray(new DeploymentPolicy[0]);
    }
   
    static StratosAdminResponse undeployCartridge(String cartridgeType) throws RestAPIException {

        CloudControllerServiceClient cloudControllerServiceClient = getCloudControllerServiceClient();
        if (cloudControllerServiceClient != null) {
                try {
          cloudControllerServiceClient.unDeployCartridgeDefinition(cartridgeType);
        } catch (RemoteException e) {
          log.error(e.getMessage(), e);
          throw new RestAPIException(e.getMessage(), e);
        } catch (CloudControllerServiceInvalidCartridgeTypeExceptionException e) {
          String msg = e.getFaultMessage().getInvalidCartridgeTypeException().getMessage();
View Full Code Here

TOP

Related Classes of org.apache.stratos.manager.client.CloudControllerServiceClient

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.