You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ga...@apache.org on 2015/07/21 10:48:48 UTC
[1/4] stratos git commit: Fix issues in updating a network partition
and a deployment policy
Repository: stratos
Updated Branches:
refs/heads/tenant-isolation ea45f6cf7 -> ca0333bb2
Fix issues in updating a network partition and a deployment policy
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/b751ddd2
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/b751ddd2
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/b751ddd2
Branch: refs/heads/tenant-isolation
Commit: b751ddd2b9c332a4df4c4c1b5db00612b9dc6bb9
Parents: ea182b4
Author: Dinithi <di...@wso2.com>
Authored: Mon Jul 20 10:07:57 2015 +0530
Committer: Dinithi <di...@wso2.com>
Committed: Mon Jul 20 10:07:57 2015 +0530
----------------------------------------------------------------------
.../services/impl/CloudControllerServiceImpl.java | 2 +-
.../apache/stratos/rest/endpoint/api/StratosApiV41.java | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/b751ddd2/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
index d4c7b13..0aee888 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
@@ -1644,7 +1644,7 @@ public class CloudControllerServiceImpl implements CloudControllerService {
String networkPartitionId = networkPartition.getId();
String networkPartitionUuid = networkPartition.getUuid();
- if (cloudControllerContext.getNetworkPartition(networkPartitionId) == null) {
+ if (cloudControllerContext.getNetworkPartition(networkPartitionUuid) == null) {
String message = String.format("Network partition not found: [network-partition-uuid] %s " +
"[network-partition-id] %s", networkPartitionUuid, networkPartitionId);
log.error(message);
http://git-wip-us.apache.org/repos/asf/stratos/blob/b751ddd2/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
index 6aa89ea..7cce069 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
@@ -741,7 +741,8 @@ public class StratosApiV41 extends AbstractApi {
ResponseMessageBean.ERROR, "Network partition not found")).build();
}
return Response.ok().entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,
- String.format("Network Partition updated successfully: [network-partition] %s",
+ String.format("Network Partition updated successfully: [network-partition-uuid] %s " +
+ "[network-partition-id] %s", networkPartition.getUuid(),
networkPartition.getId()))).build();
}
@@ -757,17 +758,16 @@ public class StratosApiV41 extends AbstractApi {
@AuthorizationAction("/permission/admin/stratos/networkPartitions/manage")
public Response removeNetworkPartition(
@PathParam("networkPartitionId") String networkPartitionId) throws RestAPIException {
-
+ PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext();
try {
- PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext();
StratosApiV41Utils.removeNetworkPartition(networkPartitionId, carbonContext.getTenantId());
} catch (CloudControllerServiceNetworkPartitionNotExistsExceptionException e) {
return Response.status(Response.Status.NOT_FOUND).entity(new ResponseMessageBean(
ResponseMessageBean.ERROR, "Network partition is not found")).build();
}
return Response.ok().entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,
- String.format("Network partition deleted successfully: [network-partition] %s",
- networkPartitionId))).build();
+ String.format("Network partition deleted successfully: [network-partition-id] %s " +
+ "[tenant-domain] %s", networkPartitionId, carbonContext.getTenantDomain()))).build();
}
// API methods for applications
[2/4] stratos git commit: Merge branch 'tenant-isolation-v1' of
https://github.com/dinithis/stratos into tenant-isolation
Posted by ga...@apache.org.
Merge branch 'tenant-isolation-v1' of https://github.com/dinithis/stratos into tenant-isolation
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/6b16576f
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/6b16576f
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/6b16576f
Branch: refs/heads/tenant-isolation
Commit: 6b16576fe5bbef99873348279654738dfc112145
Parents: ea45f6c b751ddd
Author: Gayan Gunarathne <ga...@wso2.com>
Authored: Tue Jul 21 12:10:02 2015 +0530
Committer: Gayan Gunarathne <ga...@wso2.com>
Committed: Tue Jul 21 12:10:02 2015 +0530
----------------------------------------------------------------------
.../services/impl/CloudControllerServiceImpl.java | 2 +-
.../apache/stratos/rest/endpoint/api/StratosApiV41.java | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
[3/4] stratos git commit: Refactor varibales with uuid
Posted by ga...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/ca0333bb/service-stubs/org.apache.stratos.cloud.controller.service.stub/src/main/resources/CloudControllerService.wsdl
----------------------------------------------------------------------
diff --git a/service-stubs/org.apache.stratos.cloud.controller.service.stub/src/main/resources/CloudControllerService.wsdl b/service-stubs/org.apache.stratos.cloud.controller.service.stub/src/main/resources/CloudControllerService.wsdl
index 99bfb94..ac8bbca 100644
--- a/service-stubs/org.apache.stratos.cloud.controller.service.stub/src/main/resources/CloudControllerService.wsdl
+++ b/service-stubs/org.apache.stratos.cloud.controller.service.stub/src/main/resources/CloudControllerService.wsdl
@@ -1,188 +1,170 @@
-<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns="http://impl.services.controller.cloud.stratos.apache.org" xmlns:ax27="http://kubernetes.domain.controller.cloud.stratos.apache.org/xsd" xmlns:ax25="http://common.stratos.apache.org/xsd" xmlns:ax23="http://domain.controller.cloud.stratos.apache.org/xsd" xmlns:ax21="http://exception.controller.cloud.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax212="http://topology.domain.messaging.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax210="http://domain.common.stratos.apache.org/xsd" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://impl.services.controller.cloud.stratos.apache.org">
+<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ax29="http://kubernetes.domain.controller.cloud.stratos.apache.org/xsd" xmlns:ns="http://impl.services.controller.cloud.stratos.apache.org" xmlns:ax27="http://topology.domain.messaging.stratos.apache.org/xsd" xmlns:ax23="http://domain.controller.cloud.stratos.apache.org/xsd" xmlns:ax24="http://common.stratos.apache.org/xsd" xmlns:ax21="http://exception.controller.cloud.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax212="http://domain.common.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://impl.services.controller.cloud.stratos.apache.org">
<wsdl:types>
- <xs:schema xmlns:ax29="http://kubernetes.domain.controller.cloud.stratos.apache.org/xsd" xmlns:ax213="http://topology.domain.messaging.stratos.apache.org/xsd" xmlns:ax24="http://domain.controller.cloud.stratos.apache.org/xsd" xmlns:ax22="http://exception.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://impl.services.controller.cloud.stratos.apache.org">
+ <xs:schema xmlns:ax28="http://topology.domain.messaging.stratos.apache.org/xsd" xmlns:ax26="http://domain.controller.cloud.stratos.apache.org/xsd" xmlns:ax211="http://kubernetes.domain.controller.cloud.stratos.apache.org/xsd" xmlns:ax22="http://exception.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://impl.services.controller.cloud.stratos.apache.org">
<xs:import namespace="http://exception.controller.cloud.stratos.apache.org/xsd"/>
<xs:import namespace="http://domain.controller.cloud.stratos.apache.org/xsd"/>
- <xs:import namespace="http://kubernetes.domain.controller.cloud.stratos.apache.org/xsd"/>
<xs:import namespace="http://topology.domain.messaging.stratos.apache.org/xsd"/>
- <xs:element name="getIaasProviders">
- <xs:complexType>
- <xs:sequence/>
- </xs:complexType>
- </xs:element>
- <xs:element name="getIaasProvidersResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="CloudControllerServiceInvalidCartridgeTypeException">
+ <xs:import namespace="http://kubernetes.domain.controller.cloud.stratos.apache.org/xsd"/>
+ <xs:element name="CloudControllerServiceCartridgeNotFoundException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidCartridgeTypeException" nillable="true" type="ax21:InvalidCartridgeTypeException"/>
+ <xs:element minOccurs="0" name="CartridgeNotFoundException" nillable="true" type="ax21:CartridgeNotFoundException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeCartridge">
+ <xs:element name="getCartridgeByTenant">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="tenantId" type="xs:int"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeCartridgeResponse">
+ <xs:element name="getCartridgeByTenantResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax26:Cartridge"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidServiceGroupException">
+ <xs:element name="getCartridgesByTenant">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax21:InvalidServiceGroupException"/>
+ <xs:element minOccurs="0" name="tenantId" type="xs:int"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addServiceGroup">
+ <xs:element name="getCartridgesByTenantResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax23:ServiceGroup"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:Cartridge"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addServiceGroupResponse">
+ <xs:element name="CloudControllerServiceUnregisteredClusterException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="UnregisteredClusterException" nillable="true" type="ax21:UnregisteredClusterException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeServiceGroup">
+ <xs:element name="unregisterService">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeServiceGroupResponse">
+ <xs:element name="unregisterServiceResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroup">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getServiceGroupResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax23:ServiceGroup"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getServiceGroupSubGroups">
+ <xs:element name="CloudControllerServiceInvalidPartitionException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="InvalidPartitionException" nillable="true" type="ax21:InvalidPartitionException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupSubGroupsResponse">
+ <xs:element name="CloudControllerServiceInvalidCartridgeTypeException">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="InvalidCartridgeTypeException" nillable="true" type="ax21:InvalidCartridgeTypeException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupCartridges">
+ <xs:element name="validateDeploymentPolicyNetworkPartition">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="cartridgeUuid" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="networkPartitionUuid" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupCartridgesResponse">
+ <xs:element name="validateDeploymentPolicyNetworkPartitionResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupDependencies">
+ <xs:element name="updateClusterStatus">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="instanceId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="status" nillable="true" type="ax27:ClusterStatus"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupDependenciesResponse">
+ <xs:element name="updateClusterStatusResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax23:Dependencies"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidPartitionException">
+ <xs:element name="CloudControllerServiceApplicationClusterRegistrationException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidPartitionException" nillable="true" type="ax21:InvalidPartitionException"/>
+ <xs:element minOccurs="0" name="ApplicationClusterRegistrationException" nillable="true" type="ax21:ApplicationClusterRegistrationException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="validateDeploymentPolicyNetworkPartition">
+ <xs:element name="createApplicationClusters">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="networkPartitionId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="appUuid" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="appClustersContexts" nillable="true" type="ax26:ApplicationClusterContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="validateDeploymentPolicyNetworkPartitionResponse">
+ <xs:element name="createApplicationClustersResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidCartridgeDefinitionException">
+ <xs:element name="CloudControllerServiceClusterInstanceCreationException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidCartridgeDefinitionException" nillable="true" type="ax21:InvalidCartridgeDefinitionException"/>
+ <xs:element minOccurs="0" name="ClusterInstanceCreationException" nillable="true" type="ax21:ClusterInstanceCreationException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidIaasProviderException">
+ <xs:element name="createClusterInstance">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidIaasProviderException" nillable="true" type="ax21:InvalidIaasProviderException"/>
+ <xs:element minOccurs="0" name="serviceType" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="instanceId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="partitionId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="networkPartitionId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceCartridgeAlreadyExistsException">
+ <xs:element name="createClusterInstanceResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="CartridgeAlreadyExistsException" nillable="true" type="ax21:CartridgeAlreadyExistsException"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addCartridge">
+ <xs:element name="getKubernetesClusters">
<xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="cartridgeConfig" nillable="true" type="ax23:Cartridge"/>
- </xs:sequence>
+ <xs:sequence/>
</xs:complexType>
</xs:element>
- <xs:element name="addCartridgeResponse">
+ <xs:element name="getKubernetesClustersResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:KubernetesCluster"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -193,20 +175,6 @@
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getKubernetesCluster">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="kubernetesClusterUuid" nillable="true" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getKubernetesClusterResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax29:KubernetesCluster"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
<xs:element name="getKubernetesClusterByTenant">
<xs:complexType>
<xs:sequence>
@@ -314,38 +282,24 @@
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceNonExistingKubernetesHostException">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="NonExistingKubernetesHostException" nillable="true" type="ax21:NonExistingKubernetesHostException"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="updateKubernetesHost">
+ <xs:element name="removeKubernetesCluster">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax29:KubernetesHost"/>
+ <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateKubernetesHostResponse">
+ <xs:element name="removeKubernetesClusterResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeKubernetesCluster">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="removeKubernetesClusterResponse">
+ <xs:element name="CloudControllerServiceNonExistingKubernetesHostException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="NonExistingKubernetesHostException" nillable="true" type="ax21:NonExistingKubernetesHostException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -391,6 +345,20 @@
</xs:sequence>
</xs:complexType>
</xs:element>
+ <xs:element name="updateKubernetesHost">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax29:KubernetesHost"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="updateKubernetesHostResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
<xs:element name="CloudControllerServiceNetworkPartitionAlreadyExistsException">
<xs:complexType>
<xs:sequence>
@@ -408,7 +376,7 @@
<xs:element name="addNetworkPartition">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="networkPartition" nillable="true" type="ax23:NetworkPartition"/>
+ <xs:element minOccurs="0" name="networkPartition" nillable="true" type="ax26:NetworkPartition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -444,7 +412,7 @@
<xs:element name="updateNetworkPartition">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="networkPartition" nillable="true" type="ax23:NetworkPartition"/>
+ <xs:element minOccurs="0" name="networkPartition" nillable="true" type="ax26:NetworkPartition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -463,7 +431,7 @@
<xs:element name="getNetworkPartitionsResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax23:NetworkPartition"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:NetworkPartition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -477,7 +445,7 @@
<xs:element name="getNetworkPartitionsByTenantResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax23:NetworkPartition"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:NetworkPartition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -491,49 +459,42 @@
<xs:element name="getNetworkPartitionResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax23:NetworkPartition"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getCartridgesByTenant">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="tenantId" type="xs:int"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax26:NetworkPartition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getCartridgesByTenantResponse">
+ <xs:element name="CloudControllerServiceInvalidCartridgeDefinitionException">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax23:Cartridge"/>
+ <xs:element minOccurs="0" name="InvalidCartridgeDefinitionException" nillable="true" type="ax21:InvalidCartridgeDefinitionException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceCartridgeNotFoundException">
+ <xs:element name="CloudControllerServiceInvalidIaasProviderException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="CartridgeNotFoundException" nillable="true" type="ax21:CartridgeNotFoundException"/>
+ <xs:element minOccurs="0" name="InvalidIaasProviderException" nillable="true" type="ax21:InvalidIaasProviderException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceCloudControllerException">
+ <xs:element name="CloudControllerServiceCartridgeAlreadyExistsException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="CloudControllerException" nillable="true" type="ax21:CloudControllerException"/>
+ <xs:element minOccurs="0" name="CartridgeAlreadyExistsException" nillable="true" type="ax21:CartridgeAlreadyExistsException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="startInstance">
+ <xs:element name="addCartridge">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="instanceContext" nillable="true" type="ax23:InstanceContext"/>
+ <xs:element minOccurs="0" name="cartridgeConfig" nillable="true" type="ax26:Cartridge"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="startInstanceResponse">
+ <xs:element name="addCartridgeResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax23:MemberContext"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -547,7 +508,7 @@
<xs:element name="updateCartridge">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="cartridge" nillable="true" type="ax23:Cartridge"/>
+ <xs:element minOccurs="0" name="cartridge" nillable="true" type="ax26:Cartridge"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -558,80 +519,129 @@
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getCartridge">
+ <xs:element name="removeCartridge">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getCartridgeResponse">
+ <xs:element name="removeCartridgeResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax23:Cartridge"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="validatePartition">
+ <xs:element name="CloudControllerServiceInvalidServiceGroupException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="partition" nillable="true" type="ax23:Partition"/>
+ <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax21:InvalidServiceGroupException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="validatePartitionResponse">
+ <xs:element name="addServiceGroup">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax26:ServiceGroup"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="addServiceGroupResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="registerService">
+ <xs:element name="removeServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="registrant" nillable="true" type="ax23:Registrant"/>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="registerServiceResponse">
+ <xs:element name="removeServiceGroupResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="startInstances">
+ <xs:element name="getServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="instanceContexts" nillable="true" type="ax23:InstanceContext"/>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="startInstancesResponse">
+ <xs:element name="getServiceGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax23:MemberContext"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax26:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidMemberException">
+ <xs:element name="getServiceGroupSubGroups">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidMemberException" nillable="true" type="ax21:InvalidMemberException"/>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="terminateInstance">
+ <xs:element name="getServiceGroupSubGroupsResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="memberId" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="terminateInstanceResponse">
+ <xs:element name="getServiceGroupCartridges">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getServiceGroupCartridgesResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getServiceGroupDependencies">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getServiceGroupDependenciesResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax26:Dependencies"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="CloudControllerServiceCloudControllerException">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="CloudControllerException" nillable="true" type="ax21:CloudControllerException"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="startInstances">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="instanceContexts" nillable="true" type="ax26:InstanceContext"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="startInstancesResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:MemberContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -670,142 +680,132 @@
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateClusterStatus">
+ <xs:element name="registerService">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="instanceId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="status" nillable="true" type="ax212:ClusterStatus"/>
+ <xs:element minOccurs="0" name="registrant" nillable="true" type="ax26:Registrant"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateClusterStatusResponse">
+ <xs:element name="registerServiceResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceUnregisteredClusterException">
+ <xs:element name="getCartridge">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="UnregisteredClusterException" nillable="true" type="ax21:UnregisteredClusterException"/>
+ <xs:element minOccurs="0" name="cartridgeUuid" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="unregisterService">
+ <xs:element name="getCartridgeResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax26:Cartridge"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="unregisterServiceResponse">
+ <xs:element name="getClusterContext">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getCartridgeByTenant">
+ <xs:element name="getClusterContextResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="tenantId" type="xs:int"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax26:ClusterContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getCartridgeByTenantResponse">
+ <xs:element name="startInstance">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax23:Cartridge"/>
+ <xs:element minOccurs="0" name="instanceContext" nillable="true" type="ax26:InstanceContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getCartridges">
+ <xs:element name="startInstanceResponse">
<xs:complexType>
- <xs:sequence/>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax26:MemberContext"/>
+ </xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getCartridgesResponse">
+ <xs:element name="CloudControllerServiceInvalidMemberException">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="InvalidMemberException" nillable="true" type="ax21:InvalidMemberException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getClusterContext">
+ <xs:element name="terminateInstance">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="memberId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getClusterContextResponse">
+ <xs:element name="terminateInstanceResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax23:ClusterContext"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceApplicationClusterRegistrationException">
+ <xs:element name="getKubernetesCluster">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="ApplicationClusterRegistrationException" nillable="true" type="ax21:ApplicationClusterRegistrationException"/>
+ <xs:element minOccurs="0" name="kubernetesClusterUuid" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="createApplicationClusters">
+ <xs:element name="getKubernetesClusterResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="appId" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="appClustersContexts" nillable="true" type="ax23:ApplicationClusterContext"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax29:KubernetesCluster"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="createApplicationClustersResponse">
+ <xs:element name="validatePartition">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="partition" nillable="true" type="ax26:Partition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceClusterInstanceCreationException">
+ <xs:element name="validatePartitionResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="ClusterInstanceCreationException" nillable="true" type="ax21:ClusterInstanceCreationException"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="createClusterInstance">
+ <xs:element name="getIaasProviders">
<xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="serviceType" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="instanceId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="partitionId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="networkPartitionId" nillable="true" type="xs:string"/>
- </xs:sequence>
+ <xs:sequence/>
</xs:complexType>
</xs:element>
- <xs:element name="createClusterInstanceResponse">
+ <xs:element name="getIaasProvidersResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getKubernetesClusters">
+ <xs:element name="getCartridges">
<xs:complexType>
<xs:sequence/>
</xs:complexType>
</xs:element>
- <xs:element name="getKubernetesClustersResponse">
+ <xs:element name="getCartridgesResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:KubernetesCluster"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -824,7 +824,7 @@
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://common.stratos.apache.org/xsd">
<xs:complexType name="Properties">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax25:Property"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax24:Property"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Property">
@@ -835,12 +835,12 @@
</xs:complexType>
</xs:schema>
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://exception.controller.cloud.stratos.apache.org/xsd">
- <xs:complexType name="InvalidCartridgeTypeException">
+ <xs:complexType name="CartridgeNotFoundException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidServiceGroupException">
+ <xs:complexType name="UnregisteredClusterException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
@@ -850,18 +850,20 @@
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidCartridgeDefinitionException">
+ <xs:complexType name="InvalidCartridgeTypeException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidIaasProviderException">
+ <xs:complexType name="ApplicationClusterRegistrationException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="CartridgeAlreadyExistsException">
- <xs:sequence/>
+ <xs:complexType name="ClusterInstanceCreationException">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
+ </xs:sequence>
</xs:complexType>
<xs:complexType name="NonExistingKubernetesClusterException">
<xs:sequence>
@@ -911,44 +913,42 @@
<xs:complexType name="NetworkPartitionNotExistsException">
<xs:sequence/>
</xs:complexType>
- <xs:complexType name="CartridgeNotFoundException">
+ <xs:complexType name="InvalidCartridgeDefinitionException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="CloudControllerException">
- <xs:complexContent>
- <xs:extension base="xs:RuntimeException">
- <xs:sequence/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="CartridgeDefinitionNotExistsException">
+ <xs:complexType name="InvalidIaasProviderException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidMemberException">
- <xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
- </xs:sequence>
+ <xs:complexType name="CartridgeAlreadyExistsException">
+ <xs:sequence/>
</xs:complexType>
- <xs:complexType name="InvalidClusterException">
+ <xs:complexType name="CartridgeDefinitionNotExistsException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="UnregisteredClusterException">
+ <xs:complexType name="InvalidServiceGroupException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="ApplicationClusterRegistrationException">
+ <xs:complexType name="CloudControllerException">
+ <xs:complexContent>
+ <xs:extension base="xs:RuntimeException">
+ <xs:sequence/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="InvalidClusterException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="ClusterInstanceCreationException">
+ <xs:complexType name="InvalidMemberException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
@@ -969,17 +969,17 @@
</xs:complexContent>
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ax28="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://kubernetes.domain.controller.cloud.stratos.apache.org/xsd">
+ <xs:schema xmlns:ax210="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://kubernetes.domain.controller.cloud.stratos.apache.org/xsd">
<xs:import namespace="http://common.stratos.apache.org/xsd"/>
<xs:complexType name="KubernetesCluster">
<xs:sequence>
<xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="clusterUuid" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="kubernetesHosts" nillable="true" type="ax27:KubernetesHost"/>
- <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax27:KubernetesMaster"/>
- <xs:element minOccurs="0" name="portRange" nillable="true" type="ax27:PortRange"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax28:Properties"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="kubernetesHosts" nillable="true" type="ax29:KubernetesHost"/>
+ <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax29:KubernetesMaster"/>
+ <xs:element minOccurs="0" name="portRange" nillable="true" type="ax29:PortRange"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax210:Properties"/>
<xs:element minOccurs="0" name="tenantId" type="xs:int"/>
</xs:sequence>
</xs:complexType>
@@ -988,13 +988,13 @@
<xs:element minOccurs="0" name="hostId" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="hostname" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="privateIPAddress" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax28:Properties"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax210:Properties"/>
<xs:element minOccurs="0" name="publicIPAddress" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="KubernetesMaster">
<xs:complexContent>
- <xs:extension base="ax27:KubernetesHost">
+ <xs:extension base="ax29:KubernetesHost">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
@@ -1006,23 +1006,9 @@
</xs:sequence>
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ax26="http://common.stratos.apache.org/xsd" xmlns:ax211="http://domain.common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://domain.controller.cloud.stratos.apache.org/xsd">
+ <xs:schema xmlns:ax213="http://domain.common.stratos.apache.org/xsd" xmlns:ax25="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://domain.controller.cloud.stratos.apache.org/xsd">
<xs:import namespace="http://common.stratos.apache.org/xsd"/>
<xs:import namespace="http://domain.common.stratos.apache.org/xsd"/>
- <xs:complexType name="ServiceGroup">
- <xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridges" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax23:Dependencies"/>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="subGroups" nillable="true" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="Dependencies">
- <xs:sequence>
- <xs:element minOccurs="0" name="killBehaviour" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="startupOrders" nillable="true" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
<xs:complexType name="Cartridge">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="appTypeMappings" nillable="true" type="ax23:AppType"/>
@@ -1120,6 +1106,22 @@
<xs:element minOccurs="0" name="proxyPort" type="xs:int"/>
</xs:sequence>
</xs:complexType>
+ <xs:complexType name="ApplicationClusterContext">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="autoscalePolicyName" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="dependencyClusterIds" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="deploymentPolicyName" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="hostName" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="lbCluster" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
+ <xs:element minOccurs="0" name="tenantRange" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="textPayload" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="volumeRequired" type="xs:boolean"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax23:Volume"/>
+ </xs:sequence>
+ </xs:complexType>
<xs:complexType name="NetworkPartition">
<xs:sequence>
<xs:element minOccurs="0" name="activeByDefault" type="xs:boolean"/>
@@ -1143,6 +1145,20 @@
<xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
+ <xs:complexType name="ServiceGroup">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridges" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax23:Dependencies"/>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="subGroups" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="Dependencies">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="killBehaviour" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="startupOrders" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
<xs:complexType name="InstanceContext">
<xs:sequence>
<xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
@@ -1166,14 +1182,14 @@
<xs:element minOccurs="0" name="clusterInstanceId" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="defaultPrivateIP" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="defaultPublicIP" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="dynamicPayload" nillable="true" type="ax210:NameValuePair"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="dynamicPayload" nillable="true" type="ax212:NameValuePair"/>
<xs:element minOccurs="0" name="initTime" type="xs:long"/>
<xs:element minOccurs="0" name="instanceId" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="instanceMetadata" nillable="true" type="ax23:InstanceMetadata"/>
<xs:element minOccurs="0" name="kubernetesPodId" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="kubernetesPodLabel" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="lbClusterId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="loadBalancingIPType" nillable="true" type="ax210:LoadBalancingIPType"/>
+ <xs:element minOccurs="0" name="loadBalancingIPType" nillable="true" type="ax212:LoadBalancingIPType"/>
<xs:element minOccurs="0" name="memberId" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="networkPartitionId" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="obsoleteExpiryTime" type="xs:long"/>
@@ -1213,8 +1229,8 @@
</xs:complexType>
<xs:complexType name="ClusterContext">
<xs:sequence>
- <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="applicationUuid" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="cartridgeUuid" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="hostName" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
@@ -1227,22 +1243,6 @@
<xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax23:Volume"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="ApplicationClusterContext">
- <xs:sequence>
- <xs:element minOccurs="0" name="autoscalePolicyName" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="dependencyClusterIds" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="deploymentPolicyName" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="hostName" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="lbCluster" type="xs:boolean"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
- <xs:element minOccurs="0" name="tenantRange" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="textPayload" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="volumeRequired" type="xs:boolean"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax23:Volume"/>
- </xs:sequence>
- </xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="getCartridgesRequest">
@@ -1560,18 +1560,18 @@
<wsdl:message name="getKubernetesClusterResponse">
<wsdl:part name="parameters" element="ns:getKubernetesClusterResponse"/>
</wsdl:message>
- <wsdl:message name="getCartridgeByTenantRequest">
- <wsdl:part name="parameters" element="ns:getCartridgeByTenant"/>
- </wsdl:message>
- <wsdl:message name="getCartridgeByTenantResponse">
- <wsdl:part name="parameters" element="ns:getCartridgeByTenantResponse"/>
- </wsdl:message>
<wsdl:message name="getNetworkPartitionsRequest">
<wsdl:part name="parameters" element="ns:getNetworkPartitions"/>
</wsdl:message>
<wsdl:message name="getNetworkPartitionsResponse">
<wsdl:part name="parameters" element="ns:getNetworkPartitionsResponse"/>
</wsdl:message>
+ <wsdl:message name="getCartridgeByTenantRequest">
+ <wsdl:part name="parameters" element="ns:getCartridgeByTenant"/>
+ </wsdl:message>
+ <wsdl:message name="getCartridgeByTenantResponse">
+ <wsdl:part name="parameters" element="ns:getCartridgeByTenantResponse"/>
+ </wsdl:message>
<wsdl:message name="removeCartridgeRequest">
<wsdl:part name="parameters" element="ns:removeCartridge"/>
</wsdl:message>
@@ -1798,15 +1798,15 @@
<wsdl:output message="ns:getKubernetesClusterResponse" wsaw:Action="urn:getKubernetesClusterResponse"/>
<wsdl:fault message="ns:CloudControllerServiceNonExistingKubernetesClusterException" name="CloudControllerServiceNonExistingKubernetesClusterException" wsaw:Action="urn:getKubernetesClusterCloudControllerServiceNonExistingKubernetesClusterException"/>
</wsdl:operation>
+ <wsdl:operation name="getNetworkPartitions">
+ <wsdl:input message="ns:getNetworkPartitionsRequest" wsaw:Action="urn:getNetworkPartitions"/>
+ <wsdl:output message="ns:getNetworkPartitionsResponse" wsaw:Action="urn:getNetworkPartitionsResponse"/>
+ </wsdl:operation>
<wsdl:operation name="getCartridgeByTenant">
<wsdl:input message="ns:getCartridgeByTenantRequest" wsaw:Action="urn:getCartridgeByTenant"/>
<wsdl:output message="ns:getCartridgeByTenantResponse" wsaw:Action="urn:getCartridgeByTenantResponse"/>
<wsdl:fault message="ns:CloudControllerServiceCartridgeNotFoundException" name="CloudControllerServiceCartridgeNotFoundException" wsaw:Action="urn:getCartridgeByTenantCloudControllerServiceCartridgeNotFoundException"/>
</wsdl:operation>
- <wsdl:operation name="getNetworkPartitions">
- <wsdl:input message="ns:getNetworkPartitionsRequest" wsaw:Action="urn:getNetworkPartitions"/>
- <wsdl:output message="ns:getNetworkPartitionsResponse" wsaw:Action="urn:getNetworkPartitionsResponse"/>
- </wsdl:operation>
<wsdl:operation name="removeCartridge">
<wsdl:input message="ns:removeCartridgeRequest" wsaw:Action="urn:removeCartridge"/>
<wsdl:output message="ns:removeCartridgeResponse" wsaw:Action="urn:removeCartridgeResponse"/>
@@ -2329,26 +2329,26 @@
<soap:fault use="literal" name="CloudControllerServiceNonExistingKubernetesClusterException"/>
</wsdl:fault>
</wsdl:operation>
- <wsdl:operation name="getNetworkPartitions">
- <soap:operation soapAction="urn:getNetworkPartitions" style="document"/>
+ <wsdl:operation name="getCartridgeByTenant">
+ <soap:operation soapAction="urn:getCartridgeByTenant" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
+ <wsdl:fault name="CloudControllerServiceCartridgeNotFoundException">
+ <soap:fault use="literal" name="CloudControllerServiceCartridgeNotFoundException"/>
+ </wsdl:fault>
</wsdl:operation>
- <wsdl:operation name="getCartridgeByTenant">
- <soap:operation soapAction="urn:getCartridgeByTenant" style="document"/>
+ <wsdl:operation name="getNetworkPartitions">
+ <soap:operation soapAction="urn:getNetworkPartitions" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
- <wsdl:fault name="CloudControllerServiceCartridgeNotFoundException">
- <soap:fault use="literal" name="CloudControllerServiceCartridgeNotFoundException"/>
- </wsdl:fault>
</wsdl:operation>
<wsdl:operation name="removeCartridge">
<soap:operation soapAction="urn:removeCartridge" style="document"/>
@@ -2890,26 +2890,26 @@
<soap12:fault use="literal" name="CloudControllerServiceNonExistingKubernetesClusterException"/>
</wsdl:fault>
</wsdl:operation>
- <wsdl:operation name="getNetworkPartitions">
- <soap12:operation soapAction="urn:getNetworkPartitions" style="document"/>
+ <wsdl:operation name="getCartridgeByTenant">
+ <soap12:operation soapAction="urn:getCartridgeByTenant" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
+ <wsdl:fault name="CloudControllerServiceCartridgeNotFoundException">
+ <soap12:fault use="literal" name="CloudControllerServiceCartridgeNotFoundException"/>
+ </wsdl:fault>
</wsdl:operation>
- <wsdl:operation name="getCartridgeByTenant">
- <soap12:operation soapAction="urn:getCartridgeByTenant" style="document"/>
+ <wsdl:operation name="getNetworkPartitions">
+ <soap12:operation soapAction="urn:getNetworkPartitions" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
- <wsdl:fault name="CloudControllerServiceCartridgeNotFoundException">
- <soap12:fault use="literal" name="CloudControllerServiceCartridgeNotFoundException"/>
- </wsdl:fault>
</wsdl:operation>
<wsdl:operation name="removeCartridge">
<soap12:operation soapAction="urn:removeCartridge" style="document"/>
@@ -3313,8 +3313,8 @@
<mime:content type="text/xml" part="parameters"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="getNetworkPartitions">
- <http:operation location="getNetworkPartitions"/>
+ <wsdl:operation name="getCartridgeByTenant">
+ <http:operation location="getCartridgeByTenant"/>
<wsdl:input>
<mime:content type="text/xml" part="parameters"/>
</wsdl:input>
@@ -3322,8 +3322,8 @@
<mime:content type="text/xml" part="parameters"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="getCartridgeByTenant">
- <http:operation location="getCartridgeByTenant"/>
+ <wsdl:operation name="getNetworkPartitions">
+ <http:operation location="getNetworkPartitions"/>
<wsdl:input>
<mime:content type="text/xml" part="parameters"/>
</wsdl:input>
[4/4] stratos git commit: Refactor varibales with uuid
Posted by ga...@apache.org.
Refactor varibales with uuid
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/ca0333bb
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/ca0333bb
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/ca0333bb
Branch: refs/heads/tenant-isolation
Commit: ca0333bb2cfd39e7436b99d0aae920fb3a470759
Parents: 6b16576
Author: Gayan Gunarathne <ga...@wso2.com>
Authored: Tue Jul 21 14:18:23 2015 +0530
Committer: Gayan Gunarathne <ga...@wso2.com>
Committed: Tue Jul 21 14:18:23 2015 +0530
----------------------------------------------------------------------
.../client/AutoscalerCloudControllerClient.java | 4 +-
.../autoscaler/monitor/MonitorFactory.java | 14 +-
.../context/CloudControllerContext.java | 24 +-
.../cloud/controller/domain/ClusterContext.java | 16 +-
.../iaases/kubernetes/KubernetesIaas.java | 8 +-
.../publisher/TopologyEventPublisher.java | 4 +-
.../messaging/topology/TopologyBuilder.java | 6 +-
.../impl/CloudControllerServiceImpl.java | 72 +--
.../client/CloudControllerServiceClient.java | 4 +-
.../rest/endpoint/api/StratosApiV41.java | 16 +-
.../rest/endpoint/api/StratosApiV41Utils.java | 10 +-
.../main/resources/CloudControllerService.wsdl | 580 +++++++++----------
12 files changed, 380 insertions(+), 378 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/ca0333bb/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/AutoscalerCloudControllerClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/AutoscalerCloudControllerClient.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/AutoscalerCloudControllerClient.java
index 9eb3d8e..712bf2f 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/AutoscalerCloudControllerClient.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/AutoscalerCloudControllerClient.java
@@ -145,7 +145,7 @@ public class AutoscalerCloudControllerClient {
}
}
- public synchronized void createApplicationClusters(String appId,
+ public synchronized void createApplicationClusters(String appUuid,
ApplicationClusterContext[] applicationClusterContexts) {
List<org.apache.stratos.cloud.controller.stub.domain.ApplicationClusterContext> contextDTOs =
new ArrayList<org.apache.stratos.cloud.controller.stub.domain.ApplicationClusterContext>();
@@ -177,7 +177,7 @@ public class AutoscalerCloudControllerClient {
new org.apache.stratos.cloud.controller.stub.domain.ApplicationClusterContext[contextDTOs.size()];
contextDTOs.toArray(applicationClusterContextDTOs);
try {
- stub.createApplicationClusters(appId, applicationClusterContextDTOs);
+ stub.createApplicationClusters(appUuid, applicationClusterContextDTOs);
} catch (RemoteException e) {
String msg = e.getMessage();
log.error(msg, e);
http://git-wip-us.apache.org/repos/asf/stratos/blob/ca0333bb/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java
index 516cef6..372e43e 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java
@@ -215,22 +215,22 @@ public class MonitorFactory {
//Retrieving the Cluster from Topology
String clusterId = context.getId();
- String serviceName = context.getServiceUuid();
+ String serviceUuid = context.getServiceUuid();
Cluster cluster;
//acquire read lock for the service and cluster
- TopologyManager.acquireReadLockForCluster(serviceName, clusterId);
+ TopologyManager.acquireReadLockForCluster(serviceUuid, clusterId);
try {
Topology topology = TopologyManager.getTopology();
- Service service = topology.getService(serviceName);
+ Service service = topology.getService(serviceUuid);
if (service == null) {
- String msg = String.format("Service not found in topology: [service] %s", serviceName);
+ String msg = String.format("Service not found in topology: [service] %s", serviceUuid);
throw new RuntimeException(msg);
}
cluster = service.getCluster(clusterId);
if (cluster == null) {
String msg = String.format("Cluster not found in topology: [service] %s [cluster] %s",
- serviceName, clusterId);
+ serviceUuid, clusterId);
throw new RuntimeException(msg);
}
//Find whether any other instances exists in group
@@ -263,7 +263,7 @@ public class MonitorFactory {
try {
CloudControllerServiceClient.getInstance().
- validateNetworkPartitionOfDeploymentPolicy(serviceName,
+ validateNetworkPartitionOfDeploymentPolicy(serviceUuid,
networkPartitionRef.getUuid());
} catch (Exception e) {
String msg = String.format("Error while validating deployment policy " +
@@ -323,7 +323,7 @@ public class MonitorFactory {
return clusterMonitor;
} finally {
- TopologyManager.releaseReadLockForCluster(serviceName, clusterId);
+ TopologyManager.releaseReadLockForCluster(serviceUuid, clusterId);
}
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/ca0333bb/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/context/CloudControllerContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/context/CloudControllerContext.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/context/CloudControllerContext.java
index b5f69cb..35d0da2 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/context/CloudControllerContext.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/context/CloudControllerContext.java
@@ -290,16 +290,16 @@ public class CloudControllerContext implements Serializable {
networkPartitionIDToNetworkPartitionMap.put(networkPartition.getUuid(), networkPartition);
}
- public NetworkPartition getNetworkPartition(String networkPartitionID) {
- return networkPartitionIDToNetworkPartitionMap.get(networkPartitionID);
+ public NetworkPartition getNetworkPartition(String networkPartitionUuid) {
+ return networkPartitionIDToNetworkPartitionMap.get(networkPartitionUuid);
}
public Collection<NetworkPartition> getNetworkPartitions() {
return networkPartitionIDToNetworkPartitionMap.values();
}
- public void removeNetworkPartition(String networkPartitionID) {
- networkPartitionIDToNetworkPartitionMap.remove(networkPartitionID);
+ public void removeNetworkPartition(String networkPartitionUuid) {
+ networkPartitionIDToNetworkPartitionMap.remove(networkPartitionUuid);
}
public NetworkPartition getNetworkPartitionForTenant(String networkPartitionId, int tenantId) {
@@ -821,8 +821,8 @@ public class CloudControllerContext implements Serializable {
this.cartridgeTypeToIaasProviders = cartridgeTypeToIaasProviders;
}
- public void addIaasProvider(String cartridgeType, IaasProvider iaasProvider) {
- List<IaasProvider> iaasProviders = cartridgeTypeToIaasProviders.get(cartridgeType);
+ public void addIaasProvider(String cartridgeUuid, IaasProvider iaasProvider) {
+ List<IaasProvider> iaasProviders = cartridgeTypeToIaasProviders.get(cartridgeUuid);
if (iaasProviders == null) {
iaasProviders = new ArrayList<IaasProvider>();
}
@@ -839,7 +839,7 @@ public class CloudControllerContext implements Serializable {
// Else, add iaas provider against cartridge type
iaasProviders.add(iaasProvider);
- cartridgeTypeToIaasProviders.put(cartridgeType, iaasProviders);
+ cartridgeTypeToIaasProviders.put(cartridgeUuid, iaasProviders);
}
public IaasProvider getIaasProvider(String cartridgeUuid, String iaasType) {
@@ -855,8 +855,8 @@ public class CloudControllerContext implements Serializable {
return null;
}
- public List<IaasProvider> getIaasProviders(String cartridgeType) {
- List<IaasProvider> iaasProviderList = cartridgeTypeToIaasProviders.get(cartridgeType);
+ public List<IaasProvider> getIaasProviders(String cartridgeUuid) {
+ List<IaasProvider> iaasProviderList = cartridgeTypeToIaasProviders.get(cartridgeUuid);
return iaasProviderList;
}
@@ -890,13 +890,13 @@ public class CloudControllerContext implements Serializable {
/**
* Get cluster port mappings of an application cluster.
- * @param applicationId
+ * @param applicationUuid
* @param clusterId
* @return
*/
- public List<ClusterPortMapping> getClusterPortMappings(String applicationId, String clusterId) {
+ public List<ClusterPortMapping> getClusterPortMappings(String applicationUuid, String clusterId) {
Map<String, List<ClusterPortMapping>> clusterIdToPortMappings =
- applicationIdToClusterIdToPortMappings.get(applicationId);
+ applicationIdToClusterIdToPortMappings.get(applicationUuid);
if(clusterIdToPortMappings != null) {
return clusterIdToPortMappings.get(clusterId);
http://git-wip-us.apache.org/repos/asf/stratos/blob/ca0333bb/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/ClusterContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/ClusterContext.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/ClusterContext.java
index 09b987d..87cc7f7 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/ClusterContext.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/ClusterContext.java
@@ -32,9 +32,9 @@ public class ClusterContext implements Serializable {
private static final long serialVersionUID = 4830667953031229223L;
- private final String applicationId;
+ private final String applicationUuid;
private final String clusterId;
- private final String cartridgeType;
+ private final String cartridgeUuid;
private final String payload;
private final String hostName;
private final boolean isLbCluster;
@@ -50,8 +50,8 @@ public class ClusterContext implements Serializable {
public ClusterContext(String applicationId, String cartridgeType, String clusterId, String payload, String hostName,
boolean isLbCluster, Properties properties) {
- this.applicationId = applicationId;
- this.cartridgeType = cartridgeType;
+ this.applicationUuid = applicationId;
+ this.cartridgeUuid = cartridgeType;
this.clusterId = clusterId;
this.payload = payload;
this.hostName = hostName;
@@ -59,16 +59,16 @@ public class ClusterContext implements Serializable {
this.setProperties(properties);
}
- public String getApplicationId() {
- return applicationId;
+ public String getApplicationUuid() {
+ return applicationUuid;
}
public String getClusterId() {
return clusterId;
}
- public String getCartridgeType() {
- return cartridgeType;
+ public String getCartridgeUuid() {
+ return cartridgeUuid;
}
public String getPayload() {
http://git-wip-us.apache.org/repos/asf/stratos/blob/ca0333bb/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java
index 155d3dc..d2fcaba 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java
@@ -173,7 +173,7 @@ public class KubernetesIaas extends Iaas {
memberContext.getMemberId()));
// Validate cartridge
- String cartridgeType = clusterContext.getCartridgeType();
+ String cartridgeType = clusterContext.getCartridgeUuid();
Cartridge cartridge = CloudControllerContext.getInstance().getCartridge(cartridgeType);
if (cartridge == null) {
String msg = String.format("Cartridge not found: [application] %s [cartridge] %s",
@@ -215,7 +215,7 @@ public class KubernetesIaas extends Iaas {
kubernetesPortRange.getLower());
// Generate kubernetes service ports and update port mappings in cartridge
- generateKubernetesServicePorts(clusterContext.getApplicationId(), clusterContext.getClusterId(),
+ generateKubernetesServicePorts(clusterContext.getApplicationUuid(), clusterContext.getClusterId(),
kubernetesClusterContext, cartridge);
// Create kubernetes services for port mappings
@@ -456,7 +456,7 @@ public class KubernetesIaas extends Iaas {
throws KubernetesClientException {
String clusterId = clusterContext.getClusterId();
- String cartridgeType = clusterContext.getCartridgeType();
+ String cartridgeType = clusterContext.getCartridgeUuid();
Cartridge cartridge = CloudControllerContext.getInstance().getCartridge(cartridgeType);
if (cartridge == null) {
@@ -496,7 +496,7 @@ public class KubernetesIaas extends Iaas {
}
Collection<ClusterPortMapping> clusterPortMappings = CloudControllerContext.getInstance()
- .getClusterPortMappings(clusterContext.getApplicationId(), clusterId);
+ .getClusterPortMappings(clusterContext.getApplicationUuid(), clusterId);
if (clusterPortMappings != null) {
for (ClusterPortMapping clusterPortMapping : clusterPortMappings) {
http://git-wip-us.apache.org/repos/asf/stratos/blob/ca0333bb/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/publisher/TopologyEventPublisher.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/publisher/TopologyEventPublisher.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/publisher/TopologyEventPublisher.java
index 3f7b0d7..37ba56e 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/publisher/TopologyEventPublisher.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/publisher/TopologyEventPublisher.java
@@ -128,11 +128,11 @@ public class TopologyEventPublisher {
public static void sendClusterRemovedEvent(ClusterContext ctxt, String deploymentPolicy) {
ClusterRemovedEvent clusterRemovedEvent = new ClusterRemovedEvent(
- ctxt.getCartridgeType(), ctxt.getClusterId(), deploymentPolicy, ctxt.isLbCluster());
+ ctxt.getCartridgeUuid(), ctxt.getClusterId(), deploymentPolicy, ctxt.isLbCluster());
if (log.isInfoEnabled()) {
log.info(String
.format("Publishing cluster removed event: [service-name] %s [cluster-id] %s",
- ctxt.getCartridgeType(), ctxt.getClusterId()));
+ ctxt.getCartridgeUuid(), ctxt.getClusterId()));
}
publishEvent(clusterRemovedEvent);
http://git-wip-us.apache.org/repos/asf/stratos/blob/ca0333bb/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/topology/TopologyBuilder.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/topology/TopologyBuilder.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/topology/TopologyBuilder.java
index a8d8827..b960909 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/topology/TopologyBuilder.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/topology/TopologyBuilder.java
@@ -363,18 +363,18 @@ public class TopologyBuilder {
public static void handleClusterRemoved(ClusterContext ctxt) {
Topology topology = TopologyManager.getTopology();
- Service service = topology.getService(ctxt.getCartridgeType());
+ Service service = topology.getService(ctxt.getCartridgeUuid());
String deploymentPolicy;
if (service == null) {
log.warn(String.format("Service %s does not exist",
- ctxt.getCartridgeType()));
+ ctxt.getCartridgeUuid()));
return;
}
if (!service.clusterExists(ctxt.getClusterId())) {
log.warn(String.format("Cluster %s does not exist for service %s",
ctxt.getClusterId(),
- ctxt.getCartridgeType()));
+ ctxt.getCartridgeUuid()));
return;
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/ca0333bb/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
index 0aee888..7c699be 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
@@ -362,7 +362,7 @@ public class CloudControllerServiceImpl implements CloudControllerService {
handleNullObject(clusterContext, "Could not start instance, cluster context not found: [cluster-id] " + clusterId);
// Validate cartridge
- String cartridgeType = clusterContext.getCartridgeType();
+ String cartridgeType = clusterContext.getCartridgeUuid();
Cartridge cartridge = CloudControllerContext.getInstance().getCartridge(cartridgeType);
if (cartridge == null) {
String msg = "Could not startup instance, cartridge not found: [cartridge-type] " + cartridgeType;
@@ -385,7 +385,7 @@ public class CloudControllerServiceImpl implements CloudControllerService {
String memberId = generateMemberId(clusterId);
// Create member context
- String applicationId = clusterContext.getApplicationId();
+ String applicationId = clusterContext.getApplicationUuid();
MemberContext memberContext = createMemberContext(applicationId, cartridgeType, memberId,
CloudControllerUtil.getLoadBalancingIPTypeEnumFromString(cartridge.getLoadBalancingIPType()), instanceContext);
@@ -761,13 +761,13 @@ public class CloudControllerServiceImpl implements CloudControllerService {
}
@Override
- public Cartridge getCartridge(String cartridgeType) throws CartridgeNotFoundException {
- Cartridge cartridge = CloudControllerContext.getInstance().getCartridge(cartridgeType);
+ public Cartridge getCartridge(String cartridgeUuid) throws CartridgeNotFoundException {
+ Cartridge cartridge = CloudControllerContext.getInstance().getCartridge(cartridgeUuid);
if (cartridge != null) {
return cartridge;
}
- String msg = "Could not find cartridge: [cartridge-type] " + cartridgeType;
+ String msg = "Could not find cartridge: [cartridge-uuid] " + cartridgeUuid;
throw new CartridgeNotFoundException(msg);
}
@@ -798,7 +798,7 @@ public class CloudControllerServiceImpl implements CloudControllerService {
Collection<Cartridge> allCartridges = CloudControllerContext.getInstance().getCartridges();
List<Cartridge> cartridges = new ArrayList<Cartridge>();
if (allCartridges == null || allCartridges.size() == 0) {
- log.info("No registered Cartridge found.");
+ log.info("No registered Cartridge found for [tenant-id]" + tenantId);
return null;
}
for (Cartridge cartridge : allCartridges) {
@@ -819,13 +819,13 @@ public class CloudControllerServiceImpl implements CloudControllerService {
ClusterContext ctxt = CloudControllerContext.getInstance().getClusterContext(clusterId_);
handleNullObject(ctxt, "Service unregistration failed. Invalid cluster id: " + clusterId);
- final String cartridgeType = ctxt.getCartridgeType();
- Cartridge cartridge = CloudControllerContext.getInstance().getCartridge(cartridgeType);
+ final String cartridgeUuid = ctxt.getCartridgeUuid();
+ Cartridge cartridge = CloudControllerContext.getInstance().getCartridge(cartridgeUuid);
if (cartridge == null) {
String msg =
- String.format("Service unregistration failed. No matching cartridge found: [cartridge-type] %s " +
- "[application-id] %s", cartridgeType, ctxt.getApplicationId());
+ String.format("Service unregistration failed. No matching cartridge found: [cartridge-uuid] %s " +
+ "[application-id] %s", cartridgeUuid, ctxt.getApplicationUuid());
log.error(msg);
throw new UnregisteredClusterException(msg);
}
@@ -836,12 +836,12 @@ public class CloudControllerServiceImpl implements CloudControllerService {
ClusterContext ctxt = CloudControllerContext.getInstance().getClusterContext(clusterId_);
if (ctxt == null) {
String msg = String.format("Service unregistration failed. Cluster not found: [cluster-id] %s " +
- "[application-id] %s", clusterId_, ctxt.getApplicationId());
+ "[application-id] %s", clusterId_, ctxt.getApplicationUuid());
log.error(msg);
return;
}
Collection<Member> members = TopologyManager.getTopology().
- getService(ctxt.getCartridgeType()).getCluster(clusterId_).getMembers();
+ getService(ctxt.getCartridgeUuid()).getCluster(clusterId_).getMembers();
//finding the responding members from the existing members in the topology.
int sizeOfRespondingMembers = 0;
for (Member member : members) {
@@ -866,7 +866,7 @@ public class CloudControllerServiceImpl implements CloudControllerService {
} catch (Exception e) {
// we are not gonna stop the execution due to errors.
log.warn((String.format("Instance termination failed of member [member-id] %s " +
- "[application-id] %s", member.getMemberId(), ctxt.getApplicationId())), e);
+ "[application-id] %s", member.getMemberId(), ctxt.getApplicationUuid())), e);
}
}
@@ -881,12 +881,12 @@ public class CloudControllerServiceImpl implements CloudControllerService {
ClusterContext ctxt = CloudControllerContext.getInstance().getClusterContext(clusterId_);
if (ctxt == null) {
String msg = String.format("Service unregistration failed. Cluster not found: [cluster-id] %s " +
- "[application-id] %s ", clusterId_, ctxt.getApplicationId());
+ "[application-id] %s ", clusterId_, ctxt.getApplicationUuid());
log.error(msg);
return;
}
Collection<Member> members = TopologyManager.getTopology().
- getService(ctxt.getCartridgeType()).getCluster(clusterId_).getMembers();
+ getService(ctxt.getCartridgeUuid()).getCluster(clusterId_).getMembers();
while (members.size() > 0) {
//waiting until all the members got removed from the Topology/ timed out
@@ -894,7 +894,7 @@ public class CloudControllerServiceImpl implements CloudControllerService {
}
log.info(String.format("Unregistration of service cluster: [cluster-id] %s [application-id]",
- clusterId_, ctxt.getApplicationId()));
+ clusterId_, ctxt.getApplicationUuid()));
deleteVolumes(ctxt);
onClusterRemoval(clusterId_);
} finally {
@@ -910,7 +910,7 @@ public class CloudControllerServiceImpl implements CloudControllerService {
try {
lock = CloudControllerContext.getInstance().acquireCartridgesWriteLock();
- Cartridge cartridge = CloudControllerContext.getInstance().getCartridge(ctxt.getCartridgeType());
+ Cartridge cartridge = CloudControllerContext.getInstance().getCartridge(ctxt.getCartridgeUuid());
if (cartridge != null && CloudControllerContext.getInstance().getIaasProviders(cartridge.getType()) != null && ctxt.getVolumes() != null) {
for (Volume volume : ctxt.getVolumes()) {
if (volume.getId() != null) {
@@ -926,7 +926,7 @@ public class CloudControllerServiceImpl implements CloudControllerService {
} catch (Exception ignore) {
if (log.isErrorEnabled()) {
log.error((String.format("Error while deleting volume [id] %s " +
- "[application-id]", volume.getId(), ctxt.getApplicationId())),
+ "[application-id]", volume.getId(), ctxt.getApplicationUuid())),
ignore);
}
}
@@ -952,32 +952,32 @@ public class CloudControllerServiceImpl implements CloudControllerService {
* FIXME: A validate method shouldn't persist data
*/
@Override
- public boolean validateDeploymentPolicyNetworkPartition(String cartridgeType, String networkPartitionId)
+ public boolean validateDeploymentPolicyNetworkPartition(String cartridgeUuid, String networkPartitionUuid)
throws InvalidPartitionException, InvalidCartridgeTypeException {
- NetworkPartition networkPartition = CloudControllerContext.getInstance().getNetworkPartition(networkPartitionId);
+ NetworkPartition networkPartition = CloudControllerContext.getInstance().getNetworkPartition(networkPartitionUuid);
Lock lock = null;
try {
lock = CloudControllerContext.getInstance().acquireCartridgesWriteLock();
- List<String> validatedPartitions = CloudControllerContext.getInstance().getPartitionIds(cartridgeType);
+ List<String> validatedPartitions = CloudControllerContext.getInstance().getPartitionIds(cartridgeUuid);
if (validatedPartitions != null) {
// cache hit for this cartridge
// get list of partitions
if (log.isDebugEnabled()) {
- log.debug("Partition validation cache hit for cartridge type: " + cartridgeType);
+ log.debug("Partition validation cache hit for cartridge uuid: " + cartridgeUuid);
}
}
Map<String, IaasProvider> partitionToIaasProviders = new ConcurrentHashMap<String, IaasProvider>();
if (log.isDebugEnabled()) {
- log.debug("Deployment policy validation started for cartridge type: " + cartridgeType);
+ log.debug("Deployment policy validation started for cartridge uuid: " + cartridgeUuid);
}
- Cartridge cartridge = CloudControllerContext.getInstance().getCartridge(cartridgeType);
+ Cartridge cartridge = CloudControllerContext.getInstance().getCartridge(cartridgeUuid);
if (cartridge == null) {
- String msg = "Cartridge not found: " + cartridgeType;
+ String msg = "Cartridge not found: " + cartridgeUuid;
log.error(msg);
throw new InvalidCartridgeTypeException(msg);
}
@@ -1014,28 +1014,28 @@ public class CloudControllerServiceImpl implements CloudControllerService {
}
// add to cache
- CloudControllerContext.getInstance().addToCartridgeTypeToPartitionIdMap(cartridgeType, partitionId);
+ CloudControllerContext.getInstance().addToCartridgeTypeToPartitionIdMap(cartridgeUuid, partitionId);
if (log.isDebugEnabled()) {
log.debug("Partition " + partitionId + " added to the cache against cartridge: " +
- "[cartridge-type] " + cartridgeType);
+ "[cartridge-uuid] " + cartridgeUuid);
}
} catch (Exception e) {
- String message = "Could not cache partitions against the cartridge: [cartridge-type] " + cartridgeType;
+ String message = "Could not cache partitions against the cartridge: [cartridge-uuid] " + cartridgeUuid;
log.error(message, e);
throw new InvalidPartitionException(message, e);
}
}
// if and only if the deployment policy valid
- CloudControllerContext.getInstance().addIaasProviders(cartridgeType, partitionToIaasProviders);
+ CloudControllerContext.getInstance().addIaasProviders(cartridgeUuid, partitionToIaasProviders);
CloudControllerContext.getInstance().updateCartridge(cartridge);
// persist data
CloudControllerContext.getInstance().persist();
log.info("All partitions [" + CloudControllerUtil.getPartitionIds(networkPartition.getPartitions()) + "]" +
- " were validated successfully, against the cartridge: " + cartridgeType);
+ " were validated successfully, against the cartridge: " + cartridgeUuid);
return true;
} finally {
@@ -1084,11 +1084,11 @@ public class CloudControllerServiceImpl implements CloudControllerService {
}
@Override
- public boolean createApplicationClusters(String appId, ApplicationClusterContext[] appClustersContexts) throws
+ public boolean createApplicationClusters(String appUuid, ApplicationClusterContext[] appClustersContexts) throws
ApplicationClusterRegistrationException {
if (appClustersContexts == null || appClustersContexts.length == 0) {
String errorMsg = "No application cluster information found, unable to create clusters: " +
- "[application-id] " + appId;
+ "[application-uuid] " + appUuid;
log.error(errorMsg);
throw new ApplicationClusterRegistrationException(errorMsg);
}
@@ -1110,7 +1110,7 @@ public class CloudControllerServiceImpl implements CloudControllerService {
List<String> accessUrlPerCluster = new ArrayList();
Collection<ClusterPortMapping> clusterPortMappings =
- CloudControllerContext.getInstance().getClusterPortMappings(appId, clusterId);
+ CloudControllerContext.getInstance().getClusterPortMappings(appUuid, clusterId);
for (ClusterPortMapping clusterPortMapping : clusterPortMappings) {
try {
@@ -1137,7 +1137,7 @@ public class CloudControllerServiceImpl implements CloudControllerService {
for (ApplicationClusterContext appClusterCtxt : appClustersContexts) {
ClusterContext clusterContext = new ClusterContext(
- appId, appClusterCtxt.getCartridgeType(), appClusterCtxt.getClusterId(),
+ appUuid, appClusterCtxt.getCartridgeType(), appClusterCtxt.getClusterId(),
appClusterCtxt.getTextPayload(), appClusterCtxt.getHostName(),
appClusterCtxt.isLbCluster(), appClusterCtxt.getProperties());
@@ -1149,7 +1149,7 @@ public class CloudControllerServiceImpl implements CloudControllerService {
// Create cluster object
Cluster cluster = new Cluster(appClusterCtxt.getCartridgeType(), appClusterCtxt.getClusterId(),
- appClusterCtxt.getDeploymentPolicyName(), appClusterCtxt.getAutoscalePolicyName(), appId);
+ appClusterCtxt.getDeploymentPolicyName(), appClusterCtxt.getAutoscalePolicyName(), appUuid);
cluster.setLbCluster(false);
cluster.setTenantRange(appClusterCtxt.getTenantRange());
cluster.setHostNames(Arrays.asList(appClusterCtxt.getHostName()));
@@ -1162,7 +1162,7 @@ public class CloudControllerServiceImpl implements CloudControllerService {
clusters.add(cluster);
}
- TopologyBuilder.handleApplicationClustersCreated(appId, clusters);
+ TopologyBuilder.handleApplicationClustersCreated(appUuid, clusters);
CloudControllerContext.getInstance().persist();
} finally {
if (lock != null) {
http://git-wip-us.apache.org/repos/asf/stratos/blob/ca0333bb/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/client/CloudControllerServiceClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/client/CloudControllerServiceClient.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/client/CloudControllerServiceClient.java
index a41db85..52fbea3 100644
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/client/CloudControllerServiceClient.java
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/client/CloudControllerServiceClient.java
@@ -195,11 +195,11 @@ public class CloudControllerServiceClient {
return stub.updateKubernetesHost(kubernetesHost);
}
- public void validateNetworkPartitionOfDeploymentPolicy(String cartridgeType, String networkPartitionId)
+ public void validateNetworkPartitionOfDeploymentPolicy(String cartridgeUuid, String networkPartitionId)
throws RemoteException,
CloudControllerServiceInvalidPartitionExceptionException,
CloudControllerServiceInvalidCartridgeTypeExceptionException {
- stub.validateDeploymentPolicyNetworkPartition(cartridgeType, networkPartitionId);
+ stub.validateDeploymentPolicyNetworkPartition(cartridgeUuid, networkPartitionId);
}
public void addNetworkPartition(NetworkPartition networkPartition) throws RemoteException,
http://git-wip-us.apache.org/repos/asf/stratos/blob/ca0333bb/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
index 7cce069..2de856a 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
@@ -303,7 +303,8 @@ public class StratosApiV41 extends AbstractApi {
//Ignore this since this is valid(cartridge is does not exist) when adding the cartridge for first time
}
if (cartridgeBean != null) {
- String msg = String.format("Cartridge already exists: [cartridge-type] %s", cartridgeType);
+ String msg = String.format("Cartridge already exists: [cartridge-type] %s [cartridge-uuid] %s [tenant-id] %d",
+ cartridgeType,cartridgeDefinitionBean.getUuid(),cartridgeDefinitionBean.getTenantId());
log.warn(msg);
return Response.status(Response.Status.CONFLICT)
.entity(new ResponseMessageBean(ResponseMessageBean.ERROR, msg)).build();
@@ -312,7 +313,8 @@ public class StratosApiV41 extends AbstractApi {
StratosApiV41Utils.addCartridge(cartridgeDefinitionBean);
URI url = uriInfo.getAbsolutePathBuilder().path(cartridgeType).build();
return Response.created(url).entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,
- String.format("Cartridge added successfully: [cartridge-type] %s", cartridgeType))).build();
+ String.format("Cartridge added successfully: [cartridge-type] %s [cartridge-uuid] %s [tenant-id] %d",
+ cartridgeType,cartridgeDefinitionBean.getUuid(),cartridgeDefinitionBean.getTenantId()))).build();
}
/**
@@ -464,7 +466,7 @@ public class StratosApiV41 extends AbstractApi {
try {
StratosApiV41Utils.removeCartridge(cartridgeType,carbonContext.getTenantId());
return Response.ok().entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,
- String.format("Cartridge deleted successfully: [cartridge-type] %s [tenantId]", cartridgeType,carbonContext.getTenantId()))).build();
+ String.format("Cartridge deleted successfully: [cartridge-type] %s [tenantId] %d", cartridgeType,carbonContext.getTenantId()))).build();
} catch (RemoteException e) {
throw new RestAPIException(e.getMessage());
} catch (CloudControllerServiceInvalidCartridgeTypeExceptionException e) {
@@ -502,8 +504,8 @@ public class StratosApiV41 extends AbstractApi {
URI url = uriInfo.getAbsolutePathBuilder().path(cartridgeGroupBean.getUuid()).build();
return Response.created(url).entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,
- String.format("Cartridge Group added successfully: [cartridge-group] %s",
- cartridgeGroupBean.getUuid()))).build();
+ String.format("Cartridge Group added successfully: [cartridge-group-uuid] %s [cartridge-group-name] %s [tenant-id] %d",
+ cartridgeGroupBean.getUuid(),cartridgeGroupBean.getName(),cartridgeGroupBean.getTenantId()))).build();
} catch (InvalidCartridgeGroupDefinitionException e) {
return Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean(
ResponseMessageBean.ERROR, e.getMessage())).build();
@@ -540,8 +542,8 @@ public class StratosApiV41 extends AbstractApi {
URI url = uriInfo.getAbsolutePathBuilder().path(cartridgeGroupBean.getUuid()).build();
return Response.ok(url).entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,
- String.format("Cartridge group updated successfully: [cartridge-group] %s",
- cartridgeGroupBean.getUuid()))).build();
+ String.format("Cartridge group updated successfully: [cartridge-group-uuid] %s [cartridge-group-name] %s [tenant-id] %d",
+ cartridgeGroupBean.getUuid(),cartridgeGroupBean.getName(),cartridgeGroupBean.getTenantId()))).build();
} catch (InvalidCartridgeGroupDefinitionException e) {
return Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean(
http://git-wip-us.apache.org/repos/asf/stratos/blob/ca0333bb/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
index a1ff800..8e7bbf9 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
@@ -200,8 +200,8 @@ public class StratosApiV41Utils {
cloudControllerServiceClient.updateCartridge(cartridgeConfig);
if (log.isDebugEnabled()) {
- log.debug(String.format("Successfully updated cartridge: [cartridge-uuid] %s [cartridge-type] %s ",
- cartridgeBean.getUuid() ,cartridgeBean.getType()));
+ log.debug(String.format("Successfully updated cartridge: [cartridge-uuid] %s [cartridge-type] %s [tenant-id]",
+ cartridgeBean.getUuid() ,cartridgeBean.getType(), cartridgeBean.getTenantId()));
}
} catch (CloudControllerServiceCartridgeDefinitionNotExistsExceptionException e) {
String msg = "Could not add cartridge";
@@ -242,7 +242,7 @@ public class StratosApiV41Utils {
}
if (StringUtils.isEmpty(cartridgeConfig.getCategory())) {
throw new RestAPIException(String.format("Category is not specified in cartridge: [cartridge-uuid] %s " +
- "[cartridge-type] %s", cartridgeConfig.getUuid(), cartridgeConfig.getType()));
+ "[cartridge-type] %s [tenant-id] %d", cartridgeConfig.getUuid(), cartridgeConfig.getType(),cartridgeConfig.getTenantId()));
}
return cartridgeConfig;
}
@@ -275,8 +275,8 @@ public class StratosApiV41Utils {
// Validate whether cartridge can be removed
if (!smServiceClient.canCartridgeBeRemoved(cartridge.getUuid())) {
- String message = String.format("Cannot remove cartridge : [cartridge-uuid] %s [cartridge-type] %s ",
- cartridge.getUuid(), cartridgeType + "since it is used in another cartridge group or an " +
+ String message = String.format("Cannot remove cartridge : [cartridge-uuid] %s [cartridge-type] %s [tenant-id] %d",
+ cartridge.getUuid(), cartridgeType,tenantId + "since it is used in another cartridge group or an " +
"application");
log.error(message);
throw new RestAPIException(message);