Repository: stratos Updated Branches: refs/heads/master 138f6369a -> efe5aac3e
Add updateKubernetesHostCluster method to API Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/efe5aac3 Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/efe5aac3 Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/efe5aac3 Branch: refs/heads/master Commit: efe5aac3ea33cae20ca1e2a00fedb30c98aba0f4 Parents: 138f636 Author: Lahiru Sandaruwan <[email protected]> Authored: Tue May 19 17:23:03 2015 +0530 Committer: Lahiru Sandaruwan <[email protected]> Committed: Tue May 19 17:36:36 2015 +0530 ---------------------------------------------------------------------- .../services/CloudControllerService.java | 9 + .../impl/CloudControllerServiceImpl.java | 34 ++ .../client/CloudControllerServiceClient.java | 6 + .../rest/endpoint/api/StratosApiV41.java | 29 ++ .../rest/endpoint/api/StratosApiV41Utils.java | 26 ++ .../main/resources/CloudControllerService.wsdl | 422 +++++++++++-------- 6 files changed, 344 insertions(+), 182 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/efe5aac3/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 362494e..5c417e1 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 @@ -295,6 +295,15 @@ public interface CloudControllerService { KubernetesClusterAlreadyExistsException; /** + * Update a Kubernetes cluster. + * + * @param kubernetesCluster + * @throws org.apache.stratos.cloud.controller.exception.InvalidKubernetesClusterException + */ + public boolean updateKubernetesCluster(KubernetesCluster kubernetesCluster) throws InvalidKubernetesClusterException, + KubernetesClusterAlreadyExistsException; + + /** * Add a Kubernetes host to a Kubernetes cluster. * * @param groupId http://git-wip-us.apache.org/repos/asf/stratos/blob/efe5aac3/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 f7b44cb..7d9ab51 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 @@ -1192,6 +1192,40 @@ public class CloudControllerServiceImpl implements CloudControllerService { } @Override + public boolean updateKubernetesCluster(KubernetesCluster kubernetesCluster) throws InvalidKubernetesClusterException + { + if (kubernetesCluster == null) { + throw new InvalidKubernetesClusterException("Kubernetes cluster cannot be null"); + } + Lock lock = null; + try { + lock = CloudControllerContext.getInstance().acquireKubernetesClusterWriteLock(); + + if (log.isInfoEnabled()) { + log.info(String.format("Updating kubernetes cluster: [kubernetes-cluster-id] %s", + kubernetesCluster.getClusterId())); + } + CloudControllerUtil.validateKubernetesCluster(kubernetesCluster); + + // Updating the information model + CloudControllerContext.getInstance().updateKubernetesCluster(kubernetesCluster); + CloudControllerContext.getInstance().persist(); + + if (log.isInfoEnabled()) { + log.info(String.format("Kubernetes cluster updated successfully: [kubernetes-cluster-id] %s", + kubernetesCluster.getClusterId())); + } + return true; + } catch (Exception e) { + throw new InvalidKubernetesClusterException(e.getMessage(), e); + } finally { + if (lock != null) { + CloudControllerContext.getInstance().releaseWriteLock(lock); + } + } + } + + @Override public boolean addKubernetesHost(String kubernetesClusterId, KubernetesHost kubernetesHost) throws InvalidKubernetesHostException, NonExistingKubernetesClusterException { if (kubernetesHost == null) { http://git-wip-us.apache.org/repos/asf/stratos/blob/efe5aac3/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 4a2e5e0..7eb2bf4 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 @@ -160,6 +160,12 @@ public class CloudControllerServiceClient { } public boolean deployKubernetesCluster(KubernetesCluster kubernetesCluster) throws RemoteException, + CloudControllerServiceInvalidKubernetesClusterExceptionException { + return stub.updateKubernetesCluster(kubernetesCluster); + } + + + public boolean updateKubernetesCluster(KubernetesCluster kubernetesCluster) throws RemoteException, CloudControllerServiceInvalidKubernetesClusterExceptionException, CloudControllerServiceKubernetesClusterAlreadyExistsExceptionException { return stub.addKubernetesCluster(kubernetesCluster); http://git-wip-us.apache.org/repos/asf/stratos/blob/efe5aac3/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 f62c193..5cbf30a 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 @@ -1806,6 +1806,35 @@ public class StratosApiV41 extends AbstractApi { } /** + * Deploy kubernetes host cluster. + * + * @param kubernetesCluster the kubernetes cluster + * @return 201 if the kubernetes cluster is successfully created + * @throws RestAPIException the rest api exception + */ + @PUT + @Path("/kubernetesClusters") + @Produces("application/json") + @Consumes("application/json") + @AuthorizationAction("/permission/admin/manage/updateKubernetesCluster") + public Response updateKubernetesHostCluster( + KubernetesClusterBean kubernetesCluster) throws RestAPIException { + + try { + StratosApiV41Utils.updateKubernetesCluster(kubernetesCluster); + URI url = uriInfo.getAbsolutePathBuilder().path(kubernetesCluster.getClusterId()).build(); + return Response.created(url).entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS, + String.format("Kubernetes cluster added successfully: [kub-host-cluster] %s", + kubernetesCluster.getClusterId()))).build(); + } catch (RestAPIException e) { + throw e; + } catch (CloudControllerServiceInvalidKubernetesClusterExceptionException e) { + return Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean( + ResponseMessageBean.ERROR, "Kubernetes cluster is invalid")).build(); + } + } + + /** * Deploy kubernetes host. * * @param kubernetesClusterId the kubernetes cluster id http://git-wip-us.apache.org/repos/asf/stratos/blob/efe5aac3/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 794907b..35d2668 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 @@ -1968,6 +1968,32 @@ public class StratosApiV41Utils { return false; } + + /** + * Update Kubernetes Cluster + * + * @param kubernetesClusterBean KubernetesClusterBean + * @return add status + * @throws RestAPIException + */ + public static boolean updateKubernetesCluster(KubernetesClusterBean kubernetesClusterBean) throws RestAPIException, + CloudControllerServiceInvalidKubernetesClusterExceptionException { + + CloudControllerServiceClient cloudControllerServiceClient = getCloudControllerServiceClient(); + if (cloudControllerServiceClient != null) { + org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesCluster kubernetesCluster = + ObjectConverter.convertToCCKubernetesClusterPojo(kubernetesClusterBean); + + try { + return cloudControllerServiceClient.deployKubernetesCluster(kubernetesCluster); + } catch (RemoteException e) { + log.error(e.getMessage(), e); + throw new RestAPIException(e.getMessage(), e); + } + } + return false; + } + /** * Add Kubernetes Host * http://git-wip-us.apache.org/repos/asf/stratos/blob/efe5aac3/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 2a095bb..f8e0ea1 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,26 +1,82 @@ -<?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"> +<?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"> <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: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: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: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="getCartridges"> + <xs:element name="CloudControllerServiceCartridgeNotFoundException"> <xs:complexType> - <xs:sequence/> + <xs:sequence> + <xs:element minOccurs="0" name="CartridgeNotFoundException" nillable="true" type="ax21:CartridgeNotFoundException"/> + </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="getCartridgesResponse"> + <xs:element name="CloudControllerServiceInvalidIaasProviderException"> <xs:complexType> <xs:sequence> - <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/> + <xs:element minOccurs="0" name="InvalidIaasProviderException" nillable="true" type="ax21:InvalidIaasProviderException"/> </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="CloudControllerServiceCartridgeNotFoundException"> + <xs:element name="CloudControllerServiceCloudControllerException"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="CartridgeNotFoundException" nillable="true" type="ax21:CartridgeNotFoundException"/> + <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="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> @@ -45,13 +101,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="CloudControllerServiceCartridgeAlreadyExistsException"> <xs:complexType> <xs:sequence> @@ -148,13 +197,6 @@ </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> @@ -323,6 +365,20 @@ </xs:sequence> </xs:complexType> </xs:element> + <xs:element name="updateKubernetesCluster"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" name="kubernetesCluster" nillable="true" type="ax29:KubernetesCluster"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="updateKubernetesClusterResponse"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" name="return" type="xs:boolean"/> + </xs:sequence> + </xs:complexType> + </xs:element> <xs:element name="getKubernetesCluster"> <xs:complexType> <xs:sequence> @@ -441,13 +497,6 @@ </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> @@ -689,41 +738,6 @@ </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:schema> <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://topology.domain.messaging.stratos.apache.org/xsd"> <xs:complexType abstract="true" name="ClusterStatus"> @@ -755,12 +769,29 @@ <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> </xs:complexType> - <xs:complexType name="InvalidIaasProviderException"> + <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: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"/> </xs:sequence> @@ -781,11 +812,6 @@ <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"/> @@ -821,13 +847,6 @@ <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="InvalidClusterException"> <xs:sequence> <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/> @@ -863,9 +882,39 @@ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> - <xs:complexType name="InvalidMemberException"> + </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:import namespace="http://common.stratos.apache.org/xsd"/> + <xs:complexType name="KubernetesCluster"> <xs:sequence> - <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/> + <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:sequence> + </xs:complexType> + <xs:complexType name="KubernetesHost"> + <xs:sequence> + <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="publicIPAddress" nillable="true" type="xs:string"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="KubernetesMaster"> + <xs:complexContent> + <xs:extension base="ax29:KubernetesHost"> + <xs:sequence/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="PortRange"> + <xs:sequence> + <xs:element minOccurs="0" name="lower" type="xs:int"/> + <xs:element minOccurs="0" name="upper" type="xs:int"/> </xs:sequence> </xs:complexType> </xs:schema> @@ -884,44 +933,86 @@ </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: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:complexType name="KubernetesCluster"> + <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 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 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="KubernetesHost"> + <xs:complexType name="Volume"> <xs:sequence> - <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="publicIPAddress" nillable="true" type="xs:string"/> + <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="KubernetesMaster"> - <xs:complexContent> - <xs:extension base="ax27:KubernetesHost"> - <xs:sequence/> - </xs:extension> - </xs:complexContent> + <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="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="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="PortRange"> + <xs:complexType name="InstanceMetadata"> <xs:sequence> - <xs:element minOccurs="0" name="lower" type="xs:int"/> - <xs:element minOccurs="0" name="upper" type="xs:int"/> + <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" type="xs:int"/> </xs:sequence> </xs:complexType> - </xs:schema> - <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="Cartridge"> <xs:sequence> <xs:element maxOccurs="unbounded" minOccurs="0" name="appTypeMappings" nillable="true" type="ax23:AppType"/> @@ -997,18 +1088,6 @@ <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="kubernetesServicePort" type="xs:int"/> @@ -1028,17 +1107,6 @@ <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"/> @@ -1082,60 +1150,6 @@ <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"/> - <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="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="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="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" type="xs:int"/> - </xs:sequence> - </xs:complexType> <xs:complexType name="ApplicationClusterContext"> <xs:sequence> <xs:element minOccurs="0" name="autoscalePolicyName" nillable="true" type="xs:string"/> @@ -1322,6 +1336,12 @@ <wsdl:message name="getHostsForKubernetesClusterResponse"> <wsdl:part name="parameters" element="ns:getHostsForKubernetesClusterResponse"/> </wsdl:message> + <wsdl:message name="updateKubernetesClusterRequest"> + <wsdl:part name="parameters" element="ns:updateKubernetesCluster"/> + </wsdl:message> + <wsdl:message name="updateKubernetesClusterResponse"> + <wsdl:part name="parameters" element="ns:updateKubernetesClusterResponse"/> + </wsdl:message> <wsdl:message name="terminateInstanceForcefullyRequest"> <wsdl:part name="parameters" element="ns:terminateInstanceForcefully"/> </wsdl:message> @@ -1565,6 +1585,11 @@ <wsdl:output message="ns:getHostsForKubernetesClusterResponse" wsaw:Action="urn:getHostsForKubernetesClusterResponse"/> <wsdl:fault message="ns:CloudControllerServiceNonExistingKubernetesClusterException" name="CloudControllerServiceNonExistingKubernetesClusterException" wsaw:Action="urn:getHostsForKubernetesClusterCloudControllerServiceNonExistingKubernetesClusterException"/> </wsdl:operation> + <wsdl:operation name="updateKubernetesCluster"> + <wsdl:input message="ns:updateKubernetesClusterRequest" wsaw:Action="urn:updateKubernetesCluster"/> + <wsdl:output message="ns:updateKubernetesClusterResponse" wsaw:Action="urn:updateKubernetesClusterResponse"/> + <wsdl:fault message="ns:CloudControllerServiceInvalidKubernetesClusterException" name="CloudControllerServiceInvalidKubernetesClusterException" wsaw:Action="urn:updateKubernetesClusterCloudControllerServiceInvalidKubernetesClusterException"/> + </wsdl:operation> <wsdl:operation name="terminateInstanceForcefully"> <wsdl:input message="ns:terminateInstanceForcefullyRequest" wsaw:Action="urn:terminateInstanceForcefully"/> <wsdl:output message="ns:terminateInstanceForcefullyResponse" wsaw:Action="urn:terminateInstanceForcefullyResponse"/> @@ -1920,6 +1945,18 @@ <soap:fault use="literal" name="CloudControllerServiceNonExistingKubernetesClusterException"/> </wsdl:fault> </wsdl:operation> + <wsdl:operation name="updateKubernetesCluster"> + <soap:operation soapAction="urn:updateKubernetesCluster" style="document"/> + <wsdl:input> + <soap:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap:body use="literal"/> + </wsdl:output> + <wsdl:fault name="CloudControllerServiceInvalidKubernetesClusterException"> + <soap:fault use="literal" name="CloudControllerServiceInvalidKubernetesClusterException"/> + </wsdl:fault> + </wsdl:operation> <wsdl:operation name="terminateInstanceForcefully"> <soap:operation soapAction="urn:terminateInstanceForcefully" style="document"/> <wsdl:input> @@ -2418,6 +2455,18 @@ <soap12:fault use="literal" name="CloudControllerServiceNonExistingKubernetesClusterException"/> </wsdl:fault> </wsdl:operation> + <wsdl:operation name="updateKubernetesCluster"> + <soap12:operation soapAction="urn:updateKubernetesCluster" style="document"/> + <wsdl:input> + <soap12:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap12:body use="literal"/> + </wsdl:output> + <wsdl:fault name="CloudControllerServiceInvalidKubernetesClusterException"> + <soap12:fault use="literal" name="CloudControllerServiceInvalidKubernetesClusterException"/> + </wsdl:fault> + </wsdl:operation> <wsdl:operation name="terminateInstanceForcefully"> <soap12:operation soapAction="urn:terminateInstanceForcefully" style="document"/> <wsdl:input> @@ -2844,6 +2893,15 @@ <mime:content type="text/xml" part="parameters"/> </wsdl:output> </wsdl:operation> + <wsdl:operation name="updateKubernetesCluster"> + <http:operation location="updateKubernetesCluster"/> + <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="terminateInstanceForcefully"> <http:operation location="terminateInstanceForcefully"/> <wsdl:input>
