You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ga...@apache.org on 2015/07/06 13:35:41 UTC
[01/24] stratos git commit: Tenant Isolation - Network Partition
Repository: stratos
Updated Branches:
refs/heads/tenant-isolation [created] ae7d1582c
http://git-wip-us.apache.org/repos/asf/stratos/blob/d106e8f4/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 03abeb0..27488a5 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,31 +1,28 @@
-<?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://topology.domain.messaging.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:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ax211="http://kubernetes.domain.controller.cloud.stratos.apache.org/xsd" 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://kubernetes.domain.controller.cloud.stratos.apache.org/xsd" xmlns:ax210="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:import namespace="http://kubernetes.domain.controller.cloud.stratos.apache.org/xsd"/>
+ <xs:element name="CloudControllerServiceInvalidPartitionException">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="InvalidPartitionException" nillable="true" type="ax21:InvalidPartitionException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getCartridges">
+ <xs:element name="validatePartition">
<xs:complexType>
- <xs:sequence/>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="partition" nillable="true" type="ax26:Partition"/>
+ </xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getCartridgesResponse">
+ <xs:element name="validatePartitionResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -36,145 +33,144 @@
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getCartridge">
+ <xs:element name="CloudControllerServiceInvalidIaasProviderException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="cartridgeType" 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="getCartridgeResponse">
+ <xs:element name="CloudControllerServiceCloudControllerException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax26:Cartridge"/>
+ <xs:element minOccurs="0" name="CloudControllerException" nillable="true" type="ax21:CloudControllerException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidCartridgeDefinitionException">
+ <xs:element name="startInstances">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidCartridgeDefinitionException" nillable="true" type="ax21:InvalidCartridgeDefinitionException"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="instanceContexts" nillable="true" type="ax26:InstanceContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidIaasProviderException">
+ <xs:element name="startInstancesResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidIaasProviderException" nillable="true" type="ax21:InvalidIaasProviderException"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:MemberContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceCartridgeAlreadyExistsException">
+ <xs:element name="updateClusterStatus">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="CartridgeAlreadyExistsException" nillable="true" type="ax21:CartridgeAlreadyExistsException"/>
+ <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="addCartridge">
+ <xs:element name="updateClusterStatusResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="cartridgeConfig" nillable="true" type="ax26:Cartridge"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addCartridgeResponse">
+ <xs:element name="CloudControllerServiceUnregisteredClusterException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="UnregisteredClusterException" nillable="true" type="ax21:UnregisteredClusterException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceNetworkPartitionAlreadyExistsException">
+ <xs:element name="unregisterService">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="NetworkPartitionAlreadyExistsException" nillable="true" type="ax21:NetworkPartitionAlreadyExistsException"/>
+ <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidNetworkPartitionException">
+ <xs:element name="unregisterServiceResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidNetworkPartitionException" nillable="true" type="ax21:InvalidNetworkPartitionException"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addNetworkPartition">
+ <xs:element name="registerService">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="networkPartition" nillable="true" type="ax26:NetworkPartition"/>
+ <xs:element minOccurs="0" name="registrant" nillable="true" type="ax26:Registrant"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addNetworkPartitionResponse">
+ <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="getNetworkPartition">
+ <xs:element name="getNetworkPartitions">
<xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="networkPartitionId" nillable="true" type="xs:string"/>
- </xs:sequence>
+ <xs:sequence/>
</xs:complexType>
</xs:element>
- <xs:element name="getNetworkPartitionResponse">
+ <xs:element name="getNetworkPartitionsResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax26:NetworkPartition"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:NetworkPartition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getNetworkPartitions">
+ <xs:element name="getIaasProviders">
<xs:complexType>
<xs:sequence/>
</xs:complexType>
</xs:element>
- <xs:element name="getNetworkPartitionsResponse">
+ <xs:element name="getIaasProvidersResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:NetworkPartition"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceNetworkPartitionNotExistsException">
+ <xs:element name="getCartridges">
<xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="NetworkPartitionNotExistsException" nillable="true" type="ax21:NetworkPartitionNotExistsException"/>
- </xs:sequence>
+ <xs:sequence/>
</xs:complexType>
</xs:element>
- <xs:element name="removeNetworkPartition">
+ <xs:element name="getCartridgesResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="networkPartitionId" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeNetworkPartitionResponse">
+ <xs:element name="CloudControllerServiceInvalidCartridgeDefinitionException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="InvalidCartridgeDefinitionException" nillable="true" type="ax21:InvalidCartridgeDefinitionException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidCartridgeTypeException">
+ <xs:element name="CloudControllerServiceCartridgeAlreadyExistsException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidCartridgeTypeException" nillable="true" type="ax21:InvalidCartridgeTypeException"/>
+ <xs:element minOccurs="0" name="CartridgeAlreadyExistsException" nillable="true" type="ax21:CartridgeAlreadyExistsException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeCartridge">
+ <xs:element name="addCartridge">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="cartridgeConfig" nillable="true" type="ax26:Cartridge"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeCartridgeResponse">
+ <xs:element name="addCartridgeResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
@@ -202,548 +198,552 @@
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidServiceGroupException">
+ <xs:element name="CloudControllerServiceInvalidCartridgeTypeException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax21:InvalidServiceGroupException"/>
+ <xs:element minOccurs="0" name="InvalidCartridgeTypeException" nillable="true" type="ax21:InvalidCartridgeTypeException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroup">
+ <xs:element name="removeCartridge">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupResponse">
+ <xs:element name="removeCartridgeResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax26:ServiceGroup"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addServiceGroup">
+ <xs:element name="CloudControllerServiceInvalidServiceGroupException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax26:ServiceGroup"/>
+ <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax21:InvalidServiceGroupException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addServiceGroupResponse">
+ <xs:element name="getServiceGroupSubGroups">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeServiceGroup">
+ <xs:element name="getServiceGroupSubGroupsResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeServiceGroupResponse">
+ <xs:element name="getServiceGroupCartridges">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getClusterContext">
+ <xs:element name="getServiceGroupCartridgesResponse">
<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="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getClusterContextResponse">
+ <xs:element name="getServiceGroupDependencies">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax26:ClusterContext"/>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceNonExistingKubernetesClusterException">
+ <xs:element name="getServiceGroupDependenciesResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="NonExistingKubernetesClusterException" nillable="true" type="ax21:NonExistingKubernetesClusterException"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax26:Dependencies"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeKubernetesCluster">
+ <xs:element name="getServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeKubernetesClusterResponse">
+ <xs:element name="getServiceGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax26:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceNonExistingKubernetesHostException">
+ <xs:element name="getCartridge">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="NonExistingKubernetesHostException" nillable="true" type="ax21:NonExistingKubernetesHostException"/>
+ <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeKubernetesHost">
+ <xs:element name="getCartridgeResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesHostId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax26:Cartridge"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeKubernetesHostResponse">
+ <xs:element name="getClusterContext">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidKubernetesClusterException">
+ <xs:element name="getClusterContextResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidKubernetesClusterException" nillable="true" type="ax21:InvalidKubernetesClusterException"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax26:ClusterContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceKubernetesClusterAlreadyExistsException">
+ <xs:element name="CloudControllerServiceInvalidKubernetesClusterException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="KubernetesClusterAlreadyExistsException" nillable="true" type="ax21:KubernetesClusterAlreadyExistsException"/>
+ <xs:element minOccurs="0" name="InvalidKubernetesClusterException" nillable="true" type="ax21:InvalidKubernetesClusterException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addKubernetesCluster">
+ <xs:element name="updateKubernetesCluster">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesCluster" nillable="true" type="ax29:KubernetesCluster"/>
+ <xs:element minOccurs="0" name="kubernetesCluster" nillable="true" type="ax213:KubernetesCluster"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addKubernetesClusterResponse">
+ <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="updateKubernetesCluster">
+ <xs:element name="CloudControllerServiceInvalidKubernetesHostException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesCluster" nillable="true" type="ax29:KubernetesCluster"/>
+ <xs:element minOccurs="0" name="InvalidKubernetesHostException" nillable="true" type="ax21:InvalidKubernetesHostException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateKubernetesClusterResponse">
+ <xs:element name="CloudControllerServiceNonExistingKubernetesClusterException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="NonExistingKubernetesClusterException" nillable="true" type="ax21:NonExistingKubernetesClusterException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getKubernetesCluster">
+ <xs:element name="addKubernetesHost">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax213:KubernetesHost"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getKubernetesClusterResponse">
+ <xs:element name="addKubernetesHostResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax29:KubernetesCluster"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getKubernetesClusters">
+ <xs:element name="CloudControllerServiceInvalidKubernetesMasterException">
<xs:complexType>
- <xs:sequence/>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="InvalidKubernetesMasterException" nillable="true" type="ax21:InvalidKubernetesMasterException"/>
+ </xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getKubernetesClustersResponse">
+ <xs:element name="CloudControllerServiceNonExistingKubernetesMasterException">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:KubernetesCluster"/>
+ <xs:element minOccurs="0" name="NonExistingKubernetesMasterException" nillable="true" type="ax21:NonExistingKubernetesMasterException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceCloudControllerException">
+ <xs:element name="updateKubernetesMaster">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="CloudControllerException" nillable="true" type="ax21:CloudControllerException"/>
+ <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax213:KubernetesMaster"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="startInstance">
+ <xs:element name="updateKubernetesMasterResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="instanceContext" nillable="true" type="ax26:InstanceContext"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="startInstanceResponse">
+ <xs:element name="getKubernetesCluster">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax26:MemberContext"/>
+ <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidMemberException">
+ <xs:element name="getKubernetesClusterResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidMemberException" nillable="true" type="ax21:InvalidMemberException"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax213:KubernetesCluster"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="terminateInstance">
+ <xs:element name="CloudControllerServiceNonExistingKubernetesHostException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="memberId" 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="terminateInstanceResponse">
+ <xs:element name="updateKubernetesHost">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax213:KubernetesHost"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidPartitionException">
+ <xs:element name="updateKubernetesHostResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidPartitionException" nillable="true" type="ax21:InvalidPartitionException"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="validatePartition">
+ <xs:element name="CloudControllerServiceNetworkPartitionAlreadyExistsException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="partition" nillable="true" type="ax26:Partition"/>
+ <xs:element minOccurs="0" name="NetworkPartitionAlreadyExistsException" nillable="true" type="ax21:NetworkPartitionAlreadyExistsException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="validatePartitionResponse">
+ <xs:element name="CloudControllerServiceInvalidNetworkPartitionException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="InvalidNetworkPartitionException" nillable="true" type="ax21:InvalidNetworkPartitionException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupSubGroups">
+ <xs:element name="addNetworkPartition">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="networkPartition" nillable="true" type="ax26:NetworkPartition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupSubGroupsResponse">
+ <xs:element name="addNetworkPartitionResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupCartridges">
+ <xs:element name="CloudControllerServiceNetworkPartitionNotExistsException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="NetworkPartitionNotExistsException" nillable="true" type="ax21:NetworkPartitionNotExistsException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupCartridgesResponse">
+ <xs:element name="removeNetworkPartition">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" 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="getServiceGroupDependencies">
+ <xs:element name="removeNetworkPartitionResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupDependenciesResponse">
+ <xs:element name="updateNetworkPartition">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax26:Dependencies"/>
+ <xs:element minOccurs="0" name="networkPartition" nillable="true" type="ax26:NetworkPartition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="validateDeploymentPolicyNetworkPartition">
+ <xs:element name="updateNetworkPartitionResponse">
<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="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="validateDeploymentPolicyNetworkPartitionResponse">
+ <xs:element name="getNetworkPartition">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="networkPartitionId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="registerService">
+ <xs:element name="getNetworkPartitionResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="registrant" nillable="true" type="ax26:Registrant"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax26:NetworkPartition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="registerServiceResponse">
+ <xs:element name="CloudControllerServiceClusterInstanceCreationException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="ClusterInstanceCreationException" nillable="true" type="ax21:ClusterInstanceCreationException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="startInstances">
+ <xs:element name="createClusterInstance">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="instanceContexts" nillable="true" type="ax26:InstanceContext"/>
+ <xs:element minOccurs="0" name="serviceType" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="instanceId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="partitionId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="networkPartitionId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="startInstancesResponse">
+ <xs:element name="createClusterInstanceResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:MemberContext"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="terminateInstanceForcefully">
+ <xs:element name="CloudControllerServiceKubernetesClusterAlreadyExistsException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="memberId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="KubernetesClusterAlreadyExistsException" nillable="true" type="ax21:KubernetesClusterAlreadyExistsException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="terminateInstanceForcefullyResponse">
+ <xs:element name="addKubernetesCluster">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="kubernetesCluster" nillable="true" type="ax213:KubernetesCluster"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidClusterException">
+ <xs:element name="addKubernetesClusterResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidClusterException" nillable="true" type="ax21:InvalidClusterException"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="terminateInstances">
+ <xs:element name="getKubernetesClusters">
+ <xs:complexType>
+ <xs:sequence/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getKubernetesClustersResponse">
<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="ax213:KubernetesCluster"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="terminateInstancesResponse">
+ <xs:element name="removeKubernetesCluster">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateClusterStatus">
+ <xs:element name="removeKubernetesClusterResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="instanceId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="status" nillable="true" type="ax212:ClusterStatus"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateClusterStatusResponse">
+ <xs:element name="removeKubernetesHost">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="kubernetesHostId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceUnregisteredClusterException">
+ <xs:element name="removeKubernetesHostResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="UnregisteredClusterException" nillable="true" type="ax21:UnregisteredClusterException"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="unregisterService">
+ <xs:element name="getHostsForKubernetesCluster">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="unregisterServiceResponse">
+ <xs:element name="getHostsForKubernetesClusterResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax213:KubernetesHost"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceApplicationClusterRegistrationException">
+ <xs:element name="getMasterForKubernetesCluster">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="ApplicationClusterRegistrationException" nillable="true" type="ax21:ApplicationClusterRegistrationException"/>
+ <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="createApplicationClusters">
+ <xs:element name="getMasterForKubernetesClusterResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="appId" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="appClustersContexts" nillable="true" type="ax26:ApplicationClusterContext"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax213:KubernetesMaster"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="createApplicationClustersResponse">
+ <xs:element name="validateDeploymentPolicyNetworkPartition">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <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="CloudControllerServiceClusterInstanceCreationException">
+ <xs:element name="validateDeploymentPolicyNetworkPartitionResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="ClusterInstanceCreationException" nillable="true" type="ax21:ClusterInstanceCreationException"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="createClusterInstance">
+ <xs:element name="addServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="serviceType" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="instanceId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="partitionId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="networkPartitionId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax26:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="createClusterInstanceResponse">
+ <xs:element name="addServiceGroupResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getMasterForKubernetesCluster">
+ <xs:element name="removeServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getMasterForKubernetesClusterResponse">
+ <xs:element name="removeServiceGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax29:KubernetesMaster"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getHostsForKubernetesCluster">
+ <xs:element name="CloudControllerServiceApplicationClusterRegistrationException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="ApplicationClusterRegistrationException" nillable="true" type="ax21:ApplicationClusterRegistrationException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getHostsForKubernetesClusterResponse">
+ <xs:element name="createApplicationClusters">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:KubernetesHost"/>
+ <xs:element minOccurs="0" name="appId" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="appClustersContexts" nillable="true" type="ax26:ApplicationClusterContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidKubernetesHostException">
+ <xs:element name="createApplicationClustersResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidKubernetesHostException" nillable="true" type="ax21:InvalidKubernetesHostException"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addKubernetesHost">
+ <xs:element name="terminateInstanceForcefully">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax29:KubernetesHost"/>
+ <xs:element minOccurs="0" name="memberId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addKubernetesHostResponse">
+ <xs:element name="terminateInstanceForcefullyResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateKubernetesHost">
+ <xs:element name="startInstance">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax29:KubernetesHost"/>
+ <xs:element minOccurs="0" name="instanceContext" nillable="true" type="ax26:InstanceContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateKubernetesHostResponse">
+ <xs:element name="startInstanceResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax26:MemberContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidKubernetesMasterException">
+ <xs:element name="CloudControllerServiceInvalidMemberException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidKubernetesMasterException" nillable="true" type="ax21:InvalidKubernetesMasterException"/>
+ <xs:element minOccurs="0" name="InvalidMemberException" nillable="true" type="ax21:InvalidMemberException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceNonExistingKubernetesMasterException">
+ <xs:element name="terminateInstance">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="NonExistingKubernetesMasterException" nillable="true" type="ax21:NonExistingKubernetesMasterException"/>
+ <xs:element minOccurs="0" name="memberId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateKubernetesMaster">
+ <xs:element name="terminateInstanceResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax29:KubernetesMaster"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateKubernetesMasterResponse">
+ <xs:element name="CloudControllerServiceInvalidClusterException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="InvalidClusterException" nillable="true" type="ax21:InvalidClusterException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateNetworkPartition">
+ <xs:element name="terminateInstances">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="networkPartition" nillable="true" type="ax26:NetworkPartition"/>
+ <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateNetworkPartitionResponse">
+ <xs:element name="terminateInstancesResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
@@ -776,12 +776,12 @@
</xs:complexType>
</xs:schema>
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://exception.controller.cloud.stratos.apache.org/xsd">
- <xs:complexType name="CartridgeNotFoundException">
+ <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:complexType name="CartridgeNotFoundException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
@@ -791,28 +791,32 @@
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="CartridgeAlreadyExistsException">
- <xs:sequence/>
+ <xs:complexType name="CloudControllerException">
+ <xs:complexContent>
+ <xs:extension base="xs:RuntimeException">
+ <xs:sequence/>
+ </xs:extension>
+ </xs:complexContent>
</xs:complexType>
- <xs:complexType name="NetworkPartitionAlreadyExistsException">
+ <xs:complexType name="UnregisteredClusterException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidNetworkPartitionException">
+ <xs:complexType name="InvalidCartridgeDefinitionException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="NetworkPartitionNotExistsException">
+ <xs:complexType name="CartridgeAlreadyExistsException">
<xs:sequence/>
</xs:complexType>
- <xs:complexType name="InvalidCartridgeTypeException">
+ <xs:complexType name="CartridgeDefinitionNotExistsException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="CartridgeDefinitionNotExistsException">
+ <xs:complexType name="InvalidCartridgeTypeException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
@@ -822,104 +826,85 @@
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="NonExistingKubernetesClusterException">
+ <xs:complexType name="InvalidKubernetesClusterException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="NonExistingKubernetesHostException">
+ <xs:complexType name="InvalidKubernetesHostException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidKubernetesClusterException">
+ <xs:complexType name="NonExistingKubernetesClusterException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="KubernetesClusterAlreadyExistsException">
+ <xs:complexType name="InvalidKubernetesMasterException">
<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:complexType name="NonExistingKubernetesMasterException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidPartitionException">
+ <xs:complexType name="NonExistingKubernetesHostException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidClusterException">
+ <xs:complexType name="NetworkPartitionAlreadyExistsException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="UnregisteredClusterException">
+ <xs:complexType name="InvalidNetworkPartitionException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="ApplicationClusterRegistrationException">
- <xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
- </xs:sequence>
+ <xs:complexType name="NetworkPartitionNotExistsException">
+ <xs:sequence/>
</xs:complexType>
<xs:complexType name="ClusterInstanceCreationException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidKubernetesHostException">
+ <xs:complexType name="KubernetesClusterAlreadyExistsException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidKubernetesMasterException">
+ <xs:complexType name="ApplicationClusterRegistrationException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="NonExistingKubernetesMasterException">
+ <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 attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://domain.common.stratos.apache.org/xsd">
- <xs:complexType name="NameValuePair">
+ <xs:complexType name="InvalidClusterException">
<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:element minOccurs="0" name="message" 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: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"/>
<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="ax27:KubernetesHost"/>
- <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax27:KubernetesMaster"/>
- <xs:element minOccurs="0" name="portRange" nillable="true" type="ax27:PortRange"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax28:Properties"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="kubernetesHosts" nillable="true" type="ax211:KubernetesHost"/>
+ <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax211:KubernetesMaster"/>
+ <xs:element minOccurs="0" name="portRange" nillable="true" type="ax211:PortRange"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax212:Properties"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="KubernetesHost">
@@ -927,13 +912,13 @@
<xs:element minOccurs="0" name="hostId" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="hostname" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="privateIPAddress" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax28:Properties"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax212:Properties"/>
<xs:element minOccurs="0" name="publicIPAddress" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="KubernetesMaster">
<xs:complexContent>
- <xs:extension base="ax27:KubernetesHost">
+ <xs:extension base="ax211:KubernetesHost">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
@@ -945,9 +930,133 @@
</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: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: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: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="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="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="InstanceMetadata">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="cpu" 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: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="Persistence">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="persistenceRequired" type="xs:boolean"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax23:Volume"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="NetworkPartition">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="activeByDefault" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="partitionAlgo" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax23:Partition"/>
+ <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"/>
@@ -1017,24 +1126,6 @@
<xs:element minOccurs="0" name="networkUuid" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="Persistence">
- <xs:sequence>
- <xs:element minOccurs="0" name="persistenceRequired" type="xs:boolean"/>
- <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"/>
@@ -1045,25 +1136,10 @@
<xs:element minOccurs="0" name="proxyPort" type="xs:int"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="NetworkPartition">
- <xs:sequence>
- <xs:element minOccurs="0" name="activeByDefault" type="xs:boolean"/>
- <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="partitionAlgo" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax23:Partition"/>
- <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="Partition">
+ <xs:complexType name="Dependencies">
<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="killBehaviour" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="startupOrders" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ServiceGroup">
@@ -1074,12 +1150,6 @@
<xs:element maxOccurs="unbounded" minOccurs="0" name="subGroups" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="Dependencies">
- <xs:sequence>
- <xs:element minOccurs="0" name="killBehaviour" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="startupOrders" nillable="true" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
<xs:complexType name="ClusterContext">
<xs:sequence>
<xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
@@ -1096,74 +1166,6 @@
<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="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=
<TRUNCATED>
[06/24] stratos git commit: Tenant isolation - Deployment Policies
Posted by ga...@apache.org.
Tenant isolation - Deployment Policies
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/829e3335
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/829e3335
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/829e3335
Branch: refs/heads/tenant-isolation
Commit: 829e33351d1e30d179be76b258ef11718ff72f88
Parents: 887f66f
Author: Dinithi <di...@wso2.com>
Authored: Sat Jun 27 10:56:01 2015 +0530
Committer: Dinithi <di...@wso2.com>
Committed: Sat Jun 27 10:56:01 2015 +0530
----------------------------------------------------------------------
.../autoscaler/pojo/policy/PolicyManager.java | 34 +-
.../policy/deployment/DeploymentPolicy.java | 31 +-
.../autoscaler/registry/RegistryManager.java | 2 +-
.../services/impl/AutoscalerServiceImpl.java | 22 +-
.../policy/deployment/DeploymentPolicyBean.java | 18 +
.../default/configure/deployment-policies.json | 1 +
.../schema/configure/deployment-policies.json | 7 +-
.../rest/endpoint/api/StratosApiV41.java | 4 +
.../rest/endpoint/api/StratosApiV41Utils.java | 42 +-
.../util/converter/ObjectConverter.java | 12 +-
.../src/main/resources/AutoscalerService.wsdl | 518 ++++++++++---------
11 files changed, 386 insertions(+), 305 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/829e3335/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
index e7fc57c..f127de7 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
@@ -133,7 +133,7 @@ public class PolicyManager {
if (log.isInfoEnabled()) {
log.info(String.format("Deployment policy is added successfully: [deployment-policy-id] %s",
- policy.getDeploymentPolicyID()));
+ policy.getUuid()));
}
}
@@ -145,27 +145,27 @@ public class PolicyManager {
*/
public void addDeploymentPolicyToInformationModel(DeploymentPolicy deploymentPolicy)
throws InvalidDeploymentPolicyException {
- if (!deploymentPolicyListMap.containsKey(deploymentPolicy.getDeploymentPolicyID())) {
+ if (!deploymentPolicyListMap.containsKey(deploymentPolicy.getUuid())) {
if (log.isDebugEnabled()) {
- log.debug("Adding deployment policy: " + deploymentPolicy.getDeploymentPolicyID());
+ log.debug("Adding deployment policy: " + deploymentPolicy.getUuid());
}
- deploymentPolicyListMap.put(deploymentPolicy.getDeploymentPolicyID(), deploymentPolicy);
+ deploymentPolicyListMap.put(deploymentPolicy.getUuid(), deploymentPolicy);
} else {
String errMsg = "Specified deployment policy [" +
- deploymentPolicy.getDeploymentPolicyID() + "] already exists";
+ deploymentPolicy.getUuid() + "] already exists";
log.error(errMsg);
throw new InvalidDeploymentPolicyException(errMsg);
}
}
public boolean updateDeploymentPolicy(DeploymentPolicy policy) throws InvalidPolicyException {
- if (StringUtils.isEmpty(policy.getDeploymentPolicyID())) {
+ if (StringUtils.isEmpty(policy.getUuid())) {
throw new AutoScalerException("Deployment policy id cannot be empty");
}
this.updateDeploymentPolicyInInformationModel(policy);
RegistryManager.getInstance().persistDeploymentPolicy(policy);
if (log.isInfoEnabled()) {
- log.info(String.format("Deployment policy is updated successfully: [id] %s", policy.getDeploymentPolicyID()));
+ log.info(String.format("Deployment policy is updated successfully: [id] %s", policy.getUuid()));
}
return true;
}
@@ -209,11 +209,11 @@ public class PolicyManager {
}
public void updateDeploymentPolicyInInformationModel(DeploymentPolicy deploymentPolicy) throws InvalidPolicyException {
- if (deploymentPolicyListMap.containsKey(deploymentPolicy.getDeploymentPolicyID())) {
+ if (deploymentPolicyListMap.containsKey(deploymentPolicy.getUuid())) {
if (log.isDebugEnabled()) {
- log.debug("Updating deployment policy: " + deploymentPolicy.getDeploymentPolicyID());
+ log.debug("Updating deployment policy: " + deploymentPolicy.getUuid());
}
- deploymentPolicyListMap.put(deploymentPolicy.getDeploymentPolicyID(), deploymentPolicy);
+ deploymentPolicyListMap.put(deploymentPolicy.getUuid(), deploymentPolicy);
}
}
@@ -278,16 +278,16 @@ public class PolicyManager {
private void addDeploymentPolicyToPolicyListMap(DeploymentPolicy policy) {
- if (StringUtils.isEmpty(policy.getDeploymentPolicyID())) {
+ if (StringUtils.isEmpty(policy.getUuid())) {
throw new RuntimeException("Application id is not found in the deployment policy");
}
- if (!deploymentPolicyListMap.containsKey(policy.getDeploymentPolicyID())) {
+ if (!deploymentPolicyListMap.containsKey(policy.getUuid())) {
if (log.isDebugEnabled()) {
- log.debug("Adding deployment policy: [deployment-policy-id] " + policy.getDeploymentPolicyID());
+ log.debug("Adding deployment policy: [deployment-policy-id] " + policy.getUuid());
}
- deploymentPolicyListMap.put(policy.getDeploymentPolicyID(), policy);
+ deploymentPolicyListMap.put(policy.getUuid(), policy);
} else {
- String errMsg = "Deployment policy already exists: [deployment-policy-id] " + policy.getDeploymentPolicyID();
+ String errMsg = "Deployment policy already exists: [deployment-policy-id] " + policy.getUuid();
log.error(errMsg);
}
}
@@ -300,9 +300,9 @@ public class PolicyManager {
public void updateDeploymentPolicyToInformationModel(DeploymentPolicy policy) throws InvalidPolicyException {
if (log.isDebugEnabled()) {
- log.debug("Updating deployment policy: " + policy.getDeploymentPolicyID());
+ log.debug("Updating deployment policy: " + policy.getUuid());
}
- deploymentPolicyListMap.put(policy.getDeploymentPolicyID(), policy);
+ deploymentPolicyListMap.put(policy.getUuid(), policy);
}
/**
http://git-wip-us.apache.org/repos/asf/stratos/blob/829e3335/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/DeploymentPolicy.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/DeploymentPolicy.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/DeploymentPolicy.java
index 56d1f15..c28b300 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/DeploymentPolicy.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/DeploymentPolicy.java
@@ -32,15 +32,34 @@ import java.util.Arrays;
public class DeploymentPolicy implements Serializable {
private static final long serialVersionUID = 5675507196284400099L;
- private String deploymentPolicyID;
+ private String uuid;
+ private int tenantId;
+ private String id;
private NetworkPartitionRef[] networkPartitionRefs;
- public String getDeploymentPolicyID() {
- return deploymentPolicyID;
+ public String getUuid() {
+ return uuid;
}
- public void setDeploymentPolicyID(String deploymentPolicyID) {
- this.deploymentPolicyID = deploymentPolicyID;
+ public void setUuid(String uuid) {
+ this.uuid = uuid;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+
+ public int getTenantId() {
+ return tenantId;
+ }
+
+ public void setTenantId(int tenantId) {
+ this.tenantId = tenantId;
}
public NetworkPartitionRef[] getNetworkPartitionRefs() {
@@ -86,7 +105,7 @@ public class DeploymentPolicy implements Serializable {
}
public String toString() {
- return String.format("{ deployment-policy-id : %s, network-partitions : %s", deploymentPolicyID,
+ return String.format("{ deployment-policy-id : %s, network-partitions : %s", uuid,
Arrays.toString(networkPartitionRefs));
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/829e3335/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
index e16d3f5..a3c5703 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
@@ -162,7 +162,7 @@ public class RegistryManager {
}
public void persistDeploymentPolicy(DeploymentPolicy deploymentPolicy) {
- String resourcePath = AutoscalerConstants.AUTOSCALER_RESOURCE + AutoscalerConstants.DEPLOYMENT_POLICY_RESOURCE + "/" + deploymentPolicy.getDeploymentPolicyID();
+ String resourcePath = AutoscalerConstants.AUTOSCALER_RESOURCE + AutoscalerConstants.DEPLOYMENT_POLICY_RESOURCE + "/" + deploymentPolicy.getUuid();
persist(deploymentPolicy, resourcePath);
if (log.isDebugEnabled()) {
log.debug(String.format("Deployment policy written to registry: %s", deploymentPolicy.toString()));
http://git-wip-us.apache.org/repos/asf/stratos/blob/829e3335/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
index 3f2120c..d0da8d5 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
@@ -25,7 +25,6 @@ import org.apache.stratos.autoscaler.algorithms.networkpartition.NetworkPartitio
import org.apache.stratos.autoscaler.applications.ApplicationHolder;
import org.apache.stratos.autoscaler.applications.parser.ApplicationParser;
import org.apache.stratos.autoscaler.applications.parser.DefaultApplicationParser;
-import org.apache.stratos.autoscaler.applications.pojo.*;
import org.apache.stratos.autoscaler.applications.pojo.ApplicationClusterContext;
import org.apache.stratos.autoscaler.applications.pojo.ApplicationContext;
import org.apache.stratos.autoscaler.applications.pojo.ArtifactRepositoryContext;
@@ -57,7 +56,6 @@ import org.apache.stratos.autoscaler.pojo.policy.deployment.ApplicationPolicy;
import org.apache.stratos.autoscaler.pojo.policy.deployment.DeploymentPolicy;
import org.apache.stratos.autoscaler.registry.RegistryManager;
import org.apache.stratos.autoscaler.services.AutoscalerService;
-import org.apache.stratos.autoscaler.stub.pojo.*;
import org.apache.stratos.autoscaler.util.AutoscalerUtil;
import org.apache.stratos.cloud.controller.stub.CloudControllerServiceInvalidCartridgeTypeExceptionException;
import org.apache.stratos.cloud.controller.stub.CloudControllerServiceInvalidPartitionExceptionException;
@@ -1044,13 +1042,13 @@ public class AutoscalerServiceImpl implements AutoscalerService {
validateDeploymentPolicy(deploymentPolicy);
if (log.isInfoEnabled()) {
- log.info("Adding deployment policy: [deployment-policy-id] " + deploymentPolicy.getDeploymentPolicyID());
+ log.info("Adding deployment policy: [deployment-policy-id] " + deploymentPolicy.getUuid());
}
if (log.isDebugEnabled()) {
log.debug("Deployment policy definition: " + deploymentPolicy.toString());
}
- String deploymentPolicyID = deploymentPolicy.getDeploymentPolicyID();
+ String deploymentPolicyID = deploymentPolicy.getUuid();
if (PolicyManager.getInstance().getDeploymentPolicy(deploymentPolicyID) != null) {
String message = "Deployment policy already exists: [deployment-policy-id] " + deploymentPolicyID;
log.error(message);
@@ -1080,7 +1078,7 @@ public class AutoscalerServiceImpl implements AutoscalerService {
}
// deployment policy id can't be null or empty
- String deploymentPolicyId = deploymentPolicy.getDeploymentPolicyID();
+ String deploymentPolicyId = deploymentPolicy.getUuid();
if (StringUtils.isBlank(deploymentPolicyId)) {
String msg = String.format("Deployment policy id is blank");
log.error(msg);
@@ -1173,13 +1171,13 @@ public class AutoscalerServiceImpl implements AutoscalerService {
validateDeploymentPolicy(deploymentPolicy);
if (log.isInfoEnabled()) {
- log.info("Updating deployment policy: [deployment-policy-id] " + deploymentPolicy.getDeploymentPolicyID());
+ log.info("Updating deployment policy: [deployment-policy-id] " + deploymentPolicy.getUuid());
}
if (log.isDebugEnabled()) {
log.debug("Updating Deployment policy definition: " + deploymentPolicy.toString());
}
- String deploymentPolicyID = deploymentPolicy.getDeploymentPolicyID();
+ String deploymentPolicyID = deploymentPolicy.getUuid();
if (PolicyManager.getInstance().getDeploymentPolicy(deploymentPolicyID) == null) {
String message = "Deployment policy not exists: [deployment-policy-id] " + deploymentPolicyID;
log.error(message);
@@ -1201,30 +1199,30 @@ public class AutoscalerServiceImpl implements AutoscalerService {
for (ClusterMonitor clusterMonitor : AutoscalerContext.getInstance().getClusterMonitors().values()) {
//Following if statement checks the relevant clusters for the updated deployment policy
- if (deploymentPolicy.getDeploymentPolicyID().equals(clusterMonitor.getDeploymentPolicyId())) {
+ if (deploymentPolicy.getUuid().equals(clusterMonitor.getDeploymentPolicyId())) {
for (NetworkPartitionRef networkPartition : deploymentPolicy.getNetworkPartitionRefs()) {
ClusterLevelNetworkPartitionContext clusterLevelNetworkPartitionContext
= clusterMonitor.getClusterContext().getNetworkPartitionCtxt(networkPartition.getId());
try {
addNewPartitionsToClusterMonitor(clusterLevelNetworkPartitionContext, networkPartition,
- deploymentPolicy.getDeploymentPolicyID(), clusterMonitor.getClusterContext().getServiceId());
+ deploymentPolicy.getUuid(), clusterMonitor.getClusterContext().getServiceId());
} catch (RemoteException e) {
String message = "Connection to cloud controller failed, Cluster monitor update failed for" +
- " [deployment-policy] " + deploymentPolicy.getDeploymentPolicyID();
+ " [deployment-policy] " + deploymentPolicy.getUuid();
log.error(message);
throw new CloudControllerConnectionException(message, e);
} catch (CloudControllerServiceInvalidPartitionExceptionException e) {
String message = "Invalid partition, Cluster monitor update failed for [deployment-policy] "
- + deploymentPolicy.getDeploymentPolicyID();
+ + deploymentPolicy.getUuid();
log.error(message);
throw new InvalidDeploymentPolicyException(message, e);
} catch (CloudControllerServiceInvalidCartridgeTypeExceptionException e) {
String message = "Invalid cartridge type, Cluster monitor update failed for [deployment-policy] "
- + deploymentPolicy.getDeploymentPolicyID() + " [cartridge] "
+ + deploymentPolicy.getUuid() + " [cartridge] "
+ clusterMonitor.getClusterContext().getServiceId();
log.error(message);
throw new InvalidDeploymentPolicyException(message, e);
http://git-wip-us.apache.org/repos/asf/stratos/blob/829e3335/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/deployment/DeploymentPolicyBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/deployment/DeploymentPolicyBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/deployment/DeploymentPolicyBean.java
index 1837714..05eaa31 100644
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/deployment/DeploymentPolicyBean.java
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/deployment/DeploymentPolicyBean.java
@@ -28,6 +28,24 @@ import java.util.List;
public class DeploymentPolicyBean {
private String id;
+ private String uuid;
+ private int tenantId;
+
+ public String getUuid() {
+ return uuid;
+ }
+
+ public void setUuid(String uuid) {
+ this.uuid = uuid;
+ }
+
+ public int getTenantId() {
+ return tenantId;
+ }
+
+ public void setTenantId(int tenantId) {
+ this.tenantId = tenantId;
+ }
private List<NetworkPartitionReferenceBean> networkPartitions;
http://git-wip-us.apache.org/repos/asf/stratos/blob/829e3335/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/deployment-policies.json
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/deployment-policies.json b/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/deployment-policies.json
index f749ab4..f8ccf75 100644
--- a/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/deployment-policies.json
+++ b/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/deployment-policies.json
@@ -1,4 +1,5 @@
{
+ "uuid": "",
"id": "deployment-policy-1",
"networkPartitions": [
{
http://git-wip-us.apache.org/repos/asf/stratos/blob/829e3335/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/deployment-policies.json
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/deployment-policies.json b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/deployment-policies.json
index 396a26b..2c78bee 100644
--- a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/deployment-policies.json
+++ b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/deployment-policies.json
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
- "id": "root",
+ "uuid": "root",
"type": "object",
"title":"Deployment Policy Definition",
"name": "Deployment Policy",
@@ -9,6 +9,11 @@
"disable_collapse": true
},
"properties": {
+ "uuid": {
+ "id": "root/uuid",
+ "type": "string",
+ "title":"UUID"
+ },
"id": {
"id": "root/id",
"type": "string",
http://git-wip-us.apache.org/repos/asf/stratos/blob/829e3335/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 bbbd3f2..40f193f 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
@@ -133,6 +133,10 @@ public class StratosApiV41 extends AbstractApi {
DeploymentPolicyBean deploymentPolicyDefinitionBean) throws RestAPIException {
String deploymentPolicyID = deploymentPolicyDefinitionBean.getId();
+ deploymentPolicyDefinitionBean.setUuid(UUID.randomUUID().toString());
+
+ PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext();
+ deploymentPolicyDefinitionBean.setTenantId(carbonContext.getTenantId());
try {
StratosApiV41Utils.addDeploymentPolicy(deploymentPolicyDefinitionBean);
} catch (AutoscalerServiceInvalidDeploymentPolicyExceptionException e) {
http://git-wip-us.apache.org/repos/asf/stratos/blob/829e3335/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 5b12e59..13798d8 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
@@ -2760,7 +2760,7 @@ public class StratosApiV41Utils {
if (networkPartitionRef.getId().equals(networkPartitionId)) {
String message = String.format("Cannot remove the network partition %s, since" +
" it is used in deployment policy %s", networkPartitionId,
- deploymentPolicy.getDeploymentPolicyID());
+ deploymentPolicy.getId());
log.error(message);
throw new RestAPIException(message);
}
@@ -2875,22 +2875,35 @@ public class StratosApiV41Utils {
/**
* Get deployment policy by deployment policy id
*
- * @param deploymentPolicyID deployment policy id
+ * @param deploymentPolicyId deployment policy id
* @return {@link DeploymentPolicyBean}
*/
- public static DeploymentPolicyBean getDeployementPolicy(String deploymentPolicyID) throws RestAPIException {
+ public static DeploymentPolicyBean getDeployementPolicy(String deploymentPolicyId) throws RestAPIException {
DeploymentPolicyBean deploymentPolicyBean;
try {
+ org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy[] deploymentPolicies
+ = AutoscalerServiceClient.getInstance().getDeploymentPolicies();
- org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy deploymentPolicy
- = AutoscalerServiceClient.getInstance().getDeploymentPolicy(deploymentPolicyID);
+ DeploymentPolicy deploymentPolicy = null;
+ PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext();
+ List<DeploymentPolicy> deploymentPoliciesForTenant = new ArrayList<DeploymentPolicy>();
+ for (DeploymentPolicy deploymentPolicy1 : deploymentPolicies) {
+ if (carbonContext.getTenantId() == deploymentPolicy1.getTenantId()) {
+ deploymentPoliciesForTenant.add(deploymentPolicy1);
+ if (deploymentPolicy1.getId().equals(deploymentPolicyId)) {
+ deploymentPolicy = deploymentPolicy1;
+ }
+ }
+ }
+ //org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy deploymentPolicy
+ // = AutoscalerServiceClient.getInstance().getDeploymentPolicy(deploymentPolicyID);
if (deploymentPolicy == null) {
return null;
}
deploymentPolicyBean = ObjectConverter.convertCCStubDeploymentPolicyToDeploymentPolicy(deploymentPolicy);
} catch (RemoteException e) {
- String msg = "Could not find deployment policy: [deployment-policy-id] " + deploymentPolicyID;
+ String msg = "Could not find deployment policy: [deployment-policy-id] " + deploymentPolicyId;
log.error(msg, e);
throw new RestAPIException(msg);
}
@@ -2907,7 +2920,22 @@ public class StratosApiV41Utils {
try {
org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy[] deploymentPolicies
= AutoscalerServiceClient.getInstance().getDeploymentPolicies();
- return ObjectConverter.convertASStubDeploymentPoliciesToDeploymentPolicies(deploymentPolicies);
+
+ DeploymentPolicy[] deploymentPoliciesForTenantArray = new DeploymentPolicy[0];
+ if (deploymentPolicies != null) {
+ PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext();
+ List<DeploymentPolicy> deploymentPoliciesForTenant = new ArrayList<DeploymentPolicy>();
+ for (DeploymentPolicy deploymentPolicy : deploymentPolicies) {
+ if (carbonContext.getTenantId() == deploymentPolicy.getTenantId()) {
+ deploymentPoliciesForTenant.add(deploymentPolicy);
+ }
+ }
+ if (deploymentPoliciesForTenant.size() != 0) {
+ deploymentPoliciesForTenantArray = deploymentPoliciesForTenant.toArray(new
+ DeploymentPolicy[deploymentPoliciesForTenant.size()]);
+ }
+ }
+ return ObjectConverter.convertASStubDeploymentPoliciesToDeploymentPolicies(deploymentPoliciesForTenantArray);
} catch (RemoteException e) {
String message = "Could not get deployment policies";
log.error(message);
http://git-wip-us.apache.org/repos/asf/stratos/blob/829e3335/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 5f4b3d9..1900dcf 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
@@ -1978,7 +1978,9 @@ public class ObjectConverter {
}
DeploymentPolicyBean deploymentPolicyBean = new DeploymentPolicyBean();
- deploymentPolicyBean.setId(deploymentPolicy.getDeploymentPolicyID());
+ deploymentPolicyBean.setId(deploymentPolicy.getId());
+ deploymentPolicyBean.setUuid(deploymentPolicy.getUuid());
+ deploymentPolicyBean.setTenantId(deploymentPolicy.getTenantId());
deploymentPolicyBean.setNetworkPartitions(convertASStubNetworkPartitionsToNetworkPartitionReferences(
deploymentPolicy.getNetworkPartitionRefs()));
return deploymentPolicyBean;
@@ -2012,7 +2014,9 @@ public class ObjectConverter {
}
DeploymentPolicy deploymentPolicy = new DeploymentPolicy();
- deploymentPolicy.setDeploymentPolicyID(deploymentPolicyBean.getId());
+ deploymentPolicy.setId(deploymentPolicyBean.getId());
+ deploymentPolicy.setUuid(deploymentPolicyBean.getUuid());
+ deploymentPolicy.setTenantId(deploymentPolicyBean.getTenantId());
if (deploymentPolicyBean.getNetworkPartitions() != null) {
deploymentPolicy.setNetworkPartitionRefs(convertNetworkPartitionToASStubNetworkPartition(
deploymentPolicyBean.getNetworkPartitions()));
@@ -2045,7 +2049,9 @@ public class ObjectConverter {
}
DeploymentPolicyBean deploymentPolicyBean = new DeploymentPolicyBean();
- deploymentPolicyBean.setId(deploymentPolicy.getDeploymentPolicyID());
+ deploymentPolicyBean.setId(deploymentPolicy.getId());
+ deploymentPolicyBean.setUuid(deploymentPolicy.getUuid());
+ deploymentPolicyBean.setTenantId(deploymentPolicy.getTenantId());
deploymentPolicyBean.setNetworkPartitions(convertASStubNetworkPartitionRefsToNetworkPartitions(
deploymentPolicy.getNetworkPartitionRefs()));
return deploymentPolicyBean;
[21/24] stratos git commit: Update the method comment
Posted by ga...@apache.org.
Update the method comment
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/e5d003d5
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/e5d003d5
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/e5d003d5
Branch: refs/heads/tenant-isolation
Commit: e5d003d55e502dfec6bd44749415c790f311890e
Parents: a82310c
Author: Gayan Gunarathne <ga...@wso2.com>
Authored: Mon Jul 6 13:35:11 2015 +0530
Committer: Gayan Gunarathne <ga...@wso2.com>
Committed: Mon Jul 6 13:35:11 2015 +0530
----------------------------------------------------------------------
.../rest/endpoint/api/StratosApiV41Utils.java | 114 +++++++++----------
1 file changed, 57 insertions(+), 57 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/e5d003d5/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 6aae2fe..16f70cd 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
@@ -107,63 +107,63 @@ public class StratosApiV41Utils {
private static final Log log = LogFactory.getLog(StratosApiV41Utils.class);
- /**
- * Add new cartridge util method
- *
- * @param cartridgeBean Cartridge definition
- * @throws RestAPIException
- */
- public static void addCartridge(CartridgeBean cartridgeBean) throws RestAPIException {
-
- try {
- if (log.isDebugEnabled()) {
- log.debug(String.format("Adding cartridge: [cartridge-type] %s ", cartridgeBean.getType()));
- }
-
- List<IaasProviderBean> iaasProviders = cartridgeBean.getIaasProvider();
- if ((iaasProviders == null) || iaasProviders.size() == 0) {
- throw new RestAPIException(String.format("IaaS providers not found in cartridge: %s",
- cartridgeBean.getType()));
- }
-
- for(PortMappingBean portMapping : cartridgeBean.getPortMapping()) {
- if(StringUtils.isBlank(portMapping.getName())) {
- portMapping.setName(portMapping.getProtocol() + "-" + portMapping.getPort());
- if(log.isInfoEnabled()) {
- log.info(String.format("Port mapping name not found, default value generated: " +
- "[cartridge-type] %s [port-mapping-name] %s",
- cartridgeBean.getType(), portMapping.getName()));
- }
- }
- }
-
- Cartridge cartridgeConfig = createCartridgeConfig(cartridgeBean);
- CloudControllerServiceClient cloudControllerServiceClient = CloudControllerServiceClient.getInstance();
- cloudControllerServiceClient.addCartridge(cartridgeConfig);
-
- if (log.isDebugEnabled()) {
- log.debug(String.format(
- "Successfully added cartridge: [cartridge-type] %s ",
- cartridgeBean.getType()));
- }
- } catch (CloudControllerServiceCartridgeAlreadyExistsExceptionException e) {
- String msg = "Could not add cartridge";
- log.error(msg, e);
- throw new RestAPIException(msg);
- } catch (CloudControllerServiceInvalidCartridgeDefinitionExceptionException e) {
- String msg = "Could not add cartridge";
- log.error(msg, e);
- throw new RestAPIException(msg);
- } catch (RemoteException e) {
- String msg = "Could not add cartridge";
- log.error(msg, e);
- throw new RestAPIException(msg);
- } catch (CloudControllerServiceInvalidIaasProviderExceptionException e) {
- String msg = "Could not add cartridge";
- log.error(msg, e);
- throw new RestAPIException(msg);
- }
- }
+ /**
+ * Add new cartridge util method
+ *
+ * @param cartridgeBean Cartridge definition
+ * @throws RestAPIException
+ */
+ public static void addCartridge(CartridgeBean cartridgeBean) throws RestAPIException {
+
+ try {
+ if (log.isDebugEnabled()) {
+ log.debug(String.format("Adding cartridge: [cartridge-type] %s ", cartridgeBean.getType()));
+ }
+
+ List<IaasProviderBean> iaasProviders = cartridgeBean.getIaasProvider();
+ if ((iaasProviders == null) || iaasProviders.size() == 0) {
+ throw new RestAPIException(String.format("IaaS providers not found in cartridge: %s",
+ cartridgeBean.getType()));
+ }
+
+ for (PortMappingBean portMapping : cartridgeBean.getPortMapping()) {
+ if (StringUtils.isBlank(portMapping.getName())) {
+ portMapping.setName(portMapping.getProtocol() + "-" + portMapping.getPort());
+ if (log.isInfoEnabled()) {
+ log.info(String.format("Port mapping name not found, default value generated: " +
+ "[cartridge-type] %s [port-mapping-name] %s",
+ cartridgeBean.getType(), portMapping.getName()));
+ }
+ }
+ }
+
+ Cartridge cartridgeConfig = createCartridgeConfig(cartridgeBean);
+ CloudControllerServiceClient cloudControllerServiceClient = CloudControllerServiceClient.getInstance();
+ cloudControllerServiceClient.addCartridge(cartridgeConfig);
+
+ if (log.isDebugEnabled()) {
+ log.debug(String.format(
+ "Successfully added cartridge: [cartridge-type] %s ",
+ cartridgeBean.getType()));
+ }
+ } catch (CloudControllerServiceCartridgeAlreadyExistsExceptionException e) {
+ String msg = "Could not add cartridge";
+ log.error(msg, e);
+ throw new RestAPIException(msg);
+ } catch (CloudControllerServiceInvalidCartridgeDefinitionExceptionException e) {
+ String msg = "Could not add cartridge";
+ log.error(msg, e);
+ throw new RestAPIException(msg);
+ } catch (RemoteException e) {
+ String msg = "Could not add cartridge";
+ log.error(msg, e);
+ throw new RestAPIException(msg);
+ } catch (CloudControllerServiceInvalidIaasProviderExceptionException e) {
+ String msg = "Could not add cartridge";
+ log.error(msg, e);
+ throw new RestAPIException(msg);
+ }
+ }
/**
* Update Cartridge
[18/24] stratos git commit: removing UUID from the UI
Posted by ga...@apache.org.
removing UUID from the UI
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/96545c52
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/96545c52
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/96545c52
Branch: refs/heads/tenant-isolation
Commit: 96545c52182cefb6fcb6afd2bd3cda18fc98dd51
Parents: 52380b1
Author: Dinithi <di...@wso2.com>
Authored: Fri Jul 3 09:38:37 2015 +0530
Committer: Dinithi <di...@wso2.com>
Committed: Fri Jul 3 09:38:37 2015 +0530
----------------------------------------------------------------------
.../applications/parser/DefaultApplicationParser.java | 2 +-
.../apache/stratos/autoscaler/util/AutoscalerUtil.java | 2 +-
.../forms/default/configure/application-policies.json | 1 -
.../forms/default/configure/autoscaling-policies.json | 1 -
.../forms/default/configure/deployment-policies.json | 1 -
.../forms/default/configure/network-partitions.json | 1 -
.../forms/schema/configure/application-policies.json | 8 +-------
.../forms/schema/configure/autoscaling-policies.json | 11 +++--------
.../forms/schema/configure/deployment-policies.json | 9 ++-------
.../forms/schema/configure/network-partitions.json | 9 ++-------
10 files changed, 10 insertions(+), 35 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/96545c52/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java
index a3ac423..d0f8514 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java
@@ -167,7 +167,7 @@ public class DefaultApplicationParser implements ApplicationParser {
"[cartridge-type] %s [alias] %s", applicationId, cartridgeType, alias));
}
- AutoscalePolicy autoscalingPolicy = PolicyManager.getInstance().getAutoscalePolicyById(autoscalingPolicyId);
+ AutoscalePolicy autoscalingPolicy = PolicyManager.getInstance().getAutoscalePolicy(autoscalingPolicyId);
if (autoscalingPolicy == null) {
handleError(String.format("Autoscaling policy is not found: [application-id] %s " +
"[cartridge-type] %s [alias] %s [autoscaling-policy] %s", applicationId, cartridgeType,
http://git-wip-us.apache.org/repos/asf/stratos/blob/96545c52/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
index c5ba3b9..8efdd1c 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
@@ -766,7 +766,7 @@ public class AutoscalerUtil {
int referencesOfNetworkPartition = 0;
for (String deploymentPolicyIDReferredInApp : deploymentPolicyIdsReferredInApplication) {
try {
- DeploymentPolicy deploymentPolicyInApp = PolicyManager.getInstance().getDeploymentPolicyById(deploymentPolicyIDReferredInApp);
+ DeploymentPolicy deploymentPolicyInApp = PolicyManager.getInstance().getDeploymentPolicy(deploymentPolicyIDReferredInApp);
if (deploymentPolicyInApp != null) {
for (NetworkPartitionRef networkPartitionOfDeploymentPolicy : deploymentPolicyInApp.getNetworkPartitionRefs()) {
if (networkPartitionOfDeploymentPolicy != null) {
http://git-wip-us.apache.org/repos/asf/stratos/blob/96545c52/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/application-policies.json
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/application-policies.json b/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/application-policies.json
index 0f92e09..008e079 100644
--- a/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/application-policies.json
+++ b/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/application-policies.json
@@ -1,5 +1,4 @@
{
- "uuid": "",
"id": "application-policy-1",
"algorithm":"one-after-another",
"networkPartitions":[
http://git-wip-us.apache.org/repos/asf/stratos/blob/96545c52/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/autoscaling-policies.json
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/autoscaling-policies.json b/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/autoscaling-policies.json
index 7fa3c03..29c755f 100644
--- a/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/autoscaling-policies.json
+++ b/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/autoscaling-policies.json
@@ -1,5 +1,4 @@
{
- "uuid": "",
"id": "economy",
"description":"autoscale policy description",
"loadThresholds": {
http://git-wip-us.apache.org/repos/asf/stratos/blob/96545c52/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/deployment-policies.json
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/deployment-policies.json b/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/deployment-policies.json
index f8ccf75..f749ab4 100644
--- a/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/deployment-policies.json
+++ b/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/deployment-policies.json
@@ -1,5 +1,4 @@
{
- "uuid": "",
"id": "deployment-policy-1",
"networkPartitions": [
{
http://git-wip-us.apache.org/repos/asf/stratos/blob/96545c52/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/network-partitions.json
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/network-partitions.json b/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/network-partitions.json
index 70f2899..0ad6424 100644
--- a/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/network-partitions.json
+++ b/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/network-partitions.json
@@ -1,5 +1,4 @@
{
- "uuid": "",
"id": "network-partition-1",
"provider": "mock",
"partitions": [
http://git-wip-us.apache.org/repos/asf/stratos/blob/96545c52/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/application-policies.json
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/application-policies.json b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/application-policies.json
index b7ade53..b94c5b8 100644
--- a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/application-policies.json
+++ b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/application-policies.json
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
- "uuid": "root",
+ "id": "root",
"type": "object",
"title": "Application Policy Definition",
"name": "Application Policy",
@@ -9,12 +9,6 @@
"disable_collapse": true
},
"properties": {
- "uuid": {
- "id": "root/uuid",
- "type": "string",
- "title": "Application Policy UUID ",
- "name": "Application Policy UUID"
- },
"id": {
"id": "root/id",
"type": "string",
http://git-wip-us.apache.org/repos/asf/stratos/blob/96545c52/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/autoscaling-policies.json
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/autoscaling-policies.json b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/autoscaling-policies.json
index 21416ff..5b094f9 100644
--- a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/autoscaling-policies.json
+++ b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/autoscaling-policies.json
@@ -1,24 +1,19 @@
{
"type":"object",
"$schema": "http://json-schema.org/draft-04/schema",
- "uuid": "root",
+ "id": "root",
"title":"Auto-scaling Policy Definition",
- "name": "Auto-scaling Policy UUID",
+ "name": "Auto-scaling Policy",
"options": {
"disable_properties": true,
"disable_collapse": true
},
"required" : ["id", "loadThresholds"],
"properties":{
- "uuid": {
- "type":"string",
- "id": "root/uuid",
- "title":"Auto Scale policy UUID"
- },
"id": {
"type":"string",
"id": "root/id",
- "title":"Auto Scale policy ID",
+ "title":"Auto Scale policy Id",
"minLength":4,
"default":"Policy name",
"maxItems":1
http://git-wip-us.apache.org/repos/asf/stratos/blob/96545c52/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/deployment-policies.json
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/deployment-policies.json b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/deployment-policies.json
index 2c78bee..29a27f1 100644
--- a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/deployment-policies.json
+++ b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/deployment-policies.json
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
- "uuid": "root",
+ "id": "root",
"type": "object",
"title":"Deployment Policy Definition",
"name": "Deployment Policy",
@@ -9,15 +9,10 @@
"disable_collapse": true
},
"properties": {
- "uuid": {
- "id": "root/uuid",
- "type": "string",
- "title":"UUID"
- },
"id": {
"id": "root/id",
"type": "string",
- "title":"Deployment Policy ID"
+ "title":"Deployment Policy Id"
},
"networkPartitions": {
"id": "root/networkPartitions",
http://git-wip-us.apache.org/repos/asf/stratos/blob/96545c52/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/network-partitions.json
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/network-partitions.json b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/network-partitions.json
index 85bcfab..2332650 100644
--- a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/network-partitions.json
+++ b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/network-partitions.json
@@ -1,19 +1,14 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
- "uuid": "root",
+ "id": "root",
"type": "object",
"title": "Network Partition Definition",
- "name": "Network Partition Policy",
+ "name": "Network Partition",
"options": {
"disable_properties": true,
"disable_collapse": true
},
"properties": {
- "uuid": {
- "id": "root/uuid",
- "type": "string",
- "title": "UUID"
- },
"id": {
"id": "root/id",
"type": "string",
[04/24] stratos git commit: Modifying log messages to display uuid
Posted by ga...@apache.org.
Modifying log messages to display uuid
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/887f66f9
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/887f66f9
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/887f66f9
Branch: refs/heads/tenant-isolation
Commit: 887f66f96504de9f8fcca82e63c94352afc079ce
Parents: c77bc81
Author: Dinithi <di...@wso2.com>
Authored: Fri Jun 26 09:13:35 2015 +0530
Committer: Dinithi <di...@wso2.com>
Committed: Fri Jun 26 09:13:35 2015 +0530
----------------------------------------------------------------------
.../impl/CloudControllerServiceImpl.java | 72 ++++++++++++--------
1 file changed, 43 insertions(+), 29 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/887f66f9/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 801f41e..105f222 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
@@ -1459,9 +1459,10 @@ public class CloudControllerServiceImpl implements CloudControllerService {
log.info(String.format("Adding network partition: [network-partition-id] %s", networkPartition.getUuid()));
}
- String networkPartitionID = networkPartition.getUuid();
- if (cloudControllerContext.getNetworkPartition(networkPartitionID) != null) {
- String message = "Network partition already exists: [network-partition-id] " + networkPartitionID;
+ String networkPartitionUuid = networkPartition.getUuid();
+ if (cloudControllerContext.getNetworkPartition(networkPartitionUuid) != null) {
+ String message = "Network partition already exists: [network-partition-uuid] " + networkPartitionUuid +
+ "[network-partition-id] " + networkPartition.getId();
log.error(message);
throw new NetworkPartitionAlreadyExistsException(message);
}
@@ -1470,8 +1471,9 @@ public class CloudControllerServiceImpl implements CloudControllerService {
for (Partition partition : networkPartition.getPartitions()) {
if (partition != null) {
if (log.isInfoEnabled()) {
- log.info(String.format("Validating partition: [network-partition-id] %s [partition-id] %s",
- networkPartition.getUuid(), partition.getId()));
+ log.info(String.format("Validating partition: [network-partition-uuid] %s " +
+ "[network-partition-id] %s [partition-id] %s", networkPartitionUuid,
+ networkPartition.getId(), partition.getId()));
}
// Overwrites partition provider with network partition provider
partition.setProvider(networkPartition.getProvider());
@@ -1480,19 +1482,22 @@ public class CloudControllerServiceImpl implements CloudControllerService {
} catch (InvalidPartitionException e) {
//Following message is shown to the end user in all the the API clients(GUI/CLI/Rest API)
throw new InvalidNetworkPartitionException(String.format("Network partition " +
- " %s, is invalid since the partition %s is invalid",
- networkPartition.getUuid(), partition.getId()), e);
+ "[network-partition-uuid] %s [network-partition-id] %s , " +
+ "is invalid since the partition %s is invalid",
+ networkPartition.getUuid(), networkPartition.getId(), partition.getId()), e);
}
if (log.isInfoEnabled()) {
- log.info(String.format("Partition validated successfully: [network-partition-id] %s " +
- "[partition-id] %s", networkPartition.getUuid(), partition.getId()));
+ log.info(String.format("Partition validated successfully: [network-partition-uuid] %s " +
+ "[network-partition-id] %s [partition-id] %s", networkPartition.getUuid(),
+ networkPartition.getId(), partition.getId()));
}
}
}
} else {
//Following message is shown to the end user in all the the API clients(GUI/CLI/Rest API)
- throw new InvalidNetworkPartitionException(String.format("Network partition: " +
- "%s doesn't not have any partitions ", networkPartition.getUuid()));
+ throw new InvalidNetworkPartitionException(String.format("Network partition [network-partition-uuid] %s " +
+ "[network-partition-id] %s, doesn't not have any partitions ", networkPartition.getUuid(),
+ networkPartition.getId()));
}
// adding network partition to CC-Context
@@ -1500,8 +1505,8 @@ public class CloudControllerServiceImpl implements CloudControllerService {
// persisting CC-Context
CloudControllerContext.getInstance().persist();
if (log.isInfoEnabled()) {
- log.info(String.format("Network partition added successfully: [network-partition-id] %s",
- networkPartition.getUuid()));
+ log.info(String.format("Network partition added successfully: [network-partition-uuid] %s " +
+ "[network-partition-id] %s", networkPartition.getUuid(),networkPartition.getId()));
}
return true;
}
@@ -1510,13 +1515,17 @@ public class CloudControllerServiceImpl implements CloudControllerService {
public boolean removeNetworkPartition(String networkPartitionId) throws NetworkPartitionNotExistsException {
try {
+ String networkPartitionUuid = cloudControllerContext.getNetworkPartition(networkPartitionId).getUuid();
+
if (log.isInfoEnabled()) {
- log.info(String.format("Removing network partition: [network-partition-id] %s", networkPartitionId));
+ log.info(String.format("Removing network partition: [network-partition-uuid] %s " +
+ "[network-partition-id] %s", networkPartitionUuid, networkPartitionId));
}
- handleNullObject(networkPartitionId, "Network Partition ID is null");
+ handleNullObject(networkPartitionId, "Network Partition Id is null");
if (cloudControllerContext.getNetworkPartition(networkPartitionId) == null) {
- String message = "Network partition not found: [network-partition-id] " + networkPartitionId;
+ String message = String.format("Network partition not found: [network-partition-uuid] %s " +
+ "[network-partition-id] %s", networkPartitionUuid, networkPartitionId);
log.error(message);
throw new NetworkPartitionNotExistsException(message);
}
@@ -1525,8 +1534,8 @@ public class CloudControllerServiceImpl implements CloudControllerService {
// persisting CC-Context
CloudControllerContext.getInstance().persist();
if (log.isInfoEnabled()) {
- log.info(String.format("Network partition removed successfully: [network-partition-id] %s",
- networkPartitionId));
+ log.info(String.format("Network partition removed successfully: [network-partition-uuid] %s " +
+ "[network-partition-id] %s", networkPartitionUuid, networkPartitionId));
}
} catch (Exception e) {
String message = e.getMessage();
@@ -1540,15 +1549,17 @@ public class CloudControllerServiceImpl implements CloudControllerService {
public boolean updateNetworkPartition(NetworkPartition networkPartition) throws NetworkPartitionNotExistsException {
try {
handleNullObject(networkPartition, "Network Partition is null");
- handleNullObject(networkPartition.getUuid(), "Network Partition ID is null");
+ handleNullObject(networkPartition.getUuid(), "Network Partition Id is null");
if (log.isInfoEnabled()) {
log.info(String.format("Updating network partition: [network-partition-id] %s", networkPartition.getUuid()));
}
- String networkPartitionID = networkPartition.getId();
- if (cloudControllerContext.getNetworkPartition(networkPartitionID) == null) {
- String message = "Network partition not found: [network-partition-id] " + networkPartitionID;
+ String networkPartitionId = networkPartition.getId();
+ String networkPartitionUuid = networkPartition.getUuid();
+ if (cloudControllerContext.getNetworkPartition(networkPartitionId) == null) {
+ String message = String.format("Network partition not found: [network-partition-uuid] %s " +
+ "[network-partition-id] %s", networkPartitionUuid, networkPartitionId);
log.error(message);
throw new NetworkPartitionNotExistsException(message);
}
@@ -1557,15 +1568,17 @@ public class CloudControllerServiceImpl implements CloudControllerService {
for (Partition partition : networkPartition.getPartitions()) {
if (partition != null) {
if (log.isInfoEnabled()) {
- log.info(String.format("Validating partition: [network-partition-id] %s [partition-id] %s",
- networkPartition.getUuid(), partition.getId()));
+ log.info(String.format("Validating partition: [network-partition-uuid] %s " +
+ "[network-partition-id] %s [partition-id] %s", networkPartitionUuid,
+ networkPartitionId, partition.getId()));
}
// Overwrites partition provider with network partition provider
partition.setProvider(networkPartition.getProvider());
validatePartition(partition);
if (log.isInfoEnabled()) {
- log.info(String.format("Partition validated successfully: [network-partition-id] %s " +
- "[partition-id] %s", networkPartition.getUuid(), partition.getId()));
+ log.info(String.format("Partition validated successfully: [network-partition-uuid] %s " +
+ "[network-partition-uuid] %s [partition-id] %s", networkPartitionUuid,
+ networkPartitionId, partition.getId()));
}
}
}
@@ -1576,8 +1589,8 @@ public class CloudControllerServiceImpl implements CloudControllerService {
// persisting CC-Context
CloudControllerContext.getInstance().persist();
if (log.isInfoEnabled()) {
- log.info(String.format("Network partition updated successfully: [network-partition-id] %s",
- networkPartition.getUuid()));
+ log.info(String.format("Network partition updated successfully: [network-partition-uuid] %s " +
+ "[network-partition-id] %s", networkPartitionUuid, networkPartitionId));
}
return true;
} catch (Exception e) {
@@ -1604,7 +1617,8 @@ public class CloudControllerServiceImpl implements CloudControllerService {
try {
return CloudControllerContext.getInstance().getNetworkPartition(networkPartitionId);
} catch (Exception e) {
- String message = String.format("Could not get network partition: [network-partition-id] %s",
+ String message = String.format("Could not get network partition: [network-partition-uuid] %s " +
+ "[network-partition-id] %s", getNetworkPartition(networkPartitionId).getUuid(),
networkPartitionId);
log.error(message);
throw new CloudControllerException(message, e);
[22/24] stratos git commit: Merge PR 383
Posted by ga...@apache.org.
Merge PR 383
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/0293c847
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/0293c847
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/0293c847
Branch: refs/heads/tenant-isolation
Commit: 0293c847ab13d4da5bd2cd40e6499f0e73a5a264
Parents: e5d003d 3402fba
Author: Gayan Gunarathne <ga...@wso2.com>
Authored: Mon Jul 6 14:02:43 2015 +0530
Committer: Gayan Gunarathne <ga...@wso2.com>
Committed: Mon Jul 6 14:02:43 2015 +0530
----------------------------------------------------------------------
.../OneAfterAnotherAlgorithm.java | 4 +-
.../applications/dependency/DependencyTree.java | 12 +-
.../context/cluster/ClusterContext.java | 8 +-
.../AutoscalerTopologyEventReceiver.java | 28 +-
.../autoscaler/monitor/MonitorFactory.java | 6 +-
.../monitor/component/GroupMonitor.java | 18 +-
.../component/ParentComponentMonitor.java | 22 +
.../builder/MonitorStatusEventBuilder.java | 37 -
.../autoscaler/pojo/policy/PolicyManager.java | 149 +--
.../pojo/policy/autoscale/AutoscalePolicy.java | 24 +-
.../policy/deployment/ApplicationPolicy.java | 18 +
.../policy/deployment/DeploymentPolicy.java | 33 +-
.../autoscaler/registry/RegistryManager.java | 20 +-
.../services/impl/AutoscalerServiceImpl.java | 233 +++--
.../stratos/autoscaler/util/AutoscalerUtil.java | 20 +-
.../stratos/cli/RestCommandLineService.java | 3 +-
.../context/CloudControllerContext.java | 10 +-
.../controller/domain/NetworkPartition.java | 36 +-
.../application/ApplicationEventReceiver.java | 23 +-
.../messaging/topology/TopologyBuilder.java | 9 +-
.../impl/CloudControllerServiceImpl.java | 88 +-
.../axiom/CloudControllerContextTest.java | 2 +-
.../stratos/common/beans/UserInfoBean.java | 3 +
.../beans/partition/NetworkPartitionBean.java | 18 +
.../NetworkPartitionReferenceBean.java | 9 +
.../policy/autoscale/AutoscalePolicyBean.java | 18 +
.../deployment/ApplicationPolicyBean.java | 18 +
.../policy/deployment/DeploymentPolicyBean.java | 18 +
.../common/client/AutoscalerServiceClient.java | 8 +-
.../common/partition/NetworkPartitionRef.java | 9 +
.../schema/configure/application-policies.json | 4 +-
.../schema/configure/autoscaling-policies.json | 2 +-
.../schema/configure/deployment-policies.json | 2 +-
.../schema/configure/network-partitions.json | 2 +-
.../controllers/forms/schema/users/users.json | 1 -
.../themes/theme0/partials/configure_form.hbs | 4 +
.../management/StratosUserManagerUtils.java | 10 +-
.../persistence/MockPersistenceManager.java | 28 +-
.../iaas/persistence/PersistenceManager.java | 21 +-
.../persistence/PersistenceManagerFactory.java | 8 +-
.../mock/iaas/persistence/RegistryManager.java | 12 +-
.../cartridge.agent/plugins/README.md | 4 +-
.../rest/endpoint/api/StratosApiV41.java | 71 +-
.../rest/endpoint/api/StratosApiV41Utils.java | 229 +++--
.../util/converter/ObjectConverter.java | 27 +-
.../src/main/webapp/api/WEB-INF/cxf-servlet.xml | 2 +
.../src/main/resources/AutoscalerService.wsdl | 504 +++++-----
.../main/resources/CloudControllerService.wsdl | 914 +++++++++----------
48 files changed, 1653 insertions(+), 1096 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/0293c847/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
----------------------------------------------------------------------
diff --cc components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
index 16f70cd,466dfb1..fbcad1c
--- 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
@@@ -107,64 -109,65 +109,67 @@@ public class StratosApiV41Utils
private static final Log log = LogFactory.getLog(StratosApiV41Utils.class);
- /**
- * Add New Cartridge
- *
- * @param cartridgeBean Cartridge definition
- * @throws RestAPIException
- */
- // Util methods for cartridges
- public static void addCartridge(CartridgeBean cartridgeBean) throws RestAPIException {
+
- try {
- if (log.isDebugEnabled()) {
- log.debug(String.format("Adding cartridge: [cartridge-type] %s ", cartridgeBean.getType()));
- }
+ /**
+ * Add new cartridge util method
+ *
+ * @param cartridgeBean Cartridge definition
+ * @throws RestAPIException
+ */
+ public static void addCartridge(CartridgeBean cartridgeBean) throws RestAPIException {
+
+ try {
+ if (log.isDebugEnabled()) {
+ log.debug(String.format("Adding cartridge: [cartridge-type] %s ", cartridgeBean.getType()));
+ }
+
+ List<IaasProviderBean> iaasProviders = cartridgeBean.getIaasProvider();
+ if ((iaasProviders == null) || iaasProviders.size() == 0) {
+ throw new RestAPIException(String.format("IaaS providers not found in cartridge: %s",
+ cartridgeBean.getType()));
+ }
+
+ for (PortMappingBean portMapping : cartridgeBean.getPortMapping()) {
+ if (StringUtils.isBlank(portMapping.getName())) {
+ portMapping.setName(portMapping.getProtocol() + "-" + portMapping.getPort());
+ if (log.isInfoEnabled()) {
+ log.info(String.format("Port mapping name not found, default value generated: " +
+ "[cartridge-type] %s [port-mapping-name] %s",
+ cartridgeBean.getType(), portMapping.getName()));
+ }
+ }
+ }
- List<IaasProviderBean> iaasProviders = cartridgeBean.getIaasProvider();
- if ((iaasProviders == null) || iaasProviders.size() == 0) {
- throw new RestAPIException(String.format("IaaS providers not found in cartridge: %s",
- cartridgeBean.getType()));
- }
+ Cartridge cartridgeConfig = createCartridgeConfig(cartridgeBean);
+ CloudControllerServiceClient cloudControllerServiceClient = CloudControllerServiceClient.getInstance();
+ cloudControllerServiceClient.addCartridge(cartridgeConfig);
- for (PortMappingBean portMapping : cartridgeBean.getPortMapping()) {
- if (StringUtils.isBlank(portMapping.getName())) {
- portMapping.setName(portMapping.getProtocol() + "-" + portMapping.getPort());
- if (log.isInfoEnabled()) {
- log.info(String.format("Port mapping name not found, default value generated: " +
- "[cartridge-type] %s [port-mapping-name] %s",
- cartridgeBean.getType(), portMapping.getName()));
- }
- }
- }
+ if (log.isDebugEnabled()) {
+ log.debug(String.format(
+ "Successfully added cartridge: [cartridge-type] %s ",
+ cartridgeBean.getType()));
+ }
+ } catch (CloudControllerServiceCartridgeAlreadyExistsExceptionException e) {
+ String msg = "Could not add cartridge";
+ log.error(msg, e);
+ throw new RestAPIException(msg);
+ } catch (CloudControllerServiceInvalidCartridgeDefinitionExceptionException e) {
+ String msg = "Could not add cartridge";
+ log.error(msg, e);
+ throw new RestAPIException(msg);
+ } catch (RemoteException e) {
+ String msg = "Could not add cartridge";
+ log.error(msg, e);
+ throw new RestAPIException(msg);
+ } catch (CloudControllerServiceInvalidIaasProviderExceptionException e) {
+ String msg = "Could not add cartridge";
+ log.error(msg, e);
+ throw new RestAPIException(msg);
+ }
+ }
- Cartridge cartridgeConfig = createCartridgeConfig(cartridgeBean);
- CloudControllerServiceClient cloudControllerServiceClient = CloudControllerServiceClient.getInstance();
- cloudControllerServiceClient.addCartridge(cartridgeConfig);
+
- if (log.isDebugEnabled()) {
- log.debug(String.format(
- "Successfully added cartridge: [cartridge-type] %s ",
- cartridgeBean.getType()));
- }
- } catch (CloudControllerServiceCartridgeAlreadyExistsExceptionException e) {
- String msg = "Could not add cartridge";
- log.error(msg, e);
- throw new RestAPIException(msg);
- } catch (CloudControllerServiceInvalidCartridgeDefinitionExceptionException e) {
- String msg = "Could not add cartridge";
- log.error(msg, e);
- throw new RestAPIException(msg);
- } catch (RemoteException e) {
- String msg = "Could not add cartridge";
- log.error(msg, e);
- throw new RestAPIException(msg);
- } catch (CloudControllerServiceInvalidIaasProviderExceptionException e) {
- String msg = "Could not add cartridge";
- log.error(msg, e);
- throw new RestAPIException(msg);
- }
- }
+
/**
* Update Cartridge
*
[05/24] stratos git commit: Tenant isolation - Deployment Policies
Posted by ga...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/829e3335/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl
----------------------------------------------------------------------
diff --git a/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl b/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl
index 3a6896e..ad14ba5 100644
--- a/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl
+++ b/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns="http://impl.services.autoscaler.stratos.apache.org" xmlns:ax25="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax26="http://partition.common.stratos.apache.org/xsd" xmlns:ax217="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax21="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax22="http://common.stratos.apache.org/xsd" xmlns:ax219="http://rmi.java/xsd" xmlns:ax214="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax220="http://io.java/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax212="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax210="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ax225="http://pojo.a
utoscaler.stratos.apache.org/xsd" 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.autoscaler.stratos.apache.org">
+<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ax29="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ns="http://impl.services.autoscaler.stratos.apache.org" xmlns:ax25="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax26="http://common.stratos.apache.org/xsd" xmlns:ax23="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax21="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax214="http://partition.common.stratos.apache.org/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax220="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax213="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax223="http://rmi.java/xsd" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ax211="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd"
xmlns:ax224="http://io.java/xsd" 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.autoscaler.stratos.apache.org">
<wsdl:types>
- <xs:schema xmlns:ax221="http://io.java/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://rmi.java/xsd">
+ <xs:schema xmlns:ax225="http://io.java/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://rmi.java/xsd">
<xs:import namespace="http://io.java/xsd"/>
<xs:complexType name="RemoteException">
<xs:complexContent>
- <xs:extension base="ax220:IOException">
+ <xs:extension base="ax224:IOException">
<xs:sequence>
<xs:element minOccurs="0" name="cause" nillable="true" type="xs:anyType"/>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
@@ -21,7 +21,7 @@
<xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="instanceRoundingFactor" type="xs:float"/>
<xs:element minOccurs="0" name="isPublic" type="xs:boolean"/>
- <xs:element minOccurs="0" name="loadThresholds" nillable="true" type="ax212:LoadThresholds"/>
+ <xs:element minOccurs="0" name="loadThresholds" nillable="true" type="ax211:LoadThresholds"/>
<xs:element minOccurs="0" name="tenantId" type="xs:int"/>
</xs:sequence>
</xs:complexType>
@@ -33,17 +33,17 @@
</xs:sequence>
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ax23="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd">
+ <xs:schema xmlns:ax27="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd">
<xs:import namespace="http://common.stratos.apache.org/xsd"/>
<xs:complexType name="ApplicationContext">
<xs:sequence>
<xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="components" nillable="true" type="ax21:ComponentContext"/>
+ <xs:element minOccurs="0" name="components" nillable="true" type="ax25:ComponentContext"/>
<xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="multiTenant" type="xs:boolean"/>
<xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax23:Properties"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"/>
<xs:element minOccurs="0" name="status" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="tenantAdminUsername" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="tenantDomain" nillable="true" type="xs:string"/>
@@ -52,10 +52,10 @@
</xs:complexType>
<xs:complexType name="ComponentContext">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="applicationClusterContexts" nillable="true" type="ax21:ApplicationClusterContext"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax21:CartridgeContext"/>
- <xs:element minOccurs="0" name="dependencyContext" nillable="true" type="ax21:DependencyContext"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax21:GroupContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="applicationClusterContexts" nillable="true" type="ax25:ApplicationClusterContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax25:CartridgeContext"/>
+ <xs:element minOccurs="0" name="dependencyContext" nillable="true" type="ax25:DependencyContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax25:GroupContext"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ApplicationClusterContext">
@@ -66,8 +66,8 @@
<xs:element maxOccurs="unbounded" minOccurs="0" name="dependencyClusterIds" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="deploymentPolicyName" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="hostName" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="persistenceContext" nillable="true" type="ax21:PersistenceContext"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax23:Properties"/>
+ <xs:element minOccurs="0" name="persistenceContext" nillable="true" type="ax25:PersistenceContext"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"/>
<xs:element minOccurs="0" name="tenantRange" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="textPayload" nillable="true" type="xs:string"/>
</xs:sequence>
@@ -75,7 +75,7 @@
<xs:complexType name="PersistenceContext">
<xs:sequence>
<xs:element minOccurs="0" name="persistenceRequired" type="xs:boolean"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax21:VolumeContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax25:VolumeContext"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="VolumeContext">
@@ -94,21 +94,21 @@
<xs:sequence>
<xs:element minOccurs="0" name="cartridgeMax" type="xs:int"/>
<xs:element minOccurs="0" name="cartridgeMin" type="xs:int"/>
- <xs:element minOccurs="0" name="subscribableInfoContext" nillable="true" type="ax21:SubscribableInfoContext"/>
+ <xs:element minOccurs="0" name="subscribableInfoContext" nillable="true" type="ax25:SubscribableInfoContext"/>
<xs:element minOccurs="0" name="type" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="SubscribableInfoContext">
<xs:sequence>
<xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="artifactRepositoryContext" nillable="true" type="ax21:ArtifactRepositoryContext"/>
+ <xs:element minOccurs="0" name="artifactRepositoryContext" nillable="true" type="ax25:ArtifactRepositoryContext"/>
<xs:element minOccurs="0" name="autoscalingPolicy" nillable="true" type="xs:string"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="dependencyAliases" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="maxMembers" type="xs:int"/>
<xs:element minOccurs="0" name="minMembers" type="xs:int"/>
- <xs:element minOccurs="0" name="persistenceContext" nillable="true" type="ax21:PersistenceContext"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax23:Properties"/>
+ <xs:element minOccurs="0" name="persistenceContext" nillable="true" type="ax25:PersistenceContext"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ArtifactRepositoryContext">
@@ -130,9 +130,9 @@
<xs:complexType name="GroupContext">
<xs:sequence>
<xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax21:CartridgeContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax25:CartridgeContext"/>
<xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax21:GroupContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax25:GroupContext"/>
<xs:element minOccurs="0" name="groupMaxInstances" type="xs:int"/>
<xs:element minOccurs="0" name="groupMinInstances" type="xs:int"/>
<xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
@@ -143,8 +143,8 @@
<xs:complexType name="ServiceGroup">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="cartridges" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax225:Dependencies"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="groups" nillable="true" type="ax225:ServiceGroup"/>
+ <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax29:Dependencies"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="groups" nillable="true" type="ax29:ServiceGroup"/>
<xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
@@ -156,28 +156,48 @@
</xs:sequence>
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ax29="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax24="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax218="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax215="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax222="http://rmi.java/xsd" xmlns:ax213="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax224="http://common.stratos.apache.org/xsd" xmlns:ax211="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax226="http://pojo.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://impl.services.autoscaler.stratos.apache.org">
- <xs:import namespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd"/>
- <xs:import namespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
+ <xs:schema xmlns:ax28="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax24="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax217="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax22="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax218="http://common.stratos.apache.org/xsd" xmlns:ax212="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax221="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax210="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax226="http://rmi.java/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://impl.services.autoscaler.stratos.apache.org">
+ <xs:import namespace="http://application.exception.autoscaler.stratos.apache.org/xsd"/>
<xs:import namespace="http://exception.autoscaler.stratos.apache.org/xsd"/>
+ <xs:import namespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd"/>
+ <xs:import namespace="http://pojo.autoscaler.stratos.apache.org/xsd"/>
<xs:import namespace="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
+ <xs:import namespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
+ <xs:import namespace="http://common.stratos.apache.org/xsd"/>
<xs:import namespace="http://policy.exception.autoscaler.stratos.apache.org/xsd"/>
- <xs:import namespace="http://application.exception.autoscaler.stratos.apache.org/xsd"/>
<xs:import namespace="http://rmi.java/xsd"/>
- <xs:import namespace="http://common.stratos.apache.org/xsd"/>
- <xs:import namespace="http://pojo.autoscaler.stratos.apache.org/xsd"/>
- <xs:element name="findClusterId">
+ <xs:element name="AutoscalerServiceApplicationDefinitionException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax21:ApplicationDefinitionException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="findClusterIdResponse">
+ <xs:element name="AutoscalerServiceCartridgeGroupNotFoundException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="CartridgeGroupNotFoundException" nillable="true" type="ax23:CartridgeGroupNotFoundException"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="AutoscalerServiceCartridgeNotFoundException">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="CartridgeNotFoundException" nillable="true" type="ax23:CartridgeNotFoundException"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="addApplication">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax28:ApplicationContext"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="addApplicationResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -189,7 +209,7 @@
<xs:element name="getApplicationsResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax24:ApplicationContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax28:ApplicationContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -203,7 +223,35 @@
<xs:element name="getApplicationResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax24:ApplicationContext"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax28:ApplicationContext"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getServiceGroup">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getServiceGroupResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax29:ServiceGroup"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getAutoscalingPolicy">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="autoscalingPolicyId" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getAutoscalingPolicyResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax212:AutoscalePolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -217,42 +265,43 @@
<xs:element name="getDeploymentPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax29:DeploymentPolicy"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax217:DeploymentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceAutoScalingPolicyAlreadyExistException">
+ <xs:element name="AutoscalerServiceInvalidArgumentException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="AutoScalingPolicyAlreadyExistException" nillable="true" type="ax210:AutoScalingPolicyAlreadyExistException"/>
+ <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax23:InvalidArgumentException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addAutoScalingPolicy">
+ <xs:element name="updateClusterMonitor">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax212:AutoscalePolicy"/>
+ <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax26:Properties"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addAutoScalingPolicyResponse">
+ <xs:element name="updateClusterMonitorResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getAutoscalingPolicy">
+ <xs:element name="getApplicationPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="autoscalingPolicyId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="applicationPolicyId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getAutoscalingPolicyResponse">
+ <xs:element name="getApplicationPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax212:AutoscalePolicy"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax217:ApplicationPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -268,84 +317,70 @@
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceInvalidPolicyException">
+ <xs:element name="AutoscalerServiceAutoScalingPolicyAlreadyExistException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax214:InvalidPolicyException"/>
+ <xs:element minOccurs="0" name="AutoScalingPolicyAlreadyExistException" nillable="true" type="ax23:AutoScalingPolicyAlreadyExistException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateAutoScalingPolicy">
+ <xs:element name="addAutoScalingPolicy">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax212:AutoscalePolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateAutoScalingPolicyResponse">
+ <xs:element name="addAutoScalingPolicyResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceUnremovablePolicyException">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="UnremovablePolicyException" nillable="true" type="ax214:UnremovablePolicyException"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="AutoscalerServicePolicyDoesNotExistException">
+ <xs:element name="AutoscalerServiceInvalidPolicyException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="PolicyDoesNotExistException" nillable="true" type="ax214:PolicyDoesNotExistException"/>
+ <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax220:InvalidPolicyException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeAutoScalingPolicy">
+ <xs:element name="updateAutoScalingPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="autoscalePolicyId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax212:AutoscalePolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeAutoScalingPolicyResponse">
+ <xs:element name="updateAutoScalingPolicyResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceApplicationDefinitionException">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax217:ApplicationDefinitionException"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="AutoscalerServiceCartridgeGroupNotFoundException">
+ <xs:element name="AutoscalerServiceUnremovablePolicyException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="CartridgeGroupNotFoundException" nillable="true" type="ax210:CartridgeGroupNotFoundException"/>
+ <xs:element minOccurs="0" name="UnremovablePolicyException" nillable="true" type="ax220:UnremovablePolicyException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceCartridgeNotFoundException">
+ <xs:element name="AutoscalerServicePolicyDoesNotExistException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="CartridgeNotFoundException" nillable="true" type="ax210:CartridgeNotFoundException"/>
+ <xs:element minOccurs="0" name="PolicyDoesNotExistException" nillable="true" type="ax220:PolicyDoesNotExistException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addApplication">
+ <xs:element name="removeAutoScalingPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax24:ApplicationContext"/>
+ <xs:element minOccurs="0" name="autoscalePolicyId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addApplicationResponse">
+ <xs:element name="removeAutoScalingPolicyResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
@@ -355,7 +390,7 @@
<xs:element name="updateApplication">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax24:ApplicationContext"/>
+ <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax28:ApplicationContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -424,226 +459,231 @@
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceRemoteException">
+ <xs:element name="AutoscalerServiceInvalidServiceGroupException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="RemoteException" nillable="true" type="ax219:RemoteException"/>
+ <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax21:InvalidServiceGroupException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceInvalidApplicationPolicyException">
+ <xs:element name="addServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidApplicationPolicyException" nillable="true" type="ax217:InvalidApplicationPolicyException"/>
+ <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax29:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceApplicationPolicyAlreadyExistsException">
+ <xs:element name="addServiceGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="ApplicationPolicyAlreadyExistsException" nillable="true" type="ax214:ApplicationPolicyAlreadyExistsException"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addApplicationPolicy">
+ <xs:element name="updateServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax29:ApplicationPolicy"/>
+ <xs:element minOccurs="0" name="cartridgeGroup" nillable="true" type="ax29:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addApplicationPolicyResponse">
+ <xs:element name="updateServiceGroupResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getApplicationPolicy">
+ <xs:element name="removeServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationPolicyId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="groupName" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getApplicationPolicyResponse">
+ <xs:element name="removeServiceGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax29:ApplicationPolicy"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeApplicationPolicy">
+ <xs:element name="findClusterId">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationPolicyId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeApplicationPolicyResponse">
+ <xs:element name="findClusterIdResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceApplicatioinPolicyNotExistsException">
+ <xs:element name="AutoscalerServiceAutoScalerException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="ApplicatioinPolicyNotExistsException" nillable="true" type="ax214:ApplicatioinPolicyNotExistsException"/>
+ <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax23:AutoScalerException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateApplicationPolicy">
+ <xs:element name="getServiceGroups">
+ <xs:complexType>
+ <xs:sequence/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getServiceGroupsResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax29:ApplicationPolicy"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateApplicationPolicyResponse">
+ <xs:element name="serviceGroupExist">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getApplicationPolicies">
+ <xs:element name="serviceGroupExistResponse">
<xs:complexType>
- <xs:sequence/>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ </xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getApplicationPoliciesResponse">
+ <xs:element name="undeployServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:ApplicationPolicy"/>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceInvalidArgumentException">
+ <xs:element name="undeployServiceGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax210:InvalidArgumentException"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateClusterMonitor">
+ <xs:element name="getApplicationNetworkPartitions">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax22:Properties"/>
+ <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateClusterMonitorResponse">
+ <xs:element name="getApplicationNetworkPartitionsResponse">
<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="AutoscalerServiceInvalidServiceGroupException">
+ <xs:element name="AutoscalerServiceRemoteException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax217:InvalidServiceGroupException"/>
+ <xs:element minOccurs="0" name="RemoteException" nillable="true" type="ax223:RemoteException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addServiceGroup">
+ <xs:element name="AutoscalerServiceInvalidApplicationPolicyException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax225:ServiceGroup"/>
+ <xs:element minOccurs="0" name="InvalidApplicationPolicyException" nillable="true" type="ax21:InvalidApplicationPolicyException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addServiceGroupResponse">
+ <xs:element name="AutoscalerServiceApplicationPolicyAlreadyExistsException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="ApplicationPolicyAlreadyExistsException" nillable="true" type="ax220:ApplicationPolicyAlreadyExistsException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateServiceGroup">
+ <xs:element name="addApplicationPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="cartridgeGroup" nillable="true" type="ax225:ServiceGroup"/>
+ <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax217:ApplicationPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateServiceGroupResponse">
+ <xs:element name="addApplicationPolicyResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeServiceGroup">
+ <xs:element name="removeApplicationPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="groupName" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="applicationPolicyId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeServiceGroupResponse">
+ <xs:element name="removeApplicationPolicyResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroup">
+ <xs:element name="AutoscalerServiceApplicatioinPolicyNotExistsException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="ApplicatioinPolicyNotExistsException" nillable="true" type="ax220:ApplicatioinPolicyNotExistsException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupResponse">
+ <xs:element name="updateApplicationPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax225:ServiceGroup"/>
+ <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax217:ApplicationPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceAutoScalerException">
+ <xs:element name="updateApplicationPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax210:AutoScalerException"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getApplicationNetworkPartitions">
+ <xs:element name="getApplicationPolicies">
<xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
- </xs:sequence>
+ <xs:sequence/>
</xs:complexType>
</xs:element>
- <xs:element name="getApplicationNetworkPartitionsResponse">
+ <xs:element name="getApplicationPoliciesResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax217:ApplicationPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoscalerServiceInvalidDeploymentPolicyException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidDeploymentPolicyException" nillable="true" type="ax214:InvalidDeploymentPolicyException"/>
+ <xs:element minOccurs="0" name="InvalidDeploymentPolicyException" nillable="true" type="ax220:InvalidDeploymentPolicyException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoscalerServiceDeploymentPolicyAlreadyExistsException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="DeploymentPolicyAlreadyExistsException" nillable="true" type="ax214:DeploymentPolicyAlreadyExistsException"/>
+ <xs:element minOccurs="0" name="DeploymentPolicyAlreadyExistsException" nillable="true" type="ax220:DeploymentPolicyAlreadyExistsException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="addDeployementPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax29:DeploymentPolicy"/>
+ <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax217:DeploymentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -657,21 +697,21 @@
<xs:element name="AutoscalerServiceDeploymentPolicyNotExistsException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="DeploymentPolicyNotExistsException" nillable="true" type="ax214:DeploymentPolicyNotExistsException"/>
+ <xs:element minOccurs="0" name="DeploymentPolicyNotExistsException" nillable="true" type="ax220:DeploymentPolicyNotExistsException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoscalerServiceCloudControllerConnectionException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="CloudControllerConnectionException" nillable="true" type="ax210:CloudControllerConnectionException"/>
+ <xs:element minOccurs="0" name="CloudControllerConnectionException" nillable="true" type="ax23:CloudControllerConnectionException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="updateDeploymentPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax29:DeploymentPolicy"/>
+ <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax217:DeploymentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -704,58 +744,20 @@
<xs:element name="getDeploymentPoliciesResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:DeploymentPolicy"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getServiceGroups">
- <xs:complexType>
- <xs:sequence/>
- </xs:complexType>
- </xs:element>
- <xs:element name="getServiceGroupsResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax225:ServiceGroup"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="serviceGroupExist">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="serviceGroupExistResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="undeployServiceGroup">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="undeployServiceGroupResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax217:DeploymentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
- <xs:schema xmlns:ax28="http://partition.common.stratos.apache.org/xsd" xmlns:ax223="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
+ <xs:schema xmlns:ax216="http://partition.common.stratos.apache.org/xsd" xmlns:ax219="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
<xs:import namespace="http://partition.common.stratos.apache.org/xsd"/>
<xs:import namespace="http://common.stratos.apache.org/xsd"/>
<xs:complexType name="DeploymentPolicy">
<xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicyID" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitionRefs" nillable="true" type="ax28:NetworkPartitionRef"/>
+ <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitionRefs" nillable="true" type="ax216:NetworkPartitionRef"/>
+ <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="ApplicationPolicy">
@@ -764,17 +766,17 @@
<xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitionGroups" nillable="true" type="xs:string"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitions" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax22:Properties"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax26:Properties"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ax27="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://partition.common.stratos.apache.org/xsd">
+ <xs:schema xmlns:ax215="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://partition.common.stratos.apache.org/xsd">
<xs:import namespace="http://common.stratos.apache.org/xsd"/>
<xs:complexType name="NetworkPartitionRef">
<xs:sequence>
<xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="partitionAlgo" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="partitionRefs" nillable="true" type="ax26:PartitionRef"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="partitionRefs" nillable="true" type="ax214:PartitionRef"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PartitionRef">
@@ -783,7 +785,7 @@
<xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
<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="ax27:Properties"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax26:Properties"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
@@ -793,12 +795,12 @@
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidApplicationPolicyException">
+ <xs:complexType name="InvalidServiceGroupException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidServiceGroupException">
+ <xs:complexType name="InvalidApplicationPolicyException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
@@ -807,7 +809,7 @@
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://common.stratos.apache.org/xsd">
<xs:complexType name="Properties">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax22:Property"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax26:Property"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Property">
@@ -817,7 +819,7 @@
</xs:sequence>
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ax216="http://exception.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://policy.exception.autoscaler.stratos.apache.org/xsd">
+ <xs:schema xmlns:ax222="http://exception.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://policy.exception.autoscaler.stratos.apache.org/xsd">
<xs:import namespace="http://exception.autoscaler.stratos.apache.org/xsd"/>
<xs:complexType name="InvalidPolicyException">
<xs:sequence>
@@ -826,14 +828,14 @@
</xs:complexType>
<xs:complexType name="UnremovablePolicyException">
<xs:complexContent>
- <xs:extension base="ax216:AutoScalerException">
+ <xs:extension base="ax23:AutoScalerException">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="PolicyDoesNotExistException">
<xs:complexContent>
- <xs:extension base="ax216:AutoScalerException">
+ <xs:extension base="ax23:AutoScalerException">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
@@ -864,16 +866,6 @@
</xs:complexType>
</xs:schema>
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://exception.autoscaler.stratos.apache.org/xsd">
- <xs:complexType name="AutoScalingPolicyAlreadyExistException">
- <xs:sequence/>
- </xs:complexType>
- <xs:complexType name="AutoScalerException">
- <xs:complexContent>
- <xs:extension base="xs:RuntimeException">
- <xs:sequence/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
<xs:complexType name="CartridgeGroupNotFoundException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
@@ -889,6 +881,16 @@
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
+ <xs:complexType name="AutoScalingPolicyAlreadyExistException">
+ <xs:sequence/>
+ </xs:complexType>
+ <xs:complexType name="AutoScalerException">
+ <xs:complexContent>
+ <xs:extension base="xs:RuntimeException">
+ <xs:sequence/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
<xs:complexType name="CloudControllerConnectionException">
<xs:sequence/>
</xs:complexType>
@@ -1032,18 +1034,18 @@
<wsdl:message name="existApplicationResponse">
<wsdl:part name="parameters" element="ns:existApplicationResponse"/>
</wsdl:message>
- <wsdl:message name="getServiceGroupRequest">
- <wsdl:part name="parameters" element="ns:getServiceGroup"/>
- </wsdl:message>
- <wsdl:message name="getServiceGroupResponse">
- <wsdl:part name="parameters" element="ns:getServiceGroupResponse"/>
- </wsdl:message>
<wsdl:message name="deleteApplicationRequest">
<wsdl:part name="parameters" element="ns:deleteApplication"/>
</wsdl:message>
<wsdl:message name="deleteApplicationResponse">
<wsdl:part name="parameters" element="ns:deleteApplicationResponse"/>
</wsdl:message>
+ <wsdl:message name="getServiceGroupRequest">
+ <wsdl:part name="parameters" element="ns:getServiceGroup"/>
+ </wsdl:message>
+ <wsdl:message name="getServiceGroupResponse">
+ <wsdl:part name="parameters" element="ns:getServiceGroupResponse"/>
+ </wsdl:message>
<wsdl:message name="undeployServiceGroupRequest">
<wsdl:part name="parameters" element="ns:undeployServiceGroup"/>
</wsdl:message>
@@ -1134,18 +1136,18 @@
<wsdl:message name="removeServiceGroupResponse">
<wsdl:part name="parameters" element="ns:removeServiceGroupResponse"/>
</wsdl:message>
- <wsdl:message name="getApplicationPolicyRequest">
- <wsdl:part name="parameters" element="ns:getApplicationPolicy"/>
- </wsdl:message>
- <wsdl:message name="getApplicationPolicyResponse">
- <wsdl:part name="parameters" element="ns:getApplicationPolicyResponse"/>
- </wsdl:message>
<wsdl:message name="updateApplicationRequest">
<wsdl:part name="parameters" element="ns:updateApplication"/>
</wsdl:message>
<wsdl:message name="updateApplicationResponse">
<wsdl:part name="parameters" element="ns:updateApplicationResponse"/>
</wsdl:message>
+ <wsdl:message name="getApplicationPolicyRequest">
+ <wsdl:part name="parameters" element="ns:getApplicationPolicy"/>
+ </wsdl:message>
+ <wsdl:message name="getApplicationPolicyResponse">
+ <wsdl:part name="parameters" element="ns:getApplicationPolicyResponse"/>
+ </wsdl:message>
<wsdl:portType name="AutoscalerServicePortType">
<wsdl:operation name="removeAutoScalingPolicy">
<wsdl:input message="ns:removeAutoScalingPolicyRequest" wsaw:Action="urn:removeAutoScalingPolicy"/>
@@ -1232,14 +1234,14 @@
<wsdl:input message="ns:existApplicationRequest" wsaw:Action="urn:existApplication"/>
<wsdl:output message="ns:existApplicationResponse" wsaw:Action="urn:existApplicationResponse"/>
</wsdl:operation>
- <wsdl:operation name="getServiceGroup">
- <wsdl:input message="ns:getServiceGroupRequest" wsaw:Action="urn:getServiceGroup"/>
- <wsdl:output message="ns:getServiceGroupResponse" wsaw:Action="urn:getServiceGroupResponse"/>
- </wsdl:operation>
<wsdl:operation name="deleteApplication">
<wsdl:input message="ns:deleteApplicationRequest" wsaw:Action="urn:deleteApplication"/>
<wsdl:output message="ns:deleteApplicationResponse" wsaw:Action="urn:deleteApplicationResponse"/>
</wsdl:operation>
+ <wsdl:operation name="getServiceGroup">
+ <wsdl:input message="ns:getServiceGroupRequest" wsaw:Action="urn:getServiceGroup"/>
+ <wsdl:output message="ns:getServiceGroupResponse" wsaw:Action="urn:getServiceGroupResponse"/>
+ </wsdl:operation>
<wsdl:operation name="undeployServiceGroup">
<wsdl:input message="ns:undeployServiceGroupRequest" wsaw:Action="urn:undeployServiceGroup"/>
<wsdl:output message="ns:undeployServiceGroupResponse" wsaw:Action="urn:undeployServiceGroupResponse"/>
@@ -1304,10 +1306,6 @@
<wsdl:output message="ns:removeServiceGroupResponse" wsaw:Action="urn:removeServiceGroupResponse"/>
<wsdl:fault message="ns:AutoscalerServiceCartridgeGroupNotFoundException" name="AutoscalerServiceCartridgeGroupNotFoundException" wsaw:Action="urn:removeServiceGroupAutoscalerServiceCartridgeGroupNotFoundException"/>
</wsdl:operation>
- <wsdl:operation name="getApplicationPolicy">
- <wsdl:input message="ns:getApplicationPolicyRequest" wsaw:Action="urn:getApplicationPolicy"/>
- <wsdl:output message="ns:getApplicationPolicyResponse" wsaw:Action="urn:getApplicationPolicyResponse"/>
- </wsdl:operation>
<wsdl:operation name="updateApplication">
<wsdl:input message="ns:updateApplicationRequest" wsaw:Action="urn:updateApplication"/>
<wsdl:output message="ns:updateApplicationResponse" wsaw:Action="urn:updateApplicationResponse"/>
@@ -1315,6 +1313,10 @@
<wsdl:fault message="ns:AutoscalerServiceCartridgeGroupNotFoundException" name="AutoscalerServiceCartridgeGroupNotFoundException" wsaw:Action="urn:updateApplicationAutoscalerServiceCartridgeGroupNotFoundException"/>
<wsdl:fault message="ns:AutoscalerServiceCartridgeNotFoundException" name="AutoscalerServiceCartridgeNotFoundException" wsaw:Action="urn:updateApplicationAutoscalerServiceCartridgeNotFoundException"/>
</wsdl:operation>
+ <wsdl:operation name="getApplicationPolicy">
+ <wsdl:input message="ns:getApplicationPolicyRequest" wsaw:Action="urn:getApplicationPolicy"/>
+ <wsdl:output message="ns:getApplicationPolicyResponse" wsaw:Action="urn:getApplicationPolicyResponse"/>
+ </wsdl:operation>
</wsdl:portType>
<wsdl:binding name="AutoscalerServiceSoap11Binding" type="ns:AutoscalerServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
@@ -1522,8 +1524,8 @@
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="deleteApplication">
- <soap:operation soapAction="urn:deleteApplication" style="document"/>
+ <wsdl:operation name="getServiceGroup">
+ <soap:operation soapAction="urn:getServiceGroup" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
@@ -1531,8 +1533,8 @@
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="getServiceGroup">
- <soap:operation soapAction="urn:getServiceGroup" style="document"/>
+ <wsdl:operation name="deleteApplication">
+ <soap:operation soapAction="urn:deleteApplication" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
@@ -1696,6 +1698,15 @@
<soap:fault use="literal" name="AutoscalerServiceCartridgeGroupNotFoundException"/>
</wsdl:fault>
</wsdl:operation>
+ <wsdl:operation name="getApplicationPolicy">
+ <soap:operation soapAction="urn:getApplicationPolicy" style="document"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
<wsdl:operation name="updateApplication">
<soap:operation soapAction="urn:updateApplication" style="document"/>
<wsdl:input>
@@ -1714,15 +1725,6 @@
<soap:fault use="literal" name="AutoscalerServiceCartridgeGroupNotFoundException"/>
</wsdl:fault>
</wsdl:operation>
- <wsdl:operation name="getApplicationPolicy">
- <soap:operation soapAction="urn:getApplicationPolicy" style="document"/>
- <wsdl:input>
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
</wsdl:binding>
<wsdl:binding name="AutoscalerServiceSoap12Binding" type="ns:AutoscalerServicePortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
@@ -1930,8 +1932,8 @@
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="deleteApplication">
- <soap12:operation soapAction="urn:deleteApplication" style="document"/>
+ <wsdl:operation name="getServiceGroup">
+ <soap12:operation soapAction="urn:getServiceGroup" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
@@ -1939,8 +1941,8 @@
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="getServiceGroup">
- <soap12:operation soapAction="urn:getServiceGroup" style="document"/>
+ <wsdl:operation name="deleteApplication">
+ <soap12:operation soapAction="urn:deleteApplication" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
@@ -2104,6 +2106,15 @@
<soap12:fault use="literal" name="AutoscalerServiceCartridgeGroupNotFoundException"/>
</wsdl:fault>
</wsdl:operation>
+ <wsdl:operation name="getApplicationPolicy">
+ <soap12:operation soapAction="urn:getApplicationPolicy" style="document"/>
+ <wsdl:input>
+ <soap12:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
<wsdl:operation name="updateApplication">
<soap12:operation soapAction="urn:updateApplication" style="document"/>
<wsdl:input>
@@ -2122,15 +2133,6 @@
<soap12:fault use="literal" name="AutoscalerServiceCartridgeGroupNotFoundException"/>
</wsdl:fault>
</wsdl:operation>
- <wsdl:operation name="getApplicationPolicy">
- <soap12:operation soapAction="urn:getApplicationPolicy" style="document"/>
- <wsdl:input>
- <soap12:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap12:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
</wsdl:binding>
<wsdl:binding name="AutoscalerServiceHttpBinding" type="ns:AutoscalerServicePortType">
<http:binding verb="POST"/>
@@ -2287,8 +2289,8 @@
<mime:content type="text/xml" part="parameters"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="deleteApplication">
- <http:operation location="deleteApplication"/>
+ <wsdl:operation name="getServiceGroup">
+ <http:operation location="getServiceGroup"/>
<wsdl:input>
<mime:content type="text/xml" part="parameters"/>
</wsdl:input>
@@ -2296,8 +2298,8 @@
<mime:content type="text/xml" part="parameters"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="getServiceGroup">
- <http:operation location="getServiceGroup"/>
+ <wsdl:operation name="deleteApplication">
+ <http:operation location="deleteApplication"/>
<wsdl:input>
<mime:content type="text/xml" part="parameters"/>
</wsdl:input>
@@ -2413,8 +2415,8 @@
<mime:content type="text/xml" part="parameters"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="updateApplication">
- <http:operation location="updateApplication"/>
+ <wsdl:operation name="getApplicationPolicy">
+ <http:operation location="getApplicationPolicy"/>
<wsdl:input>
<mime:content type="text/xml" part="parameters"/>
</wsdl:input>
@@ -2422,8 +2424,8 @@
<mime:content type="text/xml" part="parameters"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="getApplicationPolicy">
- <http:operation location="getApplicationPolicy"/>
+ <wsdl:operation name="updateApplication">
+ <http:operation location="updateApplication"/>
<wsdl:input>
<mime:content type="text/xml" part="parameters"/>
</wsdl:input>
[20/24] stratos git commit: Update the method comment
Posted by ga...@apache.org.
Update the method comment
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/a82310cb
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/a82310cb
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/a82310cb
Branch: refs/heads/tenant-isolation
Commit: a82310cb95b86c9f9b894cf74e99c05d1cceda54
Parents: f5c4c8e
Author: Gayan Gunarathne <ga...@wso2.com>
Authored: Mon Jul 6 13:32:30 2015 +0530
Committer: Gayan Gunarathne <ga...@wso2.com>
Committed: Mon Jul 6 13:32:30 2015 +0530
----------------------------------------------------------------------
.../apache/stratos/rest/endpoint/api/StratosApiV41Utils.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/a82310cb/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 0d685bf..6aae2fe 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
@@ -108,13 +108,12 @@ public class StratosApiV41Utils {
private static final Log log = LogFactory.getLog(StratosApiV41Utils.class);
/**
- * Add New Cartridge
+ * Add new cartridge util method
*
* @param cartridgeBean Cartridge definition
* @throws RestAPIException
*/
- // Util methods for cartridges
- public static void addCartridge(CartridgeBean cartridgeBean) throws RestAPIException {
+ public static void addCartridge(CartridgeBean cartridgeBean) throws RestAPIException {
try {
if (log.isDebugEnabled()) {
[16/24] stratos git commit: Validating Deploymant policies,
Autoscaling policies,
Application policies and Network partitions as per the modifications
Posted by ga...@apache.org.
Validating Deploymant policies, Autoscaling policies, Application policies and Network partitions as per the modifications
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/3d167d40
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/3d167d40
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/3d167d40
Branch: refs/heads/tenant-isolation
Commit: 3d167d400e76b9afd8019b2761b0db340cd015bd
Parents: 3487d95
Author: Dinithi <di...@wso2.com>
Authored: Thu Jul 2 14:07:36 2015 +0530
Committer: Dinithi <di...@wso2.com>
Committed: Thu Jul 2 14:07:36 2015 +0530
----------------------------------------------------------------------
.../autoscaler/pojo/policy/PolicyManager.java | 74 ++++++++++++++++----
.../autoscaler/registry/RegistryManager.java | 6 +-
.../services/impl/AutoscalerServiceImpl.java | 35 +++++++--
.../impl/CloudControllerServiceImpl.java | 13 +++-
.../rest/endpoint/api/StratosApiV41Utils.java | 4 +-
5 files changed, 108 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/3d167d40/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
index 129227e..07cde0d 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
@@ -138,7 +138,7 @@ public class PolicyManager {
}
/**
- * Retrieve deployment policies from registy and add it to in memory model
+ * Retrieve deployment policies from registry and add it to in memory model
*
* @param deploymentPolicy
* @throws InvalidDeploymentPolicyException
@@ -173,16 +173,16 @@ public class PolicyManager {
/**
* Remove deployment policy from in memory map and registry.
*
- * @param deploymentPolicyID
+ * @param deploymentPolicyId Deployment policy Id
* @throws InvalidPolicyException
*/
- public void removeDeploymentPolicy(String deploymentPolicyID) {
- removeDeploymentPolicyFromMap(deploymentPolicyID);
- RegistryManager.getInstance().removeDeploymentPolicy(deploymentPolicyID);
+ public void removeDeploymentPolicy(String deploymentPolicyId) {
+ removeDeploymentPolicyFromMap(deploymentPolicyId);
+ RegistryManager.getInstance().removeDeploymentPolicy(deploymentPolicyId);
if (log.isInfoEnabled()) {
log.info(String.format("Deployment policy is removed successfully: [deployment-policy-id] %s",
- deploymentPolicyID));
+ deploymentPolicyId));
}
}
@@ -269,11 +269,27 @@ public class PolicyManager {
/**
* Returns the autoscale policy to which the specified id is mapped or null
*
- * @param id
+ * @param uuid Autoscale policy UUID
* @return
*/
- public AutoscalePolicy getAutoscalePolicy(String id) {
- return autoscalePolicyListMap.get(id);
+ public AutoscalePolicy getAutoscalePolicy(String uuid) {
+ return autoscalePolicyListMap.get(uuid);
+ }
+
+ /**
+ * Returns the autoscale policy to which the specified id is mapped or null
+ *
+ * @param id Autoscle policy Id
+ * @return
+ */
+ public AutoscalePolicy getAutoscalePolicyById(String id) {
+ AutoscalePolicy autoscalePolicy = null;
+ for (AutoscalePolicy autoscalePolicy1 : getAutoscalePolicyList()) {
+ if (autoscalePolicy1.getId().equals(id)) {
+ autoscalePolicy = autoscalePolicy1;
+ }
+ }
+ return autoscalePolicy;
}
@@ -340,11 +356,27 @@ public class PolicyManager {
/**
* Returns the deployment policy to which the specified id is mapped or null
*
- * @param id
+ * @param uuid UUID of the deployment policy
* @return
*/
- public DeploymentPolicy getDeploymentPolicy(String id) {
- return deploymentPolicyListMap.get(id);
+ public DeploymentPolicy getDeploymentPolicy(String uuid) {
+ return deploymentPolicyListMap.get(uuid);
+ }
+
+ /**
+ * Returns the deployment policy to which the specified id is mapped or null
+ *
+ * @param id Id of the deployment policy
+ * @return
+ */
+ public DeploymentPolicy getDeploymentPolicyById(String id) {
+ DeploymentPolicy deploymentPolicy = null;
+ for (DeploymentPolicy deploymentPolicy1 : getDeploymentPolicies()) {
+ if (deploymentPolicy1.getId().equals(id)) {
+ deploymentPolicy = deploymentPolicy1;
+ }
+ }
+ return deploymentPolicy;
}
@@ -394,13 +426,29 @@ public class PolicyManager {
/**
* Retruns an ApplicationPolicy of a given application
*
- * @param applicationPolicyId
+ * @param applicationPolicyId Application policy Id
* @return
*/
public ApplicationPolicy getApplicationPolicy(String applicationPolicyId) {
return applicationPolicyListMap.get(applicationPolicyId);
}
+ /**
+ * Returns the deployment policy to which the specified id is mapped or null
+ *
+ * @param id Id of the deployment policy
+ * @return
+ */
+ public ApplicationPolicy getApplicationPolicyById(String id) {
+ ApplicationPolicy applicationPolicy = null;
+ for (ApplicationPolicy applicationPolicy1 : getApplicationPolicies()) {
+ if (applicationPolicy1.getId().equals(id)) {
+ applicationPolicy = applicationPolicy1;
+ }
+ }
+ return applicationPolicy;
+ }
+
public void updateApplicationPolicyInInformationModel(ApplicationPolicy applicationPolicy) {
if (applicationPolicyListMap.containsKey(applicationPolicy.getUuid())) {
if (log.isDebugEnabled()) {
http://git-wip-us.apache.org/repos/asf/stratos/blob/3d167d40/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
index 15a8107..57d318f 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
@@ -640,13 +640,13 @@ public class RegistryManager {
}
}
- public void removeDeploymentPolicy(String deploymentPolicyID) {
+ public void removeDeploymentPolicy(String deploymentPolicyId) {
String resourcePath = AutoscalerConstants.AUTOSCALER_RESOURCE + AutoscalerConstants.DEPLOYMENT_POLICY_RESOURCE + "/" +
- deploymentPolicyID;
+ deploymentPolicyId;
this.delete(resourcePath);
if (log.isDebugEnabled()) {
log.debug(String.format("Deployment policy deleted from registry: [id] %s",
- deploymentPolicyID));
+ deploymentPolicyId));
}
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/3d167d40/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
index 3f3c071..960dc29 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
@@ -90,6 +90,14 @@ public class AutoscalerServiceImpl implements AutoscalerService {
@Override
public boolean addAutoScalingPolicy(AutoscalePolicy autoscalePolicy)
throws AutoScalingPolicyAlreadyExistException {
+ String autoscalePolicyId = autoscalePolicy.getId();
+ if (PolicyManager.getInstance().getAutoscalePolicyById(autoscalePolicyId) != null && PolicyManager
+ .getInstance().getAutoscalePolicyById(autoscalePolicyId).getTenantId() == autoscalePolicy.getTenantId
+ ()) {
+ String message = "Autoscaling policy already exists: [autoscaling-policy-id] " + autoscalePolicyId;
+ log.error(message);
+ throw new AutoScalingPolicyAlreadyExistException(message);
+ }
return PolicyManager.getInstance().addAutoscalePolicy(autoscalePolicy);
}
@@ -887,8 +895,16 @@ public class AutoscalerServiceImpl implements AutoscalerService {
log.debug("Application policy definition: " + applicationPolicy.toString());
}
- String applicationPolicyId = applicationPolicy.getUuid();
- if (PolicyManager.getInstance().getApplicationPolicy(applicationPolicyId) != null) {
+ String applicationPolicyUuid = applicationPolicy.getUuid();
+ if (PolicyManager.getInstance().getApplicationPolicy(applicationPolicyUuid) != null) {
+ String message = "Application policy already exists: [application-policy-uuid] " + applicationPolicyUuid;
+ log.error(message);
+ throw new ApplicationPolicyAlreadyExistsException(message);
+ }
+
+ String applicationPolicyId = applicationPolicy.getId();
+ if (PolicyManager.getInstance().getApplicationPolicyById(applicationPolicyId) != null && PolicyManager
+ .getInstance().getApplicationPolicyById(applicationPolicyId).getTenantId() == applicationPolicy.getTenantId()) {
String message = "Application policy already exists: [application-policy-id] " + applicationPolicyId;
log.error(message);
throw new ApplicationPolicyAlreadyExistsException(message);
@@ -1041,17 +1057,26 @@ public class AutoscalerServiceImpl implements AutoscalerService {
log.debug("Deployment policy definition: " + deploymentPolicy.toString());
}
- String deploymentPolicyId = deploymentPolicy.getUuid();
- if (PolicyManager.getInstance().getDeploymentPolicy(deploymentPolicyId) != null) {
+ String deploymentPolicyUuid = deploymentPolicy.getUuid();
+ if (PolicyManager.getInstance().getDeploymentPolicy(deploymentPolicyUuid) != null) {
+ String message = "Deployment policy already exists: [deployment-policy-uuid] " + deploymentPolicyUuid;
+ log.error(message);
+ throw new DeploymentPolicyAlreadyExistsException(message);
+ }
+
+ String deploymentPolicyId = deploymentPolicy.getId();
+ if (PolicyManager.getInstance().getDeploymentPolicyById(deploymentPolicyId) != null && PolicyManager
+ .getInstance().getDeploymentPolicyById(deploymentPolicyId).getTenantId() == deploymentPolicy.getTenantId()) {
String message = "Deployment policy already exists: [deployment-policy-id] " + deploymentPolicyId;
log.error(message);
throw new DeploymentPolicyAlreadyExistsException(message);
}
+
// Add cartridge to the cloud controller context and persist
PolicyManager.getInstance().addDeploymentPolicy(deploymentPolicy);
if (log.isInfoEnabled()) {
- log.info("Successfully added deployment policy: [deployment-policy-id] " + deploymentPolicyId);
+ log.info("Successfully added deployment policy: [deployment-policy-uuid] " + deploymentPolicyUuid);
}
return true;
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/3d167d40/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 17a523b..0e754c8 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
@@ -38,6 +38,7 @@ import org.apache.stratos.common.Property;
import org.apache.stratos.common.domain.LoadBalancingIPType;
import org.apache.stratos.common.threading.StratosThreadPool;
import org.apache.stratos.messaging.domain.topology.*;
+import org.wso2.carbon.context.PrivilegedCarbonContext;
import java.net.MalformedURLException;
import java.net.URL;
@@ -62,7 +63,7 @@ public class CloudControllerServiceImpl implements CloudControllerService {
private CloudControllerContext cloudControllerContext = CloudControllerContext.getInstance();
private ExecutorService executorService;
-
+ private int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId();
public CloudControllerServiceImpl() {
executorService = StratosThreadPool.getExecutorService("cloud.controller.instance.manager.thread.pool", 50);
@@ -1453,7 +1454,7 @@ public class CloudControllerServiceImpl implements CloudControllerService {
InvalidNetworkPartitionException {
handleNullObject(networkPartition, "Network Partition is null");
- handleNullObject(networkPartition.getUuid(), "Network Partition ID is null");
+ handleNullObject(networkPartition.getUuid(), "Network Partition Id is null");
if (log.isInfoEnabled()) {
log.info(String.format("Adding network partition: [network-partition-uuid] %s",
@@ -1468,6 +1469,14 @@ public class CloudControllerServiceImpl implements CloudControllerService {
throw new NetworkPartitionAlreadyExistsException(message);
}
+ String networkPartitionId = networkPartition.getId();
+ if (cloudControllerContext.getNetworkPartition(networkPartitionId) != null && cloudControllerContext
+ .getNetworkPartition(networkPartitionId).getTenantId() == networkPartition.getTenantId()) {
+ String message = "Network partition already exists: [network-partition-id] " + networkPartitionId;
+ log.error(message);
+ throw new NetworkPartitionAlreadyExistsException(message);
+ }
+
if (networkPartition.getPartitions() != null && networkPartition.getPartitions().length != 0) {
for (Partition partition : networkPartition.getPartitions()) {
if (partition != null) {
http://git-wip-us.apache.org/repos/asf/stratos/blob/3d167d40/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 817a9de..466dfb1 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
@@ -832,8 +832,10 @@ public class StratosApiV41Utils {
}
AutoscalerServiceClient serviceClient = getAutoscalerServiceClient();
+ ApplicationPolicyBean applicationPolicyBean;
try {
- serviceClient.removeApplicationPolicy(applicationPolicyId);
+ applicationPolicyBean = getApplicationPolicy(applicationPolicyId);
+ serviceClient.removeApplicationPolicy(applicationPolicyBean.getUuid());
} catch (RemoteException e) {
String msg = "Could not remove application policy. " + e.getLocalizedMessage();
log.error(msg, e);
[17/24] stratos git commit: update validation of application policy
against application
Posted by ga...@apache.org.
update validation of application policy against application
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/52380b1a
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/52380b1a
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/52380b1a
Branch: refs/heads/tenant-isolation
Commit: 52380b1a64910de4c18dce5cfde503bb354da367
Parents: 3d167d4
Author: Dinithi <di...@wso2.com>
Authored: Thu Jul 2 15:00:16 2015 +0530
Committer: Dinithi <di...@wso2.com>
Committed: Thu Jul 2 15:00:16 2015 +0530
----------------------------------------------------------------------
.../autoscaler/applications/parser/DefaultApplicationParser.java | 2 +-
.../java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/52380b1a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java
index d0f8514..a3ac423 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java
@@ -167,7 +167,7 @@ public class DefaultApplicationParser implements ApplicationParser {
"[cartridge-type] %s [alias] %s", applicationId, cartridgeType, alias));
}
- AutoscalePolicy autoscalingPolicy = PolicyManager.getInstance().getAutoscalePolicy(autoscalingPolicyId);
+ AutoscalePolicy autoscalingPolicy = PolicyManager.getInstance().getAutoscalePolicyById(autoscalingPolicyId);
if (autoscalingPolicy == null) {
handleError(String.format("Autoscaling policy is not found: [application-id] %s " +
"[cartridge-type] %s [alias] %s [autoscaling-policy] %s", applicationId, cartridgeType,
http://git-wip-us.apache.org/repos/asf/stratos/blob/52380b1a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
index 40d9a95..c5ba3b9 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
@@ -727,7 +727,7 @@ public class AutoscalerUtil {
public static void validateApplicationPolicyAgainstApplication(String applicationId, String applicationPolicyId)
throws ApplicatioinPolicyNotExistsException, InvalidApplicationPolicyException {
- ApplicationPolicy applicationPolicy = PolicyManager.getInstance().getApplicationPolicy(applicationPolicyId);
+ ApplicationPolicy applicationPolicy = PolicyManager.getInstance().getApplicationPolicyById(applicationPolicyId);
if (applicationPolicy == null) {
String msg = String.format("Application Policy not exists for [application-policy-id] %s", applicationPolicyId);
log.error(msg);
@@ -766,7 +766,7 @@ public class AutoscalerUtil {
int referencesOfNetworkPartition = 0;
for (String deploymentPolicyIDReferredInApp : deploymentPolicyIdsReferredInApplication) {
try {
- DeploymentPolicy deploymentPolicyInApp = PolicyManager.getInstance().getDeploymentPolicy(deploymentPolicyIDReferredInApp);
+ DeploymentPolicy deploymentPolicyInApp = PolicyManager.getInstance().getDeploymentPolicyById(deploymentPolicyIDReferredInApp);
if (deploymentPolicyInApp != null) {
for (NetworkPartitionRef networkPartitionOfDeploymentPolicy : deploymentPolicyInApp.getNetworkPartitionRefs()) {
if (networkPartitionOfDeploymentPolicy != null) {
[14/24] stratos git commit: Tenant isolation - Application Policies
Posted by ga...@apache.org.
Tenant isolation - Application Policies
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/a7756432
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/a7756432
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/a7756432
Branch: refs/heads/tenant-isolation
Commit: a77564326bb97d2a6796c31d7bfac815e12aa353
Parents: dd7442d
Author: Dinithi <di...@wso2.com>
Authored: Tue Jun 30 12:17:39 2015 +0530
Committer: Dinithi <di...@wso2.com>
Committed: Tue Jun 30 12:17:39 2015 +0530
----------------------------------------------------------------------
.../OneAfterAnotherAlgorithm.java | 4 +-
.../autoscaler/pojo/policy/PolicyManager.java | 17 +-
.../policy/deployment/ApplicationPolicy.java | 18 ++
.../autoscaler/registry/RegistryManager.java | 4 +-
.../services/impl/AutoscalerServiceImpl.java | 6 +-
.../stratos/autoscaler/util/AutoscalerUtil.java | 4 +-
.../deployment/ApplicationPolicyBean.java | 18 ++
.../default/configure/application-policies.json | 1 +
.../schema/configure/application-policies.json | 12 +-
.../rest/endpoint/api/StratosApiV41.java | 11 +-
.../rest/endpoint/api/StratosApiV41Utils.java | 35 ++-
.../util/converter/ObjectConverter.java | 4 +
.../src/main/resources/AutoscalerService.wsdl | 238 ++++++++++---------
13 files changed, 228 insertions(+), 144 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/a7756432/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/algorithms/networkpartition/OneAfterAnotherAlgorithm.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/algorithms/networkpartition/OneAfterAnotherAlgorithm.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/algorithms/networkpartition/OneAfterAnotherAlgorithm.java
index c9f6970..e6f71f1 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/algorithms/networkpartition/OneAfterAnotherAlgorithm.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/algorithms/networkpartition/OneAfterAnotherAlgorithm.java
@@ -68,7 +68,7 @@ public class OneAfterAnotherAlgorithm implements NetworkPartitionAlgorithm {
return null;
}
- String applicationPolicyId = applicationPolicy.getId();
+ String applicationPolicyId = applicationPolicy.getUuid();
String[] networkPartitionGroups = applicationPolicy.getNetworkPartitionGroups();
if (networkPartitionGroups != null && networkPartitionGroups.length != 0) {
if (log.isDebugEnabled()) {
@@ -223,7 +223,7 @@ public class OneAfterAnotherAlgorithm implements NetworkPartitionAlgorithm {
return null;
}
- String applicationPolicyId = applicationPolicy.getId();
+ String applicationPolicyId = applicationPolicy.getUuid();
String[] networkPartitionGroups = applicationPolicy.getNetworkPartitionGroups();
List<String> selectedNetworkPartitions = new ArrayList<String>();
http://git-wip-us.apache.org/repos/asf/stratos/blob/a7756432/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
index bb161ed..129227e 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
@@ -349,7 +349,7 @@ public class PolicyManager {
public void addApplicationPolicy(ApplicationPolicy applicationPolicy) throws InvalidApplicationPolicyException {
- String applicationPolicyId = applicationPolicy.getId();
+ String applicationPolicyId = applicationPolicy.getUuid();
if (log.isInfoEnabled()) {
log.info(String.format("Adding application policy : [application-policy-id] %s", applicationPolicyId));
}
@@ -357,8 +357,7 @@ public class PolicyManager {
RegistryManager.getInstance().persistApplicationPolicy(applicationPolicy);
if (log.isInfoEnabled()) {
- log.info(String
- .format("Application policy is added successfully: [application-policy-id] %s",
+ log.info(String.format("Application policy is added successfully: [application-policy-id] %s",
applicationPolicyId));
}
@@ -378,7 +377,7 @@ public class PolicyManager {
public void addApplicationPolicyToInformationModel(ApplicationPolicy applicationPolicy)
throws InvalidApplicationPolicyException {
- String applicationPolicyId = applicationPolicy.getId();
+ String applicationPolicyId = applicationPolicy.getUuid();
if (!applicationPolicyListMap.containsKey(applicationPolicyId)) {
if (log.isDebugEnabled()) {
log.debug("Adding application policy : " + applicationPolicyId);
@@ -403,22 +402,22 @@ public class PolicyManager {
}
public void updateApplicationPolicyInInformationModel(ApplicationPolicy applicationPolicy) {
- if (applicationPolicyListMap.containsKey(applicationPolicy.getId())) {
+ if (applicationPolicyListMap.containsKey(applicationPolicy.getUuid())) {
if (log.isDebugEnabled()) {
- log.debug("Updating application policy: " + applicationPolicy.getId());
+ log.debug("Updating application policy: " + applicationPolicy.getUuid());
}
- applicationPolicyListMap.put(applicationPolicy.getId(), applicationPolicy);
+ applicationPolicyListMap.put(applicationPolicy.getUuid(), applicationPolicy);
}
}
public boolean updateApplicationPolicy(ApplicationPolicy applicationPolicy) {
- if (StringUtils.isEmpty(applicationPolicy.getId())) {
+ if (StringUtils.isEmpty(applicationPolicy.getUuid())) {
throw new AutoScalerException("Application policy id cannot be empty");
}
this.updateApplicationPolicyInInformationModel(applicationPolicy);
RegistryManager.getInstance().persistApplicationPolicy(applicationPolicy);
if (log.isInfoEnabled()) {
- log.info(String.format("Application policy is updated successfully: [id] %s", applicationPolicy.getId()));
+ log.info(String.format("Application policy is updated successfully: [id] %s", applicationPolicy.getUuid()));
}
return true;
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a7756432/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/ApplicationPolicy.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/ApplicationPolicy.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/ApplicationPolicy.java
index 856f90f..9dc33f0 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/ApplicationPolicy.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/ApplicationPolicy.java
@@ -25,7 +25,9 @@ import java.io.Serializable;
public class ApplicationPolicy implements Serializable {
private static final long serialVersionUID = -2851334419121310395L;
+ private String uuid;
private String id;
+ private int tenantId;
private String algorithm;
private String[] networkPartitions;
private Properties properties;
@@ -40,6 +42,22 @@ public class ApplicationPolicy implements Serializable {
this.id = id;
}
+ public int getTenantId() {
+ return tenantId;
+ }
+
+ public void setTenantId(int tenantId) {
+ this.tenantId = tenantId;
+ }
+
+ public String getUuid() {
+ return uuid;
+ }
+
+ public void setUuid(String uuid) {
+ this.uuid = uuid;
+ }
+
public String getAlgorithm() {
return algorithm;
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a7756432/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
index 5780864..15a8107 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
@@ -682,10 +682,10 @@ public class RegistryManager {
try {
startTenantFlow();
String resourcePath = AutoscalerConstants.AUTOSCALER_RESOURCE +
- AutoscalerConstants.APPLICATION_POLICY_RESOURCE + "/" + applicationPolicy.getId();
+ AutoscalerConstants.APPLICATION_POLICY_RESOURCE + "/" + applicationPolicy.getUuid();
persist(applicationPolicy, resourcePath);
if (log.isDebugEnabled()) {
- log.debug(String.format("Application policy written to registry : %s", applicationPolicy.getId()));
+ log.debug(String.format("Application policy written to registry : %s", applicationPolicy.getUuid()));
}
} finally {
endTenantFlow();
http://git-wip-us.apache.org/repos/asf/stratos/blob/a7756432/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
index d0da8d5..2b4cb12 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
@@ -888,13 +888,13 @@ public class AutoscalerServiceImpl implements AutoscalerService {
AutoscalerUtil.validateApplicationPolicy(applicationPolicy);
if (log.isInfoEnabled()) {
- log.info("Adding application policy: [application-policy-id] " + applicationPolicy.getId());
+ log.info("Adding application policy: [application-policy-id] " + applicationPolicy.getUuid());
}
if (log.isDebugEnabled()) {
log.debug("Application policy definition: " + applicationPolicy.toString());
}
- String applicationPolicyID = applicationPolicy.getId();
+ String applicationPolicyID = applicationPolicy.getUuid();
if (PolicyManager.getInstance().getApplicationPolicy(applicationPolicyID) != null) {
String message = "Application policy already exists: [application-policy-id] " + applicationPolicyID;
log.error(message);
@@ -942,7 +942,7 @@ public class AutoscalerServiceImpl implements AutoscalerService {
throw new InvalidApplicationPolicyException(msg);
}
- String applicationPolicyId = applicationPolicy.getId();
+ String applicationPolicyId = applicationPolicy.getUuid();
ApplicationPolicy existingApplicationPolicy = PolicyManager.getInstance().getApplicationPolicy(applicationPolicyId);
if (existingApplicationPolicy == null) {
String msg = String.format("No such application policy found [application-policy-id] %s", applicationPolicyId);
http://git-wip-us.apache.org/repos/asf/stratos/blob/a7756432/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
index 2f78fe7..c126aad 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
@@ -610,7 +610,7 @@ public class AutoscalerUtil {
}
// application policy id can't be null
- if (applicationPolicy.getId() == null || StringUtils.isBlank(applicationPolicy.getId())) {
+ if (applicationPolicy.getUuid() == null || StringUtils.isBlank(applicationPolicy.getUuid())) {
String msg = "Invalid Application Policy: Application policy id null or empty";
log.error(msg);
throw new InvalidApplicationPolicyException(msg);
@@ -661,7 +661,7 @@ public class AutoscalerUtil {
if (null == CloudControllerServiceClient.getInstance().
getNetworkPartition(networkPartitionId)) {
String msg = String.format("Network partition not found: [network-partition-id] %s in " +
- "[application-policy-id] %s", networkPartitionId, applicationPolicy.getId());
+ "[application-policy-id] %s", networkPartitionId, applicationPolicy.getUuid());
log.error(msg);
throw new InvalidApplicationPolicyException(msg);
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a7756432/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/deployment/ApplicationPolicyBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/deployment/ApplicationPolicyBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/deployment/ApplicationPolicyBean.java
index 8c906aa..e912227 100644
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/deployment/ApplicationPolicyBean.java
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/deployment/ApplicationPolicyBean.java
@@ -28,10 +28,28 @@ import java.util.List;
public class ApplicationPolicyBean {
private String id;
+ private String uuid;
+ private int tenantId;
private String algorithm;
String[] networkPartitions;
List<PropertyBean> properties;
+ public String getUuid() {
+ return uuid;
+ }
+
+ public void setUuid(String uuid) {
+ this.uuid = uuid;
+ }
+
+ public int getTenantId() {
+ return tenantId;
+ }
+
+ public void setTenantId(int tenantId) {
+ this.tenantId = tenantId;
+ }
+
public String getId() {
return id;
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a7756432/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/application-policies.json
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/application-policies.json b/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/application-policies.json
index 008e079..0f92e09 100644
--- a/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/application-policies.json
+++ b/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/application-policies.json
@@ -1,4 +1,5 @@
{
+ "uuid": "",
"id": "application-policy-1",
"algorithm":"one-after-another",
"networkPartitions":[
http://git-wip-us.apache.org/repos/asf/stratos/blob/a7756432/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/application-policies.json
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/application-policies.json b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/application-policies.json
index cf4675d..b7ade53 100644
--- a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/application-policies.json
+++ b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/application-policies.json
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
- "id": "root",
+ "uuid": "root",
"type": "object",
"title": "Application Policy Definition",
"name": "Application Policy",
@@ -9,18 +9,24 @@
"disable_collapse": true
},
"properties": {
+ "uuid": {
+ "id": "root/uuid",
+ "type": "string",
+ "title": "Application Policy UUID ",
+ "name": "Application Policy UUID"
+ },
"id": {
"id": "root/id",
"type": "string",
"title": "Application Policy Id ",
- "name": "Application Policy Id",
+ "name": "Application Policy Id"
},
"algorithm": {
"id": "root/algorithm",
"type": "string",
"title": "Application Policy Algorithm ",
"name": "Application Policy Algorithm",
- "enum": ["one-after-another","all-at-once"],
+ "enum": ["one-after-another","all-at-once"]
},
"networkPartitions": {
"id": "root/networkPartitions",
http://git-wip-us.apache.org/repos/asf/stratos/blob/a7756432/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 b5e5bc0..e07abaa 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
@@ -905,12 +905,19 @@ public class StratosApiV41 extends AbstractApi {
@AuthorizationAction("/permission/admin/stratos/applicationPolicies/manage")
public Response addApplicationPolicy(
ApplicationPolicyBean applicationPolicy) throws RestAPIException {
+
+ String applicationPolicyId = applicationPolicy.getId();
+ applicationPolicy.setUuid(UUID.randomUUID().toString());
+ String applicationPolicyUuid = applicationPolicy.getUuid();
+
+ PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext();
+ applicationPolicy.setTenantId(carbonContext.getTenantId());
try {
StratosApiV41Utils.addApplicationPolicy(applicationPolicy);
URI url = uriInfo.getAbsolutePathBuilder().path(applicationPolicy.getId()).build();
return Response.created(url).entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,
- String.format("Application policy added successfully: [application-policy] %s",
- applicationPolicy.getId()))).build();
+ String.format("Application policy added successfully: [application-policy-uuid] %s " +
+ "[application-policy-id] %s", applicationPolicyUuid, applicationPolicyId))).build();
} catch (AutoscalerServiceInvalidApplicationPolicyExceptionException e) {
String backendErrorMessage = e.getFaultMessage().getInvalidApplicationPolicyException().getMessage();
return Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean(
http://git-wip-us.apache.org/repos/asf/stratos/blob/a7756432/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 457ed65..12860b0 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
@@ -704,7 +704,8 @@ public class StratosApiV41Utils {
AutoscalerServiceInvalidApplicationPolicyExceptionException,
AutoscalerServiceApplicatioinPolicyNotExistsExceptionException {
- log.info(String.format("Updating application policy: [id] %s", applicationPolicyBean.getId()));
+ log.info(String.format("Updating application policy: [application-policy-uuid] %s [application-policy-id] " +
+ "%s", applicationPolicyBean.getUuid(), applicationPolicyBean.getId()));
AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
if (autoscalerServiceClient != null) {
@@ -736,16 +737,30 @@ public class StratosApiV41Utils {
ApplicationPolicy[] applicationPolicies = null;
AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
+ ApplicationPolicy[] applicationPoliciesForTenantArray = new ApplicationPolicy[0];
if (autoscalerServiceClient != null) {
try {
applicationPolicies = autoscalerServiceClient.getApplicationPolicies();
+ if (applicationPolicies != null) {
+ PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext();
+ List<ApplicationPolicy> applicationPoliciesForTenant = new ArrayList<ApplicationPolicy>();
+ for (ApplicationPolicy applicationPolicy : applicationPolicies) {
+ if (carbonContext.getTenantId() == applicationPolicy.getTenantId()) {
+ applicationPoliciesForTenant.add(applicationPolicy);
+ }
+ }
+ if (applicationPoliciesForTenant.size() != 0) {
+ applicationPoliciesForTenantArray = applicationPoliciesForTenant.toArray(new
+ ApplicationPolicy[applicationPoliciesForTenant.size()]);
+ }
+ }
} catch (RemoteException e) {
String msg = "Could not get application policies" + e.getLocalizedMessage();
log.error(msg, e);
throw new RestAPIException(msg);
}
}
- return ObjectConverter.convertASStubApplicationPoliciesToApplicationPolicies(applicationPolicies);
+ return ObjectConverter.convertASStubApplicationPoliciesToApplicationPolicies(applicationPoliciesForTenantArray);
}
/**
@@ -771,7 +786,21 @@ public class StratosApiV41Utils {
try {
AutoscalerServiceClient serviceClient = AutoscalerServiceClient.getInstance();
- ApplicationPolicy applicationPolicy = serviceClient.getApplicationPolicy(applicationPolicyId);
+ ApplicationPolicy[] applicationPolicies = serviceClient.getApplicationPolicies();
+ ApplicationPolicy applicationPolicy = null;
+
+ PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext();
+ for (ApplicationPolicy applicationPolicy1 : applicationPolicies) {
+ if (carbonContext.getTenantId() == applicationPolicy1.getTenantId()) {
+ if (applicationPolicy1.getId().equals(applicationPolicyId)) {
+ applicationPolicy = applicationPolicy1;
+ }
+ }
+ }
+ if (applicationPolicy == null) {
+ return null;
+ }
+
return ObjectConverter.convertASStubApplicationPolicyToApplicationPolicy(applicationPolicy);
} catch (RemoteException e) {
String message = String.format("Could not get application policy [application-policy-id] %s",
http://git-wip-us.apache.org/repos/asf/stratos/blob/a7756432/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 693af46..139c5be 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
@@ -494,6 +494,8 @@ public class ObjectConverter {
ApplicationPolicyBean applicationPolicyBean = new ApplicationPolicyBean();
applicationPolicyBean.setId(applicationPolicy.getId());
+ applicationPolicyBean.setUuid(applicationPolicy.getUuid());
+ applicationPolicyBean.setTenantId(applicationPolicy.getTenantId());
applicationPolicyBean.setAlgorithm(applicationPolicy.getAlgorithm());
applicationPolicyBean.setNetworkPartitions(applicationPolicy.getNetworkPartitions());
@@ -2001,6 +2003,8 @@ public class ObjectConverter {
applicationPolicy.setId(applicationPolicyBean.getId());
applicationPolicy.setAlgorithm(applicationPolicyBean.getAlgorithm());
applicationPolicy.setNetworkPartitions(applicationPolicyBean.getNetworkPartitions());
+ applicationPolicy.setUuid(applicationPolicyBean.getUuid());
+ applicationPolicy.setTenantId(applicationPolicyBean.getTenantId());
if (applicationPolicyBean.getProperties() != null) {
if (!applicationPolicyBean.getProperties().isEmpty()) {
applicationPolicy.setProperties(getASPropertiesFromCommonProperties(applicationPolicyBean.getProperties()));
http://git-wip-us.apache.org/repos/asf/stratos/blob/a7756432/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl
----------------------------------------------------------------------
diff --git a/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl b/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl
index fb40b3d..720b198 100644
--- a/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl
+++ b/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns="http://impl.services.autoscaler.stratos.apache.org" xmlns:ax27="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax28="http://common.stratos.apache.org/xsd" xmlns:ax25="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax23="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax21="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax217="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax215="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax212="http://io.java/xsd" xmlns:ax222="http://partition.common.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ax211="http://rmi.java/xsd" xmlns:ax225="http://autoscale.policy.pojo.au
toscaler.stratos.apache.org/xsd" 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.autoscaler.stratos.apache.org">
+<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ax29="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ns="http://impl.services.autoscaler.stratos.apache.org" xmlns:ax27="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax23="http://common.stratos.apache.org/xsd" xmlns:ax21="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax22="http://partition.common.stratos.apache.org/xsd" xmlns:ax219="http://io.java/xsd" xmlns:ax218="http://rmi.java/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax215="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax222="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax213="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ax211="http://application.exception.au
toscaler.stratos.apache.org/xsd" 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.autoscaler.stratos.apache.org">
<wsdl:types>
- <xs:schema xmlns:ax213="http://io.java/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://rmi.java/xsd">
+ <xs:schema xmlns:ax220="http://io.java/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://rmi.java/xsd">
<xs:import namespace="http://io.java/xsd"/>
<xs:complexType name="RemoteException">
<xs:complexContent>
- <xs:extension base="ax212:IOException">
+ <xs:extension base="ax219:IOException">
<xs:sequence>
<xs:element minOccurs="0" name="cause" nillable="true" type="xs:anyType"/>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
@@ -21,7 +21,7 @@
<xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="instanceRoundingFactor" type="xs:float"/>
<xs:element minOccurs="0" name="isPublic" type="xs:boolean"/>
- <xs:element minOccurs="0" name="loadThresholds" nillable="true" type="ax225:LoadThresholds"/>
+ <xs:element minOccurs="0" name="loadThresholds" nillable="true" type="ax27:LoadThresholds"/>
<xs:element minOccurs="0" name="tenantId" type="xs:int"/>
<xs:element minOccurs="0" name="uuid" nillable="true" type="xs:string"/>
</xs:sequence>
@@ -34,17 +34,17 @@
</xs:sequence>
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ax29="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd">
+ <xs:schema xmlns:ax216="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd">
<xs:import namespace="http://common.stratos.apache.org/xsd"/>
<xs:complexType name="ApplicationContext">
<xs:sequence>
<xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="components" nillable="true" type="ax27:ComponentContext"/>
+ <xs:element minOccurs="0" name="components" nillable="true" type="ax215:ComponentContext"/>
<xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="multiTenant" type="xs:boolean"/>
<xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax29:Properties"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax23:Properties"/>
<xs:element minOccurs="0" name="status" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="tenantAdminUsername" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="tenantDomain" nillable="true" type="xs:string"/>
@@ -53,10 +53,10 @@
</xs:complexType>
<xs:complexType name="ComponentContext">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="applicationClusterContexts" nillable="true" type="ax27:ApplicationClusterContext"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax27:CartridgeContext"/>
- <xs:element minOccurs="0" name="dependencyContext" nillable="true" type="ax27:DependencyContext"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax27:GroupContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="applicationClusterContexts" nillable="true" type="ax215:ApplicationClusterContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax215:CartridgeContext"/>
+ <xs:element minOccurs="0" name="dependencyContext" nillable="true" type="ax215:DependencyContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax215:GroupContext"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ApplicationClusterContext">
@@ -67,8 +67,8 @@
<xs:element maxOccurs="unbounded" minOccurs="0" name="dependencyClusterIds" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="deploymentPolicyName" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="hostName" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="persistenceContext" nillable="true" type="ax27:PersistenceContext"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax29:Properties"/>
+ <xs:element minOccurs="0" name="persistenceContext" nillable="true" type="ax215:PersistenceContext"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax23:Properties"/>
<xs:element minOccurs="0" name="tenantRange" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="textPayload" nillable="true" type="xs:string"/>
</xs:sequence>
@@ -76,7 +76,7 @@
<xs:complexType name="PersistenceContext">
<xs:sequence>
<xs:element minOccurs="0" name="persistenceRequired" type="xs:boolean"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax27:VolumeContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax215:VolumeContext"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="VolumeContext">
@@ -95,21 +95,21 @@
<xs:sequence>
<xs:element minOccurs="0" name="cartridgeMax" type="xs:int"/>
<xs:element minOccurs="0" name="cartridgeMin" type="xs:int"/>
- <xs:element minOccurs="0" name="subscribableInfoContext" nillable="true" type="ax27:SubscribableInfoContext"/>
+ <xs:element minOccurs="0" name="subscribableInfoContext" nillable="true" type="ax215:SubscribableInfoContext"/>
<xs:element minOccurs="0" name="type" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="SubscribableInfoContext">
<xs:sequence>
<xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="artifactRepositoryContext" nillable="true" type="ax27:ArtifactRepositoryContext"/>
+ <xs:element minOccurs="0" name="artifactRepositoryContext" nillable="true" type="ax215:ArtifactRepositoryContext"/>
<xs:element minOccurs="0" name="autoscalingPolicy" nillable="true" type="xs:string"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="dependencyAliases" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="maxMembers" type="xs:int"/>
<xs:element minOccurs="0" name="minMembers" type="xs:int"/>
- <xs:element minOccurs="0" name="persistenceContext" nillable="true" type="ax27:PersistenceContext"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax29:Properties"/>
+ <xs:element minOccurs="0" name="persistenceContext" nillable="true" type="ax215:PersistenceContext"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax23:Properties"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ArtifactRepositoryContext">
@@ -131,9 +131,9 @@
<xs:complexType name="GroupContext">
<xs:sequence>
<xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax27:CartridgeContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax215:CartridgeContext"/>
<xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax27:GroupContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax215:GroupContext"/>
<xs:element minOccurs="0" name="groupMaxInstances" type="xs:int"/>
<xs:element minOccurs="0" name="groupMinInstances" type="xs:int"/>
<xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
@@ -144,8 +144,8 @@
<xs:complexType name="ServiceGroup">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="cartridges" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax21:Dependencies"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="groups" nillable="true" type="ax21:ServiceGroup"/>
+ <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax29:Dependencies"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="groups" nillable="true" type="ax29:ServiceGroup"/>
<xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
@@ -157,37 +157,44 @@
</xs:sequence>
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ax218="http://common.stratos.apache.org/xsd" xmlns:ax224="http://partition.common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
- <xs:import namespace="http://common.stratos.apache.org/xsd"/>
- <xs:import namespace="http://partition.common.stratos.apache.org/xsd"/>
- <xs:complexType name="ApplicationPolicy">
- <xs:sequence>
- <xs:element minOccurs="0" name="algorithm" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitionGroups" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitions" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax28:Properties"/>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="DeploymentPolicy">
- <xs:sequence>
- <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitionRefs" nillable="true" type="ax222:NetworkPartitionRef"/>
- <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:schema>
- <xs:schema xmlns:ax26="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax24="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax216="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax22="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax219="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax214="http://rmi.java/xsd" xmlns:ax221="http://common.stratos.apache.org/xsd" xmlns:ax210="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax226="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://impl.services.autoscaler.stratos.apache.org">
+ <xs:schema xmlns:ax28="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax26="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax217="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax214="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax221="http://rmi.java/xsd" xmlns:ax212="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax223="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax210="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax226="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://impl.services.autoscaler.stratos.apache.org">
+ <xs:import namespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
+ <xs:import namespace="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
<xs:import namespace="http://pojo.autoscaler.stratos.apache.org/xsd"/>
<xs:import namespace="http://application.exception.autoscaler.stratos.apache.org/xsd"/>
<xs:import namespace="http://exception.autoscaler.stratos.apache.org/xsd"/>
<xs:import namespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd"/>
<xs:import namespace="http://rmi.java/xsd"/>
<xs:import namespace="http://policy.exception.autoscaler.stratos.apache.org/xsd"/>
- <xs:import namespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
<xs:import namespace="http://common.stratos.apache.org/xsd"/>
- <xs:import namespace="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
+ <xs:element name="getDeploymentPolicy">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="deploymentPolicyID" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getDeploymentPolicyResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax26:DeploymentPolicy"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getAutoscalingPolicy">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="autoscalingPolicyId" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getAutoscalingPolicyResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax27:AutoscalePolicy"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
<xs:element name="getServiceGroup">
<xs:complexType>
<xs:sequence>
@@ -198,35 +205,35 @@
<xs:element name="getServiceGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax21:ServiceGroup"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax29:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoscalerServiceApplicationDefinitionException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax23:ApplicationDefinitionException"/>
+ <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax212:ApplicationDefinitionException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoscalerServiceCartridgeGroupNotFoundException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="CartridgeGroupNotFoundException" nillable="true" type="ax25:CartridgeGroupNotFoundException"/>
+ <xs:element minOccurs="0" name="CartridgeGroupNotFoundException" nillable="true" type="ax214:CartridgeGroupNotFoundException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoscalerServiceCartridgeNotFoundException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="CartridgeNotFoundException" nillable="true" type="ax25:CartridgeNotFoundException"/>
+ <xs:element minOccurs="0" name="CartridgeNotFoundException" nillable="true" type="ax214:CartridgeNotFoundException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="addApplication">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax27:ApplicationContext"/>
+ <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax217:ApplicationContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -240,7 +247,7 @@
<xs:element name="updateApplication">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax27:ApplicationContext"/>
+ <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax217:ApplicationContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -261,7 +268,7 @@
<xs:element name="getApplicationResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax27:ApplicationContext"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax217:ApplicationContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -287,7 +294,7 @@
<xs:element name="getApplicationsResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax27:ApplicationContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax217:ApplicationContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -309,28 +316,28 @@
<xs:element name="AutoscalerServiceRemoteException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="RemoteException" nillable="true" type="ax214:RemoteException"/>
+ <xs:element minOccurs="0" name="RemoteException" nillable="true" type="ax218:RemoteException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoscalerServiceInvalidApplicationPolicyException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidApplicationPolicyException" nillable="true" type="ax23:InvalidApplicationPolicyException"/>
+ <xs:element minOccurs="0" name="InvalidApplicationPolicyException" nillable="true" type="ax212:InvalidApplicationPolicyException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoscalerServiceApplicationPolicyAlreadyExistsException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="ApplicationPolicyAlreadyExistsException" nillable="true" type="ax216:ApplicationPolicyAlreadyExistsException"/>
+ <xs:element minOccurs="0" name="ApplicationPolicyAlreadyExistsException" nillable="true" type="ax222:ApplicationPolicyAlreadyExistsException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="addApplicationPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax217:ApplicationPolicy"/>
+ <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax26:ApplicationPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -351,7 +358,7 @@
<xs:element name="getApplicationPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax217:ApplicationPolicy"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax26:ApplicationPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -363,21 +370,21 @@
<xs:element name="getApplicationPoliciesResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax217:ApplicationPolicy"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:ApplicationPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoscalerServiceApplicatioinPolicyNotExistsException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="ApplicatioinPolicyNotExistsException" nillable="true" type="ax216:ApplicatioinPolicyNotExistsException"/>
+ <xs:element minOccurs="0" name="ApplicatioinPolicyNotExistsException" nillable="true" type="ax222:ApplicatioinPolicyNotExistsException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="updateApplicationPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax217:ApplicationPolicy"/>
+ <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax26:ApplicationPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -391,14 +398,14 @@
<xs:element name="AutoscalerServiceInvalidPolicyException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax216:InvalidPolicyException"/>
+ <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax222:InvalidPolicyException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoscalerServiceUnremovablePolicyException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="UnremovablePolicyException" nillable="true" type="ax216:UnremovablePolicyException"/>
+ <xs:element minOccurs="0" name="UnremovablePolicyException" nillable="true" type="ax222:UnremovablePolicyException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -419,7 +426,7 @@
<xs:element name="AutoscalerServiceAutoScalerException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax25:AutoScalerException"/>
+ <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax214:AutoScalerException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -474,21 +481,21 @@
<xs:element name="getServiceGroupsResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax21:ServiceGroup"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoscalerServiceInvalidServiceGroupException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax23:InvalidServiceGroupException"/>
+ <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax212:InvalidServiceGroupException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="addServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax21:ServiceGroup"/>
+ <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax29:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -502,7 +509,7 @@
<xs:element name="updateServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="cartridgeGroup" nillable="true" type="ax21:ServiceGroup"/>
+ <xs:element minOccurs="0" name="cartridgeGroup" nillable="true" type="ax29:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -530,7 +537,7 @@
<xs:element name="AutoscalerServiceInvalidArgumentException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax25:InvalidArgumentException"/>
+ <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax214:InvalidArgumentException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -538,7 +545,7 @@
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax28:Properties"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax23:Properties"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -567,28 +574,28 @@
<xs:element name="AutoscalerServiceInvalidDeploymentPolicyException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidDeploymentPolicyException" nillable="true" type="ax216:InvalidDeploymentPolicyException"/>
+ <xs:element minOccurs="0" name="InvalidDeploymentPolicyException" nillable="true" type="ax222:InvalidDeploymentPolicyException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoscalerServiceDeploymentPolicyNotExistsException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="DeploymentPolicyNotExistsException" nillable="true" type="ax216:DeploymentPolicyNotExistsException"/>
+ <xs:element minOccurs="0" name="DeploymentPolicyNotExistsException" nillable="true" type="ax222:DeploymentPolicyNotExistsException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoscalerServiceCloudControllerConnectionException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="CloudControllerConnectionException" nillable="true" type="ax25:CloudControllerConnectionException"/>
+ <xs:element minOccurs="0" name="CloudControllerConnectionException" nillable="true" type="ax214:CloudControllerConnectionException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="updateDeploymentPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax217:DeploymentPolicy"/>
+ <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax26:DeploymentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -607,7 +614,7 @@
<xs:element name="getDeploymentPoliciesResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax217:DeploymentPolicy"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:DeploymentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -619,21 +626,21 @@
<xs:element name="getAutoScalingPoliciesResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax225:AutoscalePolicy"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax27:AutoscalePolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoscalerServiceAutoScalingPolicyAlreadyExistException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="AutoScalingPolicyAlreadyExistException" nillable="true" type="ax25:AutoScalingPolicyAlreadyExistException"/>
+ <xs:element minOccurs="0" name="AutoScalingPolicyAlreadyExistException" nillable="true" type="ax214:AutoScalingPolicyAlreadyExistException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="addAutoScalingPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax225:AutoscalePolicy"/>
+ <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax27:AutoscalePolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -647,7 +654,7 @@
<xs:element name="updateAutoScalingPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax225:AutoscalePolicy"/>
+ <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax27:AutoscalePolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -661,7 +668,7 @@
<xs:element name="AutoscalerServicePolicyDoesNotExistException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="PolicyDoesNotExistException" nillable="true" type="ax216:PolicyDoesNotExistException"/>
+ <xs:element minOccurs="0" name="PolicyDoesNotExistException" nillable="true" type="ax222:PolicyDoesNotExistException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -682,14 +689,14 @@
<xs:element name="AutoscalerServiceDeploymentPolicyAlreadyExistsException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="DeploymentPolicyAlreadyExistsException" nillable="true" type="ax216:DeploymentPolicyAlreadyExistsException"/>
+ <xs:element minOccurs="0" name="DeploymentPolicyAlreadyExistsException" nillable="true" type="ax222:DeploymentPolicyAlreadyExistsException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="addDeployementPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax217:DeploymentPolicy"/>
+ <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax26:DeploymentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -714,34 +721,6 @@
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getDeploymentPolicy">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicyID" nillable="true" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getDeploymentPolicyResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax217:DeploymentPolicy"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getAutoscalingPolicy">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="autoscalingPolicyId" nillable="true" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getAutoscalingPolicyResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax225:AutoscalePolicy"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
<xs:element name="serviceGroupExist">
<xs:complexType>
<xs:sequence>
@@ -771,13 +750,36 @@
</xs:complexType>
</xs:element>
</xs:schema>
- <xs:schema xmlns:ax223="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://partition.common.stratos.apache.org/xsd">
+ <xs:schema xmlns:ax25="http://partition.common.stratos.apache.org/xsd" xmlns:ax224="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
+ <xs:import namespace="http://partition.common.stratos.apache.org/xsd"/>
+ <xs:import namespace="http://common.stratos.apache.org/xsd"/>
+ <xs:complexType name="DeploymentPolicy">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitionRefs" nillable="true" type="ax25:NetworkPartitionRef"/>
+ <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="ApplicationPolicy">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="algorithm" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitionGroups" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitions" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax23:Properties"/>
+ <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:schema>
+ <xs:schema xmlns:ax24="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://partition.common.stratos.apache.org/xsd">
<xs:import namespace="http://common.stratos.apache.org/xsd"/>
<xs:complexType name="NetworkPartitionRef">
<xs:sequence>
<xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="partitionAlgo" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="partitionRefs" nillable="true" type="ax222:PartitionRef"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="partitionRefs" nillable="true" type="ax22:PartitionRef"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PartitionRef">
@@ -786,7 +788,7 @@
<xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
<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="ax28:Properties"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax23:Properties"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
@@ -810,7 +812,7 @@
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://common.stratos.apache.org/xsd">
<xs:complexType name="Properties">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax28:Property"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax23:Property"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Property">
@@ -820,7 +822,7 @@
</xs:sequence>
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ax220="http://exception.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://policy.exception.autoscaler.stratos.apache.org/xsd">
+ <xs:schema xmlns:ax225="http://exception.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://policy.exception.autoscaler.stratos.apache.org/xsd">
<xs:import namespace="http://exception.autoscaler.stratos.apache.org/xsd"/>
<xs:complexType name="ApplicationPolicyAlreadyExistsException">
<xs:sequence/>
@@ -837,7 +839,7 @@
</xs:complexType>
<xs:complexType name="UnremovablePolicyException">
<xs:complexContent>
- <xs:extension base="ax25:AutoScalerException">
+ <xs:extension base="ax213:AutoScalerException">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
@@ -852,7 +854,7 @@
</xs:complexType>
<xs:complexType name="PolicyDoesNotExistException">
<xs:complexContent>
- <xs:extension base="ax25:AutoScalerException">
+ <xs:extension base="ax213:AutoScalerException">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
[15/24] stratos git commit: modifying deployment policy and
application policy validations
Posted by ga...@apache.org.
modifying deployment policy and application policy validations
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/3487d95f
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/3487d95f
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/3487d95f
Branch: refs/heads/tenant-isolation
Commit: 3487d95f70420cc8e2b1c77bd0167bb3e30e096e
Parents: a775643
Author: Dinithi <di...@wso2.com>
Authored: Tue Jun 30 17:07:32 2015 +0530
Committer: Dinithi <di...@wso2.com>
Committed: Tue Jun 30 17:07:32 2015 +0530
----------------------------------------------------------------------
.../services/impl/AutoscalerServiceImpl.java | 46 ++--
.../stratos/autoscaler/util/AutoscalerUtil.java | 6 +-
.../impl/CloudControllerServiceImpl.java | 3 +-
.../rest/endpoint/api/StratosApiV41Utils.java | 21 +-
.../src/main/resources/AutoscalerService.wsdl | 85 +++---
.../main/resources/CloudControllerService.wsdl | 272 +++++++++----------
6 files changed, 220 insertions(+), 213 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/3487d95f/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
index 2b4cb12..3f3c071 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
@@ -25,13 +25,7 @@ import org.apache.stratos.autoscaler.algorithms.networkpartition.NetworkPartitio
import org.apache.stratos.autoscaler.applications.ApplicationHolder;
import org.apache.stratos.autoscaler.applications.parser.ApplicationParser;
import org.apache.stratos.autoscaler.applications.parser.DefaultApplicationParser;
-import org.apache.stratos.autoscaler.applications.pojo.ApplicationClusterContext;
-import org.apache.stratos.autoscaler.applications.pojo.ApplicationContext;
-import org.apache.stratos.autoscaler.applications.pojo.ArtifactRepositoryContext;
-import org.apache.stratos.autoscaler.applications.pojo.CartridgeContext;
-import org.apache.stratos.autoscaler.applications.pojo.ComponentContext;
-import org.apache.stratos.autoscaler.applications.pojo.GroupContext;
-import org.apache.stratos.autoscaler.applications.pojo.SubscribableInfoContext;
+import org.apache.stratos.autoscaler.applications.pojo.*;
import org.apache.stratos.autoscaler.applications.topic.ApplicationBuilder;
import org.apache.stratos.autoscaler.client.AutoscalerCloudControllerClient;
import org.apache.stratos.autoscaler.context.AutoscalerContext;
@@ -44,7 +38,6 @@ import org.apache.stratos.autoscaler.exception.*;
import org.apache.stratos.autoscaler.exception.application.ApplicationDefinitionException;
import org.apache.stratos.autoscaler.exception.application.InvalidApplicationPolicyException;
import org.apache.stratos.autoscaler.exception.application.InvalidServiceGroupException;
-import org.apache.stratos.autoscaler.exception.CartridgeNotFoundException;
import org.apache.stratos.autoscaler.exception.policy.*;
import org.apache.stratos.autoscaler.monitor.cluster.ClusterMonitor;
import org.apache.stratos.autoscaler.monitor.component.ApplicationMonitor;
@@ -894,9 +887,9 @@ public class AutoscalerServiceImpl implements AutoscalerService {
log.debug("Application policy definition: " + applicationPolicy.toString());
}
- String applicationPolicyID = applicationPolicy.getUuid();
- if (PolicyManager.getInstance().getApplicationPolicy(applicationPolicyID) != null) {
- String message = "Application policy already exists: [application-policy-id] " + applicationPolicyID;
+ String applicationPolicyId = applicationPolicy.getUuid();
+ if (PolicyManager.getInstance().getApplicationPolicy(applicationPolicyId) != null) {
+ String message = "Application policy already exists: [application-policy-id] " + applicationPolicyId;
log.error(message);
throw new ApplicationPolicyAlreadyExistsException(message);
}
@@ -1048,9 +1041,9 @@ public class AutoscalerServiceImpl implements AutoscalerService {
log.debug("Deployment policy definition: " + deploymentPolicy.toString());
}
- String deploymentPolicyID = deploymentPolicy.getUuid();
- if (PolicyManager.getInstance().getDeploymentPolicy(deploymentPolicyID) != null) {
- String message = "Deployment policy already exists: [deployment-policy-id] " + deploymentPolicyID;
+ String deploymentPolicyId = deploymentPolicy.getUuid();
+ if (PolicyManager.getInstance().getDeploymentPolicy(deploymentPolicyId) != null) {
+ String message = "Deployment policy already exists: [deployment-policy-id] " + deploymentPolicyId;
log.error(message);
throw new DeploymentPolicyAlreadyExistsException(message);
}
@@ -1058,7 +1051,7 @@ public class AutoscalerServiceImpl implements AutoscalerService {
PolicyManager.getInstance().addDeploymentPolicy(deploymentPolicy);
if (log.isInfoEnabled()) {
- log.info("Successfully added deployment policy: [deployment-policy-id] " + deploymentPolicyID);
+ log.info("Successfully added deployment policy: [deployment-policy-id] " + deploymentPolicyId);
}
return true;
}
@@ -1078,7 +1071,8 @@ public class AutoscalerServiceImpl implements AutoscalerService {
}
// deployment policy id can't be null or empty
- String deploymentPolicyId = deploymentPolicy.getUuid();
+ String deploymentPolicyUuid = deploymentPolicy.getUuid();
+ String deploymentPolicyId = deploymentPolicy.getId();
if (StringUtils.isBlank(deploymentPolicyId)) {
String msg = String.format("Deployment policy id is blank");
log.error(msg);
@@ -1088,7 +1082,7 @@ public class AutoscalerServiceImpl implements AutoscalerService {
// deployment policy should contain at least one network partition reference
if (null == deploymentPolicy.getNetworkPartitionRefs() || deploymentPolicy.getNetworkPartitionRefs().length == 0) {
String msg = String.format("Deployment policy does not have any network partition references: " +
- "[deployment-policy-id] %s", deploymentPolicyId);
+ "[deployment-policy-uuid] %s [deployment-policy-id] %s", deploymentPolicyUuid, deploymentPolicyId);
log.error(msg);
throw new InvalidDeploymentPolicyException(msg);
}
@@ -1098,8 +1092,8 @@ public class AutoscalerServiceImpl implements AutoscalerService {
// network partition id can't be null or empty
String networkPartitionId = networkPartitionRef.getId();
if (StringUtils.isBlank(networkPartitionId)) {
- String msg = String.format("Network partition id is blank: [deployment-policy-id] %s",
- deploymentPolicyId);
+ String msg = String.format("Network partition id is blank: [deployment-policy-uuid] %s " +
+ "[deployment-policy-id] %s", deploymentPolicyUuid, deploymentPolicyId);
log.error(msg);
throw new InvalidDeploymentPolicyException(msg);
}
@@ -1107,9 +1101,11 @@ public class AutoscalerServiceImpl implements AutoscalerService {
// network partitions should be already added
NetworkPartition networkPartition = CloudControllerServiceClient.getInstance()
.getNetworkPartition(networkPartitionId);
- if (networkPartition == null) {
- String msg = String.format("Network partition is not found: [deployment-policy-id] %s " +
- "[network-partition-id] %s", deploymentPolicyId, networkPartitionId);
+
+ if (networkPartition == null || (deploymentPolicy.getTenantId() != networkPartition.getTenantId())) {
+ String msg = String.format("Network partition is not found: [deployment-policy-uuid] %s " +
+ "[deployment-policy-id] %s [network-partition-id] %s", deploymentPolicyUuid,
+ deploymentPolicyId, networkPartitionId);
log.error(msg);
throw new InvalidDeploymentPolicyException(msg);
}
@@ -1320,11 +1316,11 @@ public class AutoscalerServiceImpl implements AutoscalerService {
}
@Override
- public DeploymentPolicy getDeploymentPolicy(String deploymentPolicyID) {
+ public DeploymentPolicy getDeploymentPolicy(String deploymentPolicyId) {
if (log.isDebugEnabled()) {
- log.debug("Getting deployment policy: [deployment-policy_id] " + deploymentPolicyID);
+ log.debug("Getting deployment policy: [deployment-policy_id] " + deploymentPolicyId);
}
- return PolicyManager.getInstance().getDeploymentPolicy(deploymentPolicyID);
+ return PolicyManager.getInstance().getDeploymentPolicy(deploymentPolicyId);
}
@Override
http://git-wip-us.apache.org/repos/asf/stratos/blob/3487d95f/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
index c126aad..40d9a95 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
@@ -50,6 +50,7 @@ import org.apache.stratos.autoscaler.pojo.policy.PolicyManager;
import org.apache.stratos.autoscaler.pojo.policy.deployment.ApplicationPolicy;
import org.apache.stratos.autoscaler.pojo.policy.deployment.DeploymentPolicy;
import org.apache.stratos.autoscaler.registry.RegistryManager;
+import org.apache.stratos.cloud.controller.stub.domain.NetworkPartition;
import org.apache.stratos.common.Properties;
import org.apache.stratos.common.Property;
import org.apache.stratos.common.client.CloudControllerServiceClient;
@@ -658,8 +659,9 @@ public class AutoscalerUtil {
}
// network partitions should be added already
- if (null == CloudControllerServiceClient.getInstance().
- getNetworkPartition(networkPartitionId)) {
+ NetworkPartition networkPartition = CloudControllerServiceClient.getInstance()
+ .getNetworkPartition(networkPartitionId);
+ if (null == networkPartition || (applicationPolicy.getTenantId() != networkPartition.getTenantId())) {
String msg = String.format("Network partition not found: [network-partition-id] %s in " +
"[application-policy-id] %s", networkPartitionId, applicationPolicy.getUuid());
log.error(msg);
http://git-wip-us.apache.org/repos/asf/stratos/blob/3487d95f/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 105f222..17a523b 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
@@ -1456,7 +1456,8 @@ public class CloudControllerServiceImpl implements CloudControllerService {
handleNullObject(networkPartition.getUuid(), "Network Partition ID is null");
if (log.isInfoEnabled()) {
- log.info(String.format("Adding network partition: [network-partition-id] %s", networkPartition.getUuid()));
+ log.info(String.format("Adding network partition: [network-partition-uuid] %s",
+ networkPartition.getUuid()));
}
String networkPartitionUuid = networkPartition.getUuid();
http://git-wip-us.apache.org/repos/asf/stratos/blob/3487d95f/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 12860b0..817a9de 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
@@ -2866,8 +2866,21 @@ public class StratosApiV41Utils {
public static NetworkPartitionBean getNetworkPartition(String networkPartitionId) throws RestAPIException {
try {
CloudControllerServiceClient serviceClient = CloudControllerServiceClient.getInstance();
- org.apache.stratos.cloud.controller.stub.domain.NetworkPartition networkPartition =
- serviceClient.getNetworkPartition(networkPartitionId);
+ org.apache.stratos.cloud.controller.stub.domain.NetworkPartition[] networkPartitions =
+ serviceClient.getNetworkPartitions();
+
+ NetworkPartition networkPartition = null;
+ PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext();
+ for (NetworkPartition networkPartition1 : networkPartitions) {
+ if (carbonContext.getTenantId() == networkPartition1.getTenantId()) {
+ if (networkPartition1.getId().equals(networkPartitionId)) {
+ networkPartition = networkPartition1;
+ }
+ }
+ }
+ if (networkPartition == null) {
+ return null;
+ }
return ObjectConverter.convertCCStubNetworkPartitionToNetworkPartition(networkPartition);
} catch (RemoteException e) {
String message = e.getMessage();
@@ -2945,17 +2958,13 @@ public class StratosApiV41Utils {
DeploymentPolicy deploymentPolicy = null;
PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext();
- // List<DeploymentPolicy> deploymentPoliciesForTenant = new ArrayList<DeploymentPolicy>();
for (DeploymentPolicy deploymentPolicy1 : deploymentPolicies) {
if (carbonContext.getTenantId() == deploymentPolicy1.getTenantId()) {
- //deploymentPoliciesForTenant.add(deploymentPolicy1);
if (deploymentPolicy1.getId().equals(deploymentPolicyId)) {
deploymentPolicy = deploymentPolicy1;
}
}
}
- //org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy deploymentPolicy
- // = AutoscalerServiceClient.getInstance().getDeploymentPolicy(deploymentPolicyID);
if (deploymentPolicy == null) {
return null;
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/3487d95f/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl
----------------------------------------------------------------------
diff --git a/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl b/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl
index 720b198..78aeb74 100644
--- a/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl
+++ b/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ax29="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ns="http://impl.services.autoscaler.stratos.apache.org" xmlns:ax27="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax23="http://common.stratos.apache.org/xsd" xmlns:ax21="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax22="http://partition.common.stratos.apache.org/xsd" xmlns:ax219="http://io.java/xsd" xmlns:ax218="http://rmi.java/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax215="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax222="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax213="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ax211="http://application.exception.au
toscaler.stratos.apache.org/xsd" 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.autoscaler.stratos.apache.org">
+<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ax29="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ns="http://impl.services.autoscaler.stratos.apache.org" xmlns:ax25="http://common.stratos.apache.org/xsd" xmlns:ax23="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax24="http://partition.common.stratos.apache.org/xsd" xmlns:ax21="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax219="http://io.java/xsd" xmlns:ax218="http://rmi.java/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax215="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax222="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax213="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ax211="http://application.exception.au
toscaler.stratos.apache.org/xsd" 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.autoscaler.stratos.apache.org">
<wsdl:types>
<xs:schema xmlns:ax220="http://io.java/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://rmi.java/xsd">
<xs:import namespace="http://io.java/xsd"/>
@@ -21,7 +21,7 @@
<xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="instanceRoundingFactor" type="xs:float"/>
<xs:element minOccurs="0" name="isPublic" type="xs:boolean"/>
- <xs:element minOccurs="0" name="loadThresholds" nillable="true" type="ax27:LoadThresholds"/>
+ <xs:element minOccurs="0" name="loadThresholds" nillable="true" type="ax29:LoadThresholds"/>
<xs:element minOccurs="0" name="tenantId" type="xs:int"/>
<xs:element minOccurs="0" name="uuid" nillable="true" type="xs:string"/>
</xs:sequence>
@@ -44,7 +44,7 @@
<xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="multiTenant" type="xs:boolean"/>
<xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax23:Properties"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
<xs:element minOccurs="0" name="status" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="tenantAdminUsername" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="tenantDomain" nillable="true" type="xs:string"/>
@@ -68,7 +68,7 @@
<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="persistenceContext" nillable="true" type="ax215:PersistenceContext"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax23:Properties"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
<xs:element minOccurs="0" name="tenantRange" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="textPayload" nillable="true" type="xs:string"/>
</xs:sequence>
@@ -109,7 +109,7 @@
<xs:element minOccurs="0" name="maxMembers" type="xs:int"/>
<xs:element minOccurs="0" name="minMembers" type="xs:int"/>
<xs:element minOccurs="0" name="persistenceContext" nillable="true" type="ax215:PersistenceContext"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax23:Properties"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ArtifactRepositoryContext">
@@ -144,8 +144,8 @@
<xs:complexType name="ServiceGroup">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="cartridges" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax29:Dependencies"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="groups" nillable="true" type="ax29:ServiceGroup"/>
+ <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax21:Dependencies"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="groups" nillable="true" type="ax21:ServiceGroup"/>
<xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
@@ -157,55 +157,55 @@
</xs:sequence>
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ax28="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax26="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax217="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax214="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax221="http://rmi.java/xsd" xmlns:ax212="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax223="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax210="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax226="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://impl.services.autoscaler.stratos.apache.org">
+ <xs:schema xmlns:ax28="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax217="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax22="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax214="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax221="http://rmi.java/xsd" xmlns:ax212="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax223="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax210="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax226="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://impl.services.autoscaler.stratos.apache.org">
+ <xs:import namespace="http://pojo.autoscaler.stratos.apache.org/xsd"/>
<xs:import namespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
<xs:import namespace="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
- <xs:import namespace="http://pojo.autoscaler.stratos.apache.org/xsd"/>
<xs:import namespace="http://application.exception.autoscaler.stratos.apache.org/xsd"/>
<xs:import namespace="http://exception.autoscaler.stratos.apache.org/xsd"/>
<xs:import namespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd"/>
<xs:import namespace="http://rmi.java/xsd"/>
<xs:import namespace="http://policy.exception.autoscaler.stratos.apache.org/xsd"/>
<xs:import namespace="http://common.stratos.apache.org/xsd"/>
- <xs:element name="getDeploymentPolicy">
+ <xs:element name="getServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicyID" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getDeploymentPolicyResponse">
+ <xs:element name="getServiceGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax26:DeploymentPolicy"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax21:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getAutoscalingPolicy">
+ <xs:element name="getDeploymentPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="autoscalingPolicyId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="deploymentPolicyID" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getAutoscalingPolicyResponse">
+ <xs:element name="getDeploymentPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax27:AutoscalePolicy"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax28:DeploymentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroup">
+ <xs:element name="getAutoscalingPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="autoscalingPolicyId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupResponse">
+ <xs:element name="getAutoscalingPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax29:ServiceGroup"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax29:AutoscalePolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -337,7 +337,7 @@
<xs:element name="addApplicationPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax26:ApplicationPolicy"/>
+ <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax28:ApplicationPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -358,7 +358,7 @@
<xs:element name="getApplicationPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax26:ApplicationPolicy"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax28:ApplicationPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -370,7 +370,7 @@
<xs:element name="getApplicationPoliciesResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:ApplicationPolicy"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax28:ApplicationPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -384,7 +384,7 @@
<xs:element name="updateApplicationPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax26:ApplicationPolicy"/>
+ <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax28:ApplicationPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -481,7 +481,7 @@
<xs:element name="getServiceGroupsResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:ServiceGroup"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax21:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -495,7 +495,7 @@
<xs:element name="addServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax29:ServiceGroup"/>
+ <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax21:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -509,7 +509,7 @@
<xs:element name="updateServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="cartridgeGroup" nillable="true" type="ax29:ServiceGroup"/>
+ <xs:element minOccurs="0" name="cartridgeGroup" nillable="true" type="ax21:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -545,7 +545,7 @@
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax23:Properties"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -595,7 +595,7 @@
<xs:element name="updateDeploymentPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax26:DeploymentPolicy"/>
+ <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax28:DeploymentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -614,7 +614,7 @@
<xs:element name="getDeploymentPoliciesResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:DeploymentPolicy"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax28:DeploymentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -626,7 +626,7 @@
<xs:element name="getAutoScalingPoliciesResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax27:AutoscalePolicy"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:AutoscalePolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -640,7 +640,7 @@
<xs:element name="addAutoScalingPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax27:AutoscalePolicy"/>
+ <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax29:AutoscalePolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -654,7 +654,7 @@
<xs:element name="updateAutoScalingPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax27:AutoscalePolicy"/>
+ <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax29:AutoscalePolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -696,7 +696,7 @@
<xs:element name="addDeployementPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax26:DeploymentPolicy"/>
+ <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax28:DeploymentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -750,13 +750,13 @@
</xs:complexType>
</xs:element>
</xs:schema>
- <xs:schema xmlns:ax25="http://partition.common.stratos.apache.org/xsd" xmlns:ax224="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
+ <xs:schema xmlns:ax27="http://partition.common.stratos.apache.org/xsd" xmlns:ax224="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
<xs:import namespace="http://partition.common.stratos.apache.org/xsd"/>
<xs:import namespace="http://common.stratos.apache.org/xsd"/>
<xs:complexType name="DeploymentPolicy">
<xs:sequence>
<xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitionRefs" nillable="true" type="ax25:NetworkPartitionRef"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitionRefs" nillable="true" type="ax27:NetworkPartitionRef"/>
<xs:element minOccurs="0" name="tenantId" type="xs:int"/>
<xs:element minOccurs="0" name="uuid" nillable="true" type="xs:string"/>
</xs:sequence>
@@ -767,19 +767,20 @@
<xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitionGroups" nillable="true" type="xs:string"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitions" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax23:Properties"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
<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:schema>
- <xs:schema xmlns:ax24="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://partition.common.stratos.apache.org/xsd">
+ <xs:schema xmlns:ax26="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://partition.common.stratos.apache.org/xsd">
<xs:import namespace="http://common.stratos.apache.org/xsd"/>
<xs:complexType name="NetworkPartitionRef">
<xs:sequence>
<xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="partitionAlgo" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="partitionRefs" nillable="true" type="ax22:PartitionRef"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="partitionRefs" nillable="true" type="ax24:PartitionRef"/>
+ <xs:element minOccurs="0" name="uuid" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PartitionRef">
@@ -788,7 +789,7 @@
<xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
<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="ax23:Properties"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
@@ -812,7 +813,7 @@
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://common.stratos.apache.org/xsd">
<xs:complexType name="Properties">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax23:Property"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax25:Property"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Property">
http://git-wip-us.apache.org/repos/asf/stratos/blob/3487d95f/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 27488a5..e273689 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="CloudControllerServiceCartridgeNotFoundException">
<xs:complexType>
<xs:sequence>
@@ -99,53 +78,24 @@
</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="getNetworkPartitions">
- <xs:complexType>
- <xs:sequence/>
- </xs:complexType>
- </xs:element>
- <xs:element name="getNetworkPartitionsResponse">
+ <xs:element name="CloudControllerServiceInvalidPartitionException">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:NetworkPartition"/>
+ <xs:element minOccurs="0" name="InvalidPartitionException" nillable="true" type="ax21:InvalidPartitionException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getIaasProviders">
- <xs:complexType>
- <xs:sequence/>
- </xs:complexType>
- </xs:element>
- <xs:element name="getIaasProvidersResponse">
+ <xs:element name="validatePartition">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" 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="getCartridges">
- <xs:complexType>
- <xs:sequence/>
- </xs:complexType>
- </xs:element>
- <xs:element name="getCartridgesResponse">
+ <xs:element name="validatePartitionResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -547,6 +497,56 @@
</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="getNetworkPartitions">
+ <xs:complexType>
+ <xs:sequence/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNetworkPartitionsResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:NetworkPartition"/>
+ </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="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="getKubernetesClusters">
<xs:complexType>
<xs:sequence/>
@@ -776,11 +776,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="CartridgeNotFoundException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
@@ -803,6 +798,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="InvalidCartridgeDefinitionException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
@@ -948,17 +948,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:sequence>
- </xs:complexType>
<xs:complexType name="InstanceContext">
<xs:sequence>
<xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
@@ -973,6 +962,17 @@
<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"/>
@@ -1026,37 +1026,6 @@
<xs:element minOccurs="0" name="ram" type="xs:int"/>
</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="Persistence">
- <xs:sequence>
- <xs:element minOccurs="0" name="persistenceRequired" type="xs:boolean"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax23:Volume"/>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="NetworkPartition">
- <xs:sequence>
- <xs:element minOccurs="0" name="activeByDefault" type="xs:boolean"/>
- <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="partitionAlgo" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax23:Partition"/>
- <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"/>
@@ -1126,10 +1095,14 @@
<xs:element minOccurs="0" name="networkUuid" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
+ <xs:complexType name="Persistence">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="persistenceRequired" type="xs:boolean"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax23:Volume"/>
+ </xs:sequence>
+ </xs:complexType>
<xs:complexType name="PortMapping">
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesServicePort" type="xs:int"/>
- <xs:element minOccurs="0" name="kubernetesServicePortMapping" type="xs:boolean"/>
<xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="port" type="xs:int"/>
<xs:element minOccurs="0" name="protocol" nillable="true" type="xs:string"/>
@@ -1166,6 +1139,31 @@
<xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax23:Volume"/>
</xs:sequence>
</xs:complexType>
+ <xs:complexType name="NetworkPartition">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="activeByDefault" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="partitionAlgo" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax23:Partition"/>
+ <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="ApplicationClusterContext">
<xs:sequence>
<xs:element minOccurs="0" name="autoscalePolicyName" nillable="true" type="xs:string"/>
@@ -1487,6 +1485,12 @@
<wsdl:message name="removeCartridgeResponse">
<wsdl:part name="parameters" element="ns:removeCartridgeResponse"/>
</wsdl:message>
+ <wsdl:message name="getNetworkPartitionsRequest">
+ <wsdl:part name="parameters" element="ns:getNetworkPartitions"/>
+ </wsdl:message>
+ <wsdl:message name="getNetworkPartitionsResponse">
+ <wsdl:part name="parameters" element="ns:getNetworkPartitionsResponse"/>
+ </wsdl:message>
<wsdl:message name="addCartridgeRequest">
<wsdl:part name="parameters" element="ns:addCartridge"/>
</wsdl:message>
@@ -1496,12 +1500,6 @@
<wsdl:message name="CloudControllerServiceCartridgeAlreadyExistsException">
<wsdl:part name="parameters" element="ns:CloudControllerServiceCartridgeAlreadyExistsException"/>
</wsdl:message>
- <wsdl:message name="getNetworkPartitionsRequest">
- <wsdl:part name="parameters" element="ns:getNetworkPartitions"/>
- </wsdl:message>
- <wsdl:message name="getNetworkPartitionsResponse">
- <wsdl:part name="parameters" element="ns:getNetworkPartitionsResponse"/>
- </wsdl:message>
<wsdl:portType name="CloudControllerServicePortType">
<wsdl:operation name="getCartridges">
<wsdl:input message="ns:getCartridgesRequest" wsaw:Action="urn:getCartridges"/>
@@ -1705,6 +1703,10 @@
<wsdl:output message="ns:removeCartridgeResponse" wsaw:Action="urn:removeCartridgeResponse"/>
<wsdl:fault message="ns:CloudControllerServiceInvalidCartridgeTypeException" name="CloudControllerServiceInvalidCartridgeTypeException" wsaw:Action="urn:removeCartridgeCloudControllerServiceInvalidCartridgeTypeException"/>
</wsdl:operation>
+ <wsdl:operation name="getNetworkPartitions">
+ <wsdl:input message="ns:getNetworkPartitionsRequest" wsaw:Action="urn:getNetworkPartitions"/>
+ <wsdl:output message="ns:getNetworkPartitionsResponse" wsaw:Action="urn:getNetworkPartitionsResponse"/>
+ </wsdl:operation>
<wsdl:operation name="addCartridge">
<wsdl:input message="ns:addCartridgeRequest" wsaw:Action="urn:addCartridge"/>
<wsdl:output message="ns:addCartridgeResponse" wsaw:Action="urn:addCartridgeResponse"/>
@@ -1712,10 +1714,6 @@
<wsdl:fault message="ns:CloudControllerServiceInvalidIaasProviderException" name="CloudControllerServiceInvalidIaasProviderException" wsaw:Action="urn:addCartridgeCloudControllerServiceInvalidIaasProviderException"/>
<wsdl:fault message="ns:CloudControllerServiceCartridgeAlreadyExistsException" name="CloudControllerServiceCartridgeAlreadyExistsException" wsaw:Action="urn:addCartridgeCloudControllerServiceCartridgeAlreadyExistsException"/>
</wsdl:operation>
- <wsdl:operation name="getNetworkPartitions">
- <wsdl:input message="ns:getNetworkPartitionsRequest" wsaw:Action="urn:getNetworkPartitions"/>
- <wsdl:output message="ns:getNetworkPartitionsResponse" wsaw:Action="urn:getNetworkPartitionsResponse"/>
- </wsdl:operation>
</wsdl:portType>
<wsdl:binding name="CloudControllerServiceSoap11Binding" type="ns:CloudControllerServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
@@ -2208,15 +2206,6 @@
<soap:fault use="literal" name="CloudControllerServiceInvalidCartridgeTypeException"/>
</wsdl:fault>
</wsdl:operation>
- <wsdl:operation name="getNetworkPartitions">
- <soap:operation soapAction="urn:getNetworkPartitions" style="document"/>
- <wsdl:input>
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
<wsdl:operation name="addCartridge">
<soap:operation soapAction="urn:addCartridge" style="document"/>
<wsdl:input>
@@ -2235,6 +2224,15 @@
<soap:fault use="literal" name="CloudControllerServiceCartridgeAlreadyExistsException"/>
</wsdl:fault>
</wsdl:operation>
+ <wsdl:operation name="getNetworkPartitions">
+ <soap:operation soapAction="urn:getNetworkPartitions" style="document"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
</wsdl:binding>
<wsdl:binding name="CloudControllerServiceSoap12Binding" type="ns:CloudControllerServicePortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
@@ -2727,15 +2725,6 @@
<soap12:fault use="literal" name="CloudControllerServiceInvalidCartridgeTypeException"/>
</wsdl:fault>
</wsdl:operation>
- <wsdl:operation name="getNetworkPartitions">
- <soap12:operation soapAction="urn:getNetworkPartitions" style="document"/>
- <wsdl:input>
- <soap12:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap12:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
<wsdl:operation name="addCartridge">
<soap12:operation soapAction="urn:addCartridge" style="document"/>
<wsdl:input>
@@ -2754,6 +2743,15 @@
<soap12:fault use="literal" name="CloudControllerServiceCartridgeAlreadyExistsException"/>
</wsdl:fault>
</wsdl:operation>
+ <wsdl:operation name="getNetworkPartitions">
+ <soap12:operation soapAction="urn:getNetworkPartitions" style="document"/>
+ <wsdl:input>
+ <soap12:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
</wsdl:binding>
<wsdl:binding name="CloudControllerServiceHttpBinding" type="ns:CloudControllerServicePortType">
<http:binding verb="POST"/>
@@ -3108,8 +3106,8 @@
<mime:content type="text/xml" part="parameters"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="getNetworkPartitions">
- <http:operation location="getNetworkPartitions"/>
+ <wsdl:operation name="addCartridge">
+ <http:operation location="addCartridge"/>
<wsdl:input>
<mime:content type="text/xml" part="parameters"/>
</wsdl:input>
@@ -3117,8 +3115,8 @@
<mime:content type="text/xml" part="parameters"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="addCartridge">
- <http:operation location="addCartridge"/>
+ <wsdl:operation name="getNetworkPartitions">
+ <http:operation location="getNetworkPartitions"/>
<wsdl:input>
<mime:content type="text/xml" part="parameters"/>
</wsdl:input>
[11/24] stratos git commit: Tenant isolation - Autoscaling Policies
Posted by ga...@apache.org.
Tenant isolation - Autoscaling Policies
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/3accca72
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/3accca72
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/3accca72
Branch: refs/heads/tenant-isolation
Commit: 3accca721a2031920eb7bf78a691d0d1b1e6d90c
Parents: abff10e
Author: Dinithi <di...@wso2.com>
Authored: Mon Jun 29 18:17:55 2015 +0530
Committer: Dinithi <di...@wso2.com>
Committed: Mon Jun 29 18:17:55 2015 +0530
----------------------------------------------------------------------
.../autoscaler/pojo/policy/PolicyManager.java | 24 +-
.../pojo/policy/autoscale/AutoscalePolicy.java | 24 +-
.../autoscaler/registry/RegistryManager.java | 8 +-
.../policy/autoscale/AutoscalePolicyBean.java | 18 +
.../default/configure/autoscaling-policies.json | 1 +
.../schema/configure/autoscaling-policies.json | 9 +-
.../rest/endpoint/api/StratosApiV41.java | 9 +-
.../rest/endpoint/api/StratosApiV41Utils.java | 65 ++-
.../util/converter/ObjectConverter.java | 5 +-
.../src/main/resources/AutoscalerService.wsdl | 545 ++++++++++---------
10 files changed, 388 insertions(+), 320 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/3accca72/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
index f127de7..bb161ed 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
@@ -83,27 +83,27 @@ public class PolicyManager {
// Add the policy to information model and persist.
public boolean addAutoscalePolicy(AutoscalePolicy policy) throws AutoScalingPolicyAlreadyExistException {
if (log.isInfoEnabled()) {
- log.info(String.format("Adding autoscaling policy: [id] %s", policy.getId()));
+ log.info(String.format("Adding autoscaling policy: [id] %s", policy.getUuid()));
}
- if (StringUtils.isEmpty(policy.getId())) {
+ if (StringUtils.isEmpty(policy.getUuid())) {
throw new AutoScalerException("Autoscaling policy id cannot be empty");
}
this.addASPolicyToInformationModel(policy);
RegistryManager.getInstance().persistAutoscalerPolicy(policy);
if (log.isInfoEnabled()) {
- log.info(String.format("Autoscaling policy is added successfully: [id] %s", policy.getId()));
+ log.info(String.format("Autoscaling policy is added successfully: [id] %s", policy.getUuid()));
}
return true;
}
public boolean updateAutoscalePolicy(AutoscalePolicy policy) throws InvalidPolicyException {
- if (StringUtils.isEmpty(policy.getId())) {
+ if (StringUtils.isEmpty(policy.getUuid())) {
throw new AutoScalerException("Autoscaling policy id cannot be empty");
}
this.updateASPolicyInInformationModel(policy);
RegistryManager.getInstance().persistAutoscalerPolicy(policy);
if (log.isInfoEnabled()) {
- log.info(String.format("Autoscaling policy is updated successfully: [id] %s", policy.getId()));
+ log.info(String.format("Autoscaling policy is updated successfully: [id] %s", policy.getUuid()));
}
return true;
}
@@ -187,24 +187,24 @@ public class PolicyManager {
}
public void addASPolicyToInformationModel(AutoscalePolicy asPolicy) throws AutoScalingPolicyAlreadyExistException {
- if (!autoscalePolicyListMap.containsKey(asPolicy.getId())) {
+ if (!autoscalePolicyListMap.containsKey(asPolicy.getUuid())) {
if (log.isDebugEnabled()) {
- log.debug("Adding autoscaling policy: " + asPolicy.getId());
+ log.debug("Adding autoscaling policy: " + asPolicy.getUuid());
}
- autoscalePolicyListMap.put(asPolicy.getId(), asPolicy);
+ autoscalePolicyListMap.put(asPolicy.getUuid(), asPolicy);
} else {
- String errMsg = "Specified autoscaling policy [" + asPolicy.getId() + "] already exists";
+ String errMsg = "Specified autoscaling policy [" + asPolicy.getUuid() + "] already exists";
log.error(errMsg);
throw new AutoScalingPolicyAlreadyExistException(errMsg);
}
}
public void updateASPolicyInInformationModel(AutoscalePolicy asPolicy) throws InvalidPolicyException {
- if (autoscalePolicyListMap.containsKey(asPolicy.getId())) {
+ if (autoscalePolicyListMap.containsKey(asPolicy.getUuid())) {
if (log.isDebugEnabled()) {
- log.debug("Updating autoscaling policy: " + asPolicy.getId());
+ log.debug("Updating autoscaling policy: " + asPolicy.getUuid());
}
- autoscalePolicyListMap.put(asPolicy.getId(), asPolicy);
+ autoscalePolicyListMap.put(asPolicy.getUuid(), asPolicy);
}
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/3accca72/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/autoscale/AutoscalePolicy.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/autoscale/AutoscalePolicy.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/autoscale/AutoscalePolicy.java
index 8eee898..852d873 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/autoscale/AutoscalePolicy.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/autoscale/AutoscalePolicy.java
@@ -28,6 +28,7 @@ public class AutoscalePolicy implements Serializable {
private static final long serialVersionUID = 1754373171598089271L;
private LoadThresholds loadThresholds;
+ private String uuid;
private String id;
private String displayName;
private String description;
@@ -35,6 +36,15 @@ public class AutoscalePolicy implements Serializable {
private int tenantId;
private float instanceRoundingFactor;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
/**
* Gets the value of the loadThresholds property.
*
@@ -56,23 +66,23 @@ public class AutoscalePolicy implements Serializable {
}
/**
- * Gets the value of the id property.
+ * Gets the value of the uuid property.
*
* @return possible object is
* {@link String }
*/
- public String getId() {
- return id;
+ public String getUuid() {
+ return uuid;
}
/**
- * Sets the value of the id property.
+ * Sets the value of the uuid property.
*
* @param value allowed object is
* {@link String }
*/
- public void setId(String value) {
- this.id = value;
+ public void setUuid(String value) {
+ this.uuid = value;
}
/**
@@ -149,7 +159,7 @@ public class AutoscalePolicy implements Serializable {
@Override
public String toString() {
- return "ASPolicy [id=" + id + ", displayName=" + displayName
+ return "ASPolicy [uuid=" + uuid + ", displayName=" + displayName
+ ", description=" + description + ", isPublic=" + isPublic + "]";
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/3accca72/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
index a3c5703..5780864 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
@@ -173,14 +173,14 @@ public class RegistryManager {
try {
startTenantFlow();
String resourcePath = AutoscalerConstants.AUTOSCALER_RESOURCE +
- AutoscalerConstants.AS_POLICY_RESOURCE + "/" + autoscalePolicy.getId();
+ AutoscalerConstants.AS_POLICY_RESOURCE + "/" + autoscalePolicy.getUuid();
persist(autoscalePolicy, resourcePath);
if (log.isDebugEnabled()) {
log.debug(String.format("Autoscaler policy written to registry: [id] %s [name] %s [description] %s",
- autoscalePolicy.getId(), autoscalePolicy.getDisplayName(), autoscalePolicy.getDescription()));
+ autoscalePolicy.getUuid(), autoscalePolicy.getDisplayName(), autoscalePolicy.getDescription()));
}
} catch (AutoScalerException e) {
- String message = "Unable to persist autoscaler policy [autoscaler-policy-id] " + autoscalePolicy.getId();
+ String message = "Unable to persist autoscaler policy [autoscaler-policy-id] " + autoscalePolicy.getUuid();
log.error(message, e);
throw e;
} finally {
@@ -400,7 +400,7 @@ public class RegistryManager {
asPolicy = (AutoscalePolicy) dataObj;
if (log.isDebugEnabled()) {
log.debug(String.format("Autoscaler policy read from registry: [id] %s [name] %s [description] %s",
- asPolicy.getId(), asPolicy.getDisplayName(), asPolicy.getDescription()));
+ asPolicy.getUuid(), asPolicy.getDisplayName(), asPolicy.getDescription()));
}
asPolicyList.add(asPolicy);
} else {
http://git-wip-us.apache.org/repos/asf/stratos/blob/3accca72/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/autoscale/AutoscalePolicyBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/autoscale/AutoscalePolicyBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/autoscale/AutoscalePolicyBean.java
index 5dc025d..bb3de10 100644
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/autoscale/AutoscalePolicyBean.java
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/autoscale/AutoscalePolicyBean.java
@@ -25,10 +25,28 @@ import javax.xml.bind.annotation.XmlRootElement;
public class AutoscalePolicyBean {
private String id;
+ private String uuid;
+ private int tenantId;
private String displayName;
private String description;
private LoadThresholdsBean loadThresholds;
+ public String getUuid() {
+ return uuid;
+ }
+
+ public void setUuid(String uuid) {
+ this.uuid = uuid;
+ }
+
+ public int getTenantId() {
+ return tenantId;
+ }
+
+ public void setTenantId(int tenantId) {
+ this.tenantId = tenantId;
+ }
+
public String getId() {
return id;
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/3accca72/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/autoscaling-policies.json
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/autoscaling-policies.json b/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/autoscaling-policies.json
index 29c755f..7fa3c03 100644
--- a/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/autoscaling-policies.json
+++ b/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/autoscaling-policies.json
@@ -1,4 +1,5 @@
{
+ "uuid": "",
"id": "economy",
"description":"autoscale policy description",
"loadThresholds": {
http://git-wip-us.apache.org/repos/asf/stratos/blob/3accca72/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/autoscaling-policies.json
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/autoscaling-policies.json b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/autoscaling-policies.json
index 4c086d8..21416ff 100644
--- a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/autoscaling-policies.json
+++ b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/autoscaling-policies.json
@@ -1,15 +1,20 @@
{
"type":"object",
"$schema": "http://json-schema.org/draft-04/schema",
- "id": "root",
+ "uuid": "root",
"title":"Auto-scaling Policy Definition",
- "name": "Auto-scaling Policy",
+ "name": "Auto-scaling Policy UUID",
"options": {
"disable_properties": true,
"disable_collapse": true
},
"required" : ["id", "loadThresholds"],
"properties":{
+ "uuid": {
+ "type":"string",
+ "id": "root/uuid",
+ "title":"Auto Scale policy UUID"
+ },
"id": {
"type":"string",
"id": "root/id",
http://git-wip-us.apache.org/repos/asf/stratos/blob/3accca72/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 8e04ec6..08005c6 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
@@ -1387,13 +1387,18 @@ public class StratosApiV41 extends AbstractApi {
@AuthorizationAction("/permission/admin/stratos/autoscalingPolicies/manage")
public Response addAutoscalingPolicy(
AutoscalePolicyBean autoscalePolicy) throws RestAPIException {
+ String autoscalingPolicyId = autoscalePolicy.getId();
+ autoscalePolicy.setUuid(UUID.randomUUID().toString());
+ String autoscalingPolicyUuid = autoscalePolicy.getUuid();
+ PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext();
+ autoscalePolicy.setTenantId(carbonContext.getTenantId());
try {
StratosApiV41Utils.addAutoscalingPolicy(autoscalePolicy);
URI url = uriInfo.getAbsolutePathBuilder().path(autoscalePolicy.getId()).build();
return Response.created(url).entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,
- String.format("Autoscaling policy added successfully: [autoscale-policy] %s",
- autoscalePolicy.getId()))).build();
+ String.format("Autoscaling policy added successfully: [autoscale-policy-uuid] %s " +
+ "[autoscale-policy-id] %s", autoscalingPolicyUuid, autoscalingPolicyId))).build();
} catch (AutoscalerServiceInvalidPolicyExceptionException e) {
return Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean(
ResponseMessageBean.ERROR, "Provided Autoscaling policy is invalid")).build();
http://git-wip-us.apache.org/repos/asf/stratos/blob/3accca72/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 6596bf8..20929bb 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
@@ -24,6 +24,7 @@ import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.stratos.autoscaler.stub.*;
+import org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy;
import org.apache.stratos.autoscaler.stub.deployment.policy.ApplicationPolicy;
import org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy;
import org.apache.stratos.autoscaler.stub.pojo.ApplicationContext;
@@ -850,9 +851,10 @@ public class StratosApiV41Utils {
AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
if (autoscalerServiceClient != null) {
-
+ AutoscalePolicyBean autoscalePolicyBean;
try {
- autoscalerServiceClient.removeAutoscalingPolicy(autoscalePolicyId);
+ autoscalePolicyBean = getAutoScalePolicy(autoscalePolicyId);
+ autoscalerServiceClient.removeAutoscalingPolicy(autoscalePolicyBean.getUuid());
} catch (RemoteException e) {
log.error(e.getMessage(), e);
throw new RestAPIException(e.getMessage(), e);
@@ -870,17 +872,31 @@ public class StratosApiV41Utils {
org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy[] autoscalePolicies = null;
AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
+ AutoscalePolicy[] autoscalingPoliciesForTenantArray = new AutoscalePolicy[0];
+
if (autoscalerServiceClient != null) {
try {
autoscalePolicies = autoscalerServiceClient.getAutoScalePolicies();
-
+ if (autoscalePolicies != null) {
+ PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext();
+ List<AutoscalePolicy> autoscalingPoliciesForTenant = new ArrayList<AutoscalePolicy>();
+ for (AutoscalePolicy autoscalePolicy : autoscalePolicies) {
+ if (carbonContext.getTenantId() == autoscalePolicy.getTenantId()) {
+ autoscalingPoliciesForTenant.add(autoscalePolicy);
+ }
+ }
+ if (autoscalingPoliciesForTenant.size() != 0) {
+ autoscalingPoliciesForTenantArray = autoscalingPoliciesForTenant.toArray(new
+ AutoscalePolicy[autoscalingPoliciesForTenant.size()]);
+ }
+ }
} catch (RemoteException e) {
String errorMsg = "Error while getting available autoscaling policies. Cause : " + e.getMessage();
log.error(errorMsg, e);
throw new RestAPIException(errorMsg, e);
}
}
- return ObjectConverter.convertStubAutoscalePoliciesToAutoscalePolicies(autoscalePolicies);
+ return ObjectConverter.convertStubAutoscalePoliciesToAutoscalePolicies(autoscalingPoliciesForTenantArray);
}
/**
@@ -892,21 +908,30 @@ public class StratosApiV41Utils {
*/
public static AutoscalePolicyBean getAutoScalePolicy(String autoscalePolicyId) throws RestAPIException {
- org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy autoscalePolicy = null;
- AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
- if (autoscalerServiceClient != null) {
- try {
- autoscalePolicy = autoscalerServiceClient.getAutoScalePolicy(autoscalePolicyId);
+ AutoscalePolicyBean autoscalePolicyBean;
+ try {
+ AutoscalePolicy[] autoscalePolicies = AutoscalerServiceClient.getInstance().getAutoScalePolicies();
- } catch (RemoteException e) {
- String errorMsg = "Error while getting information for autoscaling policy with id " +
- autoscalePolicyId + ". Cause: " + e.getMessage();
- log.error(errorMsg, e);
- throw new RestAPIException(errorMsg, e);
+ AutoscalePolicy autoscalePolicy = null;
+ PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext();
+ for (AutoscalePolicy autoscalePolicy1 : autoscalePolicies) {
+ if (carbonContext.getTenantId() == autoscalePolicy1.getTenantId()) {
+ if (autoscalePolicy1.getId().equals(autoscalePolicyId)) {
+ autoscalePolicy = autoscalePolicy1;
+ }
+ }
}
+ if (autoscalePolicy == null) {
+ return null;
+ }
+ autoscalePolicyBean = ObjectConverter.convertStubAutoscalePolicyToAutoscalePolicy(autoscalePolicy);
+ } catch (RemoteException e) {
+ String errorMsg = "Error while getting information for autoscaling policy with id " +
+ autoscalePolicyId + ". Cause: " + e.getMessage();
+ log.error(errorMsg, e);
+ throw new RestAPIException(errorMsg, e);
}
-
- return ObjectConverter.convertStubAutoscalePolicyToAutoscalePolicy(autoscalePolicy);
+ return autoscalePolicyBean;
}
// Util methods for repo actions
@@ -2849,13 +2874,13 @@ public class StratosApiV41Utils {
AutoscalerServiceInvalidDeploymentPolicyExceptionException {
try {
if (log.isDebugEnabled()) {
- log.debug(String.format("Adding deployment policy: [deployment-policy-id] %s ",
+ log.debug(String.format("Adding deployment policy: [deployment-policy-uuid] %s [deployment-policy-id]" +
+ " %s ", deploymentPolicyDefinitionBean.getUuid(),
deploymentPolicyDefinitionBean.getId()));
}
- org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy deploymentPolicy =
-
- ObjectConverter.convertDeploymentPolicyBeanToASDeploymentPolicy(deploymentPolicyDefinitionBean);
+ org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy deploymentPolicy = ObjectConverter
+ .convertDeploymentPolicyBeanToASDeploymentPolicy(deploymentPolicyDefinitionBean);
AutoscalerServiceClient.getInstance().addDeploymentPolicy(deploymentPolicy);
if (log.isDebugEnabled()) {
http://git-wip-us.apache.org/repos/asf/stratos/blob/3accca72/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 3c0d6fc..693af46 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
@@ -410,6 +410,8 @@ public class ObjectConverter {
org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy();
autoscalePolicy.setId(autoscalePolicyBean.getId());
+ autoscalePolicy.setUuid(autoscalePolicyBean.getUuid());
+ autoscalePolicy.setTenantId(autoscalePolicyBean.getTenantId());
autoscalePolicy.setDescription(autoscalePolicyBean.getDescription());
autoscalePolicy.setDisplayName(autoscalePolicyBean.getDisplayName());
@@ -858,9 +860,10 @@ public class ObjectConverter {
AutoscalePolicyBean autoscalePolicyBean = new AutoscalePolicyBean();
autoscalePolicyBean.setId(autoscalePolicy.getId());
+ autoscalePolicyBean.setUuid(autoscalePolicy.getUuid());
+ autoscalePolicyBean.setTenantId(autoscalePolicy.getTenantId());
autoscalePolicyBean.setDescription(autoscalePolicy.getDescription());
autoscalePolicyBean.setDisplayName(autoscalePolicy.getDisplayName());
- autoscalePolicyBean.setDescription(autoscalePolicy.getDescription());
if (autoscalePolicy.getLoadThresholds() != null) {
autoscalePolicyBean.setLoadThresholds(convertStubLoadThresholdsToLoadThresholds(autoscalePolicy.getLoadThresholds()));
}
[09/24] stratos git commit: Modifying log messages to display uuid
Posted by ga...@apache.org.
Modifying log messages to display uuid
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/abff10ef
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/abff10ef
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/abff10ef
Branch: refs/heads/tenant-isolation
Commit: abff10efa154a7bf6dc641694a0d6e25bb1f7bf7
Parents: 9002585
Author: Dinithi <di...@wso2.com>
Authored: Mon Jun 29 13:12:09 2015 +0530
Committer: Dinithi <di...@wso2.com>
Committed: Mon Jun 29 13:12:09 2015 +0530
----------------------------------------------------------------------
.../common/client/AutoscalerServiceClient.java | 8 ++--
.../rest/endpoint/api/StratosApiV41.java | 28 +++++++-------
.../rest/endpoint/api/StratosApiV41Utils.java | 39 ++++++++++++--------
3 files changed, 42 insertions(+), 33 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/abff10ef/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/client/AutoscalerServiceClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/client/AutoscalerServiceClient.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/client/AutoscalerServiceClient.java
index 5d6bf16..dcd50ca 100644
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/client/AutoscalerServiceClient.java
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/client/AutoscalerServiceClient.java
@@ -220,14 +220,14 @@ public class AutoscalerServiceClient {
stub.updateDeploymentPolicy(deploymentPolicy);
}
- public void removeDeploymentPolicy(String deploymentPolicyID) throws RemoteException,
+ public void removeDeploymentPolicy(String deploymentPolicyId) throws RemoteException,
AutoscalerServiceDeploymentPolicyNotExistsExceptionException,
AutoscalerServiceUnremovablePolicyExceptionException {
- stub.removeDeployementPolicy(deploymentPolicyID);
+ stub.removeDeployementPolicy(deploymentPolicyId);
}
- public DeploymentPolicy getDeploymentPolicy(String deploymentPolicyID) throws RemoteException {
- return stub.getDeploymentPolicy(deploymentPolicyID);
+ public DeploymentPolicy getDeploymentPolicy(String deploymentPolicyId) throws RemoteException {
+ return stub.getDeploymentPolicy(deploymentPolicyId);
}
public DeploymentPolicy[] getDeploymentPolicies() throws RemoteException {
http://git-wip-us.apache.org/repos/asf/stratos/blob/abff10ef/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 40f193f..8e04ec6 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
@@ -132,8 +132,9 @@ public class StratosApiV41 extends AbstractApi {
public Response addDeploymentPolicy(
DeploymentPolicyBean deploymentPolicyDefinitionBean) throws RestAPIException {
- String deploymentPolicyID = deploymentPolicyDefinitionBean.getId();
+ String deploymentPolicyId = deploymentPolicyDefinitionBean.getId();
deploymentPolicyDefinitionBean.setUuid(UUID.randomUUID().toString());
+ String deploymentPolicyUuid = deploymentPolicyDefinitionBean.getUuid();
PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext();
deploymentPolicyDefinitionBean.setTenantId(carbonContext.getTenantId());
@@ -147,10 +148,10 @@ public class StratosApiV41 extends AbstractApi {
return Response.status(Response.Status.CONFLICT).entity(new ResponseMessageBean(
ResponseMessageBean.ERROR, "Deployment policy already exists")).build();
}
- URI url = uriInfo.getAbsolutePathBuilder().path(deploymentPolicyID).build();
+ URI url = uriInfo.getAbsolutePathBuilder().path(deploymentPolicyId).build();
return Response.created(url).entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,
- String.format("Deployment policy added successfully: " + "[deployment-policy-id] %s",
- deploymentPolicyID))).build();
+ String.format("Deployment policy added successfully: [deployment-policy-uuid] %s " +
+ "[deployment-policy-uuid] %s", deploymentPolicyUuid, deploymentPolicyId))).build();
}
/**
@@ -166,7 +167,7 @@ public class StratosApiV41 extends AbstractApi {
@AuthorizationAction("/permission/admin/stratos/deploymentPolicies/view")
public Response getDeploymentPolicy(
@PathParam("deploymentPolicyId") String deploymentPolicyId) throws RestAPIException {
- DeploymentPolicyBean deploymentPolicyBean = StratosApiV41Utils.getDeployementPolicy(deploymentPolicyId);
+ DeploymentPolicyBean deploymentPolicyBean = StratosApiV41Utils.getDeploymentPolicy(deploymentPolicyId);
if (deploymentPolicyBean == null) {
return Response.status(Response.Status.NOT_FOUND).entity(new ResponseMessageBean(
ResponseMessageBean.ERROR, "Deployment policy not found")).build();
@@ -187,7 +188,7 @@ public class StratosApiV41 extends AbstractApi {
@AuthorizationAction("/permission/admin/stratos/deploymentPolicies/view")
public Response getDeploymentPolicies()
throws RestAPIException {
- DeploymentPolicyBean[] deploymentPolicies = StratosApiV41Utils.getDeployementPolicies();
+ DeploymentPolicyBean[] deploymentPolicies = StratosApiV41Utils.getDeploymentPolicies();
if (deploymentPolicies == null || deploymentPolicies.length == 0) {
return Response.status(Response.Status.NOT_FOUND).entity(new ResponseMessageBean(
ResponseMessageBean.ERROR, "No deployment policies found")).build();
@@ -211,7 +212,8 @@ public class StratosApiV41 extends AbstractApi {
public Response updateDeploymentPolicy(
DeploymentPolicyBean deploymentPolicyDefinitionBean) throws RestAPIException {
- String deploymentPolicyID = deploymentPolicyDefinitionBean.getId();
+ String deploymentPolicyId = deploymentPolicyDefinitionBean.getId();
+ String deploymentPolicyUuid = deploymentPolicyDefinitionBean.getUuid();
// TODO :: Deployment policy validation
try {
@@ -230,10 +232,10 @@ public class StratosApiV41 extends AbstractApi {
return Response.status(Response.Status.NOT_FOUND).entity(new ResponseMessageBean(
ResponseMessageBean.ERROR, "Deployment policy not found")).build();
}
- URI url = uriInfo.getAbsolutePathBuilder().path(deploymentPolicyID).build();
+ URI url = uriInfo.getAbsolutePathBuilder().path(deploymentPolicyId).build();
return Response.ok(url).entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,
- String.format("Deployment policy updated successfully: " + "[deployment-policy-id] %s",
- deploymentPolicyID))).build();
+ String.format("Deployment policy updated successfully: [deployment-policy-uuid] %s " +
+ "[deployment-policy-id] %s", deploymentPolicyUuid, deploymentPolicyId))).build();
}
/**
@@ -261,7 +263,7 @@ public class StratosApiV41 extends AbstractApi {
}
URI url = uriInfo.getAbsolutePathBuilder().path(deploymentPolicyId).build();
return Response.ok(url).entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,
- String.format("Deployment policy removed successfully: " + "[deployment-policy-id] %s",
+ String.format("Deployment policy removed successfully: [deployment-policy-id] %s",
deploymentPolicyId))).build();
}
@@ -637,8 +639,8 @@ public class StratosApiV41 extends AbstractApi {
}
URI url = uriInfo.getAbsolutePathBuilder().path(networkPartitionId).build();
return Response.created(url).entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,
- String.format("Network partition added successfully: [network-partition-uuid] %s", networkPartitionId)))
- .build();
+ String.format("Network partition added successfully: [network-partition-uuid] %s " +
+ "[network-partition-uuid] %s", networkPartitionBean.getUuid(), networkPartitionId))).build();
}
/**
http://git-wip-us.apache.org/repos/asf/stratos/blob/abff10ef/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 9bcaafa..6596bf8 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
@@ -2841,26 +2841,27 @@ public class StratosApiV41Utils {
/**
* Add deployment policy
*
- * @param deployementPolicyDefinitionBean DeploymentPolicyBean
+ * @param deploymentPolicyDefinitionBean DeploymentPolicyBean
*/
- public static void addDeploymentPolicy(DeploymentPolicyBean deployementPolicyDefinitionBean)
+ public static void addDeploymentPolicy(DeploymentPolicyBean deploymentPolicyDefinitionBean)
throws RestAPIException,
AutoscalerServiceDeploymentPolicyAlreadyExistsExceptionException,
AutoscalerServiceInvalidDeploymentPolicyExceptionException {
try {
if (log.isDebugEnabled()) {
log.debug(String.format("Adding deployment policy: [deployment-policy-id] %s ",
- deployementPolicyDefinitionBean.getId()));
+ deploymentPolicyDefinitionBean.getId()));
}
org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy deploymentPolicy =
- ObjectConverter.convertDeploymentPolicyBeanToASDeploymentPolicy(deployementPolicyDefinitionBean);
+ ObjectConverter.convertDeploymentPolicyBeanToASDeploymentPolicy(deploymentPolicyDefinitionBean);
AutoscalerServiceClient.getInstance().addDeploymentPolicy(deploymentPolicy);
if (log.isDebugEnabled()) {
- log.debug(String.format("Successfully added deploymentPolicy: [deployment-policy-id] %s ",
- deployementPolicyDefinitionBean.getId()));
+ log.debug(String.format("Successfully added deploymentPolicy: [deployment-policy-uuid] %s " +
+ "[deployment-policy-id] %s", deploymentPolicyDefinitionBean.getUuid(),
+ deploymentPolicyDefinitionBean.getId()));
}
} catch (RemoteException e) {
String msg = e.getMessage();
@@ -2879,7 +2880,7 @@ public class StratosApiV41Utils {
* @param deploymentPolicyId deployment policy id
* @return {@link DeploymentPolicyBean}
*/
- public static DeploymentPolicyBean getDeployementPolicy(String deploymentPolicyId) throws RestAPIException {
+ public static DeploymentPolicyBean getDeploymentPolicy(String deploymentPolicyId) throws RestAPIException {
DeploymentPolicyBean deploymentPolicyBean;
try {
@@ -2888,10 +2889,10 @@ public class StratosApiV41Utils {
DeploymentPolicy deploymentPolicy = null;
PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext();
- List<DeploymentPolicy> deploymentPoliciesForTenant = new ArrayList<DeploymentPolicy>();
+ // List<DeploymentPolicy> deploymentPoliciesForTenant = new ArrayList<DeploymentPolicy>();
for (DeploymentPolicy deploymentPolicy1 : deploymentPolicies) {
if (carbonContext.getTenantId() == deploymentPolicy1.getTenantId()) {
- deploymentPoliciesForTenant.add(deploymentPolicy1);
+ //deploymentPoliciesForTenant.add(deploymentPolicy1);
if (deploymentPolicy1.getId().equals(deploymentPolicyId)) {
deploymentPolicy = deploymentPolicy1;
}
@@ -2917,7 +2918,7 @@ public class StratosApiV41Utils {
*
* @return array of {@link DeploymentPolicyBean}
*/
- public static DeploymentPolicyBean[] getDeployementPolicies() throws RestAPIException {
+ public static DeploymentPolicyBean[] getDeploymentPolicies() throws RestAPIException {
try {
org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy[] deploymentPolicies
= AutoscalerServiceClient.getInstance().getDeploymentPolicies();
@@ -2945,7 +2946,7 @@ public class StratosApiV41Utils {
}
/**
- * Update deployement policy
+ * Update deployment policy
*
* @param deploymentPolicyDefinitionBean DeploymentPolicyBean
* @throws RestAPIException
@@ -2956,7 +2957,8 @@ public class StratosApiV41Utils {
AutoscalerServiceDeploymentPolicyNotExistsExceptionException {
try {
if (log.isDebugEnabled()) {
- log.debug(String.format("Updating deployment policy: [deployment-policy-id] %s ",
+ log.debug(String.format("Updating deployment policy: [deployment-policy-uuid] %s " +
+ "[deployment-policy-id] %s ", deploymentPolicyDefinitionBean.getUuid(),
deploymentPolicyDefinitionBean.getId()));
}
@@ -2966,7 +2968,8 @@ public class StratosApiV41Utils {
AutoscalerServiceClient.getInstance().updateDeploymentPolicy(deploymentPolicy);
if (log.isDebugEnabled()) {
- log.debug(String.format("DeploymentPolicy updated successfully : [deployment-policy-id] %s ",
+ log.debug(String.format("DeploymentPolicy updated successfully : [deployment-policy-uuid] %s " +
+ "[deployment-policy-id] %s ", deploymentPolicyDefinitionBean.getUuid(),
deploymentPolicyDefinitionBean.getId()));
}
} catch (RemoteException e) {
@@ -2990,14 +2993,18 @@ public class StratosApiV41Utils {
/**
* Remove deployment policy
*
- * @param deploymentPolicyID Deployment policy ID
+ * @param deploymentPolicyId Deployment policy Id
* @throws RestAPIException
*/
- public static void removeDeploymentPolicy(String deploymentPolicyID)
+ public static void removeDeploymentPolicy(String deploymentPolicyId)
throws RestAPIException, AutoscalerServiceDeploymentPolicyNotExistsExceptionException,
AutoscalerServiceUnremovablePolicyExceptionException {
+
+ DeploymentPolicyBean deploymentPolicyBean;
try {
- AutoscalerServiceClient.getInstance().removeDeploymentPolicy(deploymentPolicyID);
+ deploymentPolicyBean = getDeploymentPolicy(deploymentPolicyId);
+ AutoscalerServiceClient.getInstance().removeDeploymentPolicy(deploymentPolicyBean.getUuid());
+
} catch (RemoteException e) {
String msg = "Could not remove deployment policy " + e.getLocalizedMessage();
log.error(msg, e);
[19/24] stratos git commit: modifying network partitions to use uuid
Posted by ga...@apache.org.
modifying network partitions to use uuid
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/3402fba9
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/3402fba9
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/3402fba9
Branch: refs/heads/tenant-isolation
Commit: 3402fba99be9a2cbe609611b7a2ef975e88712c3
Parents: 96545c5
Author: Dinithi <di...@wso2.com>
Authored: Mon Jul 6 10:08:53 2015 +0530
Committer: Dinithi <di...@wso2.com>
Committed: Mon Jul 6 10:08:53 2015 +0530
----------------------------------------------------------------------
.../context/cluster/ClusterContext.java | 8 ++++----
.../autoscaler/monitor/MonitorFactory.java | 6 ++----
.../monitor/component/GroupMonitor.java | 5 ++---
.../policy/deployment/DeploymentPolicy.java | 2 +-
.../services/impl/AutoscalerServiceImpl.java | 21 +++++++++++++-------
.../stratos/autoscaler/util/AutoscalerUtil.java | 6 +++---
.../context/CloudControllerContext.java | 2 +-
.../NetworkPartitionReferenceBean.java | 9 +++++++++
.../common/partition/NetworkPartitionRef.java | 9 +++++++++
.../util/converter/ObjectConverter.java | 1 +
10 files changed, 46 insertions(+), 23 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/3402fba9/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContext.java
index f7f2fc6..c090804 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContext.java
@@ -129,7 +129,7 @@ public class ClusterContext extends AbstractClusterContext {
NetworkPartitionRef networkPartition = null;
if (networkPartitions != null && networkPartitions.length != 0) {
for (NetworkPartitionRef i : networkPartitions) {
- if (i.getId().equals(clusterInstance.getNetworkPartitionId())) {
+ if (i.getUuid().equals(clusterInstance.getNetworkPartitionId())) {
networkPartition = i;
}
}
@@ -140,7 +140,7 @@ public class ClusterContext extends AbstractClusterContext {
networkPartitionContext = new ClusterLevelNetworkPartitionContext(
clusterInstance.getNetworkPartitionId());
} else {
- networkPartitionContext = new ClusterLevelNetworkPartitionContext(networkPartition.getId(),
+ networkPartitionContext = new ClusterLevelNetworkPartitionContext(networkPartition.getUuid(),
networkPartition.getPartitionAlgo(), 0);
}
}
@@ -185,7 +185,7 @@ public class ClusterContext extends AbstractClusterContext {
PartitionRef[] partitions = null;
if (networkPartitions != null && networkPartitions.length != 0) {
for (NetworkPartitionRef networkPartitionRef : networkPartitions) {
- if (networkPartitionRef.getId().equals(
+ if (networkPartitionRef.getUuid().equals(
clusterLevelNetworkPartitionContext.getId())) {
partitions = networkPartitionRef.getPartitionRefs();
}
@@ -204,7 +204,7 @@ public class ClusterContext extends AbstractClusterContext {
NetworkPartitionRef networkPartitionRef = null;
if (networkPartitions != null && networkPartitions.length != 0) {
for (NetworkPartitionRef networkPartition2 : networkPartitions) {
- if (networkPartition2.getId().equals(
+ if (networkPartition2.getUuid().equals(
clusterInstance.getNetworkPartitionId())) {
networkPartitionRef = networkPartition2;
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/3402fba9/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java
index 0ceac21..ea04ab9 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java
@@ -42,8 +42,6 @@ import org.apache.stratos.common.partition.PartitionRef;
import org.apache.stratos.messaging.domain.application.Application;
import org.apache.stratos.messaging.domain.application.Group;
import org.apache.stratos.messaging.domain.application.ScalingDependentList;
-import org.apache.stratos.messaging.domain.instance.ClusterInstance;
-import org.apache.stratos.messaging.domain.instance.GroupInstance;
import org.apache.stratos.messaging.domain.instance.Instance;
import org.apache.stratos.messaging.domain.topology.Cluster;
import org.apache.stratos.messaging.domain.topology.Service;
@@ -266,11 +264,11 @@ public class MonitorFactory {
CloudControllerServiceClient.getInstance().
validateNetworkPartitionOfDeploymentPolicy(serviceName,
- networkPartitionRef.getId());
+ networkPartitionRef.getUuid());
} catch (Exception e) {
String msg = String.format("Error while validating deployment policy " +
"from cloud controller [network-partition-id] %s",
- networkPartitionRef.getId());
+ networkPartitionRef.getUuid());
log.error(msg, e);
throw new RuntimeException(msg, e);
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/3402fba9/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java
index 7ef8ce4..2c7383c 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java
@@ -22,7 +22,6 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.stratos.autoscaler.algorithms.PartitionAlgorithm;
import org.apache.stratos.autoscaler.applications.ApplicationHolder;
-import org.apache.stratos.autoscaler.applications.dependency.context.ApplicationChildContext;
import org.apache.stratos.autoscaler.applications.topic.ApplicationBuilder;
import org.apache.stratos.autoscaler.context.AutoscalerContext;
import org.apache.stratos.autoscaler.context.InstanceContext;
@@ -704,7 +703,7 @@ public class GroupMonitor extends ParentComponentMonitor {
NetworkPartitionRef[] networkPartitions = deploymentPolicy.getNetworkPartitionRefs();
NetworkPartitionRef networkPartition = null;
for (NetworkPartitionRef networkPartition1 : networkPartitions) {
- if (networkPartition1.getId().equals(networkPartitionId)) {
+ if (networkPartition1.getUuid().equals(networkPartitionId)) {
networkPartition = networkPartition1;
}
}
@@ -764,7 +763,7 @@ public class GroupMonitor extends ParentComponentMonitor {
NetworkPartitionRef networkPartitionRef = null;
if (networkPartitions != null && networkPartitions.length != 0) {
for (NetworkPartitionRef i : networkPartitions) {
- if (i.getId().equals(networkPartitionId)) {
+ if (i.getUuid().equals(networkPartitionId)) {
networkPartitionRef = i;
}
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/3402fba9/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/DeploymentPolicy.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/DeploymentPolicy.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/DeploymentPolicy.java
index c28b300..8c33ee7 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/DeploymentPolicy.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/DeploymentPolicy.java
@@ -96,7 +96,7 @@ public class DeploymentPolicy implements Serializable {
public PartitionRef[] getPartitionsByNetworkPartitionId(String networkPartitionId) {
if (networkPartitionRefs != null) {
for (NetworkPartitionRef networkPartitionRef : networkPartitionRefs) {
- if (networkPartitionRef.getId().equals(networkPartitionId)) {
+ if (networkPartitionRef.getUuid().equals(networkPartitionId)) {
return networkPartitionRef.getPartitionRefs();
}
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/3402fba9/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
index 960dc29..eeede04 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
@@ -1124,12 +1124,19 @@ public class AutoscalerServiceImpl implements AutoscalerService {
}
// network partitions should be already added
- NetworkPartition networkPartition = CloudControllerServiceClient.getInstance()
- .getNetworkPartition(networkPartitionId);
+ NetworkPartition[] networkPartitions = CloudControllerServiceClient.getInstance().getNetworkPartitions();
+ NetworkPartition networkPartitionForTenant = null;
+ if (networkPartitions != null) {
+ for (NetworkPartition networkPartition : networkPartitions) {
+ if (deploymentPolicy.getTenantId() == networkPartition.getTenantId()) {
+ networkPartitionForTenant = networkPartition;
+ }
+ }
+ }
- if (networkPartition == null || (deploymentPolicy.getTenantId() != networkPartition.getTenantId())) {
+ if (networkPartitionForTenant == null) {
String msg = String.format("Network partition is not found: [deployment-policy-uuid] %s " +
- "[deployment-policy-id] %s [network-partition-id] %s", deploymentPolicyUuid,
+ "[deployment-policy-id] %s [network-partition-id] %s", deploymentPolicyUuid,
deploymentPolicyId, networkPartitionId);
log.error(msg);
throw new InvalidDeploymentPolicyException(msg);
@@ -1140,7 +1147,7 @@ public class AutoscalerServiceImpl implements AutoscalerService {
String partitionId = partitionRef.getId();
boolean isPartitionFound = false;
- for (Partition partition : networkPartition.getPartitions()) {
+ for (Partition partition : networkPartitionForTenant.getPartitions()) {
if (partition.getId().equals(partitionId)) {
isPartitionFound = true;
}
@@ -1223,7 +1230,7 @@ public class AutoscalerServiceImpl implements AutoscalerService {
if (deploymentPolicy.getUuid().equals(clusterMonitor.getDeploymentPolicyId())) {
for (NetworkPartitionRef networkPartition : deploymentPolicy.getNetworkPartitionRefs()) {
ClusterLevelNetworkPartitionContext clusterLevelNetworkPartitionContext
- = clusterMonitor.getClusterContext().getNetworkPartitionCtxt(networkPartition.getId());
+ = clusterMonitor.getClusterContext().getNetworkPartitionCtxt(networkPartition.getUuid());
try {
addNewPartitionsToClusterMonitor(clusterLevelNetworkPartitionContext, networkPartition,
@@ -1303,7 +1310,7 @@ public class AutoscalerServiceImpl implements AutoscalerService {
//It has found that this partition which is in deployment policy/network partition is new
ClusterLevelPartitionContext clusterLevelPartitionContext = new ClusterLevelPartitionContext(
- partition, networkPartitionRef.getId(), deploymentPolicyID);
+ partition, networkPartitionRef.getUuid(), deploymentPolicyID);
validationOfNetworkPartitionRequired = true;
clusterInstanceContext.addPartitionCtxt(clusterLevelPartitionContext);
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/3402fba9/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
index 8efdd1c..155d687 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
@@ -402,8 +402,8 @@ public class AutoscalerUtil {
if (deploymentPolicy != null) {
for (NetworkPartitionRef networkPartition : deploymentPolicy.getNetworkPartitionRefs()) {
if (networkPartition != null) {
- if (!networkPartitionIds.contains(networkPartition.getId())) {
- networkPartitionIds.add(networkPartition.getId());
+ if (!networkPartitionIds.contains(networkPartition.getUuid())) {
+ networkPartitionIds.add(networkPartition.getUuid());
}
}
}
@@ -770,7 +770,7 @@ public class AutoscalerUtil {
if (deploymentPolicyInApp != null) {
for (NetworkPartitionRef networkPartitionOfDeploymentPolicy : deploymentPolicyInApp.getNetworkPartitionRefs()) {
if (networkPartitionOfDeploymentPolicy != null) {
- if (networkPartitionOfDeploymentPolicy != null && networkPartitionOfDeploymentPolicy.getId().
+ if (networkPartitionOfDeploymentPolicy != null && networkPartitionOfDeploymentPolicy.getUuid().
equals(networkPartitionId)) {
referencesOfNetworkPartition++;
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/3402fba9/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/context/CloudControllerContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/context/CloudControllerContext.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/context/CloudControllerContext.java
index 708a24b..b223167 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/context/CloudControllerContext.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/context/CloudControllerContext.java
@@ -287,7 +287,7 @@ public class CloudControllerContext implements Serializable {
}
public void addNetworkPartition(NetworkPartition networkPartition) {
- networkPartitionIDToNetworkPartitionMap.put(networkPartition.getId(), networkPartition);
+ networkPartitionIDToNetworkPartitionMap.put(networkPartition.getUuid(), networkPartition);
}
public NetworkPartition getNetworkPartition(String networkPartitionID) {
http://git-wip-us.apache.org/repos/asf/stratos/blob/3402fba9/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/partition/NetworkPartitionReferenceBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/partition/NetworkPartitionReferenceBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/partition/NetworkPartitionReferenceBean.java
index c593ee4..4aa587d 100644
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/partition/NetworkPartitionReferenceBean.java
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/partition/NetworkPartitionReferenceBean.java
@@ -26,6 +26,7 @@ import java.util.List;
public class NetworkPartitionReferenceBean {
private String id;
+ private String uuid;
private String provider;
private List<PartitionReferenceBean> partitions;
private String partitionAlgo;
@@ -38,6 +39,14 @@ public class NetworkPartitionReferenceBean {
this.id = id;
}
+ public String getUuid() {
+ return uuid;
+ }
+
+ public void setUuid(String uuid) {
+ this.uuid = uuid;
+ }
+
public List<PartitionReferenceBean> getPartitions() {
return partitions;
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/3402fba9/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/partition/NetworkPartitionRef.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/partition/NetworkPartitionRef.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/partition/NetworkPartitionRef.java
index 00df0a5..d801ace 100644
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/partition/NetworkPartitionRef.java
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/partition/NetworkPartitionRef.java
@@ -30,6 +30,7 @@ public class NetworkPartitionRef implements Serializable {
private static final long serialVersionUID = -8043298009352097370L;
private String id;
+ private String uuid;
private PartitionRef[] partitionRefs;
private String partitionAlgo;
@@ -65,6 +66,14 @@ public class NetworkPartitionRef implements Serializable {
this.id = id;
}
+ public String getUuid() {
+ return uuid;
+ }
+
+ public void setUuid(String uuid) {
+ this.uuid = uuid;
+ }
+
public PartitionRef getPartitionRef(String partitionId) {
for (PartitionRef partitionRef : partitionRefs) {
if (partitionRef.getId().equals(partitionId)) {
http://git-wip-us.apache.org/repos/asf/stratos/blob/3402fba9/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 139c5be..9c00e21 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
@@ -2129,6 +2129,7 @@ public class ObjectConverter {
for (NetworkPartitionReferenceBean networkPartitionReferenceBean : networkPartitionReferenceBeans) {
NetworkPartitionRef networkPartitionRef = new NetworkPartitionRef();
networkPartitionRef.setId(networkPartitionReferenceBean.getId());
+ networkPartitionRef.setUuid(networkPartitionReferenceBean.getUuid());
networkPartitionRef.setPartitionAlgo(networkPartitionReferenceBean.getPartitionAlgo());
if (networkPartitionReferenceBean.getPartitions() != null) {
networkPartitionRef.setPartitionRefs(convertToASStubPartitions(
[02/24] stratos git commit: Tenant Isolation - Network Partition
Posted by ga...@apache.org.
Tenant Isolation - Network Partition
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/d106e8f4
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/d106e8f4
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/d106e8f4
Branch: refs/heads/tenant-isolation
Commit: d106e8f47de393269f5d0c0738d4807dd9e3b18e
Parents: f5c4c8e
Author: Dinithi <di...@wso2.com>
Authored: Thu Jun 25 15:21:14 2015 +0530
Committer: Dinithi <di...@wso2.com>
Committed: Thu Jun 25 15:21:14 2015 +0530
----------------------------------------------------------------------
.../controller/domain/NetworkPartition.java | 36 +-
.../impl/CloudControllerServiceImpl.java | 26 +-
.../beans/partition/NetworkPartitionBean.java | 18 +
.../default/configure/network-partitions.json | 1 +
.../schema/configure/network-partitions.json | 7 +-
.../themes/theme0/partials/configure_form.hbs | 4 +
.../rest/endpoint/api/StratosApiV41.java | 8 +-
.../rest/endpoint/api/StratosApiV41Utils.java | 21 +-
.../util/converter/ObjectConverter.java | 4 +
.../main/resources/CloudControllerService.wsdl | 1020 +++++++++---------
10 files changed, 613 insertions(+), 532 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/d106e8f4/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/NetworkPartition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/NetworkPartition.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/NetworkPartition.java
index 85b6179..8ac69f4 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/NetworkPartition.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/NetworkPartition.java
@@ -32,13 +32,37 @@ public class NetworkPartition implements Serializable {
private static final long serialVersionUID = -8043298009352097370L;
+ private String uuid;
private String id;
+ private int tenantId;
private String provider;
private boolean activeByDefault;
private Partition[] partitions;
private String partitionAlgo;
private Properties properties;
+ /**
+ * Gets the local Id of the network partition.
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * Sets the local Id of the network partition.
+ */
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public int getTenantId() {
+ return tenantId;
+ }
+
+ public void setTenantId(int tenantId) {
+ this.tenantId = tenantId;
+ }
+
public void setPartitions(Partition[] partitions) {
if (partitions == null) {
this.partitions = partitions;
@@ -58,17 +82,17 @@ public class NetworkPartition implements Serializable {
}
/**
- * Gets the value of the id.
+ * Gets the global Id network partition
*/
- public String getId() {
- return id;
+ public String getUuid() {
+ return uuid;
}
/**
- * sets the value of the id.
+ * Sets the global Id network partition
*/
- public void setId(String id) {
- this.id = id;
+ public void setUuid(String uuid) {
+ this.uuid = uuid;
}
public boolean isActiveByDefault() {
http://git-wip-us.apache.org/repos/asf/stratos/blob/d106e8f4/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 4d51cc1..801f41e 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
@@ -1453,13 +1453,13 @@ public class CloudControllerServiceImpl implements CloudControllerService {
InvalidNetworkPartitionException {
handleNullObject(networkPartition, "Network Partition is null");
- handleNullObject(networkPartition.getId(), "Network Partition ID is null");
+ handleNullObject(networkPartition.getUuid(), "Network Partition ID is null");
if (log.isInfoEnabled()) {
- log.info(String.format("Adding network partition: [network-partition-id] %s", networkPartition.getId()));
+ log.info(String.format("Adding network partition: [network-partition-id] %s", networkPartition.getUuid()));
}
- String networkPartitionID = networkPartition.getId();
+ String networkPartitionID = networkPartition.getUuid();
if (cloudControllerContext.getNetworkPartition(networkPartitionID) != null) {
String message = "Network partition already exists: [network-partition-id] " + networkPartitionID;
log.error(message);
@@ -1471,7 +1471,7 @@ public class CloudControllerServiceImpl implements CloudControllerService {
if (partition != null) {
if (log.isInfoEnabled()) {
log.info(String.format("Validating partition: [network-partition-id] %s [partition-id] %s",
- networkPartition.getId(), partition.getId()));
+ networkPartition.getUuid(), partition.getId()));
}
// Overwrites partition provider with network partition provider
partition.setProvider(networkPartition.getProvider());
@@ -1481,18 +1481,18 @@ public class CloudControllerServiceImpl implements CloudControllerService {
//Following message is shown to the end user in all the the API clients(GUI/CLI/Rest API)
throw new InvalidNetworkPartitionException(String.format("Network partition " +
" %s, is invalid since the partition %s is invalid",
- networkPartition.getId(), partition.getId()), e);
+ networkPartition.getUuid(), partition.getId()), e);
}
if (log.isInfoEnabled()) {
log.info(String.format("Partition validated successfully: [network-partition-id] %s " +
- "[partition-id] %s", networkPartition.getId(), partition.getId()));
+ "[partition-id] %s", networkPartition.getUuid(), partition.getId()));
}
}
}
} else {
//Following message is shown to the end user in all the the API clients(GUI/CLI/Rest API)
throw new InvalidNetworkPartitionException(String.format("Network partition: " +
- "%s doesn't not have any partitions ", networkPartition.getId()));
+ "%s doesn't not have any partitions ", networkPartition.getUuid()));
}
// adding network partition to CC-Context
@@ -1501,7 +1501,7 @@ public class CloudControllerServiceImpl implements CloudControllerService {
CloudControllerContext.getInstance().persist();
if (log.isInfoEnabled()) {
log.info(String.format("Network partition added successfully: [network-partition-id] %s",
- networkPartition.getId()));
+ networkPartition.getUuid()));
}
return true;
}
@@ -1540,10 +1540,10 @@ public class CloudControllerServiceImpl implements CloudControllerService {
public boolean updateNetworkPartition(NetworkPartition networkPartition) throws NetworkPartitionNotExistsException {
try {
handleNullObject(networkPartition, "Network Partition is null");
- handleNullObject(networkPartition.getId(), "Network Partition ID is null");
+ handleNullObject(networkPartition.getUuid(), "Network Partition ID is null");
if (log.isInfoEnabled()) {
- log.info(String.format("Updating network partition: [network-partition-id] %s", networkPartition.getId()));
+ log.info(String.format("Updating network partition: [network-partition-id] %s", networkPartition.getUuid()));
}
String networkPartitionID = networkPartition.getId();
@@ -1558,14 +1558,14 @@ public class CloudControllerServiceImpl implements CloudControllerService {
if (partition != null) {
if (log.isInfoEnabled()) {
log.info(String.format("Validating partition: [network-partition-id] %s [partition-id] %s",
- networkPartition.getId(), partition.getId()));
+ networkPartition.getUuid(), partition.getId()));
}
// Overwrites partition provider with network partition provider
partition.setProvider(networkPartition.getProvider());
validatePartition(partition);
if (log.isInfoEnabled()) {
log.info(String.format("Partition validated successfully: [network-partition-id] %s " +
- "[partition-id] %s", networkPartition.getId(), partition.getId()));
+ "[partition-id] %s", networkPartition.getUuid(), partition.getId()));
}
}
}
@@ -1577,7 +1577,7 @@ public class CloudControllerServiceImpl implements CloudControllerService {
CloudControllerContext.getInstance().persist();
if (log.isInfoEnabled()) {
log.info(String.format("Network partition updated successfully: [network-partition-id] %s",
- networkPartition.getId()));
+ networkPartition.getUuid()));
}
return true;
} catch (Exception e) {
http://git-wip-us.apache.org/repos/asf/stratos/blob/d106e8f4/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/partition/NetworkPartitionBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/partition/NetworkPartitionBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/partition/NetworkPartitionBean.java
index 3a31903..fe9305d 100644
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/partition/NetworkPartitionBean.java
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/partition/NetworkPartitionBean.java
@@ -27,11 +27,29 @@ import java.util.List;
@XmlRootElement
public class NetworkPartitionBean {
+ private String uuid;
+ private int tenantId;
private String id;
private String provider;
private List<PartitionBean> partitions;
private List<PropertyBean> properties;
+ public int getTenantId() {
+ return tenantId;
+ }
+
+ public void setTenantId(int tenantId) {
+ this.tenantId = tenantId;
+ }
+
+ public String getUuid() {
+ return uuid;
+ }
+
+ public void setUuid(String uuid) {
+ this.uuid = uuid;
+ }
+
public String getId() {
return id;
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/d106e8f4/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/network-partitions.json
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/network-partitions.json b/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/network-partitions.json
index 0ad6424..70f2899 100644
--- a/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/network-partitions.json
+++ b/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/network-partitions.json
@@ -1,4 +1,5 @@
{
+ "uuid": "",
"id": "network-partition-1",
"provider": "mock",
"partitions": [
http://git-wip-us.apache.org/repos/asf/stratos/blob/d106e8f4/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/network-partitions.json
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/network-partitions.json b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/network-partitions.json
index 22d781a..85bcfab 100644
--- a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/network-partitions.json
+++ b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/network-partitions.json
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
- "id": "root",
+ "uuid": "root",
"type": "object",
"title": "Network Partition Definition",
"name": "Network Partition Policy",
@@ -9,6 +9,11 @@
"disable_collapse": true
},
"properties": {
+ "uuid": {
+ "id": "root/uuid",
+ "type": "string",
+ "title": "UUID"
+ },
"id": {
"id": "root/id",
"type": "string",
http://git-wip-us.apache.org/repos/asf/stratos/blob/d106e8f4/components/org.apache.stratos.manager.console/console/themes/theme0/partials/configure_form.hbs
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme0/partials/configure_form.hbs b/components/org.apache.stratos.manager.console/console/themes/theme0/partials/configure_form.hbs
index 2071a60..36d4893 100644
--- a/components/org.apache.stratos.manager.console/console/themes/theme0/partials/configure_form.hbs
+++ b/components/org.apache.stratos.manager.console/console/themes/theme0/partials/configure_form.hbs
@@ -434,6 +434,10 @@ $(document).ready(function () {
}else if(editor.getEditor('root.type')){
editor.getEditor('root.type').disable();
}
+
+ if(editor.getEditor('root.uuid')){
+ editor.getEditor('root.uuid').disable();
+ }
{{/if}}
// Hook up the validation indicator to update its
http://git-wip-us.apache.org/repos/asf/stratos/blob/d106e8f4/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 9712980..8075e50 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
@@ -63,6 +63,7 @@ import java.net.URI;
import java.rmi.RemoteException;
import java.util.ArrayList;
import java.util.List;
+import java.util.UUID;
/**
* Stratos API v4.1 for Stratos 4.1.0 release.
@@ -611,6 +612,11 @@ public class StratosApiV41 extends AbstractApi {
public Response addNetworkPartition(
NetworkPartitionBean networkPartitionBean) throws RestAPIException {
String networkPartitionId = networkPartitionBean.getId();
+ networkPartitionBean.setUuid(UUID.randomUUID().toString());
+
+ PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext();
+ networkPartitionBean.setTenantId(carbonContext.getTenantId());
+
try {
StratosApiV41Utils.addNetworkPartition(networkPartitionBean);
} catch (CloudControllerServiceNetworkPartitionAlreadyExistsExceptionException e) {
@@ -627,7 +633,7 @@ public class StratosApiV41 extends AbstractApi {
}
URI url = uriInfo.getAbsolutePathBuilder().path(networkPartitionId).build();
return Response.created(url).entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,
- String.format("Network partition added successfully: [network-partition] %s", networkPartitionId)))
+ String.format("Network partition added successfully: [network-partition-uuid] %s", networkPartitionId)))
.build();
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/d106e8f4/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 0d685bf..5b12e59 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
@@ -30,6 +30,7 @@ import org.apache.stratos.autoscaler.stub.pojo.ApplicationContext;
import org.apache.stratos.autoscaler.stub.pojo.ServiceGroup;
import org.apache.stratos.cloud.controller.stub.*;
import org.apache.stratos.cloud.controller.stub.domain.Cartridge;
+import org.apache.stratos.cloud.controller.stub.domain.NetworkPartition;
import org.apache.stratos.common.beans.IaasProviderInfoBean;
import org.apache.stratos.common.beans.PropertyBean;
import org.apache.stratos.common.beans.TenantInfoBean;
@@ -2521,7 +2522,7 @@ public class StratosApiV41Utils {
}
if (!application.isMultiTenant()) {
- throw new RestAPIException("Application singups not available for single-tenant applications");
+ throw new RestAPIException("Application signups not available for single-tenant applications");
}
int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId();
@@ -2695,7 +2696,23 @@ public class StratosApiV41Utils {
CloudControllerServiceClient serviceClient = CloudControllerServiceClient.getInstance();
org.apache.stratos.cloud.controller.stub.domain.NetworkPartition[] networkPartitions =
serviceClient.getNetworkPartitions();
- return ObjectConverter.convertCCStubNetworkPartitionsToNetworkPartitions(networkPartitions);
+
+ NetworkPartition[] networkPartitionsForTenantArray = new NetworkPartition[0];
+
+ if (networkPartitions != null) {
+ PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext();
+ List<NetworkPartition> networkPartitionsForTenant = new ArrayList<NetworkPartition>();
+ for (NetworkPartition networkPartition : networkPartitions) {
+ if (carbonContext.getTenantId() == networkPartition.getTenantId()) {
+ networkPartitionsForTenant.add(networkPartition);
+ }
+ }
+ if (networkPartitionsForTenant.size() != 0) {
+ networkPartitionsForTenantArray = networkPartitionsForTenant.toArray(new
+ NetworkPartition[networkPartitionsForTenant.size()]);
+ }
+ }
+ return ObjectConverter.convertCCStubNetworkPartitionsToNetworkPartitions(networkPartitionsForTenantArray);
} catch (RemoteException e) {
String message = e.getMessage();
log.error(message);
http://git-wip-us.apache.org/repos/asf/stratos/blob/d106e8f4/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 035c32d..5f4b3d9 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
@@ -452,7 +452,9 @@ 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()) {
@@ -585,6 +587,8 @@ public class ObjectConverter {
= 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());
if (networkPartitionBean.getPartitions() != null && !networkPartitionBean.getPartitions().isEmpty()) {
networkPartition.setPartitions(convertToStubPartitions(networkPartitionBean.getPartitions()));
}
[12/24] stratos git commit: Modifying log messages to display uuid
Posted by ga...@apache.org.
Modifying log messages to display uuid
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/70da581c
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/70da581c
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/70da581c
Branch: refs/heads/tenant-isolation
Commit: 70da581c39ca64aa195185ced3bba3e54b23a551
Parents: 3accca7
Author: Dinithi <di...@wso2.com>
Authored: Mon Jun 29 18:29:41 2015 +0530
Committer: Dinithi <di...@wso2.com>
Committed: Mon Jun 29 18:29:41 2015 +0530
----------------------------------------------------------------------
.../org/apache/stratos/rest/endpoint/api/StratosApiV41.java | 5 +++--
.../apache/stratos/rest/endpoint/api/StratosApiV41Utils.java | 6 +++---
2 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/70da581c/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 08005c6..b5e5bc0 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
@@ -1432,7 +1432,8 @@ public class StratosApiV41 extends AbstractApi {
ResponseMessageBean.ERROR, "Autoscaling policy is invalid")).build();
}
return Response.ok().entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,
- String.format("Autoscaling policy updated successfully: [autoscale-policy] %s",
+ String.format("Autoscaling policy updated successfully: [autoscale-policy-uuid] %s " +
+ "[autoscale-policy-id] %s", autoscalePolicy.getUuid(),
autoscalePolicy.getId()))).build();
}
@@ -1461,7 +1462,7 @@ public class StratosApiV41 extends AbstractApi {
ResponseMessageBean.ERROR, "Autoscaling policy not found")).build();
}
return Response.ok().entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,
- String.format("Autoscaling policy deleted successfully: [autoscale-policy] %s",
+ String.format("Autoscaling policy deleted successfully: [autoscale-policy-id] %s",
autoscalingPolicyId))).build();
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/70da581c/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 20929bb..674aab3 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
@@ -847,7 +847,7 @@ public class StratosApiV41Utils {
AutoscalerServicePolicyDoesNotExistExceptionException,
AutoscalerServiceUnremovablePolicyExceptionException {
- log.info(String.format("Removing autoscaling policy: [id] %s", autoscalePolicyId));
+ log.info(String.format("Removing autoscaling policy: [autoscaling-policy-id] %s", autoscalePolicyId));
AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
if (autoscalerServiceClient != null) {
@@ -926,8 +926,8 @@ public class StratosApiV41Utils {
}
autoscalePolicyBean = ObjectConverter.convertStubAutoscalePolicyToAutoscalePolicy(autoscalePolicy);
} catch (RemoteException e) {
- String errorMsg = "Error while getting information for autoscaling policy with id " +
- autoscalePolicyId + ". Cause: " + e.getMessage();
+ String errorMsg = "Error while getting information for autoscaling policy with id " + autoscalePolicyId +
+ ". Cause: " + e.getMessage();
log.error(errorMsg, e);
throw new RestAPIException(errorMsg, e);
}
[03/24] stratos git commit: Merge branch 'master' of
https://github.com/apache/stratos into tenant-isolation-v1
Posted by ga...@apache.org.
Merge branch 'master' of https://github.com/apache/stratos into tenant-isolation-v1
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/c77bc81e
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/c77bc81e
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/c77bc81e
Branch: refs/heads/tenant-isolation
Commit: c77bc81ed0df3741c1d593d969064799734774de
Parents: d106e8f 31c101f
Author: Dinithi <di...@wso2.com>
Authored: Fri Jun 26 09:09:53 2015 +0530
Committer: Dinithi <di...@wso2.com>
Committed: Fri Jun 26 09:09:53 2015 +0530
----------------------------------------------------------------------
.../applications/dependency/DependencyTree.java | 12 +-
.../AutoscalerTopologyEventReceiver.java | 28 ++--
.../monitor/component/GroupMonitor.java | 15 +-
.../component/ParentComponentMonitor.java | 22 +++
.../builder/MonitorStatusEventBuilder.java | 37 -----
.../services/impl/AutoscalerServiceImpl.java | 141 ++++++++++++-------
.../stratos/autoscaler/util/AutoscalerUtil.java | 2 +-
.../stratos/cli/RestCommandLineService.java | 3 +-
.../application/ApplicationEventReceiver.java | 23 ++-
.../messaging/topology/TopologyBuilder.java | 9 +-
.../rest/endpoint/api/StratosApiV41.java | 8 +-
11 files changed, 185 insertions(+), 115 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/c77bc81e/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
----------------------------------------------------------------------
[07/24] stratos git commit: Merge branch 'master' of
https://github.com/apache/stratos into tenant-isolation-v1
Posted by ga...@apache.org.
Merge branch 'master' of https://github.com/apache/stratos into tenant-isolation-v1
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/20787782
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/20787782
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/20787782
Branch: refs/heads/tenant-isolation
Commit: 20787782c8aad6023782b7713e32b51bab8b6880
Parents: 829e333 a42e84d
Author: Dinithi <di...@wso2.com>
Authored: Sat Jun 27 10:57:25 2015 +0530
Committer: Dinithi <di...@wso2.com>
Committed: Sat Jun 27 10:57:25 2015 +0530
----------------------------------------------------------------------
.../cloud/controller/context/CloudControllerContext.java | 8 ++++++--
.../autoscaler/service/axiom/CloudControllerContextTest.java | 2 +-
.../rest/endpoint/util/converter/ObjectConverter.java | 1 +
3 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/20787782/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/ObjectConverter.java
----------------------------------------------------------------------
[10/24] stratos git commit: Tenant isolation - Autoscaling Policies
Posted by ga...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/3accca72/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl
----------------------------------------------------------------------
diff --git a/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl b/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl
index ad14ba5..fb40b3d 100644
--- a/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl
+++ b/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ax29="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ns="http://impl.services.autoscaler.stratos.apache.org" xmlns:ax25="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax26="http://common.stratos.apache.org/xsd" xmlns:ax23="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax21="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax214="http://partition.common.stratos.apache.org/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax220="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax213="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax223="http://rmi.java/xsd" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ax211="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd"
xmlns:ax224="http://io.java/xsd" 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.autoscaler.stratos.apache.org">
+<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns="http://impl.services.autoscaler.stratos.apache.org" xmlns:ax27="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax28="http://common.stratos.apache.org/xsd" xmlns:ax25="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax23="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax21="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax217="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax215="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax212="http://io.java/xsd" xmlns:ax222="http://partition.common.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ax211="http://rmi.java/xsd" xmlns:ax225="http://autoscale.policy.pojo.au
toscaler.stratos.apache.org/xsd" 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.autoscaler.stratos.apache.org">
<wsdl:types>
- <xs:schema xmlns:ax225="http://io.java/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://rmi.java/xsd">
+ <xs:schema xmlns:ax213="http://io.java/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://rmi.java/xsd">
<xs:import namespace="http://io.java/xsd"/>
<xs:complexType name="RemoteException">
<xs:complexContent>
- <xs:extension base="ax224:IOException">
+ <xs:extension base="ax212:IOException">
<xs:sequence>
<xs:element minOccurs="0" name="cause" nillable="true" type="xs:anyType"/>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
@@ -21,8 +21,9 @@
<xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="instanceRoundingFactor" type="xs:float"/>
<xs:element minOccurs="0" name="isPublic" type="xs:boolean"/>
- <xs:element minOccurs="0" name="loadThresholds" nillable="true" type="ax211:LoadThresholds"/>
+ <xs:element minOccurs="0" name="loadThresholds" nillable="true" type="ax225:LoadThresholds"/>
<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="LoadThresholds">
@@ -33,17 +34,17 @@
</xs:sequence>
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ax27="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd">
+ <xs:schema xmlns:ax29="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd">
<xs:import namespace="http://common.stratos.apache.org/xsd"/>
<xs:complexType name="ApplicationContext">
<xs:sequence>
<xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="components" nillable="true" type="ax25:ComponentContext"/>
+ <xs:element minOccurs="0" name="components" nillable="true" type="ax27:ComponentContext"/>
<xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="multiTenant" type="xs:boolean"/>
<xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax29:Properties"/>
<xs:element minOccurs="0" name="status" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="tenantAdminUsername" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="tenantDomain" nillable="true" type="xs:string"/>
@@ -52,10 +53,10 @@
</xs:complexType>
<xs:complexType name="ComponentContext">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="applicationClusterContexts" nillable="true" type="ax25:ApplicationClusterContext"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax25:CartridgeContext"/>
- <xs:element minOccurs="0" name="dependencyContext" nillable="true" type="ax25:DependencyContext"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax25:GroupContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="applicationClusterContexts" nillable="true" type="ax27:ApplicationClusterContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax27:CartridgeContext"/>
+ <xs:element minOccurs="0" name="dependencyContext" nillable="true" type="ax27:DependencyContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax27:GroupContext"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ApplicationClusterContext">
@@ -66,8 +67,8 @@
<xs:element maxOccurs="unbounded" minOccurs="0" name="dependencyClusterIds" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="deploymentPolicyName" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="hostName" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="persistenceContext" nillable="true" type="ax25:PersistenceContext"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"/>
+ <xs:element minOccurs="0" name="persistenceContext" nillable="true" type="ax27:PersistenceContext"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax29:Properties"/>
<xs:element minOccurs="0" name="tenantRange" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="textPayload" nillable="true" type="xs:string"/>
</xs:sequence>
@@ -75,7 +76,7 @@
<xs:complexType name="PersistenceContext">
<xs:sequence>
<xs:element minOccurs="0" name="persistenceRequired" type="xs:boolean"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax25:VolumeContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax27:VolumeContext"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="VolumeContext">
@@ -94,21 +95,21 @@
<xs:sequence>
<xs:element minOccurs="0" name="cartridgeMax" type="xs:int"/>
<xs:element minOccurs="0" name="cartridgeMin" type="xs:int"/>
- <xs:element minOccurs="0" name="subscribableInfoContext" nillable="true" type="ax25:SubscribableInfoContext"/>
+ <xs:element minOccurs="0" name="subscribableInfoContext" nillable="true" type="ax27:SubscribableInfoContext"/>
<xs:element minOccurs="0" name="type" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="SubscribableInfoContext">
<xs:sequence>
<xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="artifactRepositoryContext" nillable="true" type="ax25:ArtifactRepositoryContext"/>
+ <xs:element minOccurs="0" name="artifactRepositoryContext" nillable="true" type="ax27:ArtifactRepositoryContext"/>
<xs:element minOccurs="0" name="autoscalingPolicy" nillable="true" type="xs:string"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="dependencyAliases" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="maxMembers" type="xs:int"/>
<xs:element minOccurs="0" name="minMembers" type="xs:int"/>
- <xs:element minOccurs="0" name="persistenceContext" nillable="true" type="ax25:PersistenceContext"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"/>
+ <xs:element minOccurs="0" name="persistenceContext" nillable="true" type="ax27:PersistenceContext"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax29:Properties"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ArtifactRepositoryContext">
@@ -130,9 +131,9 @@
<xs:complexType name="GroupContext">
<xs:sequence>
<xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax25:CartridgeContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax27:CartridgeContext"/>
<xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax25:GroupContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax27:GroupContext"/>
<xs:element minOccurs="0" name="groupMaxInstances" type="xs:int"/>
<xs:element minOccurs="0" name="groupMinInstances" type="xs:int"/>
<xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
@@ -143,8 +144,8 @@
<xs:complexType name="ServiceGroup">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="cartridges" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax29:Dependencies"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="groups" nillable="true" type="ax29:ServiceGroup"/>
+ <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax21:Dependencies"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="groups" nillable="true" type="ax21:ServiceGroup"/>
<xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
@@ -156,41 +157,76 @@
</xs:sequence>
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ax28="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax24="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax217="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax22="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax218="http://common.stratos.apache.org/xsd" xmlns:ax212="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax221="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax210="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax226="http://rmi.java/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://impl.services.autoscaler.stratos.apache.org">
+ <xs:schema xmlns:ax218="http://common.stratos.apache.org/xsd" xmlns:ax224="http://partition.common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
+ <xs:import namespace="http://common.stratos.apache.org/xsd"/>
+ <xs:import namespace="http://partition.common.stratos.apache.org/xsd"/>
+ <xs:complexType name="ApplicationPolicy">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="algorithm" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitionGroups" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitions" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax28:Properties"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="DeploymentPolicy">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitionRefs" nillable="true" type="ax222:NetworkPartitionRef"/>
+ <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:schema>
+ <xs:schema xmlns:ax26="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax24="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax216="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax22="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax219="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax214="http://rmi.java/xsd" xmlns:ax221="http://common.stratos.apache.org/xsd" xmlns:ax210="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax226="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://impl.services.autoscaler.stratos.apache.org">
+ <xs:import namespace="http://pojo.autoscaler.stratos.apache.org/xsd"/>
<xs:import namespace="http://application.exception.autoscaler.stratos.apache.org/xsd"/>
<xs:import namespace="http://exception.autoscaler.stratos.apache.org/xsd"/>
<xs:import namespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd"/>
- <xs:import namespace="http://pojo.autoscaler.stratos.apache.org/xsd"/>
- <xs:import namespace="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
+ <xs:import namespace="http://rmi.java/xsd"/>
+ <xs:import namespace="http://policy.exception.autoscaler.stratos.apache.org/xsd"/>
<xs:import namespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
<xs:import namespace="http://common.stratos.apache.org/xsd"/>
- <xs:import namespace="http://policy.exception.autoscaler.stratos.apache.org/xsd"/>
- <xs:import namespace="http://rmi.java/xsd"/>
+ <xs:import namespace="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
+ <xs:element name="getServiceGroup">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getServiceGroupResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax21:ServiceGroup"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
<xs:element name="AutoscalerServiceApplicationDefinitionException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax21:ApplicationDefinitionException"/>
+ <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax23:ApplicationDefinitionException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoscalerServiceCartridgeGroupNotFoundException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="CartridgeGroupNotFoundException" nillable="true" type="ax23:CartridgeGroupNotFoundException"/>
+ <xs:element minOccurs="0" name="CartridgeGroupNotFoundException" nillable="true" type="ax25:CartridgeGroupNotFoundException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoscalerServiceCartridgeNotFoundException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="CartridgeNotFoundException" nillable="true" type="ax23:CartridgeNotFoundException"/>
+ <xs:element minOccurs="0" name="CartridgeNotFoundException" nillable="true" type="ax25:CartridgeNotFoundException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="addApplication">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax28:ApplicationContext"/>
+ <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax27:ApplicationContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -201,15 +237,17 @@
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getApplications">
+ <xs:element name="updateApplication">
<xs:complexType>
- <xs:sequence/>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax27:ApplicationContext"/>
+ </xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getApplicationsResponse">
+ <xs:element name="updateApplicationResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax28:ApplicationContext"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -223,253 +261,234 @@
<xs:element name="getApplicationResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax28:ApplicationContext"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax27:ApplicationContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroup">
+ <xs:element name="existApplication">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupResponse">
+ <xs:element name="existApplicationResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax29:ServiceGroup"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getAutoscalingPolicy">
+ <xs:element name="getApplications">
<xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="autoscalingPolicyId" nillable="true" type="xs:string"/>
- </xs:sequence>
+ <xs:sequence/>
</xs:complexType>
</xs:element>
- <xs:element name="getAutoscalingPolicyResponse">
+ <xs:element name="getApplicationsResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax212:AutoscalePolicy"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax27:ApplicationContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getDeploymentPolicy">
+ <xs:element name="deployApplication">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicyID" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="applicationPolicyId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getDeploymentPolicyResponse">
+ <xs:element name="deployApplicationResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax217:DeploymentPolicy"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceInvalidArgumentException">
+ <xs:element name="AutoscalerServiceRemoteException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax23:InvalidArgumentException"/>
+ <xs:element minOccurs="0" name="RemoteException" nillable="true" type="ax214:RemoteException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateClusterMonitor">
+ <xs:element name="AutoscalerServiceInvalidApplicationPolicyException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax26:Properties"/>
+ <xs:element minOccurs="0" name="InvalidApplicationPolicyException" nillable="true" type="ax23:InvalidApplicationPolicyException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateClusterMonitorResponse">
+ <xs:element name="AutoscalerServiceApplicationPolicyAlreadyExistsException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="ApplicationPolicyAlreadyExistsException" nillable="true" type="ax216:ApplicationPolicyAlreadyExistsException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getApplicationPolicy">
+ <xs:element name="addApplicationPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationPolicyId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax217:ApplicationPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getApplicationPolicyResponse">
+ <xs:element name="addApplicationPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax217:ApplicationPolicy"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getAutoScalingPolicies">
- <xs:complexType>
- <xs:sequence/>
- </xs:complexType>
- </xs:element>
- <xs:element name="getAutoScalingPoliciesResponse">
+ <xs:element name="getApplicationPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax212:AutoscalePolicy"/>
+ <xs:element minOccurs="0" name="applicationPolicyId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceAutoScalingPolicyAlreadyExistException">
+ <xs:element name="getApplicationPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="AutoScalingPolicyAlreadyExistException" nillable="true" type="ax23:AutoScalingPolicyAlreadyExistException"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax217:ApplicationPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addAutoScalingPolicy">
+ <xs:element name="getApplicationPolicies">
<xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax212:AutoscalePolicy"/>
- </xs:sequence>
+ <xs:sequence/>
</xs:complexType>
</xs:element>
- <xs:element name="addAutoScalingPolicyResponse">
+ <xs:element name="getApplicationPoliciesResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax217:ApplicationPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceInvalidPolicyException">
+ <xs:element name="AutoscalerServiceApplicatioinPolicyNotExistsException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax220:InvalidPolicyException"/>
+ <xs:element minOccurs="0" name="ApplicatioinPolicyNotExistsException" nillable="true" type="ax216:ApplicatioinPolicyNotExistsException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateAutoScalingPolicy">
+ <xs:element name="updateApplicationPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax212:AutoscalePolicy"/>
+ <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax217:ApplicationPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateAutoScalingPolicyResponse">
+ <xs:element name="updateApplicationPolicyResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceUnremovablePolicyException">
+ <xs:element name="AutoscalerServiceInvalidPolicyException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="UnremovablePolicyException" nillable="true" type="ax220:UnremovablePolicyException"/>
+ <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax216:InvalidPolicyException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServicePolicyDoesNotExistException">
+ <xs:element name="AutoscalerServiceUnremovablePolicyException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="PolicyDoesNotExistException" nillable="true" type="ax220:PolicyDoesNotExistException"/>
+ <xs:element minOccurs="0" name="UnremovablePolicyException" nillable="true" type="ax216:UnremovablePolicyException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeAutoScalingPolicy">
+ <xs:element name="removeApplicationPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="autoscalePolicyId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="applicationPolicyId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeAutoScalingPolicyResponse">
+ <xs:element name="removeApplicationPolicyResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateApplication">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax28:ApplicationContext"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="updateApplicationResponse">
+ <xs:element name="AutoscalerServiceAutoScalerException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax25:AutoScalerException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="existApplication">
+ <xs:element name="getApplicationNetworkPartitions">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="existApplicationResponse">
+ <xs:element name="getApplicationNetworkPartitionsResponse">
<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="deployApplication">
+ <xs:element name="undeployApplication">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="applicationPolicyId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="force" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="deployApplicationResponse">
+ <xs:element name="undeployApplicationResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="undeployApplication">
+ <xs:element name="deleteApplication">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="force" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="undeployApplicationResponse">
+ <xs:element name="deleteApplicationResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="deleteApplication">
+ <xs:element name="getServiceGroups">
<xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
- </xs:sequence>
+ <xs:sequence/>
</xs:complexType>
</xs:element>
- <xs:element name="deleteApplicationResponse">
+ <xs:element name="getServiceGroupsResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax21:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoscalerServiceInvalidServiceGroupException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax21:InvalidServiceGroupException"/>
+ <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax23:InvalidServiceGroupException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="addServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax29:ServiceGroup"/>
+ <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax21:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -483,7 +502,7 @@
<xs:element name="updateServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="cartridgeGroup" nillable="true" type="ax29:ServiceGroup"/>
+ <xs:element minOccurs="0" name="cartridgeGroup" nillable="true" type="ax21:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -508,275 +527,257 @@
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="findClusterId">
+ <xs:element name="AutoscalerServiceInvalidArgumentException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax25:InvalidArgumentException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="findClusterIdResponse">
+ <xs:element name="updateClusterMonitor">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax28:Properties"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceAutoScalerException">
+ <xs:element name="updateClusterMonitorResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax23:AutoScalerException"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroups">
+ <xs:element name="findClusterId">
<xs:complexType>
- <xs:sequence/>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
+ </xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupsResponse">
+ <xs:element name="findClusterIdResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:ServiceGroup"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="serviceGroupExist">
+ <xs:element name="AutoscalerServiceInvalidDeploymentPolicyException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="InvalidDeploymentPolicyException" nillable="true" type="ax216:InvalidDeploymentPolicyException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="serviceGroupExistResponse">
+ <xs:element name="AutoscalerServiceDeploymentPolicyNotExistsException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="DeploymentPolicyNotExistsException" nillable="true" type="ax216:DeploymentPolicyNotExistsException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="undeployServiceGroup">
+ <xs:element name="AutoscalerServiceCloudControllerConnectionException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="CloudControllerConnectionException" nillable="true" type="ax25:CloudControllerConnectionException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="undeployServiceGroupResponse">
+ <xs:element name="updateDeploymentPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax217:DeploymentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getApplicationNetworkPartitions">
+ <xs:element name="updateDeploymentPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getApplicationNetworkPartitionsResponse">
+ <xs:element name="getDeploymentPolicies">
<xs:complexType>
- <xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
- </xs:sequence>
+ <xs:sequence/>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceRemoteException">
+ <xs:element name="getDeploymentPoliciesResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="RemoteException" nillable="true" type="ax223:RemoteException"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax217:DeploymentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceInvalidApplicationPolicyException">
+ <xs:element name="getAutoScalingPolicies">
+ <xs:complexType>
+ <xs:sequence/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getAutoScalingPoliciesResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidApplicationPolicyException" nillable="true" type="ax21:InvalidApplicationPolicyException"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax225:AutoscalePolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceApplicationPolicyAlreadyExistsException">
+ <xs:element name="AutoscalerServiceAutoScalingPolicyAlreadyExistException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="ApplicationPolicyAlreadyExistsException" nillable="true" type="ax220:ApplicationPolicyAlreadyExistsException"/>
+ <xs:element minOccurs="0" name="AutoScalingPolicyAlreadyExistException" nillable="true" type="ax25:AutoScalingPolicyAlreadyExistException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addApplicationPolicy">
+ <xs:element name="addAutoScalingPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax217:ApplicationPolicy"/>
+ <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax225:AutoscalePolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addApplicationPolicyResponse">
+ <xs:element name="addAutoScalingPolicyResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeApplicationPolicy">
+ <xs:element name="updateAutoScalingPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationPolicyId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax225:AutoscalePolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeApplicationPolicyResponse">
+ <xs:element name="updateAutoScalingPolicyResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceApplicatioinPolicyNotExistsException">
+ <xs:element name="AutoscalerServicePolicyDoesNotExistException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="ApplicatioinPolicyNotExistsException" nillable="true" type="ax220:ApplicatioinPolicyNotExistsException"/>
+ <xs:element minOccurs="0" name="PolicyDoesNotExistException" nillable="true" type="ax216:PolicyDoesNotExistException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateApplicationPolicy">
+ <xs:element name="removeAutoScalingPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax217:ApplicationPolicy"/>
+ <xs:element minOccurs="0" name="autoscalePolicyId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateApplicationPolicyResponse">
+ <xs:element name="removeAutoScalingPolicyResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getApplicationPolicies">
- <xs:complexType>
- <xs:sequence/>
- </xs:complexType>
- </xs:element>
- <xs:element name="getApplicationPoliciesResponse">
+ <xs:element name="AutoscalerServiceDeploymentPolicyAlreadyExistsException">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax217:ApplicationPolicy"/>
+ <xs:element minOccurs="0" name="DeploymentPolicyAlreadyExistsException" nillable="true" type="ax216:DeploymentPolicyAlreadyExistsException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceInvalidDeploymentPolicyException">
+ <xs:element name="addDeployementPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidDeploymentPolicyException" nillable="true" type="ax220:InvalidDeploymentPolicyException"/>
+ <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax217:DeploymentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceDeploymentPolicyAlreadyExistsException">
+ <xs:element name="addDeployementPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="DeploymentPolicyAlreadyExistsException" nillable="true" type="ax220:DeploymentPolicyAlreadyExistsException"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addDeployementPolicy">
+ <xs:element name="removeDeployementPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax217:DeploymentPolicy"/>
+ <xs:element minOccurs="0" name="deploymentPolicyID" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addDeployementPolicyResponse">
+ <xs:element name="removeDeployementPolicyResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceDeploymentPolicyNotExistsException">
+ <xs:element name="getDeploymentPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="DeploymentPolicyNotExistsException" nillable="true" type="ax220:DeploymentPolicyNotExistsException"/>
+ <xs:element minOccurs="0" name="deploymentPolicyID" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceCloudControllerConnectionException">
+ <xs:element name="getDeploymentPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="CloudControllerConnectionException" nillable="true" type="ax23:CloudControllerConnectionException"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax217:DeploymentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateDeploymentPolicy">
+ <xs:element name="getAutoscalingPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax217:DeploymentPolicy"/>
+ <xs:element minOccurs="0" name="autoscalingPolicyId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateDeploymentPolicyResponse">
+ <xs:element name="getAutoscalingPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax225:AutoscalePolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeDeployementPolicy">
+ <xs:element name="serviceGroupExist">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicyID" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeDeployementPolicyResponse">
+ <xs:element name="serviceGroupExistResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getDeploymentPolicies">
+ <xs:element name="undeployServiceGroup">
<xs:complexType>
- <xs:sequence/>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ </xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getDeploymentPoliciesResponse">
+ <xs:element name="undeployServiceGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax217:DeploymentPolicy"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
- <xs:schema xmlns:ax216="http://partition.common.stratos.apache.org/xsd" xmlns:ax219="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
- <xs:import namespace="http://partition.common.stratos.apache.org/xsd"/>
- <xs:import namespace="http://common.stratos.apache.org/xsd"/>
- <xs:complexType name="DeploymentPolicy">
- <xs:sequence>
- <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitionRefs" nillable="true" type="ax216:NetworkPartitionRef"/>
- <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="ApplicationPolicy">
- <xs:sequence>
- <xs:element minOccurs="0" name="algorithm" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitionGroups" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitions" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax26:Properties"/>
- </xs:sequence>
- </xs:complexType>
- </xs:schema>
- <xs:schema xmlns:ax215="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://partition.common.stratos.apache.org/xsd">
+ <xs:schema xmlns:ax223="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://partition.common.stratos.apache.org/xsd">
<xs:import namespace="http://common.stratos.apache.org/xsd"/>
<xs:complexType name="NetworkPartitionRef">
<xs:sequence>
<xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="partitionAlgo" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="partitionRefs" nillable="true" type="ax214:PartitionRef"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="partitionRefs" nillable="true" type="ax222:PartitionRef"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PartitionRef">
@@ -785,7 +786,7 @@
<xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
<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="ax26:Properties"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax28:Properties"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
@@ -795,12 +796,12 @@
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidServiceGroupException">
+ <xs:complexType name="InvalidApplicationPolicyException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidApplicationPolicyException">
+ <xs:complexType name="InvalidServiceGroupException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
@@ -809,7 +810,7 @@
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://common.stratos.apache.org/xsd">
<xs:complexType name="Properties">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax26:Property"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax28:Property"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Property">
@@ -819,8 +820,16 @@
</xs:sequence>
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ax222="http://exception.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://policy.exception.autoscaler.stratos.apache.org/xsd">
+ <xs:schema xmlns:ax220="http://exception.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://policy.exception.autoscaler.stratos.apache.org/xsd">
<xs:import namespace="http://exception.autoscaler.stratos.apache.org/xsd"/>
+ <xs:complexType name="ApplicationPolicyAlreadyExistsException">
+ <xs:sequence/>
+ </xs:complexType>
+ <xs:complexType name="ApplicatioinPolicyNotExistsException">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
<xs:complexType name="InvalidPolicyException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
@@ -828,35 +837,27 @@
</xs:complexType>
<xs:complexType name="UnremovablePolicyException">
<xs:complexContent>
- <xs:extension base="ax23:AutoScalerException">
+ <xs:extension base="ax25:AutoScalerException">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
- <xs:complexType name="PolicyDoesNotExistException">
- <xs:complexContent>
- <xs:extension base="ax23:AutoScalerException">
- <xs:sequence/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="ApplicationPolicyAlreadyExistsException">
- <xs:sequence/>
- </xs:complexType>
- <xs:complexType name="ApplicatioinPolicyNotExistsException">
- <xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
<xs:complexType name="InvalidDeploymentPolicyException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="DeploymentPolicyAlreadyExistsException">
+ <xs:complexType name="DeploymentPolicyNotExistsException">
<xs:sequence/>
</xs:complexType>
- <xs:complexType name="DeploymentPolicyNotExistsException">
+ <xs:complexType name="PolicyDoesNotExistException">
+ <xs:complexContent>
+ <xs:extension base="ax25:AutoScalerException">
+ <xs:sequence/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="DeploymentPolicyAlreadyExistsException">
<xs:sequence/>
</xs:complexType>
</xs:schema>
@@ -876,14 +877,6 @@
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidArgumentException">
- <xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="AutoScalingPolicyAlreadyExistException">
- <xs:sequence/>
- </xs:complexType>
<xs:complexType name="AutoScalerException">
<xs:complexContent>
<xs:extension base="xs:RuntimeException">
@@ -891,9 +884,17 @@
</xs:extension>
</xs:complexContent>
</xs:complexType>
+ <xs:complexType name="InvalidArgumentException">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
<xs:complexType name="CloudControllerConnectionException">
<xs:sequence/>
</xs:complexType>
+ <xs:complexType name="AutoScalingPolicyAlreadyExistException">
+ <xs:sequence/>
+ </xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="removeAutoScalingPolicyRequest">
@@ -1136,18 +1137,18 @@
<wsdl:message name="removeServiceGroupResponse">
<wsdl:part name="parameters" element="ns:removeServiceGroupResponse"/>
</wsdl:message>
- <wsdl:message name="updateApplicationRequest">
- <wsdl:part name="parameters" element="ns:updateApplication"/>
- </wsdl:message>
- <wsdl:message name="updateApplicationResponse">
- <wsdl:part name="parameters" element="ns:updateApplicationResponse"/>
- </wsdl:message>
<wsdl:message name="getApplicationPolicyRequest">
<wsdl:part name="parameters" element="ns:getApplicationPolicy"/>
</wsdl:message>
<wsdl:message name="getApplicationPolicyResponse">
<wsdl:part name="parameters" element="ns:getApplicationPolicyResponse"/>
</wsdl:message>
+ <wsdl:message name="updateApplicationRequest">
+ <wsdl:part name="parameters" element="ns:updateApplication"/>
+ </wsdl:message>
+ <wsdl:message name="updateApplicationResponse">
+ <wsdl:part name="parameters" element="ns:updateApplicationResponse"/>
+ </wsdl:message>
<wsdl:portType name="AutoscalerServicePortType">
<wsdl:operation name="removeAutoScalingPolicy">
<wsdl:input message="ns:removeAutoScalingPolicyRequest" wsaw:Action="urn:removeAutoScalingPolicy"/>
@@ -1306,6 +1307,10 @@
<wsdl:output message="ns:removeServiceGroupResponse" wsaw:Action="urn:removeServiceGroupResponse"/>
<wsdl:fault message="ns:AutoscalerServiceCartridgeGroupNotFoundException" name="AutoscalerServiceCartridgeGroupNotFoundException" wsaw:Action="urn:removeServiceGroupAutoscalerServiceCartridgeGroupNotFoundException"/>
</wsdl:operation>
+ <wsdl:operation name="getApplicationPolicy">
+ <wsdl:input message="ns:getApplicationPolicyRequest" wsaw:Action="urn:getApplicationPolicy"/>
+ <wsdl:output message="ns:getApplicationPolicyResponse" wsaw:Action="urn:getApplicationPolicyResponse"/>
+ </wsdl:operation>
<wsdl:operation name="updateApplication">
<wsdl:input message="ns:updateApplicationRequest" wsaw:Action="urn:updateApplication"/>
<wsdl:output message="ns:updateApplicationResponse" wsaw:Action="urn:updateApplicationResponse"/>
@@ -1313,10 +1318,6 @@
<wsdl:fault message="ns:AutoscalerServiceCartridgeGroupNotFoundException" name="AutoscalerServiceCartridgeGroupNotFoundException" wsaw:Action="urn:updateApplicationAutoscalerServiceCartridgeGroupNotFoundException"/>
<wsdl:fault message="ns:AutoscalerServiceCartridgeNotFoundException" name="AutoscalerServiceCartridgeNotFoundException" wsaw:Action="urn:updateApplicationAutoscalerServiceCartridgeNotFoundException"/>
</wsdl:operation>
- <wsdl:operation name="getApplicationPolicy">
- <wsdl:input message="ns:getApplicationPolicyRequest" wsaw:Action="urn:getApplicationPolicy"/>
- <wsdl:output message="ns:getApplicationPolicyResponse" wsaw:Action="urn:getApplicationPolicyResponse"/>
- </wsdl:operation>
</wsdl:portType>
<wsdl:binding name="AutoscalerServiceSoap11Binding" type="ns:AutoscalerServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
@@ -1698,15 +1699,6 @@
<soap:fault use="literal" name="AutoscalerServiceCartridgeGroupNotFoundException"/>
</wsdl:fault>
</wsdl:operation>
- <wsdl:operation name="getApplicationPolicy">
- <soap:operation soapAction="urn:getApplicationPolicy" style="document"/>
- <wsdl:input>
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
<wsdl:operation name="updateApplication">
<soap:operation soapAction="urn:updateApplication" style="document"/>
<wsdl:input>
@@ -1725,6 +1717,15 @@
<soap:fault use="literal" name="AutoscalerServiceCartridgeGroupNotFoundException"/>
</wsdl:fault>
</wsdl:operation>
+ <wsdl:operation name="getApplicationPolicy">
+ <soap:operation soapAction="urn:getApplicationPolicy" style="document"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
</wsdl:binding>
<wsdl:binding name="AutoscalerServiceSoap12Binding" type="ns:AutoscalerServicePortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
@@ -2106,15 +2107,6 @@
<soap12:fault use="literal" name="AutoscalerServiceCartridgeGroupNotFoundException"/>
</wsdl:fault>
</wsdl:operation>
- <wsdl:operation name="getApplicationPolicy">
- <soap12:operation soapAction="urn:getApplicationPolicy" style="document"/>
- <wsdl:input>
- <soap12:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap12:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
<wsdl:operation name="updateApplication">
<soap12:operation soapAction="urn:updateApplication" style="document"/>
<wsdl:input>
@@ -2133,6 +2125,15 @@
<soap12:fault use="literal" name="AutoscalerServiceCartridgeGroupNotFoundException"/>
</wsdl:fault>
</wsdl:operation>
+ <wsdl:operation name="getApplicationPolicy">
+ <soap12:operation soapAction="urn:getApplicationPolicy" style="document"/>
+ <wsdl:input>
+ <soap12:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
</wsdl:binding>
<wsdl:binding name="AutoscalerServiceHttpBinding" type="ns:AutoscalerServicePortType">
<http:binding verb="POST"/>
@@ -2415,8 +2416,8 @@
<mime:content type="text/xml" part="parameters"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="getApplicationPolicy">
- <http:operation location="getApplicationPolicy"/>
+ <wsdl:operation name="updateApplication">
+ <http:operation location="updateApplication"/>
<wsdl:input>
<mime:content type="text/xml" part="parameters"/>
</wsdl:input>
@@ -2424,8 +2425,8 @@
<mime:content type="text/xml" part="parameters"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="updateApplication">
- <http:operation location="updateApplication"/>
+ <wsdl:operation name="getApplicationPolicy">
+ <http:operation location="getApplicationPolicy"/>
<wsdl:input>
<mime:content type="text/xml" part="parameters"/>
</wsdl:input>
[08/24] stratos git commit: Merge branch 'master' of
https://github.com/apache/stratos into tenant-isolation-v1
Posted by ga...@apache.org.
Merge branch 'master' of https://github.com/apache/stratos into tenant-isolation-v1
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/9002585d
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/9002585d
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/9002585d
Branch: refs/heads/tenant-isolation
Commit: 9002585deb15395fa76afa15f428b6d006ce1011
Parents: 2078778 4e84f86
Author: Dinithi <di...@wso2.com>
Authored: Mon Jun 29 13:10:41 2015 +0530
Committer: Dinithi <di...@wso2.com>
Committed: Mon Jun 29 13:10:41 2015 +0530
----------------------------------------------------------------------
.../stratos/common/beans/UserInfoBean.java | 3 +++
.../controllers/forms/schema/users/users.json | 1 -
.../management/StratosUserManagerUtils.java | 10 ++++++-
.../persistence/MockPersistenceManager.java | 28 +++++++++++++++-----
.../iaas/persistence/PersistenceManager.java | 21 ++++++++++++---
.../persistence/PersistenceManagerFactory.java | 8 +++++-
.../mock/iaas/persistence/RegistryManager.java | 12 ++++-----
.../rest/endpoint/api/StratosApiV41Utils.java | 13 ++++-----
.../src/main/webapp/api/WEB-INF/cxf-servlet.xml | 1 +
9 files changed, 73 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/9002585d/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
----------------------------------------------------------------------
[13/24] stratos git commit: Merge branch 'master' of
https://github.com/apache/stratos into tenant-isolation-v1
Posted by ga...@apache.org.
Merge branch 'master' of https://github.com/apache/stratos into tenant-isolation-v1
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/dd7442dd
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/dd7442dd
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/dd7442dd
Branch: refs/heads/tenant-isolation
Commit: dd7442dd4be07abbfbd7d84abb5e028ec3ee68fd
Parents: 70da581 19aaca5
Author: Dinithi <di...@wso2.com>
Authored: Mon Jun 29 18:30:25 2015 +0530
Committer: Dinithi <di...@wso2.com>
Committed: Mon Jun 29 18:30:25 2015 +0530
----------------------------------------------------------------------
.../python/cartridge.agent/cartridge.agent/plugins/README.md | 4 ++--
.../apache/stratos/rest/endpoint/api/StratosApiV41Utils.java | 6 ++++--
.../src/main/webapp/api/WEB-INF/cxf-servlet.xml | 1 +
3 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/dd7442dd/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
----------------------------------------------------------------------
[23/24] stratos git commit: Update the add cartridge method with
tenant isolation
Posted by ga...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/ae7d1582/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 e273689..33ef303 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,452 +1,456 @@
-<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ax29="http://topology.domain.messaging.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:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ax211="http://kubernetes.domain.controller.cloud.stratos.apache.org/xsd" 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://domain.controller.cloud.stratos.apache.org/xsd" xmlns:ax23="http://kubernetes.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://kubernetes.domain.controller.cloud.stratos.apache.org/xsd" xmlns:ax210="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:ax29="http://domain.controller.cloud.stratos.apache.org/xsd" xmlns:ax213="http://topology.domain.messaging.stratos.apache.org/xsd" xmlns:ax26="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://kubernetes.domain.controller.cloud.stratos.apache.org/xsd"/>
<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="CloudControllerServiceCartridgeNotFoundException">
+ <xs:element name="CloudControllerServiceNonExistingKubernetesClusterException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="CartridgeNotFoundException" nillable="true" type="ax21:CartridgeNotFoundException"/>
+ <xs:element minOccurs="0" name="NonExistingKubernetesClusterException" nillable="true" type="ax21:NonExistingKubernetesClusterException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidIaasProviderException">
+ <xs:element name="getKubernetesCluster">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidIaasProviderException" nillable="true" type="ax21:InvalidIaasProviderException"/>
+ <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceCloudControllerException">
+ <xs:element name="getKubernetesClusterResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="CloudControllerException" nillable="true" type="ax21:CloudControllerException"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax26:KubernetesCluster"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="startInstances">
+ <xs:element name="CloudControllerServiceInvalidPartitionException">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="instanceContexts" nillable="true" type="ax26:InstanceContext"/>
+ <xs:element minOccurs="0" name="InvalidPartitionException" nillable="true" type="ax21:InvalidPartitionException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="startInstancesResponse">
+ <xs:element name="validatePartition">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:MemberContext"/>
+ <xs:element minOccurs="0" name="partition" nillable="true" type="ax29:Partition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateClusterStatus">
+ <xs:element name="validatePartitionResponse">
<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:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateClusterStatusResponse">
+ <xs:element name="getCartridges">
<xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
- </xs:sequence>
+ <xs:sequence/>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceUnregisteredClusterException">
+ <xs:element name="getCartridgesResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="UnregisteredClusterException" nillable="true" type="ax21:UnregisteredClusterException"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="unregisterService">
+ <xs:element name="CloudControllerServiceCartridgeNotFoundException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="CartridgeNotFoundException" nillable="true" type="ax21:CartridgeNotFoundException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="unregisterServiceResponse">
+ <xs:element name="CloudControllerServiceInvalidIaasProviderException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="InvalidIaasProviderException" nillable="true" type="ax21:InvalidIaasProviderException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidPartitionException">
+ <xs:element name="CloudControllerServiceCloudControllerException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidPartitionException" nillable="true" type="ax21:InvalidPartitionException"/>
+ <xs:element minOccurs="0" name="CloudControllerException" nillable="true" type="ax21:CloudControllerException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="validatePartition">
+ <xs:element name="startInstance">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="partition" nillable="true" type="ax26:Partition"/>
+ <xs:element minOccurs="0" name="instanceContext" nillable="true" type="ax29:InstanceContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="validatePartitionResponse">
+ <xs:element name="startInstanceResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax29:MemberContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidCartridgeDefinitionException">
+ <xs:element name="CloudControllerServiceInvalidMemberException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidCartridgeDefinitionException" nillable="true" type="ax21:InvalidCartridgeDefinitionException"/>
+ <xs:element minOccurs="0" name="InvalidMemberException" nillable="true" type="ax21:InvalidMemberException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceCartridgeAlreadyExistsException">
+ <xs:element name="CloudControllerServiceInvalidCartridgeTypeException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="CartridgeAlreadyExistsException" nillable="true" type="ax21:CartridgeAlreadyExistsException"/>
+ <xs:element minOccurs="0" name="InvalidCartridgeTypeException" nillable="true" type="ax21:InvalidCartridgeTypeException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addCartridge">
+ <xs:element name="terminateInstance">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="cartridgeConfig" nillable="true" type="ax26:Cartridge"/>
+ <xs:element minOccurs="0" name="memberId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addCartridgeResponse">
+ <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="CloudControllerServiceCartridgeDefinitionNotExistsException">
+ <xs:element name="getIaasProviders">
<xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="CartridgeDefinitionNotExistsException" nillable="true" type="ax21:CartridgeDefinitionNotExistsException"/>
- </xs:sequence>
+ <xs:sequence/>
</xs:complexType>
</xs:element>
- <xs:element name="updateCartridge">
+ <xs:element name="getIaasProvidersResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="cartridge" nillable="true" type="ax26:Cartridge"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateCartridgeResponse">
+ <xs:element name="getCartridge">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidCartridgeTypeException">
+ <xs:element name="getCartridgeResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidCartridgeTypeException" nillable="true" type="ax21:InvalidCartridgeTypeException"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax29:Cartridge"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeCartridge">
+ <xs:element name="getClusterContext">
<xs:complexType>
<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:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeCartridgeResponse">
+ <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="ax29:ClusterContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidServiceGroupException">
+ <xs:element name="CloudControllerServiceInvalidCartridgeDefinitionException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax21:InvalidServiceGroupException"/>
+ <xs:element minOccurs="0" name="InvalidCartridgeDefinitionException" nillable="true" type="ax21:InvalidCartridgeDefinitionException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupSubGroups">
+ <xs:element name="CloudControllerServiceCartridgeAlreadyExistsException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="CartridgeAlreadyExistsException" nillable="true" type="ax21:CartridgeAlreadyExistsException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupSubGroupsResponse">
+ <xs:element name="addCartridge">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="cartridgeConfig" nillable="true" type="ax29:Cartridge"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupCartridges">
+ <xs:element name="addCartridgeResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupCartridgesResponse">
+ <xs:element name="CloudControllerServiceCartridgeDefinitionNotExistsException">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="CartridgeDefinitionNotExistsException" nillable="true" type="ax21:CartridgeDefinitionNotExistsException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupDependencies">
+ <xs:element name="updateCartridge">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="cartridge" nillable="true" type="ax29:Cartridge"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupDependenciesResponse">
+ <xs:element name="updateCartridgeResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax26:Dependencies"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroup">
+ <xs:element name="removeCartridge">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupResponse">
+ <xs:element name="removeCartridgeResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax26:ServiceGroup"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getCartridge">
+ <xs:element name="CloudControllerServiceInvalidServiceGroupException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax21:InvalidServiceGroupException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getCartridgeResponse">
+ <xs:element name="addServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax26:Cartridge"/>
+ <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax29:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getClusterContext">
+ <xs:element name="addServiceGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getClusterContextResponse">
+ <xs:element name="removeServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax26:ClusterContext"/>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidKubernetesClusterException">
+ <xs:element name="removeServiceGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidKubernetesClusterException" nillable="true" type="ax21:InvalidKubernetesClusterException"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateKubernetesCluster">
+ <xs:element name="getServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesCluster" nillable="true" type="ax213:KubernetesCluster"/>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateKubernetesClusterResponse">
+ <xs:element name="getServiceGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax29:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidKubernetesHostException">
+ <xs:element name="getServiceGroupSubGroups">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidKubernetesHostException" nillable="true" type="ax21:InvalidKubernetesHostException"/>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceNonExistingKubernetesClusterException">
+ <xs:element name="getServiceGroupSubGroupsResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="NonExistingKubernetesClusterException" nillable="true" type="ax21:NonExistingKubernetesClusterException"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addKubernetesHost">
+ <xs:element name="getServiceGroupCartridges">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax213:KubernetesHost"/>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addKubernetesHostResponse">
+ <xs:element name="getServiceGroupCartridgesResponse">
<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="CloudControllerServiceInvalidKubernetesMasterException">
+ <xs:element name="getServiceGroupDependencies">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidKubernetesMasterException" nillable="true" type="ax21:InvalidKubernetesMasterException"/>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceNonExistingKubernetesMasterException">
+ <xs:element name="getServiceGroupDependenciesResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="NonExistingKubernetesMasterException" nillable="true" type="ax21:NonExistingKubernetesMasterException"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax29:Dependencies"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateKubernetesMaster">
+ <xs:element name="startInstances">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax213:KubernetesMaster"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="instanceContexts" nillable="true" type="ax29:InstanceContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateKubernetesMasterResponse">
+ <xs:element name="startInstancesResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:MemberContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getKubernetesCluster">
+ <xs:element name="terminateInstanceForcefully">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="memberId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getKubernetesClusterResponse">
+ <xs:element name="terminateInstanceForcefullyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax213:KubernetesCluster"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceNonExistingKubernetesHostException">
+ <xs:element name="CloudControllerServiceInvalidClusterException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="NonExistingKubernetesHostException" nillable="true" type="ax21:NonExistingKubernetesHostException"/>
+ <xs:element minOccurs="0" name="InvalidClusterException" nillable="true" type="ax21:InvalidClusterException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateKubernetesHost">
+ <xs:element name="terminateInstances">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax213:KubernetesHost"/>
+ <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateKubernetesHostResponse">
+ <xs:element name="terminateInstancesResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceNetworkPartitionAlreadyExistsException">
+ <xs:element name="registerService">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="NetworkPartitionAlreadyExistsException" nillable="true" type="ax21:NetworkPartitionAlreadyExistsException"/>
+ <xs:element minOccurs="0" name="registrant" nillable="true" type="ax29:Registrant"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidNetworkPartitionException">
+ <xs:element name="registerServiceResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidNetworkPartitionException" nillable="true" type="ax21:InvalidNetworkPartitionException"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addNetworkPartition">
+ <xs:element name="CloudControllerServiceUnregisteredClusterException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="networkPartition" nillable="true" type="ax26:NetworkPartition"/>
+ <xs:element minOccurs="0" name="UnregisteredClusterException" nillable="true" type="ax21:UnregisteredClusterException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addNetworkPartitionResponse">
+ <xs:element name="unregisterService">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceNetworkPartitionNotExistsException">
+ <xs:element name="unregisterServiceResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="NetworkPartitionNotExistsException" nillable="true" type="ax21:NetworkPartitionNotExistsException"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeNetworkPartition">
+ <xs:element name="validateDeploymentPolicyNetworkPartition">
<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:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeNetworkPartitionResponse">
+ <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="updateNetworkPartition">
+ <xs:element name="updateClusterStatus">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="networkPartition" nillable="true" type="ax26:NetworkPartition"/>
+ <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="instanceId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="status" nillable="true" type="ax212:ClusterStatus"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateNetworkPartitionResponse">
+ <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="getNetworkPartition">
+ <xs:element name="CloudControllerServiceApplicationClusterRegistrationException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="networkPartitionId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="ApplicationClusterRegistrationException" nillable="true" type="ax21:ApplicationClusterRegistrationException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getNetworkPartitionResponse">
+ <xs:element name="createApplicationClusters">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax26:NetworkPartition"/>
+ <xs:element minOccurs="0" name="appId" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="appClustersContexts" nillable="true" type="ax29:ApplicationClusterContext"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="createApplicationClustersResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -476,277 +480,273 @@
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceKubernetesClusterAlreadyExistsException">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="KubernetesClusterAlreadyExistsException" nillable="true" type="ax21:KubernetesClusterAlreadyExistsException"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="addKubernetesCluster">
+ <xs:element name="getKubernetesClusters">
<xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="kubernetesCluster" nillable="true" type="ax213:KubernetesCluster"/>
- </xs:sequence>
+ <xs:sequence/>
</xs:complexType>
</xs:element>
- <xs:element name="addKubernetesClusterResponse">
+ <xs:element name="getKubernetesClustersResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:KubernetesCluster"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="registerService">
+ <xs:element name="getMasterForKubernetesCluster">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="registrant" nillable="true" type="ax26:Registrant"/>
+ <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="registerServiceResponse">
+ <xs:element name="getMasterForKubernetesClusterResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax26:KubernetesMaster"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getNetworkPartitions">
- <xs:complexType>
- <xs:sequence/>
- </xs:complexType>
- </xs:element>
- <xs:element name="getNetworkPartitionsResponse">
+ <xs:element name="getHostsForKubernetesCluster">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:NetworkPartition"/>
+ <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getIaasProviders">
+ <xs:element name="getHostsForKubernetesClusterResponse">
<xs:complexType>
- <xs:sequence/>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:KubernetesHost"/>
+ </xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getIaasProvidersResponse">
+ <xs:element name="CloudControllerServiceInvalidKubernetesClusterException">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="InvalidKubernetesClusterException" nillable="true" type="ax21:InvalidKubernetesClusterException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getCartridges">
+ <xs:element name="CloudControllerServiceKubernetesClusterAlreadyExistsException">
<xs:complexType>
- <xs:sequence/>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="KubernetesClusterAlreadyExistsException" nillable="true" type="ax21:KubernetesClusterAlreadyExistsException"/>
+ </xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getCartridgesResponse">
+ <xs:element name="addKubernetesCluster">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="kubernetesCluster" nillable="true" type="ax26:KubernetesCluster"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getKubernetesClusters">
+ <xs:element name="addKubernetesClusterResponse">
<xs:complexType>
- <xs:sequence/>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ </xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getKubernetesClustersResponse">
+ <xs:element name="updateKubernetesCluster">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax213:KubernetesCluster"/>
+ <xs:element minOccurs="0" name="kubernetesCluster" nillable="true" type="ax26:KubernetesCluster"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeKubernetesCluster">
+ <xs:element name="updateKubernetesClusterResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeKubernetesClusterResponse">
+ <xs:element name="CloudControllerServiceInvalidKubernetesHostException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="InvalidKubernetesHostException" nillable="true" type="ax21:InvalidKubernetesHostException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeKubernetesHost">
+ <xs:element name="addKubernetesHost">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesHostId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax26:KubernetesHost"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeKubernetesHostResponse">
+ <xs:element name="addKubernetesHostResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getHostsForKubernetesCluster">
+ <xs:element name="removeKubernetesCluster">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getHostsForKubernetesClusterResponse">
+ <xs:element name="removeKubernetesClusterResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax213:KubernetesHost"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getMasterForKubernetesCluster">
+ <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="getMasterForKubernetesClusterResponse">
+ <xs:element name="removeKubernetesHost">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax213:KubernetesMaster"/>
+ <xs:element minOccurs="0" name="kubernetesHostId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="validateDeploymentPolicyNetworkPartition">
+ <xs:element name="removeKubernetesHostResponse">
<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="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="validateDeploymentPolicyNetworkPartitionResponse">
+ <xs:element name="CloudControllerServiceInvalidKubernetesMasterException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="InvalidKubernetesMasterException" nillable="true" type="ax21:InvalidKubernetesMasterException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addServiceGroup">
+ <xs:element name="CloudControllerServiceNonExistingKubernetesMasterException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax26:ServiceGroup"/>
+ <xs:element minOccurs="0" name="NonExistingKubernetesMasterException" nillable="true" type="ax21:NonExistingKubernetesMasterException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addServiceGroupResponse">
+ <xs:element name="updateKubernetesMaster">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax26:KubernetesMaster"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeServiceGroup">
+ <xs:element name="updateKubernetesMasterResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeServiceGroupResponse">
+ <xs:element name="updateKubernetesHost">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax26:KubernetesHost"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceApplicationClusterRegistrationException">
+ <xs:element name="updateKubernetesHostResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="ApplicationClusterRegistrationException" nillable="true" type="ax21:ApplicationClusterRegistrationException"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="createApplicationClusters">
+ <xs:element name="CloudControllerServiceNetworkPartitionAlreadyExistsException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="appId" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="appClustersContexts" nillable="true" type="ax26:ApplicationClusterContext"/>
+ <xs:element minOccurs="0" name="NetworkPartitionAlreadyExistsException" nillable="true" type="ax21:NetworkPartitionAlreadyExistsException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="createApplicationClustersResponse">
+ <xs:element name="CloudControllerServiceInvalidNetworkPartitionException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="InvalidNetworkPartitionException" nillable="true" type="ax21:InvalidNetworkPartitionException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="terminateInstanceForcefully">
+ <xs:element name="addNetworkPartition">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="memberId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="networkPartition" nillable="true" type="ax29:NetworkPartition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="terminateInstanceForcefullyResponse">
+ <xs:element name="addNetworkPartitionResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="startInstance">
+ <xs:element name="CloudControllerServiceNetworkPartitionNotExistsException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="instanceContext" nillable="true" type="ax26:InstanceContext"/>
+ <xs:element minOccurs="0" name="NetworkPartitionNotExistsException" nillable="true" type="ax21:NetworkPartitionNotExistsException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="startInstanceResponse">
+ <xs:element name="removeNetworkPartition">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax26:MemberContext"/>
+ <xs:element minOccurs="0" name="networkPartitionId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidMemberException">
+ <xs:element name="removeNetworkPartitionResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidMemberException" nillable="true" type="ax21:InvalidMemberException"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="terminateInstance">
+ <xs:element name="updateNetworkPartition">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="memberId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="networkPartition" nillable="true" type="ax29:NetworkPartition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="terminateInstanceResponse">
+ <xs:element name="updateNetworkPartitionResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidClusterException">
+ <xs:element name="getNetworkPartitions">
+ <xs:complexType>
+ <xs:sequence/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNetworkPartitionsResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidClusterException" nillable="true" type="ax21:InvalidClusterException"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:NetworkPartition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="terminateInstances">
+ <xs:element name="getNetworkPartition">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="clusterId" 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="terminateInstancesResponse">
+ <xs:element name="getNetworkPartitionResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax29:NetworkPartition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -776,6 +776,16 @@
</xs:complexType>
</xs:schema>
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://exception.controller.cloud.stratos.apache.org/xsd">
+ <xs:complexType name="NonExistingKubernetesClusterException">
+ <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"/>
+ </xs:sequence>
+ </xs:complexType>
<xs:complexType name="CartridgeNotFoundException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
@@ -793,12 +803,12 @@
</xs:extension>
</xs:complexContent>
</xs:complexType>
- <xs:complexType name="UnregisteredClusterException">
+ <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:complexType name="InvalidCartridgeTypeException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
@@ -816,95 +826,100 @@
<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="InvalidServiceGroupException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidKubernetesClusterException">
+ <xs:complexType name="InvalidClusterException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidKubernetesHostException">
+ <xs:complexType name="UnregisteredClusterException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="NonExistingKubernetesClusterException">
+ <xs:complexType name="ApplicationClusterRegistrationException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidKubernetesMasterException">
+ <xs:complexType name="ClusterInstanceCreationException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="NonExistingKubernetesMasterException">
+ <xs:complexType name="InvalidKubernetesClusterException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="NonExistingKubernetesHostException">
+ <xs:complexType name="KubernetesClusterAlreadyExistsException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="NetworkPartitionAlreadyExistsException">
+ <xs:complexType name="InvalidKubernetesHostException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidNetworkPartitionException">
+ <xs:complexType name="NonExistingKubernetesHostException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="NetworkPartitionNotExistsException">
- <xs:sequence/>
- </xs:complexType>
- <xs:complexType name="ClusterInstanceCreationException">
+ <xs:complexType name="InvalidKubernetesMasterException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="KubernetesClusterAlreadyExistsException">
+ <xs:complexType name="NonExistingKubernetesMasterException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="ApplicationClusterRegistrationException">
+ <xs:complexType name="NetworkPartitionAlreadyExistsException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidMemberException">
+ <xs:complexType name="InvalidNetworkPartitionException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidClusterException">
+ <xs:complexType name="NetworkPartitionNotExistsException">
+ <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="message" nillable="true" type="xs:string"/>
+ <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:ax212="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://kubernetes.domain.controller.cloud.stratos.apache.org/xsd">
+ <xs:schema xmlns:ax25="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="ax211:KubernetesHost"/>
- <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax211:KubernetesMaster"/>
- <xs:element minOccurs="0" name="portRange" nillable="true" type="ax211:PortRange"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax212:Properties"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="kubernetesHosts" nillable="true" type="ax23:KubernetesHost"/>
+ <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax23:KubernetesMaster"/>
+ <xs:element minOccurs="0" name="portRange" nillable="true" type="ax23:PortRange"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="KubernetesHost">
@@ -912,13 +927,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="ax212:Properties"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax25: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="ax211:KubernetesHost">
+ <xs:extension base="ax23:KubernetesHost">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
@@ -930,24 +945,20 @@
</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:schema xmlns:ax28="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="Partition">
<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: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="ax28:Properties"/>
+ <xs:element minOccurs="0" name="provider" 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: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"/>
@@ -956,21 +967,10 @@
<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="partition" nillable="true" type="ax27:Partition"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax28: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:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax27:Volume"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Volume">
@@ -994,21 +994,21 @@
<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 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="instanceMetadata" nillable="true" type="ax27: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="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 minOccurs="0" name="partition" nillable="true" type="ax27: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 minOccurs="0" name="properties" nillable="true" type="ax28:Properties"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="publicIPs" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
@@ -1028,7 +1028,7 @@
</xs:complexType>
<xs:complexType name="Cartridge">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="appTypeMappings" nillable="true" type="ax23:AppType"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="appTypeMappings" nillable="true" type="ax27:AppType"/>
<xs:element minOccurs="0" name="baseDir" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="category" nillable="true" type="xs:string"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="deploymentDirs" nillable="true" type="xs:string"/>
@@ -1036,17 +1036,19 @@
<xs:element minOccurs="0" name="displayName" nillable="true" type="xs:string"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="exportingProperties" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="hostName" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="iaasConfigs" nillable="true" type="ax23:IaasConfig"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="iaasConfigs" nillable="true" type="ax27:IaasConfig"/>
<xs:element minOccurs="0" name="isPublic" type="xs:boolean"/>
<xs:element minOccurs="0" name="loadBalancingIPType" nillable="true" type="xs:string"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="metadataKeys" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="multiTenant" type="xs:boolean"/>
- <xs:element minOccurs="0" name="persistence" nillable="true" type="ax23:Persistence"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="portMappings" nillable="true" type="ax23:PortMapping"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
+ <xs:element minOccurs="0" name="persistence" nillable="true" type="ax27:Persistence"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="portMappings" nillable="true" type="ax27:PortMapping"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax28: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="tenantPartitions" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="type" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="uuid" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="version" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
@@ -1063,29 +1065,29 @@
<xs:element minOccurs="0" name="identity" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="imageId" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="networkInterfaces" nillable="true" type="ax23:NetworkInterfaces"/>
+ <xs:element minOccurs="0" name="networkInterfaces" nillable="true" type="ax27:NetworkInterfaces"/>
<xs:element minOccurs="0" name="payload" nillable="true" type="xs:base64Binary"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax28:Properties"/>
<xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="type" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="NetworkInterfaces">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="networkInterfaces" nillable="true" type="ax23:NetworkInterface"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="networkInterfaces" nillable="true" type="ax27:NetworkInterface"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="NetworkInterface">
<xs:sequence>
<xs:element minOccurs="0" name="fixedIp" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="floatingNetworks" nillable="true" type="ax23:FloatingNetworks"/>
+ <xs:element minOccurs="0" name="floatingNetworks" nillable="true" type="ax27:FloatingNetworks"/>
<xs:element minOccurs="0" name="networkUuid" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="portUuid" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="FloatingNetworks">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="floatingNetworks" nillable="true" type="ax23:FloatingNetwork"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="floatingNetworks" nillable="true" type="ax27:FloatingNetwork"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="FloatingNetwork">
@@ -1098,7 +1100,7 @@
<xs:complexType name="Persistence">
<xs:sequence>
<xs:element minOccurs="0" name="persistenceRequired" type="xs:boolean"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax23:Volume"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax27:Volume"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PortMapping">
@@ -1109,20 +1111,6 @@
<xs:element minOccurs="0" name="proxyPort" type="xs:int"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="Dependencies">
- <xs:sequence>
- <xs:element minOccurs="0" name="killBehaviour" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="startupOrders" nillable="true" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="ServiceGroup">
- <xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridges" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax23:Dependencies"/>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="subGroups" nillable="true" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
<xs:complexType name="ClusterContext">
<xs:sequence>
<xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
@@ -1133,22 +1121,24 @@
<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="properties" nillable="true" type="ax28: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:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax27:Volume"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="NetworkPartition">
+ <xs:complexType name="ServiceGroup">
<xs:sequence>
- <xs:element minOccurs="0" name="activeByDefault" type="xs:boolean"/>
- <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="partitionAlgo" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax23:Partition"/>
- <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:element maxOccurs="unbounded" minOccurs="0" name="cartridges" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax27:Dependencies"/>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="subGroups" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="Dependencies">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="killBehaviour" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="startupOrders" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Registrant">
@@ -1159,8 +1149,8 @@
<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="persistence" nillable="true" type="ax27:Persistence"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax28:Properties"/>
<xs:element minOccurs="0" name="tenantRange" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
@@ -1173,11 +1163,23 @@
<xs:element minOccurs="0" name="deploymentPolicyName" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="hostName" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="lbCluster" type="xs:boolean"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax28:Properties"/>
<xs:element minOccurs="0" name="tenantRange" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="textPayload" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="volumeRequired" type="xs:boolean"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax23:Volume"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax27:Volume"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="NetworkPartition">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="activeByDefault" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="partitionAlgo" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax27:Partition"/>
<TRUNCATED>
[24/24] stratos git commit: Update the add cartridge method with
tenant isolation
Posted by ga...@apache.org.
Update the add cartridge method with tenant isolation
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/ae7d1582
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/ae7d1582
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/ae7d1582
Branch: refs/heads/tenant-isolation
Commit: ae7d1582c019707238fa9eda131f70806cd8d2ad
Parents: 0293c84
Author: Gayan Gunarathne <ga...@wso2.com>
Authored: Mon Jul 6 17:01:00 2015 +0530
Committer: Gayan Gunarathne <ga...@wso2.com>
Committed: Mon Jul 6 17:01:00 2015 +0530
----------------------------------------------------------------------
.../context/CloudControllerContext.java | 2 +-
.../cloud/controller/domain/Cartridge.java | 18 +
.../impl/CloudControllerServiceImpl.java | 92 +-
.../common/beans/cartridge/CartridgeBean.java | 18 +
.../rest/endpoint/api/StratosApiV41.java | 8 +-
.../rest/endpoint/api/StratosApiV41Utils.java | 9 +-
.../main/resources/CloudControllerService.wsdl | 896 ++++++++++---------
7 files changed, 551 insertions(+), 492 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/ae7d1582/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/context/CloudControllerContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/context/CloudControllerContext.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/context/CloudControllerContext.java
index b223167..58cfb03 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/context/CloudControllerContext.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/context/CloudControllerContext.java
@@ -283,7 +283,7 @@ public class CloudControllerContext implements Serializable {
}
public void addCartridge(Cartridge cartridge) {
- cartridgeTypeToCartridgeMap.put(cartridge.getType(), cartridge);
+ cartridgeTypeToCartridgeMap.put(cartridge.getUuid(), cartridge);
}
public void addNetworkPartition(NetworkPartition networkPartition) {
http://git-wip-us.apache.org/repos/asf/stratos/blob/ae7d1582/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/Cartridge.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/Cartridge.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/Cartridge.java
index 27b84be..a9fcc11 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/Cartridge.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/Cartridge.java
@@ -37,6 +37,7 @@ public class Cartridge implements Serializable {
private transient static final Log log = LogFactory.getLog(Cartridge.class);
private static final long serialVersionUID = 6637409027085059072L;
+ private String uuid;
private String type;
private String hostName;
private String provider;
@@ -52,6 +53,7 @@ public class Cartridge implements Serializable {
private AppType[] appTypeMappings;
private String loadBalancingIPType;
private String[] metadataKeys;
+ private int tenantId;
private boolean isPublic;
@@ -305,4 +307,20 @@ public class Cartridge implements Serializable {
+ ", properties=" + properties
+ "]";
}
+
+ public String getUuid() {
+ return uuid;
+ }
+
+ public void setUuid(String uuid) {
+ this.uuid = uuid;
+ }
+
+ public int getTenantId() {
+ return tenantId;
+ }
+
+ public void setTenantId(int tenantId) {
+ this.tenantId = tenantId;
+ }
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/ae7d1582/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 0e754c8..13aa76f 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
@@ -69,47 +69,57 @@ public class CloudControllerServiceImpl implements CloudControllerService {
}
- public boolean addCartridge(Cartridge cartridgeConfig) throws InvalidCartridgeDefinitionException,
- InvalidIaasProviderException, CartridgeAlreadyExistsException {
-
- handleNullObject(cartridgeConfig, "Cartridge definition is null");
-
- if (log.isInfoEnabled()) {
- log.info("Adding cartridge: [cartridge-type] " + cartridgeConfig.getType());
- }
- if (log.isDebugEnabled()) {
- log.debug("Cartridge definition: " + cartridgeConfig.toString());
- }
-
- try {
- CloudControllerUtil.extractIaaSProvidersFromCartridge(cartridgeConfig);
- } catch (Exception e) {
- String message = "Invalid cartridge definition: [cartridge-type] " + cartridgeConfig.getType();
- log.error(message, e);
- throw new InvalidCartridgeDefinitionException(message, e);
- }
-
- String cartridgeType = cartridgeConfig.getType();
- if (cloudControllerContext.getCartridge(cartridgeType) != null) {
- String message = "Cartridge already exists: [cartridge-type] " + cartridgeType;
- log.error(message);
- throw new CartridgeAlreadyExistsException(message);
- }
-
- // Add cartridge to the cloud controller context and persist
- CloudControllerContext.getInstance().addCartridge(cartridgeConfig);
- CloudControllerContext.getInstance().persist();
-
- List<Cartridge> cartridgeList = new ArrayList<Cartridge>();
- cartridgeList.add(cartridgeConfig);
-
- TopologyBuilder.handleServiceCreated(cartridgeList);
-
- if (log.isInfoEnabled()) {
- log.info("Successfully added cartridge: [cartridge-type] " + cartridgeType);
- }
- return true;
- }
+ public boolean addCartridge(Cartridge cartridgeConfig) throws InvalidCartridgeDefinitionException,
+ InvalidIaasProviderException,
+ CartridgeAlreadyExistsException {
+
+ handleNullObject(cartridgeConfig, "Cartridge definition is null");
+ handleNullObject(cartridgeConfig.getUuid(), "Cartridge definition UUID is null");
+
+ if (log.isInfoEnabled()) {
+ log.info(String.format("Adding cartridge: [cartridge-uuid] %s [cartridge-type] %s [tenant id] %d ",
+ cartridgeConfig.getUuid(), cartridgeConfig.getType(),
+ cartridgeConfig.getTenantId()));
+ }
+ if (log.isDebugEnabled()) {
+ log.debug("Cartridge definition: " + cartridgeConfig.toString());
+ }
+
+ try {
+ CloudControllerUtil.extractIaaSProvidersFromCartridge(cartridgeConfig);
+ } catch (Exception e) {
+ String message = String.format("Invalid cartridge definition: [cartridge-uuid] %s [cartridge-type] %s",
+ " [tenant-id] ", cartridgeConfig.getUuid(), cartridgeConfig.getType(),
+ cartridgeConfig.getTenantId());
+ log.error(message, e);
+ throw new InvalidCartridgeDefinitionException(message, e);
+ }
+
+ String cartridgeUuid = cartridgeConfig.getUuid();
+ Cartridge existingCartridge = cloudControllerContext.getCartridge(cartridgeUuid);
+ if (existingCartridge != null) {
+ String message = String.format(
+ "Cartridge already exists: [cartridge-uuid] %s [cartridge-type] %s [tenant id] %d ", cartridgeUuid,
+ existingCartridge.getType(), existingCartridge.getTenantId());
+ log.error(message);
+ throw new CartridgeAlreadyExistsException(message);
+ }
+
+ // Add cartridge to the cloud controller context and persist
+ CloudControllerContext.getInstance().addCartridge(cartridgeConfig);
+ CloudControllerContext.getInstance().persist();
+
+ List<Cartridge> cartridgeList = new ArrayList<Cartridge>();
+ cartridgeList.add(cartridgeConfig);
+
+ TopologyBuilder.handleServiceCreated(cartridgeList);
+
+ if (log.isInfoEnabled()) {
+ log.info(String.format("Successfully added cartridge: [cartridge-type] %s [tenant-id] %d ",
+ cartridgeConfig.getType(), cartridgeConfig.getTenantId()));
+ }
+ return true;
+ }
@Override
public boolean updateCartridge(Cartridge cartridge) throws InvalidCartridgeDefinitionException,
http://git-wip-us.apache.org/repos/asf/stratos/blob/ae7d1582/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/CartridgeBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/CartridgeBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/CartridgeBean.java
index 482c566..b8afa84 100644
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/CartridgeBean.java
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/CartridgeBean.java
@@ -27,6 +27,7 @@ import java.util.List;
@XmlRootElement(name = "cartridgeBean")
public class CartridgeBean {
+ private String uuid;
private String type;
private String provider;
/**
@@ -48,6 +49,7 @@ public class CartridgeBean {
*/
private String loadBalancingIPType;
private List<PropertyBean> property;
+ private int tenantId;
private String getDeploymentDetails() {
if (getDeployment() != null) {
@@ -226,4 +228,20 @@ public class CartridgeBean {
public void setMetadataKeys(List<String> metadataKeys) {
this.metadataKeys = metadataKeys;
}
+
+ public String getUuid() {
+ return uuid;
+ }
+
+ public void setUuid(String uuid) {
+ this.uuid = uuid;
+ }
+
+ public int getTenantId() {
+ return tenantId;
+ }
+
+ public void setTenantId(int tenantId) {
+ this.tenantId = tenantId;
+ }
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/ae7d1582/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 e07abaa..e9976be 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
@@ -283,6 +283,11 @@ public class StratosApiV41 extends AbstractApi {
CartridgeBean cartridgeDefinitionBean) throws RestAPIException {
String cartridgeType = cartridgeDefinitionBean.getType();
+ cartridgeDefinitionBean.setUuid(UUID.randomUUID().toString());
+
+ PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext();
+ cartridgeDefinitionBean.setTenantId(carbonContext.getTenantId());
+
CartridgeBean cartridgeBean = null;
try {
cartridgeBean = StratosApiV41Utils.getCartridgeForValidate(cartridgeType);
@@ -363,8 +368,9 @@ public class StratosApiV41 extends AbstractApi {
public Response getCartridge(
@PathParam("cartridgeType") String cartridgeType) throws RestAPIException {
CartridgeBean cartridge;
+ PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext();
try {
- cartridge = StratosApiV41Utils.getCartridge(cartridgeType);
+ cartridge = StratosApiV41Utils.getCartridge(cartridgeType,carbonContext.getTenantId());
return Response.ok().entity(cartridge).build();
} catch (RestAPIException e) {
return Response.status(Response.Status.NOT_FOUND).entity(new ResponseMessageBean(
http://git-wip-us.apache.org/repos/asf/stratos/blob/ae7d1582/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 fbcad1c..1e14632 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
@@ -491,13 +491,18 @@ public class StratosApiV41Utils {
* @return Cartridge details
* @throws RestAPIException
*/
- public static CartridgeBean getCartridge(String cartridgeType) throws RestAPIException {
+ public static CartridgeBean getCartridge(String cartridgeType,int tenantId) throws RestAPIException {
try {
Cartridge cartridgeInfo = CloudControllerServiceClient.getInstance().getCartridge(cartridgeType);
if (cartridgeInfo == null) {
return null;
}
- return ObjectConverter.convertCartridgeToCartridgeDefinitionBean(cartridgeInfo);
+ if(cartridgeInfo.getTenantId()==tenantId) {
+ return ObjectConverter.convertCartridgeToCartridgeDefinitionBean(cartridgeInfo);
+ }
+ else{
+ return null;
+ }
} catch (RemoteException e) {
String message = e.getMessage();
log.error(message);