public static StratosAdminResponse deployPartition(Partition partitionBean) throws RestAPIException {
//log.info("***** " + cartridgeDefinitionBean.toString() + " *****");
AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
if (autoscalerServiceClient != null) {
org.apache.stratos.cloud.controller.stub.deployment.partition.Partition partition =
PojoConverter.convertToCCPartitionPojo(partitionBean);
try {
autoscalerServiceClient.deployPartition(partition);
} catch (RemoteException e) {
log.error(e.getMessage(), e);
throw new RestAPIException(e.getMessage(), e);
} catch (AutoScalerServiceInvalidPartitionExceptionException e) {
String message = e.getFaultMessage().getInvalidPartitionException().getMessage();