Repository: stratos Updated Branches: refs/heads/tenant-isolation 62078e418 -> 26cedf68f
http://git-wip-us.apache.org/repos/asf/stratos/blob/169ae460/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/ObjectConverter.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/ObjectConverter.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/ObjectConverter.java index ad9ccbd..af4198a 100644 --- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/ObjectConverter.java +++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/ObjectConverter.java @@ -69,9 +69,9 @@ import java.util.*; public class ObjectConverter { - public static final String CLUSTER_PROPERTY = "cluster"; + public static final String CLUSTER_PROPERTY = "cluster"; - public static Cartridge convertCartridgeBeanToStubCartridgeConfig( + public static Cartridge convertCartridgeBeanToStubCartridgeConfig( CartridgeBean cartridgeBean) throws RestAPIException { if (cartridgeBean == null) { @@ -79,8 +79,8 @@ public class ObjectConverter { } Cartridge cartridge = new Cartridge(); - cartridge.setUuid(cartridgeBean.getUuid()); - cartridge.setTenantId(cartridgeBean.getTenantId()); + cartridge.setUuid(cartridgeBean.getUuid()); + cartridge.setTenantId(cartridgeBean.getTenantId()); cartridge.setType(cartridgeBean.getType()); cartridge.setHostName(cartridgeBean.getHost()); cartridge.setProvider(cartridgeBean.getProvider()); @@ -120,7 +120,7 @@ public class ObjectConverter { // properties if (cartridgeBean.getProperty() != null && !cartridgeBean.getProperty().isEmpty()) { cartridge.setProperties(convertPropertyBeansToCCStubProperties(cartridgeBean.getProperty(), - cartridgeBean.getTenantId())); + cartridgeBean.getTenantId())); } return cartridge; } @@ -209,7 +209,7 @@ public class ObjectConverter { private static IaasConfig[] convertIaasProviderBeansToStubIaasConfig(List<IaasProviderBean> iaasProviderBeans,int tenantId) - throws RestAPIException { + throws RestAPIException { if (iaasProviderBeans == null) { return null; @@ -291,13 +291,13 @@ public class ObjectConverter { for (org.apache.stratos.common.beans.PropertyBean propertyBean : propertyBeans) { org.apache.stratos.cloud.controller.stub.Property stubProperty = new org.apache.stratos.cloud.controller.stub.Property(); - stubProperty.setName(propertyBean.getName()); - if(propertyBean.getName().equals(CLUSTER_PROPERTY)){ - stubProperty.setValue(StratosApiV41Utils.getKubernetesClusterUuidByTenant(propertyBean.getValue(),tenantId)); - } - else{ - stubProperty.setValue(propertyBean.getValue()); - } + stubProperty.setName(propertyBean.getName()); + if(propertyBean.getName().equals(CLUSTER_PROPERTY)){ + stubProperty.setValue(StratosApiV41Utils.getKubernetesClusterUuidByTenant(propertyBean.getValue(),tenantId)); + } + else{ + stubProperty.setValue(propertyBean.getValue()); + } stubPropertiesList.add(stubProperty); } @@ -413,8 +413,8 @@ public class ObjectConverter { org.apache.stratos.cloud.controller.stub.domain.Partition stubPartition = new org.apache.stratos.cloud.controller.stub.domain.Partition(); stubPartition.setId(partition.getId()); - stubPartition.setUuid(UUID.randomUUID().toString()); - stubPartition.setTenantId(tenantId); + stubPartition.setUuid(UUID.randomUUID().toString()); + stubPartition.setTenantId(tenantId); stubPartition.setProperties(convertPropertyBeansToCCStubProperties(partition.getProperty(), tenantId)); return stubPartition; @@ -475,9 +475,7 @@ public class ObjectConverter { NetworkPartitionBean networkPartition = new NetworkPartitionBean(); networkPartition.setId(stubNetworkPartition.getId()); - networkPartition.setUuid(stubNetworkPartition.getUuid()); networkPartition.setProvider(stubNetworkPartition.getProvider()); - networkPartition.setTenantId(stubNetworkPartition.getTenantId()); if (stubNetworkPartition.getPartitions() != null) { List<PartitionBean> partitionList = new ArrayList<PartitionBean>(); for (org.apache.stratos.cloud.controller.stub.domain.Partition stubPartition : stubNetworkPartition.getPartitions()) { @@ -587,9 +585,9 @@ public class ObjectConverter { } PartitionBean partition = new PartitionBean(); - partition.setUuid(stubPartition.getUuid()); - partition.setId(stubPartition.getId()); - partition.setTenantId(stubPartition.getTenantId()); + partition.setUuid(stubPartition.getUuid()); + partition.setId(stubPartition.getId()); + partition.setTenantId(stubPartition.getTenantId()); partition.setDescription(stubPartition.getDescription()); if (stubPartition.getProperties() != null) { List<org.apache.stratos.common.beans.PropertyBean> propertyBeanList @@ -609,19 +607,21 @@ public class ObjectConverter { public static org.apache.stratos.cloud.controller.stub.domain.NetworkPartition - convertNetworkPartitionToCCStubNetworkPartition(NetworkPartitionBean networkPartitionBean) throws RestAPIException { + convertNetworkPartitionToCCStubNetworkPartition(NetworkPartitionBean networkPartitionBean, + String networkPartitionUuid, int tenantId) throws RestAPIException { org.apache.stratos.cloud.controller.stub.domain.NetworkPartition networkPartition = new org.apache.stratos.cloud.controller.stub.domain.NetworkPartition(); networkPartition.setId(networkPartitionBean.getId()); networkPartition.setProvider(networkPartitionBean.getProvider()); - networkPartition.setUuid(networkPartitionBean.getUuid()); - networkPartition.setTenantId(networkPartitionBean.getTenantId()); + networkPartition.setUuid(networkPartitionUuid); + networkPartition.setTenantId(tenantId); if (networkPartitionBean.getPartitions() != null && !networkPartitionBean.getPartitions().isEmpty()) { - networkPartition.setPartitions(convertToStubPartitions(networkPartitionBean.getPartitions(),networkPartitionBean.getTenantId())); + networkPartition.setPartitions(convertToStubPartitions(networkPartitionBean.getPartitions(), tenantId)); } if (networkPartitionBean.getProperties() != null && !networkPartitionBean.getProperties().isEmpty()) { - networkPartition.setProperties(convertPropertyBeansToCCStubProperties(networkPartitionBean.getProperties(),networkPartitionBean.getTenantId())); + networkPartition.setProperties(convertPropertyBeansToCCStubProperties(networkPartitionBean.getProperties + (), tenantId)); } return networkPartition; } @@ -945,17 +945,17 @@ public class ObjectConverter { org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesCluster kubernetesCluster = new org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesCluster(); - kubernetesCluster.setClusterUuid(kubernetesClusterBean.getClusterUuid()); - kubernetesCluster.setClusterId(kubernetesClusterBean.getClusterId()); + kubernetesCluster.setClusterUuid(kubernetesClusterBean.getClusterUuid()); + kubernetesCluster.setClusterId(kubernetesClusterBean.getClusterId()); kubernetesCluster.setDescription(kubernetesClusterBean.getDescription()); kubernetesCluster.setKubernetesMaster(convertStubKubernetesMasterToKubernetesMaster( kubernetesClusterBean.getKubernetesMaster(),kubernetesClusterBean.getTenantId())); kubernetesCluster.setPortRange(convertPortRangeToStubPortRange(kubernetesClusterBean.getPortRange())); kubernetesCluster.setKubernetesHosts(convertToASKubernetesHostsPojo(kubernetesClusterBean.getKubernetesHosts(), - kubernetesClusterBean.getTenantId())); + kubernetesClusterBean.getTenantId())); kubernetesCluster.setProperties((convertPropertyBeansToCCStubProperties(kubernetesClusterBean.getProperty(), - kubernetesClusterBean.getTenantId()))); - kubernetesCluster.setTenantId(kubernetesClusterBean.getTenantId()); + kubernetesClusterBean.getTenantId()))); + kubernetesCluster.setTenantId(kubernetesClusterBean.getTenantId()); return kubernetesCluster; } @@ -991,7 +991,7 @@ public class ObjectConverter { public static org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesHost convertKubernetesHostToStubKubernetesHost(KubernetesHostBean kubernetesHostBean,int tenantId) - throws RestAPIException { + throws RestAPIException { if (kubernetesHostBean == null) { return null; @@ -1010,7 +1010,7 @@ public class ObjectConverter { public static org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesMaster convertStubKubernetesMasterToKubernetesMaster(KubernetesMasterBean kubernetesMasterBean,int tenantId) - throws RestAPIException { + throws RestAPIException { if (kubernetesMasterBean == null) { return null; @@ -1144,7 +1144,7 @@ public class ObjectConverter { applicationContext.setName(applicationDefinition.getName()); applicationContext.setDescription(applicationDefinition.getDescription()); applicationContext.setStatus(applicationDefinition.getStatus()); - applicationContext.setTenantId(applicationDefinition.getTenantId()); + applicationContext.setTenantId(applicationDefinition.getTenantId()); // convert and set components if (applicationDefinition.getComponents() != null) { @@ -1186,7 +1186,7 @@ public class ObjectConverter { applicationDefinition.setName(applicationContext.getName()); applicationDefinition.setDescription(applicationContext.getDescription()); applicationDefinition.setStatus(applicationContext.getStatus()); - applicationDefinition.setApplicationUuid(applicationContext.getApplicationUuid()); + applicationDefinition.setApplicationUuid(applicationContext.getApplicationUuid()); // convert and set components if (applicationContext.getComponents() != null) { applicationDefinition.setComponents(new ComponentBean()); @@ -1416,15 +1416,15 @@ public class ObjectConverter { context.setType(cartridgeDefinition.getType()); context.setUuid(cartridgeDefinition.getUuid()); context.setTenantId(tenantId); - try { - context.setUuid(CloudControllerServiceClient.getInstance().getCartridgeByTenant(cartridgeDefinition + try { + context.setUuid(CloudControllerServiceClient.getInstance().getCartridgeByTenant(cartridgeDefinition .getType(), tenantId).getUuid()); - } catch (RemoteException e) { - throw new RestAPIException(e); - } catch (CloudControllerServiceCartridgeNotFoundExceptionException e) { - throw new RestAPIException(e); - } - context.setSubscribableInfoContext(convertSubscribableInfo(cartridgeDefinition.getSubscribableInfo(),tenantId)); + } catch (RemoteException e) { + throw new RestAPIException(e); + } catch (CloudControllerServiceCartridgeNotFoundExceptionException e) { + throw new RestAPIException(e); + } + context.setSubscribableInfoContext(convertSubscribableInfo(cartridgeDefinition.getSubscribableInfo(),tenantId)); cartridgeContextArray[i++] = context; } @@ -1432,7 +1432,7 @@ public class ObjectConverter { } private static SubscribableInfoContext convertSubscribableInfo(SubscribableInfo subscribableInfo, int tenantId) - throws RestAPIException { + throws RestAPIException { if (subscribableInfo == null) { return null; @@ -1440,22 +1440,22 @@ public class ObjectConverter { SubscribableInfoContext infoContext = new SubscribableInfoContext(); infoContext.setAlias(subscribableInfo.getAlias()); - infoContext.setAutoscalingPolicy(subscribableInfo.getAutoscalingPolicy()); - infoContext.setDeploymentPolicy(subscribableInfo.getDeploymentPolicy()); - try { + infoContext.setAutoscalingPolicy(subscribableInfo.getAutoscalingPolicy()); + infoContext.setDeploymentPolicy(subscribableInfo.getDeploymentPolicy()); + try { AutoscalePolicy autoscalePolicy = AutoscalerServiceClient.getInstance().getAutoScalePolicyForTenant (subscribableInfo.getAutoscalingPolicy(), tenantId); if (autoscalePolicy != null) { String autoScalerUuid= autoscalePolicy.getUuid(); infoContext.setAutoscalingPolicyUuid(autoScalerUuid); } - } catch (RemoteException e) { - throw new RestAPIException(e); - } + } catch (RemoteException e) { + throw new RestAPIException(e); + } infoContext.setDependencyAliases(subscribableInfo.getDependencyAliases()); - try { + try { DeploymentPolicy deploymentPolicy = AutoscalerServiceClient.getInstance().getDeploymentPolicyForTenant( subscribableInfo.getDeploymentPolicy(), tenantId); if (deploymentPolicy != null) { @@ -1464,9 +1464,9 @@ public class ObjectConverter { } } catch (RemoteException e) { - throw new RestAPIException(e); - } - + throw new RestAPIException(e); + } + infoContext.setMaxMembers(subscribableInfo.getMaxMembers()); infoContext.setMinMembers(subscribableInfo.getMinMembers()); @@ -1576,7 +1576,7 @@ public class ObjectConverter { private static org.apache.stratos.autoscaler.stub.pojo.GroupContext[] convertGroupDefinitionsToStubGroupContexts(List<CartridgeGroupReferenceBean> groupDefinitions, int tenantId) - throws RestAPIException { + throws RestAPIException { if (groupDefinitions == null) { return null; @@ -1595,11 +1595,11 @@ public class ObjectConverter { groupContext.setGroupMinInstances(groupDefinition.getGroupMinInstances()); groupContext.setDeploymentPolicy(groupDefinition.getDeploymentPolicy()); groupContext.setDeploymentPolicyUuid(StratosApiV41Utils.getDeploymentPolicyUuidByTenant(groupDefinition - .getDeploymentPolicy(), tenantId)); + .getDeploymentPolicy(), tenantId)); // Groups if (groupDefinition.getGroups() != null) { groupContext.setGroupContexts(convertGroupDefinitionsToStubGroupContexts(groupDefinition.getGroups(), - tenantId)); + tenantId)); } // Cartridges @@ -1760,7 +1760,7 @@ public class ObjectConverter { ApplicationInstanceBean instance = new ApplicationInstanceBean(); instance.setInstanceId(applicationInstance.getInstanceId()); instance.setApplicationUuid(application.getUniqueIdentifier()); - instance.setApplicationId(application.getId()); + instance.setApplicationId(application.getId()); instance.setParentInstanceId(applicationInstance.getParentId()); instance.setStatus(applicationInstance.getStatus().toString()); applicationInstanceList.add(instance); @@ -1858,9 +1858,9 @@ public class ObjectConverter { List<String> cartridgesDefinitions = groupBean.getCartridges(); servicegroup.setName(groupBean.getName()); - servicegroup.setUuid(groupBean.getUuid()); - servicegroup.setTenantId(groupBean.getTenantId()); - + servicegroup.setUuid(groupBean.getUuid()); + servicegroup.setTenantId(groupBean.getTenantId()); + if (groupsDefinitions == null) { groupsDefinitions = new ArrayList<CartridgeGroupBean>(0); } @@ -2189,9 +2189,9 @@ public class ObjectConverter { } PartitionRef stubPartition = new PartitionRef(); - stubPartition.setUuid(partitionReferenceBean.getUuid()); - stubPartition.setId(partitionReferenceBean.getId()); - stubPartition.setTenantId(partitionReferenceBean.getTenantId()); + stubPartition.setUuid(partitionReferenceBean.getUuid()); + stubPartition.setId(partitionReferenceBean.getId()); + stubPartition.setTenantId(partitionReferenceBean.getTenantId()); stubPartition.setPartitionMax(partitionReferenceBean.getPartitionMax()); return stubPartition; } http://git-wip-us.apache.org/repos/asf/stratos/blob/169ae460/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 f64cc1e..331327e 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 @@ -5,27 +5,6 @@ <xs:import namespace="http://domain.controller.cloud.stratos.apache.org/xsd"/> <xs:import namespace="http://topology.domain.messaging.stratos.apache.org/xsd"/> <xs:import namespace="http://kubernetes.domain.controller.cloud.stratos.apache.org/xsd"/> - <xs:element name="CloudControllerServiceInvalidPartitionException"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="InvalidPartitionException" nillable="true" type="ax21:InvalidPartitionException"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="validatePartition"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="partition" nillable="true" type="ax26:Partition"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="validatePartitionResponse"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="return" type="xs:boolean"/> - </xs:sequence> - </xs:complexType> - </xs:element> <xs:element name="CloudControllerServiceInvalidCartridgeDefinitionException"> <xs:complexType> <xs:sequence> @@ -194,6 +173,42 @@ </xs:sequence> </xs:complexType> </xs:element> + <xs:element name="CloudControllerServiceInvalidPartitionException"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" name="InvalidPartitionException" nillable="true" type="ax21:InvalidPartitionException"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="validatePartition"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" name="partition" nillable="true" type="ax26:Partition"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="validatePartitionResponse"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" name="return" type="xs:boolean"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="validateDeploymentPolicyNetworkPartition"> + <xs:complexType> + <xs:sequence> + <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="validateDeploymentPolicyNetworkPartitionResponse"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" name="return" type="xs:boolean"/> + </xs:sequence> + </xs:complexType> + </xs:element> <xs:element name="CloudControllerServiceCartridgeNotFoundException"> <xs:complexType> <xs:sequence> @@ -201,6 +216,20 @@ </xs:sequence> </xs:complexType> </xs:element> + <xs:element name="registerService"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" name="registrant" nillable="true" type="ax26:Registrant"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <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="CloudControllerServiceCloudControllerException"> <xs:complexType> <xs:sequence> @@ -222,6 +251,27 @@ </xs:sequence> </xs:complexType> </xs:element> + <xs:element name="CloudControllerServiceInvalidMemberException"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" name="InvalidMemberException" nillable="true" type="ax21:InvalidMemberException"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="terminateInstance"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" name="memberId" nillable="true" type="xs:string"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="terminateInstanceResponse"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" name="return" type="xs:boolean"/> + </xs:sequence> + </xs:complexType> + </xs:element> <xs:element name="terminateInstanceForcefully"> <xs:complexType> <xs:sequence> @@ -257,99 +307,96 @@ </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="registerService"> + <xs:element name="updateClusterStatus"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="registrant" nillable="true" type="ax26:Registrant"/> + <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="ax29:ClusterStatus"/> </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="registerServiceResponse"> + <xs:element name="updateClusterStatusResponse"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="return" type="xs:boolean"/> </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="getCartridgeByTenant"> + <xs:element name="CloudControllerServiceUnregisteredClusterException"> <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="UnregisteredClusterException" nillable="true" type="ax21:UnregisteredClusterException"/> </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="getCartridgeByTenantResponse"> + <xs:element name="unregisterService"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="return" nillable="true" type="ax26:Cartridge"/> + <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="getCartridgesByTenant"> + <xs:element name="unregisterServiceResponse"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="tenantId" type="xs:int"/> + <xs:element minOccurs="0" name="return" type="xs:boolean"/> </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="getCartridgesByTenantResponse"> + <xs:element name="getCartridge"> <xs:complexType> <xs:sequence> - <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:Cartridge"/> + <xs:element minOccurs="0" name="cartridgeUuid" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="CloudControllerServiceUnregisteredClusterException"> + <xs:element name="getCartridgeResponse"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="UnregisteredClusterException" nillable="true" type="ax21:UnregisteredClusterException"/> + <xs:element minOccurs="0" name="return" nillable="true" type="ax26:Cartridge"/> </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="unregisterService"> + <xs:element name="getCartridgeByTenant"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/> + <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="unregisterServiceResponse"> + <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="validateDeploymentPolicyNetworkPartition"> + <xs:element name="getCartridges"> <xs:complexType> - <xs:sequence> - <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:sequence/> </xs:complexType> </xs:element> - <xs:element name="validateDeploymentPolicyNetworkPartitionResponse"> + <xs:element name="getCartridgesResponse"> <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="updateClusterStatus"> + <xs:element name="getClusterContext"> <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="ax29:ClusterStatus"/> </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="updateClusterStatusResponse"> + <xs:element name="getClusterContextResponse"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="return" type="xs:boolean"/> + <xs:element minOccurs="0" name="return" nillable="true" type="ax26:ClusterContext"/> </xs:sequence> </xs:complexType> </xs:element> @@ -420,6 +467,20 @@ </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="ax213:KubernetesCluster"/> + </xs:sequence> + </xs:complexType> + </xs:element> <xs:element name="getKubernetesClusterByTenant"> <xs:complexType> <xs:sequence> @@ -527,24 +588,38 @@ </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="removeKubernetesCluster"> + <xs:element name="CloudControllerServiceNonExistingKubernetesHostException"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/> + <xs:element minOccurs="0" name="NonExistingKubernetesHostException" nillable="true" type="ax21:NonExistingKubernetesHostException"/> </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="removeKubernetesClusterResponse"> + <xs:element name="updateKubernetesHost"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax213: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="CloudControllerServiceNonExistingKubernetesHostException"> + <xs:element name="removeKubernetesCluster"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="NonExistingKubernetesHostException" nillable="true" type="ax21:NonExistingKubernetesHostException"/> + <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="removeKubernetesClusterResponse"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" name="return" type="xs:boolean"/> </xs:sequence> </xs:complexType> </xs:element> @@ -590,20 +665,6 @@ </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="updateKubernetesHost"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax213: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> @@ -708,92 +769,46 @@ </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="startInstance"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="instanceContext" nillable="true" type="ax26:InstanceContext"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="startInstanceResponse"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="return" nillable="true" type="ax26:MemberContext"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="CloudControllerServiceInvalidMemberException"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="InvalidMemberException" nillable="true" type="ax21:InvalidMemberException"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="terminateInstance"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="memberId" nillable="true" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="terminateInstanceResponse"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="return" type="xs:boolean"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="getCartridge"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="cartridgeUuid" nillable="true" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="getCartridgeResponse"> + <xs:element name="getCartridgesByTenant"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="return" nillable="true" type="ax26:Cartridge"/> + <xs:element minOccurs="0" name="tenantId" type="xs:int"/> </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="getClusterContext"> + <xs:element name="getCartridgesByTenantResponse"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/> + <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:Cartridge"/> </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="getClusterContextResponse"> + <xs:element name="getNetworkPartitionByTenant"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="return" nillable="true" type="ax26:ClusterContext"/> + <xs:element minOccurs="0" name="networkPartitionId" nillable="true" type="xs:string"/> + <xs:element minOccurs="0" name="tenantId" type="xs:int"/> </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="getCartridges"> - <xs:complexType> - <xs:sequence/> - </xs:complexType> - </xs:element> - <xs:element name="getCartridgesResponse"> + <xs:element name="getNetworkPartitionByTenantResponse"> <xs:complexType> <xs:sequence> - <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/> + <xs:element minOccurs="0" name="return" nillable="true" type="ax26:NetworkPartition"/> </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="getKubernetesCluster"> + <xs:element name="startInstance"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="kubernetesClusterUuid" nillable="true" type="xs:string"/> + <xs:element minOccurs="0" name="instanceContext" nillable="true" type="ax26:InstanceContext"/> </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="getKubernetesClusterResponse"> + <xs:element name="startInstanceResponse"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="return" nillable="true" type="ax213:KubernetesCluster"/> + <xs:element minOccurs="0" name="return" nillable="true" type="ax26:MemberContext"/> </xs:sequence> </xs:complexType> </xs:element> @@ -835,11 +850,6 @@ </xs:complexType> </xs:schema> <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://exception.controller.cloud.stratos.apache.org/xsd"> - <xs:complexType name="InvalidPartitionException"> - <xs:sequence> - <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/> - </xs:sequence> - </xs:complexType> <xs:complexType name="InvalidCartridgeDefinitionException"> <xs:sequence> <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/> @@ -868,6 +878,11 @@ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> + <xs:complexType name="InvalidPartitionException"> + <xs:sequence> + <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/> + </xs:sequence> + </xs:complexType> <xs:complexType name="CartridgeNotFoundException"> <xs:sequence> <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/> @@ -880,6 +895,11 @@ </xs:extension> </xs:complexContent> </xs:complexType> + <xs:complexType name="InvalidMemberException"> + <xs:sequence> + <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/> + </xs:sequence> + </xs:complexType> <xs:complexType name="InvalidClusterException"> <xs:sequence> <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/> @@ -948,11 +968,6 @@ <xs:complexType name="NetworkPartitionNotExistsException"> <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> </xs:schema> <xs:schema xmlns:ax212="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"/> @@ -1009,19 +1024,6 @@ <xs:schema xmlns:ax28="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="Partition"> - <xs:sequence> - <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/> - <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/> - <xs:element minOccurs="0" name="isPublic" type="xs:boolean"/> - <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/> - <xs:element minOccurs="0" name="partitionMax" type="xs:int"/> - <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/> - <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"/> - <xs:element minOccurs="0" name="tenantId" type="xs:int"/> - <xs:element minOccurs="0" name="uuid" 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"/> @@ -1133,6 +1135,32 @@ <xs:element maxOccurs="unbounded" minOccurs="0" name="startupOrders" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> + <xs:complexType name="Partition"> + <xs:sequence> + <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/> + <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/> + <xs:element minOccurs="0" name="isPublic" type="xs:boolean"/> + <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/> + <xs:element minOccurs="0" name="partitionMax" type="xs:int"/> + <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/> + <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"/> + <xs:element minOccurs="0" name="tenantId" type="xs:int"/> + <xs:element minOccurs="0" name="uuid" nillable="true" type="xs:string"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="Registrant"> + <xs:sequence> + <xs:element minOccurs="0" name="autoScalerPolicyName" 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 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="payload" nillable="true" type="xs:string"/> + <xs:element minOccurs="0" name="persistence" nillable="true" type="ax23:Persistence"/> + <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/> + <xs:element minOccurs="0" name="tenantRange" 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"/> @@ -1188,17 +1216,20 @@ <xs:element minOccurs="0" name="ram" type="xs:int"/> </xs:sequence> </xs:complexType> - <xs:complexType name="Registrant"> + <xs:complexType name="ClusterContext"> <xs:sequence> - <xs:element minOccurs="0" name="autoScalerPolicyName" 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="deploymentPolicyName" 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"/> + <xs:element minOccurs="0" name="kubernetesServices" nillable="true" type="xs:anyType"/> + <xs:element minOccurs="0" name="lbCluster" type="xs:boolean"/> <xs:element minOccurs="0" name="payload" nillable="true" type="xs:string"/> - <xs:element minOccurs="0" name="persistence" nillable="true" type="ax23:Persistence"/> <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="timeoutInMillis" type="xs:long"/> + <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="ApplicationClusterContext"> @@ -1229,22 +1260,6 @@ <xs:element minOccurs="0" name="uuid" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> - <xs:complexType name="ClusterContext"> - <xs:sequence> - <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"/> - <xs:element minOccurs="0" name="kubernetesServices" nillable="true" type="xs:anyType"/> - <xs:element minOccurs="0" name="lbCluster" type="xs:boolean"/> - <xs:element minOccurs="0" name="payload" nillable="true" type="xs:string"/> - <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/> - <xs:element minOccurs="0" name="timeoutInMillis" type="xs:long"/> - <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"> @@ -1520,6 +1535,12 @@ <wsdl:message name="getClusterContextResponse"> <wsdl:part name="parameters" element="ns:getClusterContextResponse"/> </wsdl:message> + <wsdl:message name="getNetworkPartitionByTenantRequest"> + <wsdl:part name="parameters" element="ns:getNetworkPartitionByTenant"/> + </wsdl:message> + <wsdl:message name="getNetworkPartitionByTenantResponse"> + <wsdl:part name="parameters" element="ns:getNetworkPartitionByTenantResponse"/> + </wsdl:message> <wsdl:message name="updateClusterStatusRequest"> <wsdl:part name="parameters" element="ns:updateClusterStatus"/> </wsdl:message> @@ -1769,6 +1790,10 @@ <wsdl:input message="ns:getClusterContextRequest" wsaw:Action="urn:getClusterContext"/> <wsdl:output message="ns:getClusterContextResponse" wsaw:Action="urn:getClusterContextResponse"/> </wsdl:operation> + <wsdl:operation name="getNetworkPartitionByTenant"> + <wsdl:input message="ns:getNetworkPartitionByTenantRequest" wsaw:Action="urn:getNetworkPartitionByTenant"/> + <wsdl:output message="ns:getNetworkPartitionByTenantResponse" wsaw:Action="urn:getNetworkPartitionByTenantResponse"/> + </wsdl:operation> <wsdl:operation name="updateClusterStatus"> <wsdl:input message="ns:updateClusterStatusRequest" wsaw:Action="urn:updateClusterStatus"/> <wsdl:output message="ns:updateClusterStatusResponse" wsaw:Action="urn:updateClusterStatusResponse"/> @@ -2247,6 +2272,15 @@ <soap:body use="literal"/> </wsdl:output> </wsdl:operation> + <wsdl:operation name="getClusterContext"> + <soap:operation soapAction="urn:getClusterContext" style="document"/> + <wsdl:input> + <soap:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap:body use="literal"/> + </wsdl:output> + </wsdl:operation> <wsdl:operation name="updateClusterStatus"> <soap:operation soapAction="urn:updateClusterStatus" style="document"/> <wsdl:input> @@ -2256,8 +2290,8 @@ <soap:body use="literal"/> </wsdl:output> </wsdl:operation> - <wsdl:operation name="getClusterContext"> - <soap:operation soapAction="urn:getClusterContext" style="document"/> + <wsdl:operation name="getNetworkPartitionByTenant"> + <soap:operation soapAction="urn:getNetworkPartitionByTenant" style="document"/> <wsdl:input> <soap:body use="literal"/> </wsdl:input> @@ -2808,6 +2842,15 @@ <soap12:body use="literal"/> </wsdl:output> </wsdl:operation> + <wsdl:operation name="getClusterContext"> + <soap12:operation soapAction="urn:getClusterContext" style="document"/> + <wsdl:input> + <soap12:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap12:body use="literal"/> + </wsdl:output> + </wsdl:operation> <wsdl:operation name="updateClusterStatus"> <soap12:operation soapAction="urn:updateClusterStatus" style="document"/> <wsdl:input> @@ -2817,8 +2860,8 @@ <soap12:body use="literal"/> </wsdl:output> </wsdl:operation> - <wsdl:operation name="getClusterContext"> - <soap12:operation soapAction="urn:getClusterContext" style="document"/> + <wsdl:operation name="getNetworkPartitionByTenant"> + <soap12:operation soapAction="urn:getNetworkPartitionByTenant" style="document"/> <wsdl:input> <soap12:body use="literal"/> </wsdl:input> @@ -3252,6 +3295,15 @@ <mime:content type="text/xml" part="parameters"/> </wsdl:output> </wsdl:operation> + <wsdl:operation name="getClusterContext"> + <http:operation location="getClusterContext"/> + <wsdl:input> + <mime:content type="text/xml" part="parameters"/> + </wsdl:input> + <wsdl:output> + <mime:content type="text/xml" part="parameters"/> + </wsdl:output> + </wsdl:operation> <wsdl:operation name="updateClusterStatus"> <http:operation location="updateClusterStatus"/> <wsdl:input> @@ -3261,8 +3313,8 @@ <mime:content type="text/xml" part="parameters"/> </wsdl:output> </wsdl:operation> - <wsdl:operation name="getClusterContext"> - <http:operation location="getClusterContext"/> + <wsdl:operation name="getNetworkPartitionByTenant"> + <http:operation location="getNetworkPartitionByTenant"/> <wsdl:input> <mime:content type="text/xml" part="parameters"/> </wsdl:input>
