Examples of CloudControllerServiceClient


Examples of org.apache.stratos.adc.mgt.client.CloudControllerServiceClient

    public static CloudControllerServiceClient getServiceClient() throws AxisFault {
        if (serviceClient == null) {
            synchronized (CloudControllerServiceClient.class) {
                if (serviceClient == null) {
                    serviceClient = new CloudControllerServiceClient(
                            System.getProperty(CartridgeConstants.AUTOSCALER_SERVICE_URL));
                }
            }
        }
        return serviceClient;
View Full Code Here

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

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

        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
Copyright © 2018 www.massapi.com. 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.