Repository: stratos Updated Branches: refs/heads/stratos-4.1.x df2abb3ca -> b9ff2b10f
Fixed issues in CC Service related to Kubernetes Cluster validation when removing Fixed minor issue in Python CLI output display Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/b9ff2b10 Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/b9ff2b10 Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/b9ff2b10 Branch: refs/heads/stratos-4.1.x Commit: b9ff2b10fa743c2eebca8468c99a9ef7ac528f42 Parents: df2abb3 Author: Chamila de Alwis <[email protected]> Authored: Tue Nov 10 19:09:27 2015 +0530 Committer: Chamila de Alwis <[email protected]> Committed: Tue Nov 10 19:09:27 2015 +0530 ---------------------------------------------------------------------- .../services/CloudControllerService.java | 2 +- .../impl/CloudControllerServiceImpl.java | 24 +- .../client/CloudControllerServiceClient.java | 2 +- .../src/main/python/cli/cli.py | 2 +- .../rest/endpoint/api/StratosApiV41.java | 3 + .../rest/endpoint/api/StratosApiV41Utils.java | 2 +- .../main/resources/CloudControllerService.wsdl | 440 ++++++++++--------- 7 files changed, 251 insertions(+), 224 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/b9ff2b10/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/CloudControllerService.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/CloudControllerService.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/CloudControllerService.java index 169c665..4dfaf27 100644 --- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/CloudControllerService.java +++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/CloudControllerService.java @@ -330,7 +330,7 @@ public interface CloudControllerService { * @param groupId * @throws NonExistingKubernetesClusterException */ - public boolean removeKubernetesCluster(String groupId) throws NonExistingKubernetesClusterException; + public boolean removeKubernetesCluster(String groupId) throws NonExistingKubernetesClusterException, KubernetesClusterAlreadyUsedException; /** * Update a Kubernetes host. http://git-wip-us.apache.org/repos/asf/stratos/blob/b9ff2b10/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 40ed226..582e78f 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 @@ -1371,20 +1371,22 @@ public class CloudControllerServiceImpl implements CloudControllerService { } @Override - public boolean removeKubernetesCluster(String kubernetesClusterId) throws NonExistingKubernetesClusterException { + public boolean removeKubernetesCluster(String kubernetesClusterId) throws NonExistingKubernetesClusterException, KubernetesClusterAlreadyUsedException { if (StringUtils.isEmpty(kubernetesClusterId)) { throw new NonExistingKubernetesClusterException("Kubernetes cluster id cannot be empty"); } - Collection<NetworkPartition> networkPartitions=CloudControllerContext.getInstance().getNetworkPartitions(); - for(NetworkPartition networkPartition:networkPartitions){ - if(networkPartition.getProvider().equals(KUBERNETES_PROVIDER)){ - for(Property property:networkPartition.getProperties().getProperties()){ - if(property.getName().equals(KUBERNETES_CLUSTER)&&property.getValue().equals(kubernetesClusterId)){ - new KubernetesClusterAlreadyUsedException("Kubernetes cluster is already used in the network partition"); - } - } - } - } + Collection<NetworkPartition> networkPartitions = CloudControllerContext.getInstance().getNetworkPartitions(); + for (NetworkPartition networkPartition : networkPartitions) { + if (networkPartition.getProvider().equals(KUBERNETES_PROVIDER)) { + for (Partition partition : networkPartition.getPartitions()) { + for (Property property : partition.getProperties().getProperties()) { + if (property.getName().equals(KUBERNETES_CLUSTER) && property.getValue().equals(kubernetesClusterId)) { + throw new KubernetesClusterAlreadyUsedException("Kubernetes cluster is already used in the network partition"); + } + } + } + } + } Lock lock = null; try { http://git-wip-us.apache.org/repos/asf/stratos/blob/b9ff2b10/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 8944564..bdc22fd 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 @@ -161,7 +161,7 @@ public class CloudControllerServiceClient { } public void undeployKubernetesCluster(String kubernetesClusterId) throws RemoteException, - CloudControllerServiceNonExistingKubernetesClusterExceptionException { + CloudControllerServiceNonExistingKubernetesClusterExceptionException, CloudControllerServiceKubernetesClusterAlreadyUsedExceptionException { stub.removeKubernetesCluster(kubernetesClusterId); } http://git-wip-us.apache.org/repos/asf/stratos/blob/b9ff2b10/components/org.apache.stratos.python.cli/src/main/python/cli/cli.py ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.python.cli/src/main/python/cli/cli.py b/components/org.apache.stratos.python.cli/src/main/python/cli/cli.py index 572bd98..b9e6b12 100755 --- a/components/org.apache.stratos.python.cli/src/main/python/cli/cli.py +++ b/components/org.apache.stratos.python.cli/src/main/python/cli/cli.py @@ -1349,7 +1349,7 @@ class CLI(Cmd): print("No Kubernetes clusters found") else: table = PrintableTable() - rows = [["Group ID", "Description"]] + rows = [["Cluster ID", "Description"]] for kubernetes_cluster in kubernetes_clusters: rows.append([kubernetes_cluster['clusterId'], kubernetes_cluster['description']]) table.add_rows(rows) http://git-wip-us.apache.org/repos/asf/stratos/blob/b9ff2b10/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 c48bf09..55f37ed 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 @@ -2054,6 +2054,9 @@ public class StratosApiV41 extends AbstractApi { } catch (CloudControllerServiceNonExistingKubernetesClusterExceptionException e) { return Response.status(Response.Status.NOT_FOUND).entity(new ResponseMessageBean(ResponseMessageBean.ERROR, String.format("Kubernetes cluster not found: [kub-cluster] %s", kubernetesClusterId))).build(); + } catch (CloudControllerServiceKubernetesClusterAlreadyUsedExceptionException e) { + return Response.status(Response.Status.CONFLICT).entity(new ResponseMessageBean(ResponseMessageBean.ERROR, + String.format("Kubernetes cluster is being used by a deployed application: [kub-cluster] %s", kubernetesClusterId))).build(); } return Response.ok().entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS, String.format("Kubernetes Cluster removed successfully: [kub-cluster] %s", kubernetesClusterId))) http://git-wip-us.apache.org/repos/asf/stratos/blob/b9ff2b10/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 20ae749..2534f35 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 @@ -2292,7 +2292,7 @@ public class StratosApiV41Utils { * @throws RestAPIException */ public static boolean removeKubernetesCluster(String kubernetesClusterId) throws RestAPIException, - CloudControllerServiceNonExistingKubernetesClusterExceptionException { + CloudControllerServiceNonExistingKubernetesClusterExceptionException, CloudControllerServiceKubernetesClusterAlreadyUsedExceptionException { CloudControllerServiceClient cloudControllerServiceClient = getCloudControllerServiceClient(); http://git-wip-us.apache.org/repos/asf/stratos/blob/b9ff2b10/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 858354a..fe714d6 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,22 +1,10 @@ -<?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://domain.common.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://topology.domain.messaging.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"> +<?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: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://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"> <wsdl:types> - <xs:schema xmlns:ax213="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:schema xmlns:ax29="http://kubernetes.domain.controller.cloud.stratos.apache.org/xsd" xmlns:ax213="http://topology.domain.messaging.stratos.apache.org/xsd" xmlns:ax26="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: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="CloudControllerServiceCartridgeNotFoundException"> <xs:complexType> <xs:sequence> @@ -24,62 +12,6 @@ </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="CloudControllerServiceInvalidIaasProviderException"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="InvalidIaasProviderException" nillable="true" type="ax21:InvalidIaasProviderException"/> - </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="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="CloudControllerServiceInvalidCartridgeTypeException"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="InvalidCartridgeTypeException" nillable="true" type="ax21:InvalidCartridgeTypeException"/> - </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> @@ -101,6 +33,13 @@ </xs:sequence> </xs:complexType> </xs:element> + <xs:element name="CloudControllerServiceInvalidIaasProviderException"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" name="InvalidIaasProviderException" nillable="true" type="ax21:InvalidIaasProviderException"/> + </xs:sequence> + </xs:complexType> + </xs:element> <xs:element name="CloudControllerServiceCartridgeAlreadyExistsException"> <xs:complexType> <xs:sequence> @@ -197,6 +136,13 @@ </xs:sequence> </xs:complexType> </xs:element> + <xs:element name="CloudControllerServiceInvalidCartridgeTypeException"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" name="InvalidCartridgeTypeException" nillable="true" type="ax21:InvalidCartridgeTypeException"/> + </xs:sequence> + </xs:complexType> + </xs:element> <xs:element name="removeCartridge"> <xs:complexType> <xs:sequence> @@ -253,18 +199,6 @@ </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="getCartridges"> - <xs:complexType> - <xs:sequence/> - </xs:complexType> - </xs:element> - <xs:element name="getCartridgesResponse"> - <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="addServiceGroup"> <xs:complexType> <xs:sequence> @@ -293,6 +227,18 @@ </xs:sequence> </xs:complexType> </xs:element> + <xs:element name="getCartridges"> + <xs:complexType> + <xs:sequence/> + </xs:complexType> + </xs:element> + <xs:element name="getCartridgesResponse"> + <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="getClusterContext"> <xs:complexType> <xs:sequence> @@ -314,6 +260,13 @@ </xs:sequence> </xs:complexType> </xs:element> + <xs:element name="CloudControllerServiceKubernetesClusterAlreadyUsedException"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" name="KubernetesClusterAlreadyUsedException" nillable="true" type="ax21:KubernetesClusterAlreadyUsedException"/> + </xs:sequence> + </xs:complexType> + </xs:element> <xs:element name="removeKubernetesCluster"> <xs:complexType> <xs:sequence> @@ -417,6 +370,60 @@ </xs:sequence> </xs:complexType> </xs:element> + <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="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="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="CloudControllerServiceInvalidPartitionException"> <xs:complexType> <xs:sequence> @@ -424,14 +431,15 @@ </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="validatePartition"> + <xs:element name="validateDeploymentPolicyNetworkPartition"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="partition" nillable="true" type="ax26:Partition"/> + <xs:element minOccurs="0" name="cartridgeType" 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="validatePartitionResponse"> + <xs:element name="validateDeploymentPolicyNetworkPartitionResponse"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="return" type="xs:boolean"/> @@ -480,15 +488,14 @@ </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="validateDeploymentPolicyNetworkPartition"> + <xs:element name="validatePartition"> <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="partition" nillable="true" type="ax26:Partition"/> </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="validateDeploymentPolicyNetworkPartitionResponse"> + <xs:element name="validatePartitionResponse"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="return" type="xs:boolean"/> @@ -781,29 +788,12 @@ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> - <xs:complexType name="InvalidIaasProviderException"> - <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="InvalidMemberException"> - <xs:sequence> - <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/> - </xs:sequence> - </xs:complexType> - <xs:complexType name="InvalidCartridgeTypeException"> + <xs:complexType name="InvalidCartridgeDefinitionException"> <xs:sequence> <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> - <xs:complexType name="InvalidCartridgeDefinitionException"> + <xs:complexType name="InvalidIaasProviderException"> <xs:sequence> <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/> </xs:sequence> @@ -824,6 +814,11 @@ <xs:complexType name="NetworkPartitionNotExistsException"> <xs:sequence/> </xs:complexType> + <xs:complexType name="InvalidCartridgeTypeException"> + <xs:sequence> + <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/> + </xs:sequence> + </xs:complexType> <xs:complexType name="CartridgeDefinitionNotExistsException"> <xs:sequence> <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/> @@ -839,6 +834,11 @@ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> + <xs:complexType name="KubernetesClusterAlreadyUsedException"> + <xs:sequence> + <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/> + </xs:sequence> + </xs:complexType> <xs:complexType name="NonExistingKubernetesHostException"> <xs:sequence> <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/> @@ -854,6 +854,18 @@ <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="InvalidMemberException"> + <xs:sequence> + <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"/> @@ -895,16 +907,31 @@ </xs:sequence> </xs:complexType> </xs:schema> - <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:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://domain.common.stratos.apache.org/xsd"> + <xs:complexType name="NameValuePair"> + <xs:sequence> + <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/> + <xs:element minOccurs="0" name="value" nillable="true" type="xs:string"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="LoadBalancingIPType"> + <xs:complexContent> + <xs:extension base="xs:Enum"> + <xs:sequence/> + </xs:extension> + </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: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="description" nillable="true" type="xs:string"/> - <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 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:sequence> </xs:complexType> <xs:complexType name="KubernetesHost"> @@ -912,13 +939,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="ax210:Properties"/> + <xs:element minOccurs="0" name="properties" nillable="true" type="ax28: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="ax29:KubernetesHost"> + <xs:extension base="ax27:KubernetesHost"> <xs:sequence/> </xs:extension> </xs:complexContent> @@ -930,102 +957,9 @@ </xs:sequence> </xs:complexType> </xs:schema> - <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://domain.common.stratos.apache.org/xsd"> - <xs:complexType name="NameValuePair"> - <xs:sequence> - <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/> - <xs:element minOccurs="0" name="value" nillable="true" type="xs:string"/> - </xs:sequence> - </xs:complexType> - <xs:complexType name="LoadBalancingIPType"> - <xs:complexContent> - <xs:extension base="xs:Enum"> - <xs:sequence/> - </xs:extension> - </xs:complexContent> - </xs:complexType> - </xs:schema> - <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:schema xmlns:ax25="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:import namespace="http://common.stratos.apache.org/xsd"/> <xs:import namespace="http://domain.common.stratos.apache.org/xsd"/> - <xs:complexType name="InstanceContext"> - <xs:sequence> - <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="clusterInstanceId" nillable="true" type="xs:string"/> - <xs:element minOccurs="0" name="initTime" type="xs:long"/> - <xs:element minOccurs="0" name="networkPartitionId" nillable="true" type="xs:string"/> - <xs:element minOccurs="0" name="obsoleteExpiryTime" type="xs:long"/> - <xs:element minOccurs="0" name="partition" nillable="true" type="ax23:Partition"/> - <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/> - <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="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:sequence> - </xs:complexType> - <xs:complexType name="Volume"> - <xs:sequence> - <xs:element minOccurs="0" name="device" nillable="true" type="xs:string"/> - <xs:element minOccurs="0" name="iaasType" nillable="true" type="xs:string"/> - <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/> - <xs:element minOccurs="0" name="mappingPath" nillable="true" type="xs:string"/> - <xs:element minOccurs="0" name="removeOntermination" type="xs:boolean"/> - <xs:element minOccurs="0" name="size" type="xs:int"/> - <xs:element minOccurs="0" name="snapshotId" nillable="true" type="xs:string"/> - <xs:element minOccurs="0" name="volumeId" nillable="true" type="xs:string"/> - </xs:sequence> - </xs:complexType> - <xs:complexType name="MemberContext"> - <xs:sequence> - <xs:element maxOccurs="unbounded" minOccurs="0" name="allocatedIPs" nillable="true" type="xs:string"/> - <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="clusterId" nillable="true" type="xs:string"/> - <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="ax27: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="kubernetesPodName" 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="ax27: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"/> - <xs:element minOccurs="0" name="obsoleteInitTime" type="xs:long"/> - <xs:element minOccurs="0" name="partition" nillable="true" type="ax23:Partition"/> - <xs:element maxOccurs="unbounded" minOccurs="0" name="privateIPs" nillable="true" type="xs:string"/> - <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/> - <xs:element maxOccurs="unbounded" minOccurs="0" name="publicIPs" nillable="true" type="xs:string"/> - </xs:sequence> - </xs:complexType> - <xs:complexType name="InstanceMetadata"> - <xs:sequence> - <xs:element minOccurs="0" name="cpu" nillable="true" type="xs:string"/> - <xs:element minOccurs="0" name="hostname" nillable="true" type="xs:string"/> - <xs:element minOccurs="0" name="hypervisor" nillable="true" type="xs:string"/> - <xs:element minOccurs="0" name="imageId" nillable="true" type="xs:string"/> - <xs:element minOccurs="0" name="loginPort" type="xs:int"/> - <xs:element minOccurs="0" name="operatingSystem64bit" type="xs:boolean"/> - <xs:element minOccurs="0" name="operatingSystemArchitecture" nillable="true" type="xs:string"/> - <xs:element minOccurs="0" name="operatingSystemName" nillable="true" type="xs:string"/> - <xs:element minOccurs="0" name="operatingSystemVersion" nillable="true" type="xs:string"/> - <xs:element minOccurs="0" name="ram" 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"/> @@ -1101,6 +1035,18 @@ <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax23:Volume"/> </xs:sequence> </xs:complexType> + <xs:complexType name="Volume"> + <xs:sequence> + <xs:element minOccurs="0" name="device" nillable="true" type="xs:string"/> + <xs:element minOccurs="0" name="iaasType" nillable="true" type="xs:string"/> + <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/> + <xs:element minOccurs="0" name="mappingPath" nillable="true" type="xs:string"/> + <xs:element minOccurs="0" name="removeOntermination" type="xs:boolean"/> + <xs:element minOccurs="0" name="size" type="xs:int"/> + <xs:element minOccurs="0" name="snapshotId" nillable="true" type="xs:string"/> + <xs:element minOccurs="0" name="volumeId" nillable="true" type="xs:string"/> + </xs:sequence> + </xs:complexType> <xs:complexType name="PortMapping"> <xs:sequence> <xs:element minOccurs="0" name="kubernetesPortType" nillable="true" type="xs:string"/> @@ -1120,6 +1066,17 @@ <xs:element minOccurs="0" name="provider" 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:sequence> + </xs:complexType> <xs:complexType name="ServiceGroup"> <xs:sequence> <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridges" nillable="true" type="xs:string"/> @@ -1148,6 +1105,61 @@ <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax23:Volume"/> </xs:sequence> </xs:complexType> + <xs:complexType name="InstanceContext"> + <xs:sequence> + <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="clusterInstanceId" nillable="true" type="xs:string"/> + <xs:element minOccurs="0" name="initTime" type="xs:long"/> + <xs:element minOccurs="0" name="networkPartitionId" nillable="true" type="xs:string"/> + <xs:element minOccurs="0" name="obsoleteExpiryTime" type="xs:long"/> + <xs:element minOccurs="0" name="partition" nillable="true" type="ax23:Partition"/> + <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/> + <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="MemberContext"> + <xs:sequence> + <xs:element maxOccurs="unbounded" minOccurs="0" name="allocatedIPs" nillable="true" type="xs:string"/> + <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="clusterId" nillable="true" type="xs:string"/> + <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 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="kubernetesPodName" 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="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"/> + <xs:element minOccurs="0" name="obsoleteInitTime" type="xs:long"/> + <xs:element minOccurs="0" name="partition" nillable="true" type="ax23:Partition"/> + <xs:element maxOccurs="unbounded" minOccurs="0" name="privateIPs" nillable="true" type="xs:string"/> + <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/> + <xs:element maxOccurs="unbounded" minOccurs="0" name="publicIPs" nillable="true" type="xs:string"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="InstanceMetadata"> + <xs:sequence> + <xs:element minOccurs="0" name="cpu" nillable="true" type="xs:string"/> + <xs:element minOccurs="0" name="hostname" nillable="true" type="xs:string"/> + <xs:element minOccurs="0" name="hypervisor" nillable="true" type="xs:string"/> + <xs:element minOccurs="0" name="imageId" nillable="true" type="xs:string"/> + <xs:element minOccurs="0" name="loginPort" type="xs:int"/> + <xs:element minOccurs="0" name="operatingSystem64bit" type="xs:boolean"/> + <xs:element minOccurs="0" name="operatingSystemArchitecture" nillable="true" type="xs:string"/> + <xs:element minOccurs="0" name="operatingSystemName" nillable="true" type="xs:string"/> + <xs:element minOccurs="0" name="operatingSystemVersion" nillable="true" type="xs:string"/> + <xs:element minOccurs="0" name="ram" 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"/> @@ -1224,6 +1236,9 @@ <wsdl:message name="CloudControllerServiceNonExistingKubernetesClusterException"> <wsdl:part name="parameters" element="ns:CloudControllerServiceNonExistingKubernetesClusterException"/> </wsdl:message> + <wsdl:message name="CloudControllerServiceKubernetesClusterAlreadyUsedException"> + <wsdl:part name="parameters" element="ns:CloudControllerServiceKubernetesClusterAlreadyUsedException"/> + </wsdl:message> <wsdl:message name="getServiceGroupCartridgesRequest"> <wsdl:part name="parameters" element="ns:getServiceGroupCartridges"/> </wsdl:message> @@ -1522,6 +1537,7 @@ <wsdl:input message="ns:removeKubernetesClusterRequest" wsaw:Action="urn:removeKubernetesCluster"/> <wsdl:output message="ns:removeKubernetesClusterResponse" wsaw:Action="urn:removeKubernetesClusterResponse"/> <wsdl:fault message="ns:CloudControllerServiceNonExistingKubernetesClusterException" name="CloudControllerServiceNonExistingKubernetesClusterException" wsaw:Action="urn:removeKubernetesClusterCloudControllerServiceNonExistingKubernetesClusterException"/> + <wsdl:fault message="ns:CloudControllerServiceKubernetesClusterAlreadyUsedException" name="CloudControllerServiceKubernetesClusterAlreadyUsedException" wsaw:Action="urn:removeKubernetesClusterCloudControllerServiceKubernetesClusterAlreadyUsedException"/> </wsdl:operation> <wsdl:operation name="getServiceGroupCartridges"> <wsdl:input message="ns:getServiceGroupCartridgesRequest" wsaw:Action="urn:getServiceGroupCartridges"/> @@ -1773,6 +1789,9 @@ <wsdl:fault name="CloudControllerServiceNonExistingKubernetesClusterException"> <soap:fault use="literal" name="CloudControllerServiceNonExistingKubernetesClusterException"/> </wsdl:fault> + <wsdl:fault name="CloudControllerServiceKubernetesClusterAlreadyUsedException"> + <soap:fault use="literal" name="CloudControllerServiceKubernetesClusterAlreadyUsedException"/> + </wsdl:fault> </wsdl:operation> <wsdl:operation name="getServiceGroupCartridges"> <soap:operation soapAction="urn:getServiceGroupCartridges" style="document"/> @@ -2292,6 +2311,9 @@ <wsdl:fault name="CloudControllerServiceNonExistingKubernetesClusterException"> <soap12:fault use="literal" name="CloudControllerServiceNonExistingKubernetesClusterException"/> </wsdl:fault> + <wsdl:fault name="CloudControllerServiceKubernetesClusterAlreadyUsedException"> + <soap12:fault use="literal" name="CloudControllerServiceKubernetesClusterAlreadyUsedException"/> + </wsdl:fault> </wsdl:operation> <wsdl:operation name="getServiceGroupCartridges"> <soap12:operation soapAction="urn:getServiceGroupCartridges" style="document"/>
