You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ni...@apache.org on 2014/11/30 08:16:57 UTC
[01/13] stratos git commit: fixing CC service wsdl and exports
Repository: stratos
Updated Branches:
refs/heads/master 8074b43ce -> 9c59f47a8
http://git-wip-us.apache.org/repos/asf/stratos/blob/48e7c23d/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 7f90faf..9e8d312 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,1792 +1,1750 @@
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://services.controller.cloud.stratos.apache.org" xmlns:ax240="http://topology.domain.messaging.stratos.apache.org/xsd" xmlns:ax236="http://domain.controller.cloud.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax238="http://common.stratos.apache.org/xsd" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ax234="http://exception.controller.cloud.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" 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://services.controller.cloud.stratos.apache.org">
- <wsdl:documentation>CloudControllerService</wsdl:documentation>
+<?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://topology.domain.messaging.stratos.apache.org/xsd" xmlns:ax23="http://domain.controller.cloud.stratos.apache.org/xsd" xmlns:ax24="http://common.stratos.apache.org/xsd" xmlns:ax21="http://exception.controller.cloud.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://impl.services.controller.cloud.stratos.apache.org">
<wsdl:types>
- <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://topology.domain.messaging.stratos.apache.org/xsd">
- <xs:complexType abstract="true" name="ClusterStatus">
- <xs:complexContent>
- <xs:extension base="xs:Enum">
- <xs:sequence>
- <xs:element minOccurs="0" name="code" type="xs:int"></xs:element>
- </xs:sequence>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- </xs:schema>
- <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="ax238:Property"></xs:element>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="Property">
- <xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="value" nillable="true" type="xs:string"></xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:schema>
- <xs:schema xmlns:ax241="http://topology.domain.messaging.stratos.apache.org/xsd" xmlns:ax237="http://domain.controller.cloud.stratos.apache.org/xsd" xmlns:ax235="http://exception.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://services.controller.cloud.stratos.apache.org">
- <xs:import namespace="http://exception.controller.cloud.stratos.apache.org/xsd"></xs:import>
- <xs:import namespace="http://domain.controller.cloud.stratos.apache.org/xsd"></xs:import>
- <xs:import namespace="http://topology.domain.messaging.stratos.apache.org/xsd"></xs:import>
- <xs:element name="CloudControllerServiceUnregisteredClusterException">
+ <xs:schema xmlns:ax28="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://topology.domain.messaging.stratos.apache.org/xsd"/>
+ <xs:element name="CloudControllerServiceInvalidPartitionException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="UnregisteredClusterException" nillable="true" type="ax234:UnregisteredClusterException"></xs:element>
+ <xs:element minOccurs="0" name="InvalidPartitionException" nillable="true" type="ax21:InvalidPartitionException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="unregisterService">
+ <xs:element name="validatePartition">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="partition" nillable="true" type="ax26:Partition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidServiceGroupException">
+ <xs:element name="validatePartitionResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax234:InvalidServiceGroupException"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroup">
+ <xs:element name="CloudControllerServiceInvalidCartridgeTypeException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="InvalidCartridgeTypeException" nillable="true" type="ax21:InvalidCartridgeTypeException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupResponse">
+ <xs:element name="validateDeploymentPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax236:ServiceGroup"></xs:element>
+ <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax26:Partition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceUnregisteredCartridgeException">
+ <xs:element name="validateDeploymentPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="UnregisteredCartridgeException" nillable="true" type="ax234:UnregisteredCartridgeException"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="registerService">
+ <xs:element name="CloudControllerServiceUnregisteredCartridgeException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="registrant" nillable="true" type="ax236:Registrant"></xs:element>
+ <xs:element minOccurs="0" name="UnregisteredCartridgeException" nillable="true" type="ax21:UnregisteredCartridgeException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="registerServiceResponse">
+ <xs:element name="updateContainers">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="replicas" type="xs:int"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getClusterContext">
+ <xs:element name="updateContainersResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:MemberContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getClusterContextResponse">
+ <xs:element name="updateClusterStatus">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax236:ClusterContext"></xs:element>
+ <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="instanceId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="status" nillable="true" type="ax27:ClusterStatus"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="deployServiceGroup">
+ <xs:element name="CloudControllerServiceUnregisteredClusterException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax236:ServiceGroup"></xs:element>
+ <xs:element minOccurs="0" name="UnregisteredClusterException" nillable="true" type="ax21:UnregisteredClusterException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="undeployServiceGroup">
+ <xs:element name="unregisterService">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidPartitionException">
+ <xs:element name="unregisterDockerService">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidPartitionException" nillable="true" type="ax234:InvalidPartitionException"></xs:element>
+ <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidCartridgeTypeException">
+ <xs:element name="CloudControllerServiceInvalidServiceGroupException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidCartridgeTypeException" nillable="true" type="ax234:InvalidCartridgeTypeException"></xs:element>
+ <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax21:InvalidServiceGroupException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="validateDeploymentPolicy">
+ <xs:element name="undeployServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax236:Partition"></xs:element>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="validateDeploymentPolicyResponse">
+ <xs:element name="undeployCartridgeDefinition">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
</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="ax234:InvalidCartridgeDefinitionException"></xs:element>
+ <xs:element minOccurs="0" name="InvalidMemberException" nillable="true" type="ax21:InvalidMemberException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidIaasProviderException">
+ <xs:element name="terminateInstance">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidIaasProviderException" nillable="true" type="ax234:InvalidIaasProviderException"></xs:element>
+ <xs:element minOccurs="0" name="memberId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="deployCartridgeDefinition">
+ <xs:element name="CloudControllerServiceMemberTerminationFailedException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="cartridgeConfig" nillable="true" type="ax236:CartridgeConfig"></xs:element>
+ <xs:element minOccurs="0" name="MemberTerminationFailedException" nillable="true" type="ax21:MemberTerminationFailedException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getCartridgeInfo">
+ <xs:element name="terminateContainer">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="memberId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getCartridgeInfoResponse">
+ <xs:element name="terminateContainerResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax236:CartridgeInfo"></xs:element>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax26:MemberContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="undeployCartridgeDefinition">
+ <xs:element name="CloudControllerServiceInvalidClusterException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="InvalidClusterException" nillable="true" type="ax21:InvalidClusterException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupSubGroups">
+ <xs:element name="terminateAllInstances">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupSubGroupsResponse">
+ <xs:element name="terminateAllContainers">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupCartridges">
+ <xs:element name="terminateAllContainersResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:MemberContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupCartridgesResponse">
+ <xs:element name="CloudControllerServiceInvalidIaasProviderException">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="InvalidIaasProviderException" nillable="true" type="ax21:InvalidIaasProviderException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupDependencies">
+ <xs:element name="startInstance">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="memberContext" nillable="true" type="ax26:MemberContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupDependenciesResponse">
+ <xs:element name="startInstanceResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax236:Dependencies"></xs:element>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax26:MemberContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="startInstance">
+ <xs:element name="startContainers">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="memberContext" nillable="true" type="ax236:MemberContext"></xs:element>
+ <xs:element minOccurs="0" name="containerClusterContext" nillable="true" type="ax26:ContainerClusterContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="startInstanceResponse">
+ <xs:element name="startContainersResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax236:MemberContext"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:MemberContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidMemberException">
+ <xs:element name="registerService">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidMemberException" nillable="true" type="ax234:InvalidMemberException"></xs:element>
+ <xs:element minOccurs="0" name="registrant" nillable="true" type="ax26:Registrant"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="terminateInstance">
+ <xs:element name="registerServiceResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="memberId" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceInvalidClusterException">
+ <xs:element name="getServiceGroupSubGroups">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidClusterException" nillable="true" type="ax234:InvalidClusterException"></xs:element>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="terminateAllInstances">
+ <xs:element name="getServiceGroupSubGroupsResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getRegisteredCartridges">
+ <xs:element name="getServiceGroupDependencies">
<xs:complexType>
- <xs:sequence></xs:sequence>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ </xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getRegisteredCartridgesResponse">
+ <xs:element name="getServiceGroupDependenciesResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax26:Dependencies"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="unregisterDockerService">
+ <xs:element name="getServiceGroupCartridges">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="validatePartition">
+ <xs:element name="getServiceGroupCartridgesResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="partition" nillable="true" type="ax236:Partition"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="validatePartitionResponse">
+ <xs:element name="getServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="startContainers">
+ <xs:element name="getServiceGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="containerClusterContext" nillable="true" type="ax236:ContainerClusterContext"></xs:element>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax26:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="startContainersResponse">
+ <xs:element name="getRegisteredCartridges">
<xs:complexType>
- <xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax236:MemberContext"></xs:element>
- </xs:sequence>
+ <xs:sequence/>
</xs:complexType>
</xs:element>
- <xs:element name="terminateAllContainers">
+ <xs:element name="getRegisteredCartridgesResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="terminateAllContainersResponse">
+ <xs:element name="getClusterContext">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax236:MemberContext"></xs:element>
+ <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateContainers">
+ <xs:element name="getClusterContextResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="replicas" type="xs:int"></xs:element>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax26:ClusterContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateContainersResponse">
+ <xs:element name="getCartridgeInfo">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax236:MemberContext"></xs:element>
+ <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateClusterStatus">
+ <xs:element name="getCartridgeInfoResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="instanceId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="status" nillable="true" type="ax240:ClusterStatus"></xs:element>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax26:CartridgeInfo"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceMemberTerminationFailedException">
+ <xs:element name="deployServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="MemberTerminationFailedException" nillable="true" type="ax234:MemberTerminationFailedException"></xs:element>
+ <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax26:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="terminateContainer">
+ <xs:element name="CloudControllerServiceInvalidCartridgeDefinitionException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="memberId" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="InvalidCartridgeDefinitionException" nillable="true" type="ax21:InvalidCartridgeDefinitionException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="terminateContainerResponse">
+ <xs:element name="deployCartridgeDefinition">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax236:MemberContext"></xs:element>
+ <xs:element minOccurs="0" name="cartridgeConfig" nillable="true" type="ax26:CartridgeConfig"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceApplicationClusterRegistrationException">
+ <xs:element name="CloudControllerServiceClusterInstanceCreationException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="ApplicationClusterRegistrationException" nillable="true" type="ax234:ApplicationClusterRegistrationException"></xs:element>
+ <xs:element minOccurs="0" name="ClusterInstanceCreationException" nillable="true" type="ax21:ClusterInstanceCreationException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="createApplicationClusters">
+ <xs:element name="createClusterInstance">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="appId" nillable="true" type="xs:string"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="appClustersContexts" nillable="true" type="ax236:ApplicationClusterContext"></xs:element>
+ <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:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="CloudControllerServiceClusterInstanceCreationException">
+ <xs:element name="CloudControllerServiceApplicationClusterRegistrationException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="ClusterInstanceCreationException" nillable="true" type="ax234:ClusterInstanceCreationException"></xs:element>
+ <xs:element minOccurs="0" name="ApplicationClusterRegistrationException" nillable="true" type="ax21:ApplicationClusterRegistrationException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="createClusterInstance">
+ <xs:element name="createApplicationClusters">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="serviceType" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="instanceId" nillable="true" type="xs:string"></xs:element>
+ <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:schema>
- <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://exception.controller.cloud.stratos.apache.org/xsd">
- <xs:complexType name="UnregisteredClusterException">
- <xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
- </xs:sequence>
+ <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://topology.domain.messaging.stratos.apache.org/xsd">
+ <xs:complexType abstract="true" name="ClusterStatus">
+ <xs:complexContent>
+ <xs:extension base="xs:Enum">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="code" type="xs:int"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
</xs:complexType>
- <xs:complexType name="InvalidServiceGroupException">
+ </xs:schema>
+ <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://common.stratos.apache.org/xsd">
+ <xs:complexType name="Properties">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax24:Property"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="UnregisteredCartridgeException">
+ <xs:complexType name="Property">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <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: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:element>
+ <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:element>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidCartridgeDefinitionException">
+ <xs:complexType name="UnregisteredCartridgeException">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidIaasProviderException">
+ <xs:complexType name="UnregisteredClusterException">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <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="InvalidMemberException">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="MemberTerminationFailedException">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="InvalidClusterException">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="MemberTerminationFailedException">
+ <xs:complexType name="InvalidIaasProviderException">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="ApplicationClusterRegistrationException">
+ <xs:complexType name="InvalidCartridgeDefinitionException">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ClusterInstanceCreationException">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- </xs:schema>
- <xs:schema xmlns:ax239="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>
- <xs:complexType name="ServiceGroup">
+ <xs:complexType name="ApplicationClusterRegistrationException">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridges" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax236:Dependencies"></xs:element>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="subGroups" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="Dependencies">
+ </xs:schema>
+ <xs:schema xmlns:ax25="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://domain.controller.cloud.stratos.apache.org/xsd">
+ <xs:import namespace="http://common.stratos.apache.org/xsd"/>
+ <xs:complexType name="Partition">
<xs:sequence>
- <xs:element minOccurs="0" name="killBehaviour" nillable="true" type="xs:string"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="startupOrders" nillable="true" type="xs:string"></xs:element>
+ <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="partitionMax" type="xs:int"/>
+ <xs:element minOccurs="0" name="partitionMin" 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="Registrant">
+ <xs:complexType name="MemberContext">
<xs:sequence>
- <xs:element minOccurs="0" name="autoScalerPolicyName" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="deploymentPolicyName" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="hostName" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="payload" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="persistence" nillable="true" type="ax236:Persistence"></xs:element>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax238:Properties"></xs:element>
- <xs:element minOccurs="0" name="tenantRange" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="allocatedIpAddress" 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="initTime" type="xs:long"/>
+ <xs:element minOccurs="0" name="instanceId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="lbClusterId" nillable="true" type="xs:string"/>
+ <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="nodeId" 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="privateIpAddress" nillable="true" type="xs:string"/>
+ <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="Persistence">
+ <xs:complexType name="ContainerClusterContext">
<xs:sequence>
- <xs:element minOccurs="0" name="persistanceRequired" type="xs:boolean"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax236:Volume"></xs:element>
+ <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="Volume">
+ <xs:complexType name="Registrant">
<xs:sequence>
- <xs:element minOccurs="0" name="device" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="iaasType" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="mappingPath" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="removeOntermination" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="size" type="xs:int"></xs:element>
- <xs:element minOccurs="0" name="snapshotId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="volumeId" nillable="true" type="xs:string"></xs:element>
+ <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="ClusterContext">
+ <xs:complexType name="Persistence">
<xs:sequence>
- <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="hostName" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="lbCluster" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="payload" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax238:Properties"></xs:element>
- <xs:element minOccurs="0" name="timeoutInMillis" type="xs:long"></xs:element>
- <xs:element minOccurs="0" name="volumeRequired" type="xs:boolean"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax236:Volume"></xs:element>
+ <xs:element minOccurs="0" name="persistanceRequired" 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:complexType name="Volume">
<xs:sequence>
- <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="isPublic" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="partitionMax" type="xs:int"></xs:element>
- <xs:element minOccurs="0" name="partitionMin" type="xs:int"></xs:element>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax238:Properties"></xs:element>
- <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"></xs:element>
+ <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="CartridgeConfig">
+ <xs:complexType name="Dependencies">
<xs:sequence>
- <xs:element minOccurs="0" name="baseDir" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="container" nillable="true" type="ax236:Container"></xs:element>
- <xs:element minOccurs="0" name="defaultAutoscalingPolicy" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="defaultDeploymentPolicy" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="deployerType" nillable="true" type="xs:string"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="deploymentDirs" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="displayName" nillable="true" type="xs:string"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="exportingProperties" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="hostName" nillable="true" type="xs:string"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="iaasConfigs" nillable="true" type="ax236:IaasConfig"></xs:element>
- <xs:element minOccurs="0" name="isPublic" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="lbConfig" nillable="true" type="ax236:LoadbalancerConfig"></xs:element>
- <xs:element minOccurs="0" name="multiTenant" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="persistence" nillable="true" type="ax236:Persistence"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="portMappings" nillable="true" type="ax236:PortMapping"></xs:element>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax238:Properties"></xs:element>
- <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="serviceGroup" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="type" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="version" nillable="true" type="xs:string"></xs:element>
+ <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="Container">
+ <xs:complexType name="ServiceGroup">
<xs:sequence>
- <xs:element minOccurs="0" name="dockerFileRepo" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="imageName" nillable="true" type="xs:string"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="xs:string"></xs:element>
+ <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="IaasConfig">
+ <xs:complexType name="ClusterContext">
<xs:sequence>
- <xs:element minOccurs="0" name="className" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="credential" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="identity" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="imageId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="maxInstanceLimit" type="xs:int"></xs:element>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="networkInterfaces" nillable="true" type="ax236:NetworkInterfaces"></xs:element>
- <xs:element minOccurs="0" name="payload" nillable="true" type="xs:base64Binary"></xs:element>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax238:Properties"></xs:element>
- <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="type" nillable="true" type="xs:string"></xs:element>
+ <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="hostName" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="lbCluster" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="payload" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
+ <xs:element minOccurs="0" name="timeoutInMillis" type="xs:long"/>
+ <xs:element minOccurs="0" name="volumeRequired" type="xs:boolean"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax23:Volume"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="NetworkInterfaces">
+ <xs:complexType name="CartridgeInfo">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="networkInterfaces" nillable="true" type="ax236:NetworkInterface"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="appTypes" nillable="true" type="ax23:AppType"/>
+ <xs:element minOccurs="0" name="baseDir" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="defaultAutoscalingPolicy" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="defaultDeploymentPolicy" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="deploymentDirs" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="displayName" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="hostName" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="isPublic" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="lbConfig" nillable="true" type="ax23:LoadbalancerConfig"/>
+ <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 maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax25:Property"/>
+ <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="serviceGroup" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="type" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="version" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="NetworkInterface">
+ <xs:complexType name="AppType">
<xs:sequence>
- <xs:element minOccurs="0" name="fixedIp" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="networkUuid" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="portUuid" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="appSpecificMapping" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="LoadbalancerConfig">
<xs:sequence>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax238:Properties"></xs:element>
- <xs:element minOccurs="0" name="type" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
+ <xs:element minOccurs="0" name="type" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PortMapping">
<xs:sequence>
- <xs:element minOccurs="0" name="port" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="protocol" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="proxyPort" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="port" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="protocol" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="proxyPort" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="CartridgeInfo">
+ <xs:complexType name="CartridgeConfig">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="appTypes" nillable="true" type="ax236:AppType"></xs:element>
- <xs:element minOccurs="0" name="baseDir" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="defaultAutoscalingPolicy" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="defaultDeploymentPolicy" nillable="true" type="xs:string"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="deploymentDirs" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="displayName" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="hostName" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="isPublic" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="lbConfig" nillable="true" type="ax236:LoadbalancerConfig"></xs:element>
- <xs:element minOccurs="0" name="multiTenant" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="persistence" nillable="true" type="ax236:Persistence"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="portMappings" nillable="true" type="ax236:PortMapping"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax238:Property"></xs:element>
- <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="serviceGroup" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="type" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="version" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="baseDir" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="container" nillable="true" type="ax23:Container"/>
+ <xs:element minOccurs="0" name="defaultAutoscalingPolicy" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="defaultDeploymentPolicy" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="deployerType" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="deploymentDirs" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
+ <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 minOccurs="0" name="isPublic" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="lbConfig" nillable="true" type="ax23:LoadbalancerConfig"/>
+ <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="provider" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="serviceGroup" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="type" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="version" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="AppType">
+ <xs:complexType name="Container">
<xs:sequence>
- <xs:element minOccurs="0" name="appSpecificMapping" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="dockerFileRepo" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="imageName" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="MemberContext">
+ <xs:complexType name="IaasConfig">
<xs:sequence>
- <xs:element minOccurs="0" name="allocatedIpAddress" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="initTime" type="xs:long"></xs:element>
- <xs:element minOccurs="0" name="instanceId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="lbClusterId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="memberId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="networkPartitionId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="nodeId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="obsoleteExpiryTime" type="xs:long"></xs:element>
- <xs:element minOccurs="0" name="obsoleteInitTime" type="xs:long"></xs:element>
- <xs:element minOccurs="0" name="partition" nillable="true" type="ax236:Partition"></xs:element>
- <xs:element minOccurs="0" name="privateIpAddress" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax238:Properties"></xs:element>
- <xs:element minOccurs="0" name="publicIpAddress" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="className" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="credential" nillable="true" type="xs:string"/>
+ <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="maxInstanceLimit" type="xs:int"/>
+ <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="payload" nillable="true" type="xs:base64Binary"/>
+ <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="type" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="ContainerClusterContext">
+ <xs:complexType name="NetworkInterfaces">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="networkInterfaces" nillable="true" type="ax23:NetworkInterface"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="NetworkInterface">
<xs:sequence>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax238:Properties"></xs:element>
+ <xs:element minOccurs="0" name="fixedIp" nillable="true" type="xs:string"/>
+ <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="ApplicationClusterContext">
<xs:sequence>
- <xs:element minOccurs="0" name="autoscalePolicyName" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="deploymentPolicyName" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="hostName" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="lbCluster" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax238:Properties"></xs:element>
- <xs:element minOccurs="0" name="tenantRange" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="textPayload" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="autoscalePolicyName" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="deploymentPolicyName" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="hostName" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="lbCluster" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
+ <xs:element minOccurs="0" name="tenantRange" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="textPayload" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="validatePartitionRequest">
- <wsdl:part name="parameters" element="ns:validatePartition"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:validatePartition"/>
</wsdl:message>
<wsdl:message name="validatePartitionResponse">
- <wsdl:part name="parameters" element="ns:validatePartitionResponse"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:validatePartitionResponse"/>
</wsdl:message>
<wsdl:message name="CloudControllerServiceInvalidPartitionException">
- <wsdl:part name="parameters" element="ns:CloudControllerServiceInvalidPartitionException"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:CloudControllerServiceInvalidPartitionException"/>
</wsdl:message>
<wsdl:message name="createApplicationClustersRequest">
- <wsdl:part name="parameters" element="ns:createApplicationClusters"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:createApplicationClusters"/>
</wsdl:message>
<wsdl:message name="CloudControllerServiceApplicationClusterRegistrationException">
- <wsdl:part name="parameters" element="ns:CloudControllerServiceApplicationClusterRegistrationException"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:CloudControllerServiceApplicationClusterRegistrationException"/>
</wsdl:message>
<wsdl:message name="terminateContainerRequest">
- <wsdl:part name="parameters" element="ns:terminateContainer"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:terminateContainer"/>
</wsdl:message>
<wsdl:message name="terminateContainerResponse">
- <wsdl:part name="parameters" element="ns:terminateContainerResponse"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:terminateContainerResponse"/>
</wsdl:message>
<wsdl:message name="CloudControllerServiceMemberTerminationFailedException">
- <wsdl:part name="parameters" element="ns:CloudControllerServiceMemberTerminationFailedException"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:CloudControllerServiceMemberTerminationFailedException"/>
</wsdl:message>
<wsdl:message name="validateDeploymentPolicyRequest">
- <wsdl:part name="parameters" element="ns:validateDeploymentPolicy"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:validateDeploymentPolicy"/>
</wsdl:message>
<wsdl:message name="validateDeploymentPolicyResponse">
- <wsdl:part name="parameters" element="ns:validateDeploymentPolicyResponse"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:validateDeploymentPolicyResponse"/>
</wsdl:message>
<wsdl:message name="CloudControllerServiceInvalidCartridgeTypeException">
- <wsdl:part name="parameters" element="ns:CloudControllerServiceInvalidCartridgeTypeException"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:CloudControllerServiceInvalidCartridgeTypeException"/>
</wsdl:message>
<wsdl:message name="getServiceGroupCartridgesRequest">
- <wsdl:part name="parameters" element="ns:getServiceGroupCartridges"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:getServiceGroupCartridges"/>
</wsdl:message>
<wsdl:message name="getServiceGroupCartridgesResponse">
- <wsdl:part name="parameters" element="ns:getServiceGroupCartridgesResponse"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:getServiceGroupCartridgesResponse"/>
</wsdl:message>
<wsdl:message name="CloudControllerServiceInvalidServiceGroupException">
- <wsdl:part name="parameters" element="ns:CloudControllerServiceInvalidServiceGroupException"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:CloudControllerServiceInvalidServiceGroupException"/>
</wsdl:message>
<wsdl:message name="startContainersRequest">
- <wsdl:part name="parameters" element="ns:startContainers"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:startContainers"/>
</wsdl:message>
<wsdl:message name="startContainersResponse">
- <wsdl:part name="parameters" element="ns:startContainersResponse"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:startContainersResponse"/>
</wsdl:message>
<wsdl:message name="CloudControllerServiceUnregisteredCartridgeException">
- <wsdl:part name="parameters" element="ns:CloudControllerServiceUnregisteredCartridgeException"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:CloudControllerServiceUnregisteredCartridgeException"/>
</wsdl:message>
<wsdl:message name="registerServiceRequest">
- <wsdl:part name="parameters" element="ns:registerService"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:registerService"/>
</wsdl:message>
<wsdl:message name="registerServiceResponse">
- <wsdl:part name="parameters" element="ns:registerServiceResponse"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:registerServiceResponse"/>
</wsdl:message>
<wsdl:message name="terminateInstanceRequest">
- <wsdl:part name="parameters" element="ns:terminateInstance"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:terminateInstance"/>
</wsdl:message>
<wsdl:message name="CloudControllerServiceInvalidMemberException">
- <wsdl:part name="parameters" element="ns:CloudControllerServiceInvalidMemberException"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:CloudControllerServiceInvalidMemberException"/>
</wsdl:message>
<wsdl:message name="getServiceGroupDependenciesRequest">
- <wsdl:part name="parameters" element="ns:getServiceGroupDependencies"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:getServiceGroupDependencies"/>
</wsdl:message>
<wsdl:message name="getServiceGroupDependenciesResponse">
- <wsdl:part name="parameters" element="ns:getServiceGroupDependenciesResponse"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:getServiceGroupDependenciesResponse"/>
</wsdl:message>
<wsdl:message name="getServiceGroupSubGroupsRequest">
- <wsdl:part name="parameters" element="ns:getServiceGroupSubGroups"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:getServiceGroupSubGroups"/>
</wsdl:message>
<wsdl:message name="getServiceGroupSubGroupsResponse">
- <wsdl:part name="parameters" element="ns:getServiceGroupSubGroupsResponse"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:getServiceGroupSubGroupsResponse"/>
</wsdl:message>
<wsdl:message name="getServiceGroupRequest">
- <wsdl:part name="parameters" element="ns:getServiceGroup"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:getServiceGroup"/>
</wsdl:message>
<wsdl:message name="getServiceGroupResponse">
- <wsdl:part name="parameters" element="ns:getServiceGroupResponse"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:getServiceGroupResponse"/>
</wsdl:message>
<wsdl:message name="deployCartridgeDefinitionRequest">
- <wsdl:part name="parameters" element="ns:deployCartridgeDefinition"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:deployCartridgeDefinition"/>
</wsdl:message>
- <wsdl:message name="deployCartridgeDefinitionResponse"></wsdl:message>
<wsdl:message name="CloudControllerServiceInvalidCartridgeDefinitionException">
- <wsdl:part name="parameters" element="ns:CloudControllerServiceInvalidCartridgeDefinitionException"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:CloudControllerServiceInvalidCartridgeDefinitionException"/>
</wsdl:message>
<wsdl:message name="CloudControllerServiceInvalidIaasProviderException">
- <wsdl:part name="parameters" element="ns:CloudControllerServiceInvalidIaasProviderException"></wsdl:part>
- </wsdl:message>
- <wsdl:message name="undeployServiceGroupRequest">
- <wsdl:part name="parameters" element="ns:undeployServiceGroup"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:CloudControllerServiceInvalidIaasProviderException"/>
</wsdl:message>
<wsdl:message name="getCartridgeInfoRequest">
- <wsdl:part name="parameters" element="ns:getCartridgeInfo"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:getCartridgeInfo"/>
</wsdl:message>
<wsdl:message name="getCartridgeInfoResponse">
- <wsdl:part name="parameters" element="ns:getCartridgeInfoResponse"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:getCartridgeInfoResponse"/>
+ </wsdl:message>
+ <wsdl:message name="undeployServiceGroupRequest">
+ <wsdl:part name="parameters" element="ns:undeployServiceGroup"/>
</wsdl:message>
<wsdl:message name="terminateAllContainersRequest">
- <wsdl:part name="parameters" element="ns:terminateAllContainers"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:terminateAllContainers"/>
</wsdl:message>
<wsdl:message name="terminateAllContainersResponse">
- <wsdl:part name="parameters" element="ns:terminateAllContainersResponse"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:terminateAllContainersResponse"/>
</wsdl:message>
<wsdl:message name="CloudControllerServiceInvalidClusterException">
- <wsdl:part name="parameters" element="ns:CloudControllerServiceInvalidClusterException"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:CloudControllerServiceInvalidClusterException"/>
</wsdl:message>
<wsdl:message name="createClusterInstanceRequest">
- <wsdl:part name="parameters" element="ns:createClusterInstance"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:createClusterInstance"/>
</wsdl:message>
<wsdl:message name="CloudControllerServiceClusterInstanceCreationException">
- <wsdl:part name="parameters" element="ns:CloudControllerServiceClusterInstanceCreationException"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:CloudControllerServiceClusterInstanceCreationException"/>
</wsdl:message>
<wsdl:message name="unregisterServiceRequest">
- <wsdl:part name="parameters" element="ns:unregisterService"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:unregisterService"/>
</wsdl:message>
- <wsdl:message name="unregisterServiceResponse"></wsdl:message>
<wsdl:message name="CloudControllerServiceUnregisteredClusterException">
- <wsdl:part name="parameters" element="ns:CloudControllerServiceUnregisteredClusterException"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:CloudControllerServiceUnregisteredClusterException"/>
</wsdl:message>
<wsdl:message name="undeployCartridgeDefinitionRequest">
- <wsdl:part name="parameters" element="ns:undeployCartridgeDefinition"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:undeployCartridgeDefinition"/>
</wsdl:message>
- <wsdl:message name="undeployCartridgeDefinitionResponse"></wsdl:message>
<wsdl:message name="terminateAllInstancesRequest">
- <wsdl:part name="parameters" element="ns:terminateAllInstances"></wsdl:part>
- </wsdl:message>
- <wsdl:message name="unregisterDockerServiceRequest">
- <wsdl:part name="parameters" element="ns:unregisterDockerService"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:terminateAllInstances"/>
</wsdl:message>
<wsdl:message name="getRegisteredCartridgesRequest">
- <wsdl:part name="parameters" element="ns:getRegisteredCartridges"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:getRegisteredCartridges"/>
</wsdl:message>
<wsdl:message name="getRegisteredCartridgesResponse">
- <wsdl:part name="parameters" element="ns:getRegisteredCartridgesResponse"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:getRegisteredCartridgesResponse"/>
+ </wsdl:message>
+ <wsdl:message name="unregisterDockerServiceRequest">
+ <wsdl:part name="parameters" element="ns:unregisterDockerService"/>
</wsdl:message>
<wsdl:message name="startInstanceRequest">
- <wsdl:part name="parameters" element="ns:startInstance"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:startInstance"/>
</wsdl:message>
<wsdl:message name="startInstanceResponse">
- <wsdl:part name="parameters" element="ns:startInstanceResponse"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:startInstanceResponse"/>
</wsdl:message>
<wsdl:message name="updateContainersRequest">
- <wsdl:part name="parameters" element="ns:updateContainers"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:updateContainers"/>
</wsdl:message>
<wsdl:message name="updateContainersResponse">
- <wsdl:part name="parameters" element="ns:updateContainersResponse"></wsdl:part>
- </wsdl:message>
- <wsdl:message name="updateClusterStatusRequest">
- <wsdl:part name="parameters" element="ns:updateClusterStatus"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:updateContainersResponse"/>
</wsdl:message>
<wsdl:message name="getClusterContextRequest">
- <wsdl:part name="parameters" element="ns:getClusterContext"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:getClusterContext"/>
</wsdl:message>
<wsdl:message name="getClusterContextResponse">
- <wsdl:part name="parameters" element="ns:getClusterContextResponse"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:getClusterContextResponse"/>
+ </wsdl:message>
+ <wsdl:message name="updateClusterStatusRequest">
+ <wsdl:part name="parameters" element="ns:updateClusterStatus"/>
</wsdl:message>
<wsdl:message name="deployServiceGroupRequest">
- <wsdl:part name="parameters" element="ns:deployServiceGroup"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:deployServiceGroup"/>
</wsdl:message>
<wsdl:portType name="CloudControllerServicePortType">
<wsdl:operation name="validatePartition">
- <wsdl:input message="ns:validatePartitionRequest" wsaw:Action="urn:validatePartition"></wsdl:input>
- <wsdl:output me
<TRUNCATED>
[03/13] stratos git commit: Service component methods' should be
protected.
Posted by ni...@apache.org.
Service component methods' should be protected.
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/799b1768
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/799b1768
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/799b1768
Branch: refs/heads/master
Commit: 799b1768c58b818183e202e45eba8c53895baa3c
Parents: 494e293
Author: Nirmal Fernando <ni...@gmail.com>
Authored: Sun Nov 30 12:37:54 2014 +0530
Committer: Nirmal Fernando <ni...@gmail.com>
Committed: Sun Nov 30 12:47:23 2014 +0530
----------------------------------------------------------------------
.../controller/internal/CloudControllerServiceComponent.java | 7 ++++---
.../controller/services/impl/CloudControllerServiceImpl.java | 5 +++--
2 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/799b1768/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/internal/CloudControllerServiceComponent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/internal/CloudControllerServiceComponent.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/internal/CloudControllerServiceComponent.java
index 9b99e7a..8f826e3 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/internal/CloudControllerServiceComponent.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/internal/CloudControllerServiceComponent.java
@@ -22,6 +22,7 @@ package org.apache.stratos.cloud.controller.internal;
import com.hazelcast.core.HazelcastInstance;
+
import org.apache.axis2.clustering.ClusteringAgent;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -29,8 +30,8 @@ import org.apache.stratos.cloud.controller.context.CloudControllerContext;
import org.apache.stratos.cloud.controller.messaging.receiver.application.ApplicationTopicReceiver;
import org.apache.stratos.cloud.controller.messaging.receiver.cluster.status.ClusterStatusTopicReceiver;
import org.apache.stratos.cloud.controller.exception.CloudControllerException;
-import org.apache.stratos.cloud.controller.services.CloudControllerServiceImpl;
import org.apache.stratos.cloud.controller.services.CloudControllerService;
+import org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl;
import org.apache.stratos.cloud.controller.messaging.publisher.TopologySynchronizerTaskScheduler;
import org.apache.stratos.cloud.controller.messaging.receiver.instance.status.InstanceStatusTopicReceiver;
import org.apache.stratos.messaging.broker.publish.EventPublisherPool;
@@ -163,11 +164,11 @@ public class CloudControllerServiceComponent {
ServiceReferenceHolder.getInstance().setAxisConfiguration(null);
}
- public void setHazelcastInstance(HazelcastInstance hazelcastInstance) {
+ protected void setHazelcastInstance(HazelcastInstance hazelcastInstance) {
ServiceReferenceHolder.getInstance().setHazelcastInstance(hazelcastInstance);
}
- public void unsetHazelcastInstance(HazelcastInstance hazelcastInstance) {
+ protected void unsetHazelcastInstance(HazelcastInstance hazelcastInstance) {
ServiceReferenceHolder.getInstance().setHazelcastInstance(null);
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/799b1768/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 b9d891f..abec364 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
@@ -16,10 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.stratos.cloud.controller.services;
+package org.apache.stratos.cloud.controller.services.impl;
import com.google.common.collect.ImmutableSet;
import com.google.common.net.InetAddresses;
+
import org.apache.commons.collections.ListUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
@@ -31,7 +32,6 @@ import org.apache.stratos.cloud.controller.context.CloudControllerContext;
import org.apache.stratos.cloud.controller.domain.*;
import org.apache.stratos.cloud.controller.domain.Cartridge;
import org.apache.stratos.cloud.controller.domain.Dependencies;
-import org.apache.stratos.cloud.controller.domain.Partition;
import org.apache.stratos.cloud.controller.exception.*;
import org.apache.stratos.cloud.controller.functions.ContainerClusterContextToKubernetesService;
import org.apache.stratos.cloud.controller.functions.ContainerClusterContextToReplicationController;
@@ -40,6 +40,7 @@ import org.apache.stratos.cloud.controller.iaas.Iaas;
import org.apache.stratos.cloud.controller.registry.Deserializer;
import org.apache.stratos.cloud.controller.messaging.publisher.CartridgeInstanceDataPublisher;
import org.apache.stratos.cloud.controller.registry.RegistryManager;
+import org.apache.stratos.cloud.controller.services.CloudControllerService;
import org.apache.stratos.cloud.controller.messaging.topology.TopologyBuilder;
import org.apache.stratos.cloud.controller.messaging.topology.TopologyEventPublisher;
import org.apache.stratos.cloud.controller.messaging.topology.TopologyManager;
[04/13] stratos git commit: Fixing exports after latest refactoring
Posted by ni...@apache.org.
Fixing exports after latest refactoring
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/494e2934
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/494e2934
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/494e2934
Branch: refs/heads/master
Commit: 494e293457bb2e2f2ea66042866daed90e6dee7e
Parents: f0fcf7d
Author: Nirmal Fernando <ni...@gmail.com>
Authored: Sun Nov 30 12:37:03 2014 +0530
Committer: Nirmal Fernando <ni...@gmail.com>
Committed: Sun Nov 30 12:47:23 2014 +0530
----------------------------------------------------------------------
.../org.apache.stratos.cloud.controller/pom.xml | 26 +++++---------------
1 file changed, 6 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/494e2934/components/org.apache.stratos.cloud.controller/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/pom.xml b/components/org.apache.stratos.cloud.controller/pom.xml
index 1b88759..5889c1d 100644
--- a/components/org.apache.stratos.cloud.controller/pom.xml
+++ b/components/org.apache.stratos.cloud.controller/pom.xml
@@ -49,27 +49,13 @@
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Bundle-Name>${project.artifactId}</Bundle-Name>
<Export-Package>
- org.apache.stratos.cloud.controller.interfaces.*,
- org.apache.stratos.cloud.controller.messaging.publisher.*,
- org.apache.stratos.cloud.controller.topic.*,
- org.apache.stratos.cloud.controller.messaging.topology.*,
- org.apache.stratos.cloud.controller.iaas.*,
- org.apache.stratos.cloud.controller.pojo.*,
- org.apache.stratos.cloud.controller.deployers.*,
- org.apache.stratos.cloud.controller.exception.*,
- org.apache.stratos.cloud.controller.pojo.application.*,
+ !org.apache.stratos.cloud.controller.services.impl.*,
+ !org.apache.stratos.cloud.controller.internal.*,
+ org.apache.stratos.cloud.controller.*,
</Export-Package>
<Private-Package>
- !org.apache.stratos.cloud.controller.interfaces.*,
- !org.apache.stratos.cloud.controller.messaging.publisher.*,
- !org.apache.stratos.cloud.controller.topic.*,
- !org.apache.stratos.cloud.controller.iaas.*,
- !org.apache.stratos.cloud.controller.pojo.*,
- !org.apache.stratos.cloud.controller.pojo.application.*,
- !org.apache.stratos.cloud.controller.deployers.*,
- !org.apache.stratos.cloud.controller.exception.*,
- !org.apache.stratos.cloud.controller.messaging.topology.*,
- org.apache.stratos.cloud.controller.*,
+ org.apache.stratos.cloud.controller.services.impl.*,
+ org.apache.stratos.cloud.controller.internal.*,
</Private-Package>
<Import-Package>
!org.apache.commons.logging,
@@ -91,7 +77,7 @@
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-java2wsdl-maven-plugin</artifactId>
<configuration>
- <className>org.apache.stratos.cloud.controller.services.CloudControllerServiceImpl</className>
+ <className>org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl</className>
<outputFileName>target/generated-resources/wsdl/CloudControllerService.wsdl</outputFileName>
<serviceName>CloudControllerService</serviceName>
</configuration>
[10/13] stratos git commit: Autoscaler WSDL and pom export changes.
Posted by ni...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/86a67c0b/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 3a67ffa..b5c45bf 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,2510 +1,2019 @@
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ax29="http://model.policy.autoscaler.stratos.apache.org/xsd" xmlns:ns="http://api.autoscaler.stratos.apache.org" xmlns:ax25="http://kubernetes.common.stratos.apache.org/xsd" xmlns:ax26="http://common.stratos.apache.org/xsd" xmlns:ax23="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax219="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax214="http://partition.autoscaler.stratos.apache.org/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax210="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd" xmlns:ax223="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax211="http://pojo.stub.controller.cloud.stratos.apache.org/xsd" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsd
l/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://api.autoscaler.stratos.apache.org">
- <wsdl:documentation>AutoScalerService</wsdl:documentation>
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ax29="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax27="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ns="http://api.autoscaler.stratos.apache.org" xmlns:ax23="http://kubernetes.common.stratos.apache.org/xsd" xmlns:ax24="http://common.stratos.apache.org/xsd" xmlns:ax217="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax21="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax228="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax220="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax213="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax222="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax210="http://
domain.stub.controller.cloud.stratos.apache.org/xsd" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ax224="http://pojo.autoscaler.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://api.autoscaler.stratos.apache.org">
<wsdl:types>
- <xs:schema xmlns:ax224="http://pojo.stub.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd">
- <xs:import namespace="http://pojo.stub.controller.cloud.stratos.apache.org/xsd"></xs:import>
- <xs:complexType name="ApplicationContext">
+ <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd">
+ <xs:complexType name="AutoscalePolicy">
<xs:sequence>
- <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="components" nillable="true" type="ax223:ComponentContext"></xs:element>
- <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax211:Properties"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="subscribableInfoContext" nillable="true" type="ax223:SubscribableInfoContext"></xs:element>
- <xs:element minOccurs="0" name="teantAdminUsername" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="tenantDomain" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="tenantId" type="xs:int"></xs:element>
+ <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="displayName" nillable="true" type="xs:string"/>
+ <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="ax220:LoadThresholds"/>
+ <xs:element minOccurs="0" name="tenantId" type="xs:int"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="ComponentContext">
+ <xs:complexType name="LoadThresholds">
<xs:sequence>
- <xs:element minOccurs="0" name="dependencyContext" nillable="true" type="ax223:DependencyContext"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax223:GroupContext"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="subscribableContexts" nillable="true" type="ax223:SubscribableContext"></xs:element>
+ <xs:element minOccurs="0" name="loadAverage" nillable="true" type="ax220:LoadAverageThresholds"/>
+ <xs:element minOccurs="0" name="memoryConsumption" nillable="true" type="ax220:MemoryConsumptionThresholds"/>
+ <xs:element minOccurs="0" name="requestsInFlight" nillable="true" type="ax220:RequestsInFlightThresholds"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="DependencyContext">
+ <xs:complexType name="LoadAverageThresholds">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="startupOrdersContexts" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="terminationBehaviour" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="lowerLimit" type="xs:float"/>
+ <xs:element minOccurs="0" name="upperLimit" type="xs:float"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="GroupContext">
+ <xs:complexType name="MemoryConsumptionThresholds">
<xs:sequence>
- <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="autoscalingPolicy" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="xs:string"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax223:GroupContext"></xs:element>
- <xs:element minOccurs="0" name="groupInstanceMonitoringEnabled" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="groupMaxInstances" type="xs:int"></xs:element>
- <xs:element minOccurs="0" name="groupMinInstances" type="xs:int"></xs:element>
- <xs:element minOccurs="0" name="groupScalingEnabled" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="subscribableContexts" nillable="true" type="ax223:SubscribableContext"></xs:element>
+ <xs:element minOccurs="0" name="lowerLimit" type="xs:float"/>
+ <xs:element minOccurs="0" name="upperLimit" type="xs:float"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="SubscribableContext">
+ <xs:complexType name="RequestsInFlightThresholds">
<xs:sequence>
- <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="type" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="lowerLimit" type="xs:float"/>
+ <xs:element minOccurs="0" name="upperLimit" type="xs:float"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="SubscribableInfoContext">
+ </xs:schema>
+ <xs:schema xmlns:ax229="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>
- <xs:element minOccurs="0" name="autoscalingPolicy" nillable="true" type="xs:string"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="dependencyAliases" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="maxMembers" type="xs:int"></xs:element>
- <xs:element minOccurs="0" name="minMembers" type="xs:int"></xs:element>
- <xs:element minOccurs="0" name="privateRepo" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax211:Properties"></xs:element>
- <xs:element minOccurs="0" name="repoPassword" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="repoUrl" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="repoUsername" nillable="true" type="xs:string"></xs:element>
+ <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="ax228:ComponentContext"/>
+ <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax24:Properties"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="subscribableInfoContext" nillable="true" type="ax228:SubscribableInfoContext"/>
+ <xs:element minOccurs="0" name="teantAdminUsername" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="tenantDomain" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="tenantId" type="xs:int"/>
</xs:sequence>
</xs:complexType>
- </xs:schema>
- <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.autoscaler.stratos.apache.org/xsd">
- <xs:complexType name="ServiceGroup">
+ <xs:complexType name="ComponentContext">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridges" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax219:Dependencies"></xs:element>
- <xs:element minOccurs="0" name="groupscalingEnabled" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="subGroups" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="dependencyContext" nillable="true" type="ax228:DependencyContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax228:GroupContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="subscribableContexts" nillable="true" type="ax228:SubscribableContext"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="Dependencies">
+ <xs:complexType name="DependencyContext">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="scalingOrders" nillable="true" type="xs:string"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="startupOrders" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="terminationBehaviour" nillable="true" type="xs:string"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="startupOrdersContexts" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="terminationBehaviour" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- </xs:schema>
- <xs:schema xmlns:ax216="http://partition.autoscaler.stratos.apache.org/xsd" xmlns:ax213="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://model.policy.autoscaler.stratos.apache.org/xsd">
- <xs:import namespace="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd"></xs:import>
- <xs:import namespace="http://partition.autoscaler.stratos.apache.org/xsd"></xs:import>
- <xs:complexType name="DeploymentPolicy">
+ <xs:complexType name="GroupContext">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="allPartitions" nillable="true" type="ax213:Partition"></xs:element>
- <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="isPublic" type="xs:boolean"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="partitionGroups" nillable="true" type="ax216:PartitionGroup"></xs:element>
- <xs:element minOccurs="0" name="tenantId" type="xs:int"></xs:element>
+ <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="autoscalingPolicy" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax228:GroupContext"/>
+ <xs:element minOccurs="0" name="groupInstanceMonitoringEnabled" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="groupMaxInstances" type="xs:int"/>
+ <xs:element minOccurs="0" name="groupMinInstances" type="xs:int"/>
+ <xs:element minOccurs="0" name="groupScalingEnabled" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="subscribableContexts" nillable="true" type="ax228:SubscribableContext"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="AutoscalePolicy">
+ <xs:complexType name="SubscribableContext">
<xs:sequence>
- <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="displayName" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="instanceRoundingFactor" type="xs:float"></xs:element>
- <xs:element minOccurs="0" name="isPublic" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="loadThresholds" nillable="true" type="ax29:LoadThresholds"></xs:element>
- <xs:element minOccurs="0" name="tenantId" type="xs:int"></xs:element>
+ <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="type" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="LoadThresholds">
+ <xs:complexType name="SubscribableInfoContext">
<xs:sequence>
- <xs:element minOccurs="0" name="loadAverage" nillable="true" type="ax29:LoadAverageThresholds"></xs:element>
- <xs:element minOccurs="0" name="memoryConsumption" nillable="true" type="ax29:MemoryConsumptionThresholds"></xs:element>
- <xs:element minOccurs="0" name="requestsInFlight" nillable="true" type="ax29:RequestsInFlightThresholds"></xs:element>
+ <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
+ <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="privateRepo" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax24:Properties"/>
+ <xs:element minOccurs="0" name="repoPassword" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="repoUrl" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="repoUsername" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="LoadAverageThresholds">
+ </xs:schema>
+ <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.autoscaler.stratos.apache.org/xsd">
+ <xs:complexType name="ServiceGroup">
<xs:sequence>
- <xs:element minOccurs="0" name="lowerLimit" type="xs:float"></xs:element>
- <xs:element minOccurs="0" name="upperLimit" type="xs:float"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridges" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax224:Dependencies"/>
+ <xs:element minOccurs="0" name="groupscalingEnabled" type="xs:boolean"/>
+ <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="MemoryConsumptionThresholds">
+ <xs:complexType name="Dependencies">
<xs:sequence>
- <xs:element minOccurs="0" name="lowerLimit" type="xs:float"></xs:element>
- <xs:element minOccurs="0" name="upperLimit" type="xs:float"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="scalingOrders" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="startupOrders" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="terminationBehaviour" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="RequestsInFlightThresholds">
+ </xs:schema>
+ <xs:schema xmlns:ax215="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax212="http://domain.stub.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
+ <xs:import namespace="http://domain.stub.controller.cloud.stratos.apache.org/xsd"/>
+ <xs:import namespace="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
+ <xs:complexType name="DeploymentPolicy">
<xs:sequence>
- <xs:element minOccurs="0" name="lowerLimit" type="xs:float"></xs:element>
- <xs:element minOccurs="0" name="upperLimit" type="xs:float"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="allPartitions" nillable="true" type="ax212:Partition"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="applicationLevelNetworkPartitions" nillable="true" type="ax215:ApplicationLevelNetworkPartition"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelNetworkPartitions" nillable="true" type="ax215:ChildLevelNetworkPartition"/>
+ <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="tenantId" type="xs:int"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ax215="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://partition.autoscaler.stratos.apache.org/xsd">
- <xs:import namespace="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd"></xs:import>
- <xs:complexType name="PartitionGroup">
+ <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://application.exception.autoscaler.stratos.apache.org/xsd">
+ <xs:complexType name="ApplicationDefinitionException">
<xs:sequence>
- <xs:element minOccurs="0" name="activeByDefault" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="partitionAlgo" nillable="true" type="xs:string"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax215:Partition"></xs:element>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ax212="http://pojo.stub.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd">
- <xs:import namespace="http://pojo.stub.controller.cloud.stratos.apache.org/xsd"></xs:import>
- <xs:complexType name="Partition">
+ <xs:schema xmlns:ax214="http://domain.stub.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
+ <xs:import namespace="http://domain.stub.controller.cloud.stratos.apache.org/xsd"/>
+ <xs:complexType name="ApplicationLevelNetworkPartition">
<xs:sequence>
- <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="descriptionSpecified" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="idSpecified" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="isPublic" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="isPublicSpecified" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="partitionMax" type="xs:int"></xs:element>
- <xs:element minOccurs="0" name="partitionMaxSpecified" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="partitionMin" type="xs:int"></xs:element>
- <xs:element minOccurs="0" name="partitionMinSpecified" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax212:Properties"></xs:element>
- <xs:element minOccurs="0" name="propertiesSpecified" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="providerSpecified" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="activeByDefault" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax214:Partition"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="ChildLevelNetworkPartition">
+ <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="partitions" nillable="true" type="ax214:Partition"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
<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>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax24:Property"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Property">
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="value" nillable="true" type="xs:string"></xs:element>
+ <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:schema>
- <xs:schema xmlns:ax220="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax221="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd" xmlns:ax28="http://kubernetes.common.stratos.apache.org/xsd" xmlns:ax222="http://partition.autoscaler.stratos.apache.org/xsd" xmlns:ax225="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax24="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax217="http://model.policy.autoscaler.stratos.apache.org/xsd" xmlns:ax218="http://pojo.stub.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://api.autoscaler.stratos.apache.org">
- <xs:import namespace="http://exception.autoscaler.stratos.apache.org/xsd"></xs:import>
- <xs:import namespace="http://kubernetes.common.stratos.apache.org/xsd"></xs:import>
- <xs:import namespace="http://model.policy.autoscaler.stratos.apache.org/xsd"></xs:import>
- <xs:import namespace="http://pojo.stub.controller.cloud.stratos.apache.org/xsd"></xs:import>
- <xs:import namespace="http://pojo.autoscaler.stratos.apache.org/xsd"></xs:import>
- <xs:import namespace="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd"></xs:import>
- <xs:import namespace="http://partition.autoscaler.stratos.apache.org/xsd"></xs:import>
- <xs:import namespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd"></xs:import>
+ <xs:schema xmlns:ax28="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax26="http://kubernetes.common.stratos.apache.org/xsd" xmlns:ax22="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax216="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax219="http://common.stratos.apache.org/xsd" xmlns:ax218="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax221="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax223="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax225="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax226="http://domain.stub.controller.cloud.stratos.apache.org/xsd" xmlns:ax227="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax230="http://pojo.applications.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://api.autoscaler.stratos.apache.org
">
+ <xs:import namespace="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd"/>
+ <xs:import namespace="http://kubernetes.common.stratos.apache.org/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://exception.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:import namespace="http://application.exception.autoscaler.stratos.apache.org/xsd"/>
+ <xs:import namespace="http://pojo.autoscaler.stratos.apache.org/xsd"/>
+ <xs:import namespace="http://domain.stub.controller.cloud.stratos.apache.org/xsd"/>
+ <xs:import namespace="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
+ <xs:import namespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd"/>
<xs:element name="AutoScalerServiceInvalidKubernetesMasterException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidKubernetesMasterException" nillable="true" type="ax23:InvalidKubernetesMasterException"></xs:element>
+ <xs:element minOccurs="0" name="InvalidKubernetesMasterException" nillable="true" type="ax21:InvalidKubernetesMasterException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoScalerServiceNonExistingKubernetesMasterException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="NonExistingKubernetesMasterException" nillable="true" type="ax23:NonExistingKubernetesMasterException"></xs:element>
+ <xs:element minOccurs="0" name="NonExistingKubernetesMasterException" nillable="true" type="ax21:NonExistingKubernetesMasterException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="updateKubernetesMaster">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax28:KubernetesMaster"></xs:element>
+ <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax26:KubernetesMaster"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="updateKubernetesMasterResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoScalerServiceInvalidKubernetesHostException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidKubernetesHostException" nillable="true" type="ax23:InvalidKubernetesHostException"></xs:element>
+ <xs:element minOccurs="0" name="InvalidKubernetesHostException" nillable="true" type="ax21:InvalidKubernetesHostException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoScalerServiceNonExistingKubernetesHostException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="NonExistingKubernetesHostException" nillable="true" type="ax23:NonExistingKubernetesHostException"></xs:element>
+ <xs:element minOccurs="0" name="NonExistingKubernetesHostException" nillable="true" type="ax21:NonExistingKubernetesHostException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="updateKubernetesHost">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax28:KubernetesHost"></xs:element>
+ <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax26:KubernetesHost"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="updateKubernetesHostResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoScalerServiceInvalidPolicyException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax23:InvalidPolicyException"></xs:element>
+ <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax27:InvalidPolicyException"/>
</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>
+ <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax29:DeploymentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="updateDeploymentPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoScalerServiceInvalidArgumentException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax23:InvalidArgumentException"></xs:element>
+ <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax217:InvalidArgumentException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="updateClusterMonitor">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax218:Properties"></xs:element>
+ <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax24:Properties"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="updateAutoScalingPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax29:AutoscalePolicy"></xs:element>
+ <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax220:AutoscalePolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="updateAutoScalingPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoScalerServiceAutoScalerException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax23:AutoScalerException"></xs:element>
+ <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax217:AutoScalerException"/>
</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:element>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</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>
+ <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax222:ApplicationDefinitionException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="unDeployApplicationDefinition">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="tenantId" type="xs:int"></xs:element>
- <xs:element minOccurs="0" name="tenantDomain" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="tenantId" type="xs:int"/>
+ <xs:element minOccurs="0" name="tenantDomain" nillable="true" type="xs:string"/>
</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:element>
+ <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:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="removeKubernetesHost">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="hostId" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="hostId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="removeKubernetesHostResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoScalerServiceNonExistingKubernetesGroupException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="NonExistingKubernetesGroupException" nillable="true" type="ax23:NonExistingKubernetesGroupException"></xs:element>
+ <xs:element minOccurs="0" name="NonExistingKubernetesGroupException" nillable="true" type="ax21:NonExistingKubernetesGroupException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="removeKubernetesGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="removeKubernetesGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getValidDeploymentPoliciesforCartridge">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getValidDeploymentPoliciesforCartridgeResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:DeploymentPolicy"></xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getServiceLBClusterId">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="serviceType" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="deploymentPolicyName" nillable="true" type="xs:string"></xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getServiceLBClusterIdResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"></xs:element>
+ <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:sequence>
+ <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="ax219:ServiceGroup"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax224:ServiceGroup"/>
</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:element>
+ <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="ax219:ServiceGroup"></xs:element>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax224:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getPartitionsOfGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getPartitionsOfGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax221:Partition"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax226:Partition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getPartitionsOfDeploymentPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getPartitionsOfDeploymentPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax221:Partition"></xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getPartitionGroups">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"></xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getPartitionGroupsResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax214:PartitionGroup"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax226:Partition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getPartition">
+ <xs:element name="getNetworkPartitions">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="partitionId" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getPartitionResponse">
+ <xs:element name="getNetworkPartitionsResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax221:Partition"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax227:ApplicationLevelNetworkPartition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getMasterForKubernetesGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getMasterForKubernetesGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax28:KubernetesMaster"></xs:element>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax26:KubernetesMaster"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getKubernetesGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getKubernetesGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax28:KubernetesGroup"></xs:element>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax26:KubernetesGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getHostsForKubernetesGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getHostsForKubernetesGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax28:KubernetesHost"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:KubernetesHost"/>
</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:element>
+ <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="ax29:DeploymentPolicy"></xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getDefaultLBClusterId">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicyName" nillable="true" type="xs:string"></xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getDefaultLBClusterIdResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax29: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:element>
+ <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="ax29:AutoscalePolicy"></xs:element>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax220:AutoscalePolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getAllKubernetesGroups">
<xs:complexType>
- <xs:sequence></xs:sequence>
+ <xs:sequence/>
</xs:complexType>
</xs:element>
<xs:element name="getAllKubernetesGroupsResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax28:KubernetesGroup"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:KubernetesGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getAllDeploymentPolicies">
<xs:complexType>
- <xs:sequence></xs:sequence>
+ <xs:sequence/>
</xs:complexType>
</xs:element>
<xs:element name="getAllDeploymentPoliciesResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:DeploymentPolicy"></xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getAllAvailablePartitions">
- <xs:complexType>
- <xs:sequence></xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getAllAvailablePartitionsResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax221:Partition"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:DeploymentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getAllAutoScalingPolicy">
<xs:complexType>
- <xs:sequence></xs:sequence>
+ <xs:sequence/>
</xs:complexType>
</xs:element>
<xs:element name="getAllAutoScalingPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:AutoscalePolicy"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax220:AutoscalePolicy"/>
</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>
+ <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax21:InvalidServiceGroupException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="deployServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax219:ServiceGroup"></xs:element>
+ <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax224:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="deployApplicationDefinition">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax223:ApplicationContext"></xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="checkServiceLBExistenceAgainstPolicy">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"></xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="checkServiceLBExistenceAgainstPolicyResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="AutoScalerServiceNonExistingLBException">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="NonExistingLBException" nillable="true" type="ax23:NonExistingLBException"></xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="checkLBExistenceAgainstPolicy">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="lbClusterId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"></xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="checkDefaultLBExistenceAgainstPolicy">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"></xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="checkDefaultLBExistenceAgainstPolicyResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="checkClusterLBExistenceAgainstPolicy">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"></xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="checkClusterLBExistenceAgainstPolicyResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="AutoScalerServiceInvalidPartitionException">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="InvalidPartitionException" nillable="true" type="ax23:InvalidPartitionException"></xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="addPartition">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="partition" nillable="true" type="ax221:Partition"></xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="addPartitionResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax228:ApplicationContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="addKubernetesHost">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax28:KubernetesHost"></xs:element>
+ <xs:element minOccurs="0" name="groupId" 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="addKubernetesHostResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoScalerServiceInvalidKubernetesGroupException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidKubernetesGroupException" nillable="true" type="ax23:InvalidKubernetesGroupException"></xs:element>
+ <xs:element minOccurs="0" name="InvalidKubernetesGroupException" nillable="true" type="ax21:InvalidKubernetesGroupException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="addKubernetesGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesGroup" nillable="true" type="ax28:KubernetesGroup"></xs:element>
+ <xs:element minOccurs="0" name="kubernetesGroup" nillable="true" type="ax26:KubernetesGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="addKubernetesGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="addDeploymentPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax29:DeploymentPolicy"></xs:element>
+ <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax29:DeploymentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="addDeploymentPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="addAutoScalingPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax29:AutoscalePolicy"></xs:element>
+ <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax220:AutoscalePolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="addAutoScalingPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
- <xs:schema xmlns:ax27="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://kubernetes.common.stratos.apache.org/xsd">
- <xs:import namespace="http://common.stratos.apache.org/xsd"></xs:import>
- <xs:complexType name="KubernetesHost">
- <xs:sequence>
- <xs:element minOccurs="0" name="hostId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="hostIpAddress" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="hostname" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"></xs:element>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="KubernetesMaster">
- <xs:complexContent>
- <xs:extension base="ax25:KubernetesHost">
- <xs:sequence>
- <xs:element minOccurs="0" name="endpoint" nillable="true" type="xs:string"></xs:element>
- </xs:sequence>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="KubernetesGroup">
- <xs:sequence>
- <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="kubernetesHosts" nillable="true" type="ax25:KubernetesHost"></xs:element>
- <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax25:KubernetesMaster"></xs:element>
- <xs:element minOccurs="0" name="portRange" nillable="true" type="ax25:PortRange"></xs:element>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"></xs:element>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="PortRange">
- <xs:sequence>
- <xs:element minOccurs="0" name="lower" type="xs:int"></xs:element>
- <xs:element minOccurs="0" name="upper" type="xs:int"></xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:schema>
- <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.stub.controller.cloud.stratos.apache.org/xsd">
- <xs:complexType name="Properties">
+ <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd">
+ <xs:complexType name="InvalidKubernetesMasterException">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax211:Property"></xs:element>
- <xs:element minOccurs="0" name="propertiesSpecified" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="Property">
+ <xs:complexType name="NonExistingKubernetesMasterException">
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="nameSpecified" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="value" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="valueSpecified" type="xs:boolean"></xs:element>
+ <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://exception.autoscaler.stratos.apache.org/xsd">
- <xs:complexType name="InvalidKubernetesMasterException">
+ <xs:complexType name="InvalidKubernetesHostException">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="NonExistingKubernetesMasterException">
+ <xs:complexType name="NonExistingKubernetesHostException">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidKubernetesHostException">
+ <xs:complexType name="NonExistingKubernetesGroupException">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="NonExistingKubernetesHostException">
+ <xs:complexType name="InvalidServiceGroupException">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidPolicyException">
+ <xs:complexType name="InvalidKubernetesGroupException">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidArgumentException">
+ </xs:schema>
+ <xs:schema xmlns:ax25="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://kubernetes.common.stratos.apache.org/xsd">
+ <xs:import namespace="http://common.stratos.apache.org/xsd"/>
+ <xs:complexType name="KubernetesHost">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="hostId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="hostIpAddress" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="hostname" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="AutoScalerException">
+ <xs:complexType name="KubernetesMaster">
<xs:complexContent>
- <xs:extension base="xs:RuntimeException">
- <xs:sequence></xs:sequence>
+ <xs:extension base="ax23:KubernetesHost">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="endpoint" nillable="true" type="xs:string"/>
+ </xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
- <xs:complexType name="ApplicationDefinitionException">
+ <xs:complexType name="KubernetesGroup">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"/>
+ <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="NonExistingKubernetesGroupException">
+ <xs:complexType name="PortRange">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="lower" type="xs:int"/>
+ <xs:element minOccurs="0" name="upper" type="xs:int"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidServiceGroupException">
+ </xs:schema>
+ <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://policy.exception.autoscaler.stratos.apache.org/xsd">
+ <xs:complexType name="InvalidPolicyException">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="NonExistingLBException">
+ </xs:schema>
+ <xs:schema xmlns:ax211="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://domain.stub.controller.cloud.stratos.apache.org/xsd">
+ <xs:import namespace="http://common.stratos.apache.org/xsd"/>
+ <xs:complexType name="Partition">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="descriptionSpecified" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="idSpecified" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="isPublic" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="isPublicSpecified" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="partitionMax" type="xs:int"/>
+ <xs:element minOccurs="0" name="partitionMaxSpecified" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="partitionMin" type="xs:int"/>
+ <xs:element minOccurs="0" name="partitionMinSpecified" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax24:Properties"/>
+ <xs:element minOccurs="0" name="propertiesSpecified" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="providerSpecified" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidPartitionException">
+ </xs:schema>
+ <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://exception.autoscaler.stratos.apache.org/xsd">
+ <xs:complexType name="InvalidArgumentException">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidKubernetesGroupException">
- <xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
- </xs:sequence>
+ <xs:complexType name="AutoScalerException">
+ <xs:complexContent>
+ <xs:extension base="xs:RuntimeException">
+ <xs:sequence/>
+ </xs:extension>
+ </xs:complexContent>
</xs:complexType>
</xs:schema>
</wsdl:types>
+ <wsdl:message name="addKubernetesGroupRequest">
+ <wsdl:part name="parameters" element="ns:addKubernetesGroup"/>
+ </wsdl:message>
+ <wsdl:message name="addKubernetesGroupResponse">
+ <wsdl:part name="parameters" element="ns:addKubernetesGroupResponse"/>
+ </wsdl:message>
+ <wsdl:message name="AutoScalerServiceInvalidKubernetesGroupException">
+ <wsdl:part name="parameters" element="ns:AutoScalerServiceInvalidKubernetesGroupException"/>
+ </wsdl:message>
<wsdl:message name="updateKubernetesMasterRequest">
- <wsdl:part name="parameters" element="ns:updateKubernetesMaster"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:updateKubernetesMaster"/>
</wsdl:message>
<wsdl:message name="updateKubernetesMasterResponse">
- <wsdl:part name="parameters" element="ns:updateKubernetesMasterResponse"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:updateKubernetesMasterResponse"/>
</wsdl:message>
<wsdl:message name="AutoScalerServiceInvalidKubernetesMasterException">
- <wsdl:part name="parameters" element="ns:AutoScalerServiceInvalidKubernetesMasterException"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:AutoScalerServiceInvalidKubernetesMasterException"/>
</wsdl:message>
<wsdl:message name="AutoScalerServiceNonExistingKubernetesMasterException">
- <wsdl:part name="parameters" element="ns:AutoScalerServiceNonExistingKubernetesMasterException"></wsdl:part>
- </wsdl:message>
- <wsdl:message name="addKubernetesGroupRequest">
- <wsdl:part name="parameters" element="ns:addKubernetesGroup"></wsdl:part>
- </wsdl:message>
- <wsdl:message name="addKubernetesGroupResponse">
- <wsdl:part name="parameters" element="ns:addKubernetesGroupResponse"></wsdl:part>
- </wsdl:message>
- <wsdl:message name="AutoScalerServiceInvalidKubernetesGroupException">
- <wsdl:part name="parameters" element="ns:AutoScalerServiceInvalidKubernetesGroupException"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:AutoScalerServiceNonExistingKubernetesMasterException"/>
</wsdl:message>
<wsdl:message name="getServiceGroupsRequest">
- <wsdl:part name="parameters" element="ns:getServiceGroups"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:getServiceGroups"/>
</wsdl:message>
<wsdl:message name="getServiceGroupsResponse">
- <wsdl:part name="parameters" element="ns:getServiceGroupsResponse"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:getServiceGroupsResponse"/>
</wsdl:message>
<wsdl:message name="AutoScalerServiceAutoScalerException">
- <wsdl:part name="parameters" element="ns:AutoScalerServiceAutoScalerException"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:AutoScalerServiceAutoScalerException"/>
</wsdl:message>
<wsdl:message name="getPartitionsOfDeploymentPolicyRequest">
- <wsdl:part name="parameters" element="ns:getPartitionsOfDeploymentPolicy"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:getPartitionsOfDeploymentPolicy"/>
</wsdl:message>
<wsdl:message name="getPartitionsOfDeploymentPolicyResponse">
- <wsdl:part name="parameters" element="ns:getPartitionsOfDeploymentPolicyResponse"></wsdl:part>
- </wsdl:message>
- <wsdl:message name="getDefaultLBClusterIdRequest">
- <wsdl:part name="parameters" element="ns:getDefaultLBClusterId"></wsdl:part>
- </wsdl:message>
- <wsdl:message name="getDefaultLBClusterIdResponse">
- <wsdl:part name="parameters" element="ns:getDefaultLBClusterIdResponse"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:getPartitionsOfDeploymentPolicyResponse"/>
</wsdl:message>
<wsdl:message name="getPartitionsOfGroupRequest">
- <wsdl:part name="parameters" element="ns:getPartitionsOfGroup"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:getPartitionsOfGroup"/>
</wsdl:message>
<wsdl:message name="getPartitionsOfGroupResponse">
- <wsdl:part name="parameters" element="ns:getPartitionsOfGroupResponse"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:getPartitionsOfGroupResponse"/>
</wsdl:message>
<wsdl:message name="getAllAutoScalingPolicyRequest">
- <wsdl:part name="parameters" element="ns:getAllAutoScalingPolicy"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:getAllAutoScalingPolicy"/>
</wsdl:message>
<wsdl:message name="getAllAutoScalingPolicyResponse">
- <wsdl:part name="parameters" element="ns:getAllAutoScalingP
<TRUNCATED>
[11/13] stratos git commit: Autoscaler WSDL and pom export changes.
Posted by ni...@apache.org.
Autoscaler WSDL and pom export changes.
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/86a67c0b
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/86a67c0b
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/86a67c0b
Branch: refs/heads/master
Commit: 86a67c0b86f2079603a84c8f9458ae05d6c436c7
Parents: de79935
Author: Nirmal Fernando <ni...@gmail.com>
Authored: Sun Nov 30 12:43:51 2014 +0530
Committer: Nirmal Fernando <ni...@gmail.com>
Committed: Sun Nov 30 12:47:24 2014 +0530
----------------------------------------------------------------------
.../pom.xml | 15 +-
.../src/main/resources/AutoScalerService.wsdl | 2091 +++++++-----------
2 files changed, 805 insertions(+), 1301 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/86a67c0b/service-stubs/org.apache.stratos.autoscaler.service.stub/pom.xml
----------------------------------------------------------------------
diff --git a/service-stubs/org.apache.stratos.autoscaler.service.stub/pom.xml b/service-stubs/org.apache.stratos.autoscaler.service.stub/pom.xml
index cf3017b..ad4f1ad 100644
--- a/service-stubs/org.apache.stratos.autoscaler.service.stub/pom.xml
+++ b/service-stubs/org.apache.stratos.autoscaler.service.stub/pom.xml
@@ -50,7 +50,7 @@
<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
<arg line="-uri src/main/resources/AutoScalerService.wsdl -u -uw -o target/generated-code
-p org.apache.stratos.autoscaler.stub
- -ns2p http://policy.deployment.autoscaler.stratos.apache.org/xsd=org.apache.stratos.autoscaler.stub.deployment.policy,http://model.policy.autoscaler.stratos.apache.org/xsd=org.apache.stratos.autoscaler.stub.policy.model,http://exception.autoscaler.stratos.apache.org/xsd=org.apache.stratos.autoscaler.stub.exception,http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd=org.apache.stratos.cloud.controller.stub.deployment.partition,http://pojo.stub.controller.cloud.stratos.apache.org/xsd=org.apache.stratos.cloud.controller.stub.pojo,http://partition.autoscaler.stratos.apache.org/xsd=org.apache.stratos.autoscaler.stub.partition,http://kubernetes.common.stratos.apache.org/xsd=org.apache.stratos.autoscaler.stub.kubernetes,http://api.autoscaler.stratos.apache.org=org.apache.stratos.autoscaler.stub.api,http://common.stratos.apache.org/xsd=org.apache.stratos.autoscaler.stub.pojo"/>
+ -ns2p http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd=org.apache.stratos.autoscaler.stub.autoscale.policy,http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd=org.apache.stratos.autoscaler.stub.deployment.policy,http://exception.autoscaler.stratos.apache.org/xsd=org.apache.stratos.autoscaler.stub.exception,http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd=org.apache.stratos.autoscaler.stub.deployment.partition,http://pojo.applications.autoscaler.stratos.apache.org/xsd=org.apache.stratos.autoscaler.stub.pojo,http://pojo.autoscaler.stratos.apache.org/xsd=org.apache.stratos.autoscaler.stub.pojo,http://kubernetes.exception.autoscaler.stratos.apache.org/xsd=org.apache.stratos.autoscaler.stub.exception,http://api.autoscaler.stratos.apache.org=org.apache.stratos.autoscaler.stub.api,http://common.stratos.apache.org/xsd=org.apache.stratos.common,http://kubernetes.common.stratos.apache.org/xsd=org.apache.stratos.common.kubernet
es"/>
<classpath refid="maven.dependency.classpath"/>
<classpath refid="maven.compile.classpath"/>
<classpath refid="maven.runtime.classpath"/>
@@ -90,17 +90,12 @@
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Bundle-Name>${project.artifactId}</Bundle-Name>
<Export-Package>
- org.apache.stratos.autoscaler.stub.*; version=${project.version},
org.apache.stratos.autoscaler.stub.pojo.*; version=${project.version},
- org.apache.stratos.autoscaler.applications.pojo.xsd.*; version=${project.version},
org.apache.stratos.autoscaler.stub.deployment.policy.*; version=${project.version},
- org.apache.stratos.autoscaler.stub.policy.model.*; version=${project.version},
- org.apache.stratos.autoscaler.exception.*; version=${project.version},
- org.apache.stratos.autoscaler.pojo.policy.deployment.partition.*;
- version=${project.version},
- org.apache.stratos.autoscaler.api.*; version=${project.version},
- org.apache.stratos.autoscaler.kubernetes.*; version=${project.version},
- org.apache.stratos.autoscaler.pojo.xsd.*; version=${project.version},
+ org.apache.stratos.autoscaler.stub.autoscale.policy.*; version=${project.version},
+ org.apache.stratos.autoscaler.stub.deployment.partition.*; version=${project.version},
+ org.apache.stratos.autoscaler.stub.exception.*; version=${project.version},
+ org.apache.stratos.autoscaler.stub.api.*; version=${project.version},
</Export-Package>
<Private-Package>
</Private-Package>
[06/13] stratos git commit: Moving to an impl package.
Posted by ni...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/f0fcf7de/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/CloudControllerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/CloudControllerServiceImpl.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/CloudControllerServiceImpl.java
deleted file mode 100644
index b9d891f..0000000
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/CloudControllerServiceImpl.java
+++ /dev/null
@@ -1,2148 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.cloud.controller.services;
-
-import com.google.common.collect.ImmutableSet;
-import com.google.common.net.InetAddresses;
-import org.apache.commons.collections.ListUtils;
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.concurrent.PartitionValidatorCallable;
-import org.apache.stratos.cloud.controller.concurrent.ScheduledThreadExecutor;
-import org.apache.stratos.cloud.controller.concurrent.ThreadExecutor;
-import org.apache.stratos.cloud.controller.context.CloudControllerContext;
-import org.apache.stratos.cloud.controller.domain.*;
-import org.apache.stratos.cloud.controller.domain.Cartridge;
-import org.apache.stratos.cloud.controller.domain.Dependencies;
-import org.apache.stratos.cloud.controller.domain.Partition;
-import org.apache.stratos.cloud.controller.exception.*;
-import org.apache.stratos.cloud.controller.functions.ContainerClusterContextToKubernetesService;
-import org.apache.stratos.cloud.controller.functions.ContainerClusterContextToReplicationController;
-import org.apache.stratos.cloud.controller.functions.PodToMemberContext;
-import org.apache.stratos.cloud.controller.iaas.Iaas;
-import org.apache.stratos.cloud.controller.registry.Deserializer;
-import org.apache.stratos.cloud.controller.messaging.publisher.CartridgeInstanceDataPublisher;
-import org.apache.stratos.cloud.controller.registry.RegistryManager;
-import org.apache.stratos.cloud.controller.messaging.topology.TopologyBuilder;
-import org.apache.stratos.cloud.controller.messaging.topology.TopologyEventPublisher;
-import org.apache.stratos.cloud.controller.messaging.topology.TopologyManager;
-import org.apache.stratos.cloud.controller.util.CloudControllerConstants;
-import org.apache.stratos.cloud.controller.util.CloudControllerUtil;
-import org.apache.stratos.cloud.controller.util.PodActivationWatcher;
-import org.apache.stratos.cloud.controller.iaas.validators.PartitionValidator;
-import org.apache.stratos.common.*;
-import org.apache.stratos.common.constants.StratosConstants;
-import org.apache.stratos.kubernetes.client.KubernetesApiClient;
-import org.apache.stratos.kubernetes.client.exceptions.KubernetesClientException;
-import org.apache.stratos.kubernetes.client.model.Label;
-import org.apache.stratos.kubernetes.client.model.Pod;
-import org.apache.stratos.kubernetes.client.model.ReplicationController;
-import org.apache.stratos.kubernetes.client.model.Service;
-import org.apache.stratos.messaging.domain.topology.*;
-import org.apache.stratos.messaging.event.topology.MemberReadyToShutdownEvent;
-import org.jclouds.compute.ComputeService;
-import org.jclouds.compute.domain.NodeMetadata;
-import org.jclouds.compute.domain.NodeMetadataBuilder;
-import org.jclouds.compute.domain.Template;
-import org.jclouds.rest.ResourceNotFoundException;
-import org.wso2.carbon.registry.core.exceptions.RegistryException;
-
-import java.util.*;
-import java.util.Map.Entry;
-import java.util.Properties;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.Future;
-
-/**
- * Cloud Controller Service is responsible for starting up new server instances,
- * terminating already started instances, providing pending instance count etc.
- */
-public class CloudControllerServiceImpl implements CloudControllerService {
-
- private static final Log LOG = LogFactory.getLog(CloudControllerServiceImpl.class);
- public static final String IS_LOAD_BALANCER = "load.balancer";
-
- private CloudControllerContext dataHolder = CloudControllerContext
- .getInstance();
-
- public CloudControllerServiceImpl() {
- // acquire serialized data from registry
- acquireData();
- }
-
- private void acquireData() {
-
- Object obj = RegistryManager.getInstance().retrieve();
- if (obj != null) {
- try {
- Object dataObj = Deserializer
- .deserializeFromByteArray((byte[]) obj);
- if (dataObj instanceof CloudControllerContext) {
- CloudControllerContext serializedObj = (CloudControllerContext) dataObj;
- CloudControllerContext currentData = CloudControllerContext
- .getInstance();
-
- // assign necessary data
- currentData.setClusterIdToContext(serializedObj.getClusterIdToContext());
- currentData.setMemberIdToContext(serializedObj.getMemberIdToContext());
- currentData.setClusterIdToMemberContext(serializedObj.getClusterIdToMemberContext());
- currentData.setCartridges(serializedObj.getCartridges());
- currentData.setKubClusterIdToKubClusterContext(serializedObj.getKubClusterIdToKubClusterContext());
- currentData.setServiceGroups(serializedObj.getServiceGroups());
-
- if (LOG.isDebugEnabled()) {
-
- LOG.debug("Cloud Controller Data is retrieved from registry.");
- }
- } else {
- if (LOG.isDebugEnabled()) {
-
- LOG.debug("Cloud Controller Data cannot be found in registry.");
- }
- }
- } catch (Exception e) {
-
- String msg = "Unable to acquire data from Registry. Hence, any historical data will not get reflected.";
- LOG.warn(msg, e);
- }
-
- }
- }
-
- public void deployCartridgeDefinition(CartridgeConfig cartridgeConfig) throws InvalidCartridgeDefinitionException,
- InvalidIaasProviderException {
-
- handleNullObject(cartridgeConfig, "Invalid Cartridge Definition: Definition is null.");
-
- if (LOG.isDebugEnabled()) {
- LOG.debug("Cartridge definition: " + cartridgeConfig.toString());
- }
-
- Cartridge cartridge = null;
- try {
- // cartridge can never be null
- cartridge = CloudControllerUtil.toCartridge(cartridgeConfig);
- } catch (Exception e) {
- String msg =
- "Invalid Cartridge Definition: Cartridge Type: " +
- cartridgeConfig.getType() +
- ". Cause: Cannot instantiate a Cartridge Instance with the given Config. " + e.getMessage();
- LOG.error(msg, e);
- throw new InvalidCartridgeDefinitionException(msg, e);
- }
-
- List<IaasProvider> iaases = cartridge.getIaases();
-
- if (!StratosConstants.KUBERNETES_DEPLOYER_TYPE.equals(cartridge.getDeployerType())) {
- if (iaases == null || iaases.isEmpty()) {
- String msg = "Invalid Cartridge Definition: Cartridge Type: "
- + cartridgeConfig.getType()
- + ". Cause: Iaases of this Cartridge is null or empty.";
- LOG.error(msg);
- throw new InvalidCartridgeDefinitionException(msg);
- }
-
- if (iaases == null || iaases.isEmpty()) {
- String msg = "Invalid Cartridge Definition: Cartridge Type: " +
- cartridgeConfig.getType() +
- ". Cause: Iaases of this Cartridge is null or empty.";
- LOG.error(msg);
- throw new InvalidCartridgeDefinitionException(msg);
- }
-
- for (IaasProvider iaasProvider : iaases) {
- CloudControllerUtil.getIaas(iaasProvider);
- }
- }
-
- // TODO transaction begins
- String cartridgeType = cartridge.getType();
- if (dataHolder.getCartridge(cartridgeType) != null) {
- Cartridge cartridgeToBeRemoved = dataHolder.getCartridge(cartridgeType);
- // undeploy
- try {
- undeployCartridgeDefinition(cartridgeToBeRemoved.getType());
- } catch (InvalidCartridgeTypeException e) {
- //ignore
- }
- populateNewCartridge(cartridge, cartridgeToBeRemoved);
- }
-
- dataHolder.addCartridge(cartridge);
-
- // persist
- persist();
-
- List<Cartridge> cartridgeList = new ArrayList<Cartridge>();
- cartridgeList.add(cartridge);
-
- TopologyBuilder.handleServiceCreated(cartridgeList);
- // transaction ends
-
- LOG.info("Successfully deployed the Cartridge definition: " + cartridgeType);
- }
-
- private void populateNewCartridge(Cartridge cartridge,
- Cartridge cartridgeToBeRemoved) {
-
- List<IaasProvider> newIaasProviders = cartridge.getIaases();
- Map<String, IaasProvider> oldPartitionToIaasMap = cartridgeToBeRemoved.getPartitionToIaasProvider();
-
- for (Entry<String, IaasProvider> entry : oldPartitionToIaasMap.entrySet()) {
- if (entry == null) {
- continue;
- }
- String partitionId = entry.getKey();
- IaasProvider oldIaasProvider = entry.getValue();
- if (newIaasProviders.contains(oldIaasProvider)) {
- if (LOG.isDebugEnabled()) {
- LOG.debug("Copying a partition from the Cartridge that is undeployed, to the new Cartridge. "
- + "[partition id] : " + partitionId + " [cartridge type] " + cartridge.getType());
- }
- cartridge.addIaasProvider(partitionId, newIaasProviders.get(newIaasProviders.indexOf(oldIaasProvider)));
- }
- }
-
- }
-
- public void undeployCartridgeDefinition(String cartridgeType) throws InvalidCartridgeTypeException {
-
- Cartridge cartridge = null;
- if ((cartridge = dataHolder.getCartridge(cartridgeType)) != null) {
- if (dataHolder.getCartridges().remove(cartridge)) {
- // invalidate partition validation cache
- dataHolder.removeFromCartridgeTypeToPartitionIds(cartridgeType);
-
- if (LOG.isDebugEnabled()) {
- LOG.debug("Partition cache invalidated for cartridge " + cartridgeType);
- }
-
- persist();
-
- // sends the service removed event
- List<Cartridge> cartridgeList = new ArrayList<Cartridge>();
- cartridgeList.add(cartridge);
- TopologyBuilder.handleServiceRemoved(cartridgeList);
-
- if (LOG.isInfoEnabled()) {
- LOG.info("Successfully undeployed the Cartridge definition: " + cartridgeType);
- }
- return;
- }
- }
- String msg = "Cartridge [type] " + cartridgeType + " is not a deployed Cartridge type.";
- LOG.error(msg);
- throw new InvalidCartridgeTypeException(msg);
- }
-
- public void deployServiceGroup(ServiceGroup servicegroup) throws InvalidServiceGroupException {
-
- if (servicegroup == null) {
- String msg = "Invalid ServiceGroup Definition: Definition is null.";
- LOG.error(msg);
- throw new IllegalArgumentException(msg);
-
- }
-
- if (LOG.isDebugEnabled()) {
- LOG.debug("CloudControllerServiceImpl:deployServiceGroup:" + servicegroup.getName());
- }
-
- String[] subGroups = servicegroup.getCartridges();
-
-
- if (LOG.isDebugEnabled()) {
- LOG.debug("CloudControllerServiceImpl:deployServiceGroup:subGroups" + subGroups);
- if (subGroups != null) {
- LOG.debug("CloudControllerServiceImpl:deployServiceGroup:subGroups:size" + subGroups.length);
- } else {
- LOG.debug("CloudControllerServiceImpl:deployServiceGroup:subGroups: is null");
- }
- }
-
-
- Dependencies dependencies = servicegroup.getDependencies();
-
- if (LOG.isDebugEnabled()) {
- LOG.debug("CloudControllerServiceImpl:deployServiceGroup:dependencies" + dependencies);
- }
-
- if (dependencies != null) {
- String[] startupOrders = dependencies.getStartupOrders();
-
- if (LOG.isDebugEnabled()) {
- LOG.debug("CloudControllerServiceImpl:deployServiceGroup:startupOrders" + startupOrders);
-
- if (startupOrders != null) {
- LOG.debug("CloudControllerServiceImpl:deployServiceGroup:startupOrder:size" + startupOrders.length);
- } else {
- LOG.debug("CloudControllerServiceImpl:deployServiceGroup:startupOrder: is null");
- }
- }
- }
-
- dataHolder.addServiceGroup(servicegroup);
-
- this.persist();
-
- }
-
- public void undeployServiceGroup(String name) throws InvalidServiceGroupException {
- if (LOG.isDebugEnabled()) {
- LOG.debug("CloudControllerServiceImpl:undeployServiceGroup: " + name);
- }
-
- ServiceGroup serviceGroup = null;
-
- serviceGroup = dataHolder.getServiceGroup(name);
-
- if (serviceGroup != null) {
- if (dataHolder.getServiceGroups().remove(serviceGroup)) {
- persist();
- if (LOG.isInfoEnabled()) {
- LOG.info("Successfully undeployed the Service Group definition: " + serviceGroup);
- }
- return;
- }
- }
-
- String msg = "ServiceGroup " + name + " is not a deployed Service Group definition";
- LOG.error(msg);
- throw new InvalidServiceGroupException(msg);
-
- }
-
- @Override
- public ServiceGroup getServiceGroup(String name) throws InvalidServiceGroupException {
-
- if (LOG.isDebugEnabled()) {
- LOG.debug("getServiceGroupDefinition:" + name);
- }
-
- ServiceGroup serviceGroup = this.dataHolder.getServiceGroup(name);
-
- if (serviceGroup == null) {
- if (LOG.isDebugEnabled()) {
- LOG.debug("getServiceGroupDefinition: no entry found for service group " + name);
- }
- String msg = "ServiceGroup " + name + " is not a deployed Service Group definition";
- throw new InvalidServiceGroupException(msg);
- }
-
- return serviceGroup;
- }
-
- public String[] getServiceGroupSubGroups(String name) throws InvalidServiceGroupException {
- ServiceGroup serviceGroup = this.getServiceGroup(name);
- if (serviceGroup == null) {
- throw new InvalidServiceGroupException("Invalid ServiceGroup " + serviceGroup);
- }
-
- return serviceGroup.getSubGroups();
- }
-
- /**
- *
- */
- public String[] getServiceGroupCartridges(String name) throws InvalidServiceGroupException {
- ServiceGroup serviceGroup = this.getServiceGroup(name);
- if (serviceGroup == null) {
- throw new InvalidServiceGroupException("Invalid ServiceGroup " + serviceGroup);
- }
- String[] cs = serviceGroup.getCartridges();
- return cs;
-
- }
-
- public Dependencies getServiceGroupDependencies(String name) throws InvalidServiceGroupException {
- ServiceGroup serviceGroup = this.getServiceGroup(name);
- if (serviceGroup == null) {
- throw new InvalidServiceGroupException("Invalid ServiceGroup " + serviceGroup);
- }
- return serviceGroup.getDependencies();
- }
-
- @Override
- public MemberContext startInstance(MemberContext memberContext) throws
- UnregisteredCartridgeException, InvalidIaasProviderException {
-
- if (LOG.isDebugEnabled()) {
- LOG.debug("CloudControllerServiceImpl:startInstance");
- }
-
- handleNullObject(memberContext, "Instance start-up failed. Member is null.");
-
- String clusterId = memberContext.getClusterId();
- Partition partition = memberContext.getPartition();
-
- if (LOG.isDebugEnabled()) {
- LOG.debug("Received an instance spawn request : " + memberContext);
- }
-
- Template template = null;
-
- handleNullObject(partition, "Instance start-up failed. Specified Partition is null. " +
- memberContext);
-
- String partitionId = partition.getId();
- ClusterContext ctxt = dataHolder.getClusterContext(clusterId);
-
- handleNullObject(ctxt, "Instance start-up failed. Invalid cluster id. " + memberContext);
-
- String cartridgeType = ctxt.getCartridgeType();
-
- Cartridge cartridge = dataHolder.getCartridge(cartridgeType);
-
- if (cartridge == null) {
- String msg =
- "Instance start-up failed. No matching Cartridge found [type] " + cartridgeType + ". " +
- memberContext.toString();
- LOG.error(msg);
- throw new UnregisteredCartridgeException(msg);
- }
-
- memberContext.setCartridgeType(cartridgeType);
-
-
- IaasProvider iaasProvider = cartridge.getIaasProviderOfPartition(partitionId);
- if (iaasProvider == null) {
- if (LOG.isDebugEnabled()) {
- LOG.debug("IaasToPartitionMap " + cartridge.hashCode()
- + " for cartridge " + cartridgeType + " and for partition: " + partitionId);
- }
- String msg = "Instance start-up failed. "
- + "There's no IaaS provided for the partition: "
- + partitionId
- + " and for the Cartridge type: "
- + cartridgeType
- + ". Only following "
- + "partitions can be found in this Cartridge: "
- + cartridge.getPartitionToIaasProvider().keySet()
- .toString() + ". " + memberContext.toString()
- + ". ";
- LOG.fatal(msg);
- throw new InvalidIaasProviderException(msg);
- }
- String type = iaasProvider.getType();
- try {
- // generating the Unique member ID...
- String memberID = generateMemberId(clusterId);
- memberContext.setMemberId(memberID);
- // have to add memberID to the payload
- StringBuilder payload = new StringBuilder(ctxt.getPayload());
- addToPayload(payload, "MEMBER_ID", memberID);
- addToPayload(payload, "LB_CLUSTER_ID", memberContext.getLbClusterId());
- addToPayload(payload, "NETWORK_PARTITION_ID", memberContext.getNetworkPartitionId());
- addToPayload(payload, "PARTITION_ID", partitionId);
- if (memberContext.getProperties() != null) {
- org.apache.stratos.common.Properties properties = memberContext.getProperties();
- if (properties != null) {
- for (Property prop : properties.getProperties()) {
- addToPayload(payload, prop.getName(), prop.getValue());
- }
- }
- }
-
- Iaas iaas = iaasProvider.getIaas();
-
- if (LOG.isDebugEnabled()) {
- LOG.debug("Payload: " + payload.toString());
- }
-
- if (iaas == null) {
- if (LOG.isDebugEnabled()) {
- LOG.debug("Iaas is null of Iaas Provider: " + type + ". Trying to build IaaS...");
- }
- try {
- iaas = CloudControllerUtil.getIaas(iaasProvider);
- } catch (InvalidIaasProviderException e) {
- String msg = "Instance start up failed. " + memberContext.toString() +
- "Unable to build Iaas of this IaasProvider [Provider] : " + type + ". Cause: " + e.getMessage();
- LOG.error(msg, e);
- throw new InvalidIaasProviderException(msg, e);
- }
-
- }
-
- if (ctxt.isVolumeRequired()) {
- if (ctxt.getVolumes() != null) {
- for (Volume volume : ctxt.getVolumes()) {
-
- if (volume.getId() == null) {
- // create a new volume
- createVolumeAndSetInClusterContext(volume, iaasProvider);
- }
- }
- }
- }
-
- if (ctxt.isVolumeRequired()) {
- addToPayload(payload, "PERSISTENCE_MAPPING", getPersistencePayload(ctxt, iaas).toString());
- }
- iaasProvider.setPayload(payload.toString().getBytes());
- iaas.setDynamicPayload();
-
- template = iaasProvider.getTemplate();
-
- if (template == null) {
- String msg =
- "Failed to start an instance. " +
- memberContext.toString() +
- ". Reason : Jclouds Template is null for iaas provider [type]: " + iaasProvider.getType();
- LOG.error(msg);
- throw new InvalidIaasProviderException(msg);
- }
-
- //Start instance start up in a new thread
- ThreadExecutor exec = ThreadExecutor.getInstance();
- if (LOG.isDebugEnabled()) {
- LOG.debug("Cloud Controller is starting the instance start up thread.");
- }
- exec.execute(new JcloudsInstanceCreator(memberContext, iaasProvider, cartridgeType));
-
- LOG.info("Instance is successfully starting up. " + memberContext.toString());
-
- return memberContext;
-
- } catch (Exception e) {
- String msg = "Failed to start an instance. " + memberContext.toString() + " Cause: " + e.getMessage();
- LOG.error(msg, e);
- throw new IllegalStateException(msg, e);
- }
-
- }
-
- private void createVolumeAndSetInClusterContext(Volume volume,
- IaasProvider iaasProvider) {
- // iaas cannot be null at this state #startInstance method
- Iaas iaas = iaasProvider.getIaas();
- int sizeGB = volume.getSize();
- String snapshotId = volume.getSnapshotId();
- if (StringUtils.isNotEmpty(volume.getVolumeId())) {
- // volumeID is specified, so not creating additional volumes
- if (LOG.isDebugEnabled()) {
- LOG.debug("Volume creation is skipping since a volume ID is specified. [Volume ID]" + volume.getVolumeId());
- }
- volume.setId(volume.getVolumeId());
- } else {
- String volumeId = iaas.createVolume(sizeGB, snapshotId);
- volume.setId(volumeId);
- }
-
- volume.setIaasType(iaasProvider.getType());
- }
-
-
- private StringBuilder getPersistencePayload(ClusterContext ctx, Iaas iaas) {
- StringBuilder persistencePayload = new StringBuilder();
- if (isPersistenceMappingAvailable(ctx)) {
- for (Volume volume : ctx.getVolumes()) {
- if (LOG.isDebugEnabled()) {
- LOG.debug("Adding persistence mapping " + volume.toString());
- }
- if (persistencePayload.length() != 0) {
- persistencePayload.append("|");
- }
-
- persistencePayload.append(iaas.getIaasDevice(volume.getDevice()));
- persistencePayload.append("|");
- persistencePayload.append(volume.getId());
- persistencePayload.append("|");
- persistencePayload.append(volume.getMappingPath());
- }
- }
- if (LOG.isDebugEnabled()) {
- LOG.debug("Persistence payload is" + persistencePayload.toString());
- }
- return persistencePayload;
- }
-
- private boolean isPersistenceMappingAvailable(ClusterContext ctx) {
- return ctx.getVolumes() != null && ctx.isVolumeRequired();
- }
-
- private void addToPayload(StringBuilder payload, String name, String value) {
- payload.append(",");
- payload.append(name + "=" + value);
- }
-
- /**
- * Persist data in registry.
- */
- private void persist() {
- try {
- RegistryManager.getInstance().persist(
- dataHolder);
- } catch (RegistryException e) {
-
- String msg = "Failed to persist the Cloud Controller data in registry. Further, transaction roll back also failed.";
- LOG.fatal(msg);
- throw new CloudControllerException(msg, e);
- }
- }
-
- private String generateMemberId(String clusterId) {
- UUID memberId = UUID.randomUUID();
- return clusterId + memberId.toString();
- }
-
- @Override
- public void terminateInstance(String memberId) throws InvalidMemberException, InvalidCartridgeTypeException {
-
- handleNullObject(memberId, "Termination failed. Null member id.");
-
- MemberContext ctxt = dataHolder.getMemberContextOfMemberId(memberId);
-
- if (ctxt == null) {
- String msg = "Termination failed. Invalid Member Id: " + memberId;
- LOG.error(msg);
- throw new InvalidMemberException(msg);
- }
-
- if (ctxt.getNodeId() == null && ctxt.getInstanceId() == null) {
- // sending member terminated since this instance isn't reachable.
- if (LOG.isInfoEnabled()){
- LOG.info(String.format(
- "Member cannot be terminated because it is not reachable. [member] %s [nodeId] %s [instanceId] %s. Removing member from topology.",
- ctxt.getMemberId(),
- ctxt.getNodeId(),
- ctxt.getInstanceId()));
- }
-
- logTermination(ctxt);
- }
-
- // check if status == active, if true, then this is a termination on member faulty
- Topology topology;
- try {
- TopologyManager.acquireReadLock();
- topology = TopologyManager.getTopology();
- } finally {
- TopologyManager.releaseReadLock();
- }
-
- org.apache.stratos.messaging.domain.topology.Service service = topology.getService(ctxt.getCartridgeType());
-
- if (service != null) {
- Cluster cluster = service.getCluster(ctxt.getClusterId());
-
- if (cluster != null) {
- Member member = cluster.getMember(memberId);
-
- if (member != null) {
- // change member status if termination on a faulty member
- if(fixMemberStatus(member, topology)){
- // set the time this member was added to ReadyToShutdown status
- ctxt.setObsoleteInitTime(System.currentTimeMillis());
- }
-
- // check if ready to shutdown member is expired and send
- // member terminated if it is.
- if (isMemberExpired(member, ctxt.getObsoleteInitTime(), ctxt.getObsoleteExpiryTime())) {
- if (LOG.isInfoEnabled()) {
- LOG.info(String.format(
- "Member pending termination in ReadyToShutdown state exceeded expiry time. This member has to be manually deleted: %s",
- ctxt.getMemberId()));
- }
-
- logTermination(ctxt);
- return;
- }
- }
- }
- }
-
- ThreadExecutor exec = ThreadExecutor.getInstance();
- exec.execute(new InstanceTerminator(ctxt));
-
- }
-
- /**
- * Check if a member has been in the ReadyToShutdown status for a specified expiry time
- *
- * @param member
- * @param initTime
- * @param expiryTime
- * @return
- */
- private boolean isMemberExpired(Member member, long initTime, long expiryTime) {
- if (member.getStatus() == MemberStatus.ReadyToShutDown) {
- if (initTime == 0){
- // obsolete init time hasn't been set, i.e. not a member detected faulty.
- // this is a graceful shutdown
- return false;
- }
-
- // member detected faulty, calculate ready to shutdown waiting period
- long timeInReadyToShutdownStatus = System.currentTimeMillis() - initTime;
- return timeInReadyToShutdownStatus >= expiryTime;
- }
-
- return false;
- }
-
-
- /**
- * Corrects the member status upon termination call if the member is in an Active state
- *
- * @param member The {@link org.apache.stratos.messaging.domain.topology.Member} object that is being
- * checked for status
- * @param topology The {@link org.apache.stratos.messaging.domain.topology.Topology} object to update
- * the topology if needed.
- *
- */
- private boolean fixMemberStatus(Member member, Topology topology) {
- if (member.getStatus() == MemberStatus.Activated) {
- MemberReadyToShutdownEvent memberReadyToShutdownEvent = new MemberReadyToShutdownEvent(
- member.getServiceName(),
- member.getClusterId(),
- member.getNetworkPartitionId(),
- member.getPartitionId(),
- member.getMemberId(),
- member.getInstanceId());
-
- try {
- TopologyManager.acquireWriteLock();
- member.setStatus(MemberStatus.ReadyToShutDown);
- LOG.info("Member Ready to shut down event adding status started");
-
- TopologyManager.updateTopology(topology);
- } finally {
- TopologyManager.releaseWriteLock();
- }
-
- TopologyEventPublisher.sendMemberReadyToShutdownEvent(memberReadyToShutdownEvent);
- //publishing data
- CartridgeInstanceDataPublisher.publish(member.getMemberId(),
- member.getPartitionId(),
- member.getNetworkPartitionId(),
- member.getClusterId(),
- member.getServiceName(),
- MemberStatus.ReadyToShutDown.toString(),
- null);
-
- return true;
- }
-
- return false;
- }
-
-
- private class InstanceTerminator implements Runnable {
-
- private MemberContext ctxt;
-
- public InstanceTerminator(MemberContext ctxt) {
- this.ctxt = ctxt;
- }
-
- @Override
- public void run() {
-
- String memberId = ctxt.getMemberId();
- String clusterId = ctxt.getClusterId();
- String partitionId = ctxt.getPartition().getId();
- String cartridgeType = ctxt.getCartridgeType();
- String nodeId = ctxt.getNodeId();
-
- try {
- // these will never be null, since we do not add null values for these.
- Cartridge cartridge = dataHolder.getCartridge(cartridgeType);
-
- LOG.info("Starting to terminate an instance with member id : " + memberId +
- " in partition id: " + partitionId + " of cluster id: " + clusterId +
- " and of cartridge type: " + cartridgeType);
-
- if (cartridge == null) {
- String msg =
- "Termination of Member Id: " + memberId + " failed. " +
- "Cannot find a matching Cartridge for type: " +
- cartridgeType;
- LOG.error(msg);
- throw new InvalidCartridgeTypeException(msg);
- }
-
- // if no matching node id can be found.
- if (nodeId == null) {
-
- String msg =
- "Termination failed. Cannot find a node id for Member Id: " +
- memberId;
-
- // log information
- logTermination(ctxt);
- LOG.error(msg);
- throw new InvalidMemberException(msg);
- }
-
- IaasProvider iaasProvider = cartridge.getIaasProviderOfPartition(partitionId);
-
- // terminate it!
- terminate(iaasProvider, nodeId, ctxt);
-
- // log information
- logTermination(ctxt);
-
- } catch (Exception e) {
- String msg =
- "Instance termination failed. " + ctxt.toString();
- LOG.error(msg, e);
- throw new CloudControllerException(msg, e);
- }
-
- }
- }
-
- private class JcloudsInstanceCreator implements Runnable {
-
- private MemberContext memberContext;
- private IaasProvider iaasProvider;
- private String cartridgeType;
-
- public JcloudsInstanceCreator(MemberContext memberContext, IaasProvider iaasProvider,
- String cartridgeType) {
- this.memberContext = memberContext;
- this.iaasProvider = iaasProvider;
- this.cartridgeType = cartridgeType;
- }
-
- @Override
- public void run() {
-
-
- String clusterId = memberContext.getClusterId();
- Partition partition = memberContext.getPartition();
- ClusterContext ctxt = dataHolder.getClusterContext(clusterId);
- Iaas iaas = iaasProvider.getIaas();
- String publicIp = null;
-
- NodeMetadata node = null;
- // generate the group id from domain name and sub domain name.
- // Should have lower-case ASCII letters, numbers, or dashes.
- // Should have a length between 3-15
- String str = clusterId.length() > 10 ? clusterId.substring(0, 10) : clusterId.substring(0, clusterId.length());
- String group = str.replaceAll("[^a-z0-9-]", "");
-
- try {
- ComputeService computeService = iaasProvider
- .getComputeService();
- Template template = iaasProvider.getTemplate();
-
- if (LOG.isDebugEnabled()) {
- LOG.debug("Cloud Controller is delegating request to start an instance for "
- + memberContext + " to Jclouds layer.");
- }
- // create and start a node
- Set<? extends NodeMetadata> nodes = computeService
- .createNodesInGroup(group, 1, template);
- node = nodes.iterator().next();
- if (LOG.isDebugEnabled()) {
- LOG.debug("Cloud Controller received a response for the request to start "
- + memberContext + " from Jclouds layer.");
- }
-
- if (node == null) {
- String msg = "Null response received for instance start-up request to Jclouds.\n"
- + memberContext.toString();
- LOG.error(msg);
- throw new IllegalStateException(msg);
- }
-
- // node id
- String nodeId = node.getId();
- if (nodeId == null) {
- String msg = "Node id of the starting instance is null.\n"
- + memberContext.toString();
- LOG.fatal(msg);
- throw new IllegalStateException(msg);
- }
-
- memberContext.setNodeId(nodeId);
- if (LOG.isDebugEnabled()) {
- LOG.debug("Node id was set. " + memberContext.toString());
- }
-
- // attach volumes
- if (ctxt.isVolumeRequired()) {
- // remove region prefix
- String instanceId = nodeId.indexOf('/') != -1 ? nodeId
- .substring(nodeId.indexOf('/') + 1, nodeId.length())
- : nodeId;
- memberContext.setInstanceId(instanceId);
- if (ctxt.getVolumes() != null) {
- for (Volume volume : ctxt.getVolumes()) {
- try {
- iaas.attachVolume(instanceId, volume.getId(),
- volume.getDevice());
- } catch (Exception e) {
- // continue without throwing an exception, since
- // there is an instance already running
- LOG.error("Attaching Volume to Instance [ "
- + instanceId + " ] failed!", e);
- }
- }
- }
- }
-
- } catch (Exception e) {
- String msg = "Failed to start an instance. " + memberContext.toString() + " Cause: " + e.getMessage();
- LOG.error(msg, e);
- throw new IllegalStateException(msg, e);
- }
-
- try {
- if (LOG.isDebugEnabled()) {
- LOG.debug("IP allocation process started for " + memberContext);
- }
- String autoAssignIpProp =
- iaasProvider.getProperty(CloudControllerConstants.AUTO_ASSIGN_IP_PROPERTY);
-
- String pre_defined_ip =
- iaasProvider.getProperty(CloudControllerConstants.FLOATING_IP_PROPERTY);
-
- // reset ip
- String ip = "";
-
- // default behavior is autoIpAssign=false
- if (autoAssignIpProp == null ||
- (autoAssignIpProp != null && autoAssignIpProp.equals("false"))) {
-
- // check if floating ip is well defined in cartridge definition
- if (pre_defined_ip != null) {
- if (isValidIpAddress(pre_defined_ip)) {
- if (LOG.isDebugEnabled()) {
- LOG.debug("CloudControllerServiceImpl:IpAllocator:pre_defined_ip: invoking associatePredefinedAddress" + pre_defined_ip);
- }
- ip = iaas.associatePredefinedAddress(node, pre_defined_ip);
-
- if (ip == null || "".equals(ip) || !pre_defined_ip.equals(ip)) {
- // throw exception and stop instance creation
- String msg = "Error occurred while allocating predefined floating ip address: " + pre_defined_ip +
- " / allocated ip:" + ip +
- " - terminating node:" + memberContext.toString();
- LOG.error(msg);
- // terminate instance
- terminate(iaasProvider,
- node.getId(), memberContext);
- throw new CloudControllerException(msg);
- }
- } else {
- String msg = "Invalid floating ip address configured: " + pre_defined_ip +
- " - terminating node:" + memberContext.toString();
- LOG.error(msg);
- // terminate instance
- terminate(iaasProvider,
- node.getId(), memberContext);
- throw new CloudControllerException(msg);
- }
-
- } else {
- if (LOG.isDebugEnabled()) {
- LOG.debug("CloudControllerServiceImpl:IpAllocator:no (valid) predefined floating ip configured, "
- + "selecting available one from pool");
- }
- // allocate an IP address - manual IP assigning mode
- ip = iaas.associateAddress(node);
-
- if (ip != null) {
- memberContext.setAllocatedIpAddress(ip);
- if (LOG.isDebugEnabled()) {
- LOG.debug("Allocated an ip address: "
- + memberContext.toString());
- } else if (LOG.isInfoEnabled()) {
- LOG.info("Allocated ip address [ " + memberContext.getAllocatedIpAddress() +
- " ] to member with id: " + memberContext.getMemberId());
- }
- }
- }
-
- if (ip == null) {
- String msg = "No IP address found. IP allocation failed for " + memberContext;
- LOG.error(msg);
- throw new CloudControllerException(msg);
- }
-
- // build the node with the new ip
- node = NodeMetadataBuilder.fromNodeMetadata(node)
- .publicAddresses(ImmutableSet.of(ip)).build();
- }
-
-
- // public ip
- if (node.getPublicAddresses() != null &&
- node.getPublicAddresses().iterator().hasNext()) {
- ip = node.getPublicAddresses().iterator().next();
- publicIp = ip;
- memberContext.setPublicIpAddress(ip);
- if (LOG.isDebugEnabled()) {
- LOG.debug("Retrieving Public IP Address : " + memberContext.toString());
- } else if (LOG.isInfoEnabled()) {
- LOG.info("Retrieving Public IP Address: " + memberContext.getPublicIpAddress() +
- ", member id: " + memberContext.getMemberId());
- }
- }
-
- // private IP
- if (node.getPrivateAddresses() != null &&
- node.getPrivateAddresses().iterator().hasNext()) {
- ip = node.getPrivateAddresses().iterator().next();
- memberContext.setPrivateIpAddress(ip);
- if (LOG.isDebugEnabled()) {
- LOG.debug("Retrieving Private IP Address. " + memberContext.toString());
- } else if (LOG.isInfoEnabled()) {
- LOG.info("Retrieving Private IP Address: " + memberContext.getPrivateIpAddress() +
- ", member id: " + memberContext.getMemberId());
- }
- }
-
- dataHolder.addMemberContext(memberContext);
-
- // persist in registry
- persist();
-
-
- // trigger topology
- TopologyBuilder.handleMemberSpawned(cartridgeType, clusterId,
- partition.getId(), ip, publicIp, memberContext);
-
- String memberID = memberContext.getMemberId();
-
- // update the topology with the newly spawned member
- // publish data
- CartridgeInstanceDataPublisher.publish(memberID,
- memberContext.getPartition().getId(),
- memberContext.getNetworkPartitionId(),
- memberContext.getClusterId(),
- cartridgeType,
- MemberStatus.Created.toString(),
- node);
- if (LOG.isDebugEnabled()) {
- LOG.debug("Node details: " + node.toString());
- }
-
- if (LOG.isDebugEnabled()) {
- LOG.debug("IP allocation process ended for " + memberContext);
- }
-
- } catch (Exception e) {
- String msg = "Error occurred while allocating an ip address. " + memberContext.toString();
- LOG.error(msg, e);
- throw new CloudControllerException(msg, e);
- }
-
-
- }
- }
-
- private boolean isValidIpAddress(String ip) {
- boolean isValid = InetAddresses.isInetAddress(ip);
- return isValid;
- }
-
- @Override
- public void terminateAllInstances(String clusterId) throws InvalidClusterException {
-
- LOG.info("Starting to terminate all instances of cluster : "
- + clusterId);
-
- handleNullObject(clusterId, "Instance termination failed. Cluster id is null.");
-
- List<MemberContext> ctxts = dataHolder.getMemberContextsOfClusterId(clusterId);
-
- if (ctxts == null) {
- String msg = "Instance termination failed. No members found for cluster id: " + clusterId;
- LOG.warn(msg);
- return;
- }
-
- ThreadExecutor exec = ThreadExecutor.getInstance();
- for (MemberContext memberContext : ctxts) {
- exec.execute(new InstanceTerminator(memberContext));
- }
-
- }
-
-
- /**
- * A helper method to terminate an instance.
- *
- * @param iaasProvider
- * @param ctxt
- * @param nodeId
- * @return will return the IaaSProvider
- */
- private IaasProvider terminate(IaasProvider iaasProvider,
- String nodeId, MemberContext ctxt) {
- Iaas iaas = iaasProvider.getIaas();
- if (iaas == null) {
-
- try {
- iaas = CloudControllerUtil.getIaas(iaasProvider);
- } catch (InvalidIaasProviderException e) {
- String msg =
- "Instance termination failed. " + ctxt.toString() +
- ". Cause: Unable to build Iaas of this " + iaasProvider.toString();
- LOG.error(msg, e);
- throw new CloudControllerException(msg, e);
- }
-
- }
-
- //detach volumes if any
- detachVolume(iaasProvider, ctxt);
-
- // destroy the node
- iaasProvider.getComputeService().destroyNode(nodeId);
-
- // release allocated IP address
- if (ctxt.getAllocatedIpAddress() != null) {
- iaas.releaseAddress(ctxt.getAllocatedIpAddress());
- }
-
- if (LOG.isDebugEnabled()) {
- LOG.debug("Member is terminated: " + ctxt.toString());
- } else if (LOG.isInfoEnabled()) {
- LOG.info("Member with id " + ctxt.getMemberId() + " is terminated");
- }
- return iaasProvider;
- }
-
- private void detachVolume(IaasProvider iaasProvider, MemberContext ctxt) {
- String clusterId = ctxt.getClusterId();
- ClusterContext clusterCtxt = dataHolder.getClusterContext(clusterId);
- if (clusterCtxt.getVolumes() != null) {
- for (Volume volume : clusterCtxt.getVolumes()) {
- try {
- String volumeId = volume.getId();
- if (volumeId == null) {
- return;
- }
- Iaas iaas = iaasProvider.getIaas();
- iaas.detachVolume(ctxt.getInstanceId(), volumeId);
- } catch (ResourceNotFoundException ignore) {
- if (LOG.isDebugEnabled()) {
- LOG.debug(ignore);
- }
- }
- }
- }
- }
-
- private void logTermination(MemberContext memberContext) {
-
- if (memberContext == null) {
- return;
- }
-
- String partitionId = memberContext.getPartition() == null ? null : memberContext.getPartition().getId();
-
- //updating the topology
- TopologyBuilder.handleMemberTerminated(memberContext.getCartridgeType(),
- memberContext.getClusterId(), memberContext.getNetworkPartitionId(),
- partitionId, memberContext.getMemberId());
-
- //publishing data
- CartridgeInstanceDataPublisher.publish(memberContext.getMemberId(),
- partitionId,
- memberContext.getNetworkPartitionId(),
- memberContext.getClusterId(),
- memberContext.getCartridgeType(),
- MemberStatus.Terminated.toString(),
- null);
-
- // update data holders
- dataHolder.removeMemberContext(memberContext.getMemberId(), memberContext.getClusterId());
-
- // persist
- persist();
-
- }
-
- @Override
- public boolean registerService(Registrant registrant)
- throws UnregisteredCartridgeException {
-
- String cartridgeType = registrant.getCartridgeType();
- handleNullObject(cartridgeType, "Service registration failed. Cartridge Type is null.");
-
- String clusterId = registrant.getClusterId();
- handleNullObject(clusterId, "Service registration failed. Cluster id is null.");
-
- String payload = registrant.getPayload();
- handleNullObject(payload, "Service registration failed. Payload is null.");
-
- String hostName = registrant.getHostName();
- handleNullObject(hostName, "Service registration failed. Hostname is null.");
-
- Cartridge cartridge = null;
- if ((cartridge = dataHolder.getCartridge(cartridgeType)) == null) {
-
- String msg = "Registration of cluster: " + clusterId +
- " failed. - Unregistered Cartridge type: " + cartridgeType;
- LOG.error(msg);
- throw new UnregisteredCartridgeException(msg);
- }
-
- Properties props = CloudControllerUtil.toJavaUtilProperties(registrant.getProperties());
- String property = props.getProperty(IS_LOAD_BALANCER);
- boolean isLb = property != null ? Boolean.parseBoolean(property) : false;
-
- //TODO fix the properties issue
- /*ClusterContext ctxt = buildClusterContext(cartridge, clusterId,
- payload, hostName, props, isLb, registrant.getPersistence());
-
-
- dataHolder.addClusterContext(ctxt);*/
- TopologyBuilder.handleClusterCreated(registrant, isLb);
-
- persist();
-
- LOG.info("Successfully registered: " + registrant);
-
- return true;
- }
-
- private ClusterContext buildClusterContext(Cartridge cartridge,
- String clusterId, String payload, String hostName,
- org.apache.stratos.common.Properties props, boolean isLb, Persistence persistence) {
- //TODO fix properties issue
- // initialize ClusterContext
- ClusterContext ctxt = new ClusterContext(clusterId, cartridge.getType(), payload,
- hostName, isLb, props);
-
- /*String property;
- property = props.get(Constants.GRACEFUL_SHUTDOWN_TIMEOUT);
- long timeout = property != null ? Long.parseLong(property) : 30000;
-
- boolean persistanceRequired = false;
- if(persistence != null){
- persistanceRequired = persistence.isPersistanceRequired();
- }
-
- if(persistanceRequired){
- ctxt.setVolumes(persistence.getVolumes());
- ctxt.setVolumeRequired(true);
- }else{
- ctxt.setVolumeRequired(false);
- }
- ctxt.setTimeoutInMillis(timeout);
- return ctxt;
- ;*/
- return null;
- }
-
- @Override
- public String[] getRegisteredCartridges() {
- // get the list of cartridges registered
- List<Cartridge> cartridges = dataHolder
- .getCartridges();
-
- if (cartridges == null) {
- LOG.info("No registered Cartridge found.");
- return new String[0];
- }
-
- String[] cartridgeTypes = new String[cartridges.size()];
- int i = 0;
-
- if (LOG.isDebugEnabled()) {
- LOG.debug("Registered Cartridges : \n");
- }
- for (Cartridge cartridge : cartridges) {
- if (LOG.isDebugEnabled()) {
- LOG.debug(cartridge);
- }
- cartridgeTypes[i] = cartridge.getType();
- i++;
- }
-
- return cartridgeTypes;
- }
-
- @Override
- public CartridgeInfo getCartridgeInfo(String cartridgeType)
- throws UnregisteredCartridgeException {
- Cartridge cartridge = dataHolder
- .getCartridge(cartridgeType);
-
- if (cartridge != null) {
-
- return CloudControllerUtil.toCartridgeInfo(cartridge);
-
- }
-
- String msg = "Cannot find a Cartridge having a type of "
- + cartridgeType + ". Hence unable to find information.";
- LOG.error(msg);
- throw new UnregisteredCartridgeException(msg);
- }
-
- @Override
- public void unregisterService(String clusterId) throws UnregisteredClusterException {
- final String clusterId_ = clusterId;
-
- ClusterContext ctxt = dataHolder.getClusterContext(clusterId_);
-
- handleNullObject(ctxt, "Service unregistration failed. Invalid cluster id: " + clusterId);
-
- String cartridgeType = ctxt.getCartridgeType();
-
- Cartridge cartridge = dataHolder.getCartridge(cartridgeType);
-
- if (cartridge == null) {
- String msg =
- "Service unregistration failed. No matching Cartridge found [type] " + cartridgeType + ". ";
- LOG.error(msg);
- throw new UnregisteredClusterException(msg);
- }
-
- // if it's a kubernetes cluster
- if (StratosConstants.KUBERNETES_DEPLOYER_TYPE.equals(cartridge.getDeployerType())) {
- unregisterDockerService(clusterId_);
-
- } else {
-
-// TopologyBuilder.handleClusterMaintenanceMode(dataHolder.getClusterContext(clusterId_));
-
- Runnable terminateInTimeout = new Runnable() {
- @Override
- public void run() {
- ClusterContext ctxt = dataHolder.getClusterContext(clusterId_);
- if (ctxt == null) {
- String msg = "Service unregistration failed. Cluster not found: " + clusterId_;
- LOG.error(msg);
- return;
- }
- Collection<Member> members = TopologyManager.getTopology().
- getService(ctxt.getCartridgeType()).getCluster(clusterId_).getMembers();
- //finding the responding members from the existing members in the topology.
- int sizeOfRespondingMembers = 0;
- for (Member member : members) {
- if (member.getStatus().getCode() >= MemberStatus.Activated.getCode()) {
- sizeOfRespondingMembers++;
- }
- }
-
- long endTime = System.currentTimeMillis() + ctxt.getTimeoutInMillis() * sizeOfRespondingMembers;
- while (System.currentTimeMillis() < endTime) {
- CloudControllerUtil.sleep(1000);
-
- }
-
- // if there're still alive members
- if (members.size() > 0) {
- //forcefully terminate them
- for (Member member : members) {
-
- try {
- terminateInstance(member.getMemberId());
- } catch (Exception e) {
- // we are not gonna stop the execution due to errors.
- LOG.warn("Instance termination failed of member [id] " + member.getMemberId(), e);
- }
- }
- }
- }
- };
- Runnable unregister = new Runnable() {
- public void run() {
- ClusterContext ctxt = dataHolder.getClusterContext(clusterId_);
- if (ctxt == null) {
- String msg = "Service unregistration failed. Cluster not found: " + clusterId_;
- LOG.error(msg);
- return;
- }
- Collection<Member> members = TopologyManager.getTopology().
- getService(ctxt.getCartridgeType()).getCluster(clusterId_).getMembers();
- // TODO why end time is needed?
- // long endTime = System.currentTimeMillis() + ctxt.getTimeoutInMillis() * members.size();
-
- while (members.size() > 0) {
- //waiting until all the members got removed from the Topology/ timed out
- CloudControllerUtil.sleep(1000);
- }
-
- LOG.info("Unregistration of service cluster: " + clusterId_);
- deleteVolumes(ctxt);
- onClusterRemoval(clusterId_);
- }
-
- private void deleteVolumes(ClusterContext ctxt) {
- if (ctxt.isVolumeRequired()) {
- Cartridge cartridge = dataHolder.getCartridge(ctxt.getCartridgeType());
- if (cartridge != null && cartridge.getIaases() != null && ctxt.getVolumes() != null) {
- for (Volume volume : ctxt.getVolumes()) {
- if (volume.getId() != null) {
- String iaasType = volume.getIaasType();
- //Iaas iaas = dataHolder.getIaasProvider(iaasType).getIaas();
- Iaas iaas = cartridge.getIaasProvider(iaasType).getIaas();
- if (iaas != null) {
- try {
- // delete the volumes if remove on unsubscription is true.
- if (volume.isRemoveOntermination()) {
- iaas.deleteVolume(volume.getId());
- volume.setId(null);
- }
- } catch (Exception ignore) {
- if (LOG.isErrorEnabled()) {
- LOG.error("Error while deleting volume [id] " + volume.getId(), ignore);
- }
- }
- }
- }
- }
-
- }
- }
- }
- };
- new Thread(terminateInTimeout).start();
- new Thread(unregister).start();
- }
- }
-
- @Override
- public void unregisterDockerService(String clusterId)
- throws UnregisteredClusterException {
-
- // terminate all kubernetes units
- try {
- terminateAllContainers(clusterId);
- } catch (InvalidClusterException e) {
- String msg = "Docker instance termination fails for cluster: " + clusterId;
- LOG.error(msg, e);
- throw new UnregisteredClusterException(msg, e);
- }
- // send cluster removal notifications and update the state
- onClusterRemoval(clusterId);
- }
-
-
- @Override
- public boolean validateDeploymentPolicy(String cartridgeType, Partition[] partitions)
- throws InvalidPartitionException, InvalidCartridgeTypeException {
-
- Map<String, List<String>> validatedCache = dataHolder.getCartridgeTypeToPartitionIds();
- List<String> validatedPartitions = new ArrayList<String>();
-
- if (validatedCache.containsKey(cartridgeType)) {
- // cache hit for this cartridge
- // get list of partitions
- validatedPartitions = validatedCache.get(cartridgeType);
- if (LOG.isDebugEnabled()) {
- LOG.debug("Partition validation cache hit for cartridge type: " + cartridgeType);
- }
-
- }
-
- Map<String, IaasProvider> partitionToIaasProviders =
- new ConcurrentHashMap<String, IaasProvider>();
-
- if (LOG.isDebugEnabled()) {
- LOG.debug("Deployment policy validation started for cartridge type: " + cartridgeType);
- }
-
- Cartridge cartridge = dataHolder.getCartridge(cartridgeType);
-
- if (cartridge == null) {
- String msg = "Invalid Cartridge Type: " + cartridgeType;
- LOG.error(msg);
- throw new InvalidCartridgeTypeException(msg);
- }
-
- Map<String, Future<IaasProvider>> jobList = new HashMap<String, Future<IaasProvider>>();
-
- for (Partition partition : partitions) {
-
- if (validatedPartitions.contains(partition.getId())) {
- // partition cache hit
- continue;
- }
-
- Callable<IaasProvider> worker = new PartitionValidatorCallable(
- partition, cartridge);
- Future<IaasProvider> job = CloudControllerContext.getInstance()
- .getExecutor().submit(worker);
- jobList.put(partition.getId(), job);
- }
-
- // Retrieve the results of the concurrently performed sanity checks.
- for (Entry<String, Future<IaasProvider>> entry : jobList.entrySet()) {
- if (entry == null) {
- continue;
- }
- String partitionId = entry.getKey();
- Future<IaasProvider> job = entry.getValue();
- try {
- // add to a temporary Map
- partitionToIaasProviders.put(partitionId, job.get());
-
- // add to cache
- this.dataHolder.addToCartridgeTypeToPartitionIdMap(cartridgeType, partitionId);
-
- if (LOG.isDebugEnabled()) {
- LOG.debug("Partition " + partitionId + " added to the cache against cartridge type: " + cartridgeType);
- }
- } catch (Exception e) {
- LOG.error(e.getMessage(), e);
- throw new InvalidPartitionException(e.getMessage(), e);
- }
- }
-
- // if and only if the deployment policy valid
- cartridge.addIaasProviders(partitionToIaasProviders);
-
- // persist data
- persist();
-
- LOG.info("All partitions " + CloudControllerUtil.getPartitionIds(partitions) +
- " were validated successfully, against the Cartridge: " + cartridgeType);
-
- return true;
- }
-
- private void onClusterRemoval(final String clusterId) {
- ClusterContext ctxt = dataHolder.getClusterContext(clusterId);
- TopologyBuilder.handleClusterRemoved(ctxt);
- dataHolder.removeClusterContext(clusterId);
- dataHolder.removeMemberContextsOfCluster(clusterId);
- persist();
- }
-
- @Override
- public boolean validatePartition(Partition partition) throws InvalidPartitionException {
- handleNullObject(partition, "Partition validation failed. Partition is null.");
- String provider = partition.getProvider();
- handleNullObject(provider, "Partition [" + partition.getId() + "] validation failed. Partition provider is null.");
- IaasProvider iaasProvider = dataHolder.getIaasProvider(provider);
-
- if (iaasProvider == null) {
- String msg =
- "Invalid Partition - " + partition.toString() + ". Cause: Iaas Provider " +
- "is null for Partition Provider: " + provider;
- LOG.error(msg);
- throw new InvalidPartitionException(msg);
- }
-
- Iaas iaas = iaasProvider.getIaas();
-
- if (iaas == null) {
-
- try {
- iaas = CloudControllerUtil.getIaas(iaasProvider);
- } catch (InvalidIaasProviderException e) {
- String msg =
- "Invalid Partition - " + partition.toString() +
- ". Cause: Unable to build Iaas of this IaasProvider [Provider] : " + provider + ". " + e.getMessage();
- LOG.error(msg, e);
- throw new InvalidPartitionException(msg, e);
- }
-
- }
-
- PartitionValidator validator = iaas.getPartitionValidator();
- validator.setIaasProvider(iaasProvider);
- validator.validate(partition.getId(),
- CloudControllerUtil.toJavaUtilProperties(partition.getProperties()));
-
- return true;
- }
-
- public ClusterContext getClusterContext(String clusterId) {
-
- return dataHolder.getClusterContext(clusterId);
- }
-
- @Override
- public MemberContext[] startContainers(ContainerClusterContext containerClusterContext)
- throws UnregisteredCartridgeException {
-
- if (LOG.isDebugEnabled()) {
- LOG.debug("CloudControllerServiceImpl:startContainers");
- }
-
- handleNullObject(containerClusterContext, "Container start-up failed. ContainerClusterContext is null.");
-
- String clusterId = containerClusterContext.getClusterId();
- handleNullObject(clusterId, "Container start-up failed. Cluster id is null.");
-
- if (LOG.isDebugEnabled()) {
- LOG.debug("Received a container spawn request : " + containerClusterContext.toString());
- }
-
- ClusterContext ctxt = dataHolder.getClusterContext(clusterId);
- handleNullObject(ctxt, "Container start-up failed. Invalid cluster id. " + containerClusterContext.toString());
-
- String cartridgeType = ctxt.getCartridgeType();
-
- Cartridge cartridge = dataHolder.getCartridge(cartridgeType);
-
- if (cartridge == null) {
- String msg =
- "Instance start-up failed. No matching Cartridge found [type] " + cartridgeType + ". " +
- containerClusterContext.toString();
- LOG.error(msg);
- throw new UnregisteredCartridgeException(msg);
- }
-
- try {
- String minReplicas = validateProperty(StratosConstants.KUBERNETES_MIN_REPLICAS, ctxt);
- String kubernetesClusterId = validateProperty(StratosConstants.KUBERNETES_CLUSTER_ID, ctxt);
- String kubernetesMasterIp = validateProperty(StratosConstants.KUBERNETES_MASTER_IP, containerClusterContext);
- String kubernetesPortRange = validateProperty(StratosConstants.KUBERNETES_PORT_RANGE, containerClusterContext);
-
- KubernetesClusterContext kubClusterContext = getKubernetesClusterContext(kubernetesClusterId, kubernetesMasterIp, kubernetesPortRange);
-
- KubernetesApiClient kubApi = kubClusterContext.getKubApi();
-
- // first let's create a replication controller.
- ContainerClusterContextToReplicationController controllerFunction = new ContainerClusterContextToReplicationController();
- ReplicationController controller = controllerFunction.apply(containerClusterContext);
-
- if (LOG.isDebugEnabled()) {
- LOG.debug("Cloud Controller is delegating request to start a replication controller " + controller +
- " for " + containerClusterContext + " to Kubernetes layer.");
- }
-
- kubApi.createReplicationController(controller);
-
- if (LOG.isDebugEnabled()) {
- LOG.debug("Cloud Controller successfully started the controller "
- + controller + " via Kubernetes layer.");
- }
-
- // secondly let's create a kubernetes service proxy to load balance these containers
- ContainerClusterContextToKubernetesService serviceFunction = new ContainerClusterContextToKubernetesService();
- Service service = serviceFunction.apply(containerClusterContext);
-
- if (LOG.isDebugEnabled()) {
- LOG.debug("Cloud Controller is delegating request to start a service " + service +
- " for " + containerClusterContext + " to Kubernetes layer.");
- }
-
- kubApi.createService(service);
-
- // set host port and update
- Property allocatedServiceHostPortProp = new Property();
- allocatedServiceHostPortProp.setName(StratosConstants.ALLOCATED_SERVICE_HOST_PORT);
- allocatedServiceHostPortProp.setValue(String.valueOf(service.getPort()));
- ctxt.getProperties().addProperty(allocatedServiceHostPortProp);
- dataHolder.addClusterContext(ctxt);
-
- if (LOG.isDebugEnabled()) {
- LOG.debug("Cloud Controller successfully started the service "
- + controller + " via Kubernetes layer.");
- }
-
- // create a label query
- Label l = new Label();
- l.setName(clusterId);
- // execute the label query
- Pod[] newlyCreatedPods = new Pod[0];
- int expectedCount = Integer.parseInt(minReplicas);
-
- for (int i = 0; i < expectedCount; i++) {
- newlyCreatedPods = kubApi.getSelectedPods(new Label[]{l});
-
- if (LOG.isDebugEnabled()) {
-
- LOG.debug("Pods Count: " + newlyCreatedPods.length + " for cluster: " + clusterId);
- }
- if (newlyCreatedPods.length == expectedCount) {
- break;
- }
- Thread.sleep(10000);
- }
-
- if (newlyCreatedPods.length == 0) {
- if (LOG.isDebugEnabled()) {
- LOG.debug(String.format("Pods are not created for cluster : %s, hence deleting the service", clusterId));
- }
- terminateAllContainers(clusterId);
- return new MemberContext[0];
- }
-
- if (LOG.isDebugEnabled()) {
-
- LOG.debug(String.format("Pods created : %s for cluster : %s", newlyCreatedPods.length, clusterId));
- }
-
- List<MemberContext> memberContexts = new ArrayList<MemberContext>();
-
- PodToMemberContext podToMemberContextFunc = new PodToMemberContext();
- // generate Member Contexts
- for (Pod pod : newlyCreatedPods) {
- MemberContext context = podToMemberContextFunc.apply(pod);
- context.setCartridgeType(cartridgeType);
- context.setClusterId(clusterId);
-
- context.setProperties(CloudControllerUtil.addProperty(context
- .getProperties(), StratosConstants.ALLOCATED_SERVICE_HOST_PORT,
- String.valueOf(service.getPort())));
-
- dataHolder.addMemberContext(context);
-
- // wait till Pod status turns to running and send member spawned.
- ScheduledThreadExecutor exec = ScheduledThreadExecutor.getInstance();
- if (LOG.isDebugEnabled()) {
- LOG.debug("Cloud Controller is starting the instance start up thread.");
- }
- dataHolder.addScheduledFutureJob(context.getMemberId(), exec.schedule(new PodActivationWatcher(pod.getId(), context, kubApi), 5000));
-
- memberContexts.add(context);
- }
-
- // persist in registry
- persist();
-
- LOG.info("Kubernetes entities are successfully starting up: " + memberContexts);
-
- return memberContexts.toArray(new MemberContext[0]);
-
- } catch (Exception e) {
- String msg = "Failed to start an instance. " + containerClusterContext.toString() + " Cause: " + e.getMessage();
- LOG.error(msg, e);
- throw new IllegalStateException(msg, e);
- }
- }
-
- private String validateProperty(String property, ClusterContext ctxt) {
-
- String propVal = CloudControllerUtil.getProperty(ctxt.getProperties(), property);
- handleNullObject(propVal, "Property validation failed. Cannot find '" + property + "' in " + ctxt);
- return propVal;
- }
-
- private String validateProperty(String property, ContainerClusterContext ctxt) {
-
- String propVal = CloudControllerUtil.getProperty(ctxt.getProperties(), property);
- handleNullObject(propVal, "Property validation failed. '" + property + "' in " + ctxt);
- return propVal;
-
- }
-
- private KubernetesClusterContext getKubernetesClusterContext(
- String kubernetesClusterId, String kubernetesMasterIp,
- String kubernetesPortRange) {
-
- KubernetesClusterContext origCtxt = dataHolder.getKubernetesClusterContext(kubernetesClusterId);
- KubernetesClusterContext newCtxt = new KubernetesClusterContext(kubernetesClusterId, kubernetesPortRange, kubernetesMasterIp);
-
- if (origCtxt == null) {
- dataHolder.addKubernetesClusterContext(newCtxt);
- return newCtxt;
- }
-
- if (!origCtxt.equals(newCtxt)) {
- // if for some reason master IP etc. have changed
- newCtxt.setAvailableHostPorts(origCtxt.getAvailableHostPorts());
- dataHolder.addKubernetesClusterContext(newCtxt);
- return newCtxt;
- } else {
- return origCtxt;
- }
- }
-
- @Override
- public MemberContext[] terminateAllContainers(String clusterId)
- throws InvalidClusterException {
-
- ClusterContext ctxt = dataHolder.getClusterContext(clusterId);
- handleNullObject(ctxt, "Kubernetes units temrination failed. Invalid cluster id. " + clusterId);
-
- String kubernetesClusterId = CloudControllerUtil.getProperty(ctxt.getProperties(),
- StratosConstants.KUBERNETES_CLUSTER_ID);
- handleNullObject(kubernetesClusterId, "Kubernetes units termination failed. Cannot find '" +
- StratosConstants.KUBERNETES_CLUSTER_ID + "'. " + ctxt);
-
- KubernetesClusterContext kubClusterContext = dataHolder.getKubernetesClusterContext(kubernetesClusterId);
- handleNullObject(kubClusterContext, "Kubernetes units termination failed. Cannot find a matching Kubernetes Cluster for cluster id: "
- + kubernetesClusterId);
-
- KubernetesApiClient kubApi = kubClusterContext.getKubApi();
- // delete the service
- try {
- kubApi.deleteService(CloudControllerUtil.getCompatibleId(clusterId));
- } catch (KubernetesClientException e) {
- // we're not going to throw this error, but proceed with other deletions
- LOG.error("Failed to delete Kubernetes service with id: " + clusterId, e);
- }
-
- // set replicas=0 for the replication controller
- try {
- kubApi.updateReplicationController(clusterId, 0);
- } catch (KubernetesClientException e) {
- // we're not going to throw this error, but proceed with other deletions
- LOG.error("Failed to update Kubernetes Controller with id: " + clusterId, e);
- }
-
- // delete pods forcefully
- try {
- // create a label query
- Label l = new Label();
- l.setName(clusterId);
- // execute the label query
- Pod[] pods = kubApi.getSelectedPods(new Label[]{l});
-
- for (Pod pod : pods) {
- try {
- // delete pods forcefully
- kubApi.deletePod(pod.getId());
- } catch (KubernetesClientException ignore) {
- // we can't do nothing here
- LOG.warn(String.format("Failed to delete Pod [%s] forcefully!", pod.getId()));
- }
- }
- } catch (KubernetesClientException e) {
- // we're not going to throw this error, but proceed with other deletions
- LOG.error("Failed to delete pods forcefully for cluster: " + clusterId, e);
- }
-
- // delete the replication controller.
- try {
- kubApi.deleteReplicationController(clusterId);
- } catch (KubernetesClientException e) {
- String msg = "Failed to delete Kubernetes Controller with id: " + clusterId;
- LOG.error(msg, e);
- throw new InvalidClusterException(msg, e);
- }
-
- String allocatedPort = CloudControllerUtil.getProperty(ctxt.getProperties(),
- StratosConstants.ALLOCATED_SERVICE_HOST_PORT);
-
- if (allocatedPort != null) {
- kubClusterContext.deallocateHostPort(Integer
- .parseInt(allocatedPort));
- } else {
- LOG.warn("Host port dealloacation failed due to a missing property: "
- + StratosConstants.ALLOCATED_SERVICE_HOST_PORT);
- }
-
- List<MemberContext> membersToBeRemoved = dataHolder.getMemberContextsOfClusterId(clusterId);
-
- for (MemberContext memberContext : membersToBeRemoved) {
- logTermination(memberContext);
- }
-
- // persist
- persist();
-
- return membersToBeRemoved.toArray(new MemberContext[0]);
- }
-
- @Override
- public MemberContext[] updateContainers(String clusterId, int replicas)
- throws UnregisteredCartridgeException {
-
- if (LOG.isDebugEnabled()) {
- LOG.debug("CloudControllerServiceImpl:updateContainers for cluster : " + clusterId);
- }
-
- ClusterContext ctxt = dataHolder.getClusterContext(clusterId);
- handleNullObject(ctxt, "Container update failed. Invalid cluster id. " + clusterId);
-
- String cartridgeType = ctxt.getCartridgeType();
-
- Cartridge cartridge = dataHolder.getCartridge(cartridgeType);
-
- if (cartridge == null) {
- String msg =
- "Container update failed. No matching Cartridge found [type] " + cartridgeType
- + ". [cluster id] " + clusterId;
- LOG.error(msg);
- throw new UnregisteredCartridgeException(msg);
- }
-
- try {
- String kubernetesClusterId = validateProperty(StratosConstants.KUBERNETES_CLUSTER_ID, ctxt);
-
- KubernetesClusterContext kubClusterContext = dataHolder.getKubernetesClusterContext(kubernetesClusterId);
-
- if (kubClusterContext == null) {
- String msg =
- "Instance start-up failed. No matching Kubernetes Context Found for [id] " + kubernetesClusterId
- + ". [cluster id] " + clusterId;
- LOG.error(msg);
- throw new UnregisteredCartridgeException(msg);
- }
-
- KubernetesApiClient kubApi = kubClusterContext.getKubApi();
- // create a label query
- Label l = new Label();
- l.setName(clusterId);
-
- // get the current pods - useful when scale down
- Pod[] previousStatePods = kubApi.getSelectedPods(new Label[]{l});
-
- // update the replication controller - cluster id = replication controller id
- if (LOG.isDebugEnabled()) {
- LOG.debug("Cloud Controller is delegating request to update a replication controller " + clusterId +
- " to Kubernetes layer.");
- }
-
- kubApi.updateReplicationController(clusterId, replicas);
-
- if (LOG.isDebugEnabled()) {
- LOG.debug("Cloud Controller successfully updated the controller "
- + clusterId + " via Kubernetes layer.");
- }
-
- // execute the label query
- Pod[] allPods = new Pod[0];
-
- // wait replicas*5s time in the worst case ; best case = 0s
- for (int i = 0; i < (replicas * previousStatePods.length + 1); i++) {
- allPods = kubApi.getSelectedPods(new Label[]{l});
-
- if (LOG.isDebugEnabled()) {
-
- LOG.debug("Pods Count: " + allPods.length + " for cluster: " + clusterId);
- }
- if (allPods.length == replicas) {
- break;
- }
- Thread.sleep(10000);
- }
-
- if (LOG.isDebugEnabled()) {
-
- LOG.debug(String.format("Pods created : %s for cluster : %s", allPods.length, clusterId));
- }
-
- List<MemberContext> memberContexts = new ArrayList<MemberContext>();
-
- PodToMemberContext podToMemberContextFunc = new PodToMemberContext();
- // generate Member Contexts
- for (Pod pod : allPods) {
- MemberContext context;
- // if member context does not exist -> a new member (scale up)
- if ((context = dataHolder.getMemberContextOfMemberId(pod.getId())) == null) {
-
- context = podToMemberContextFunc.apply(pod);
- context.setCartridgeType(cartridgeType);
- context.setClusterId(clusterId);
-
- context.setProperties(CloudControllerUtil.addProperty(context
- .getProperties(), StratosConstants.ALLOCATED_SERVICE_HOST_PORT,
- CloudControllerUtil.getProperty(ctxt.getProperties(),
- StratosConstants.ALLOCATED_SERVICE_HOST_PORT)));
-
- // wait till Pod status turns to running and send member spawned.
- ScheduledThreadExecutor exec = ScheduledThreadExecutor.getInstance();
- if (LOG.isDebugEnabled()) {
- LOG.debug("Cloud Controller is starting the instance start up thread.");
- }
- dataHolder.addScheduledFutureJob(context.getMemberId(), exec.schedule(new PodActivationWatcher(pod.getId(), context, kubApi), 5000));
-
- memberContexts.add(context);
-
- }
- // publish data
- // TODO
-// CartridgeInstanceDataPublisher.publish(context.getMemberId(), null, null, context.getClusterId(), cartridgeType, MemberStatus.Created.toString(), node);
-
- }
-
- if (memberContexts.isEmpty()) {
- // terminated members
- @SuppressWarnings("unchecked")
- List<Pod> difference = ListUtils.subtract(Arrays.asList(previousStatePods), Arrays.asList(allPods));
- for (Pod pod : difference) {
- if (pod != null) {
- MemberContext context = dataHolder.getMemberContextOfMemberId(pod.getId());
- logTermination(context);
- memberContexts.add(context);
- }
- }
- }
-
-
- // persist in registry
- persist();
-
- LOG.info("Kubernetes entities are successfully starting up. " + memberContexts);
-
- return memberContexts.toArray(new MemberContext[0]);
-
- } catch (Exception e) {
- String msg = "Failed to update containers belong to cluster " + clusterId + ". Cause: " + e.getMessage();
- LOG.error(msg, e);
- throw new IllegalStateException(msg, e);
- }
- }
-
- @Override
- public void updateClusterStatus(String serviceName, String clusterId, String instanceId, ClusterStatus status) {
- //TODO
- }
-
- @Override
- public MemberContext terminateContainer(String memberId) throws MemberTerminationFailedException {
-
- handleNullObject(memberId, "Failed to terminate member. Invalid Member id. [Member id] " + memberId);
-
- MemberContext memberContext = dataHolder.getMemberContextOfMemberId(memberId);
-
- handleNullObject(memberContext, "Failed to terminate member. Member id not found. [Member id] " + memberId);
-
- String clusterId = memberContext.getClusterId();
-
- handleNullObject(clusterId, "Failed to terminate member. Cluster id is null. [Member id] " + memberId);
-
- ClusterContext ctxt = dataHolder.getClusterContext(clusterId);
-
- handleNullObject(ctxt,
- String.format("Failed to terminate member [Member id] %s. Invalid cluster id %s ", memberId, clusterId));
-
- String kubernetesClusterId = CloudControllerUtil.getProperty(ctxt.getProperties(),
- StratosConstants.KUBERNETES_CLUSTER_ID);
-
- handleNullObject(kubernetesClusterId, String.format("Failed to terminate member [Member id] %s. Cannot find '" +
- StratosConstants.KUBERNETES_CLUSTER_ID + "' in [cluster context] %s ", memberId, ctxt));
-
- KubernetesClusterContext kubClusterContext = dataHolder.getKubernetesClusterContext(kubernetesClusterId);
-
- handleNullObject(kubClusterContext, String.format("Failed to terminate member [Member id] %s. Cannot find a matching Kubernetes Cluster in [cluster context] %s ", memberId, ctxt));
-
- KubernetesApiClient kubApi = kubClusterContext.getKubApi();
- // delete the Pod
- try {
- // member id = pod id
- kubApi.deletePod(memberId);
-
- MemberContext memberToBeRemoved = dataHolder.getMemberContextOfMemberId(memberId);
-
- logTermination(memberToBeRemoved);
-
- return memberToBeRemoved;
-
- } catch (KubernetesClientException e) {
- String msg = String.format("Failed to terminate member [Member id] %s", memberId);
- LOG.error(msg, e);
- throw new MemberTerminationFailedException(msg, e);
- }
- }
-
- private void handleNullObject(Object obj, String errorMsg) {
- if (obj == null) {
- LOG.error(errorMsg);
- throw new IllegalArgumentException(errorMsg);
- }
- }
-
- @Override
- public void createApplicationClusters(String appId, ApplicationClusterContext[] appClustersContexts) throws
- ApplicationClusterRegistrationException {
-
- // Create a Cluster Context obj. for each of the Clusters in the Application
- if (appClustersContexts == null || appClustersContexts.length == 0) {
- String errorMsg = "No application cluster information found, unable to create clusters";
- LOG.error(errorMsg);
- throw new ApplicationClusterRegistrationException(errorMsg);
- }
- List<Cluster> clusters = new ArrayList<Cluster>();
-
-
- for (ApplicationClusterContext appClusterCtxt : appClustersContexts) {
- dataHolder.addClusterContext(new ClusterContext(appClusterCtxt.getClusterId(),
- appClusterCtxt.getCartridgeType(), appClusterCtxt.getTextPayload(),
- appClusterCtxt.getHostName(), appClusterCtxt.isLbCluster(), appClusterCtxt.getProperties()));
- // create Cluster objects
- Cluster newCluster = new Cluster(appClusterCtxt.getCartridgeType(), appClusterCtxt.getClusterId(),
- appClusterCtxt.getDeploymentPolicyName(), appClusterCtxt.getAut
<TRUNCATED>
[08/13] stratos git commit: Remove an unused method.
Posted by ni...@apache.org.
Remove an unused method.
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/f17f55ca
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/f17f55ca
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/f17f55ca
Branch: refs/heads/master
Commit: f17f55cad07200f409b018695212298de3276dc6
Parents: 8074b43
Author: Nirmal Fernando <ni...@gmail.com>
Authored: Sun Nov 30 08:16:28 2014 +0530
Committer: Nirmal Fernando <ni...@gmail.com>
Committed: Sun Nov 30 12:47:23 2014 +0530
----------------------------------------------------------------------
.../cloud/controller/util/CloudControllerUtil.java | 10 ----------
1 file changed, 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/f17f55ca/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java
index caa2b64..5360545 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java
@@ -278,16 +278,6 @@ public class CloudControllerUtil {
}
}
- public static List<Object> getKeysFromValue(Map<?, ?> hm, Object value) {
- List<Object> list = new ArrayList<Object>();
- for (Object o : hm.keySet()) {
- if (hm.get(o).equals(value)) {
- list.add(o);
- }
- }
- return list;
- }
-
public static void sleep(long time){
try {
Thread.sleep(time);
[02/13] stratos git commit: fixing CC service wsdl and exports
Posted by ni...@apache.org.
fixing CC service wsdl and exports
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/48e7c23d
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/48e7c23d
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/48e7c23d
Branch: refs/heads/master
Commit: 48e7c23d1ff390e7df116f9f32ec562964ce075e
Parents: 799b176
Author: Nirmal Fernando <ni...@gmail.com>
Authored: Sun Nov 30 12:39:36 2014 +0530
Committer: Nirmal Fernando <ni...@gmail.com>
Committed: Sun Nov 30 12:47:23 2014 +0530
----------------------------------------------------------------------
.../pom.xml | 9 +-
.../main/resources/CloudControllerService.wsdl | 1654 +++++++++---------
2 files changed, 809 insertions(+), 854 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/48e7c23d/service-stubs/org.apache.stratos.cloud.controller.service.stub/pom.xml
----------------------------------------------------------------------
diff --git a/service-stubs/org.apache.stratos.cloud.controller.service.stub/pom.xml b/service-stubs/org.apache.stratos.cloud.controller.service.stub/pom.xml
index 9c7848d..f83d8fd 100644
--- a/service-stubs/org.apache.stratos.cloud.controller.service.stub/pom.xml
+++ b/service-stubs/org.apache.stratos.cloud.controller.service.stub/pom.xml
@@ -48,7 +48,7 @@
<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
<arg line="-uri src/main/resources/CloudControllerService.wsdl -u -uw -o target/generated-code
-p org.apache.stratos.cloud.controller.stub
- -ns2p http://policy.deployment.controller.cloud.stratos.apache.org/xsd=org.apache.stratos.cloud.controller.stub.deployment.policy,http://partition.deployment.controller.cloud.stratos.apache.org/xsd=org.apache.stratos.cloud.controller.stub.deployment.partition,http://exception.controller.cloud.stratos.apache.org/xsd=org.apache.stratos.cloud.controller.stub.exception,http://pojo.controller.cloud.stratos.apache.org/xsd=org.apache.stratos.cloud.controller.stub.pojo,http://impl.controller.cloud.stratos.apache.org=org.apache.stratos.cloud.controller.stub.impl,http://common.stratos.apache.org/xsd=org.apache.stratos.cloud.controller.stub.pojo"/>
+ -ns2p http://domain.controller.cloud.stratos.apache.org/xsd=org.apache.stratos.cloud.controller.stub.domain,http://exception.controller.cloud.stratos.apache.org/xsd=org.apache.stratos.cloud.controller.stub.exception,http://impl.services.controller.cloud.stratos.apache.org=org.apache.stratos.cloud.controller.stub.services.impl,http://common.stratos.apache.org/xsd=org.apache.stratos.common"/>
<classpath refid="maven.dependency.classpath"/>
<classpath refid="maven.compile.classpath"/>
<classpath refid="maven.runtime.classpath"/>
@@ -88,13 +88,10 @@
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Bundle-Name>${project.artifactId}</Bundle-Name>
<Export-Package>
- org.apache.stratos.cloud.controller.domain.xsd.*; version=${project.version},
org.apache.stratos.cloud.controller.stub.exception.*; version=${project.version},
- org.apache.stratos.cloud.controller.stub.deployment.partition.*; version=${project.version},
- org.apache.stratos.cloud.controller.stub.pojo.*; version=${project.version},
- org.apache.stratos.cloud.controller.stub.impl.*; version=${project.version},
+ org.apache.stratos.cloud.controller.stub.domain.*; version=${project.version},
+ org.apache.stratos.cloud.controller.stub.services.impl.*; version=${project.version},
org.apache.stratos.cloud.controller.stub.*; version=${project.version},
- org.apache.stratos.cloud.controller.pojo.application.xsd.*; version=${project.version},
</Export-Package>
<Import-Package>
*;resolution:=optional
[12/13] stratos git commit: SM changes after refactoring at CC and
AS. - this commit breaks master build... will be fixed by Lahiru
Posted by ni...@apache.org.
SM changes after refactoring at CC and AS. - this commit breaks master build... will be fixed by Lahiru
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/1f7a3046
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/1f7a3046
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/1f7a3046
Branch: refs/heads/master
Commit: 1f7a30468baa8817accb591960c1b49e2693e1a0
Parents: 86a67c0
Author: Nirmal Fernando <ni...@gmail.com>
Authored: Sun Nov 30 12:46:06 2014 +0530
Committer: Nirmal Fernando <ni...@gmail.com>
Committed: Sun Nov 30 12:47:24 2014 +0530
----------------------------------------------------------------------
.../behaviour/CartridgeMgtBehaviour.java | 10 +++---
.../manager/client/AutoscalerServiceClient.java | 38 ++++++++++----------
.../client/CloudControllerServiceClient.java | 17 ++++-----
.../deploy/cartridge/CartridgeDeployer.java | 2 +-
.../cartridge/DefaultCartridgeDeployer.java | 2 +-
.../stratos/manager/deploy/service/Service.java | 4 +--
.../service/ServiceDeploymentManager.java | 8 ++---
.../service/multitenant/MultiTenantService.java | 2 +-
.../multitenant/lb/DefaultLBService.java | 6 ++--
.../multitenant/lb/ExistingLBService.java | 4 +--
.../service/multitenant/lb/LBService.java | 4 +--
.../multitenant/lb/MultiTenantLBService.java | 4 +--
.../multitenant/lb/ServiceAwareLBService.java | 6 ++--
.../apache/stratos/manager/dto/Cartridge.java | 4 +--
.../deployer/DefaultServiceGroupDeployer.java | 9 +++--
.../category/DefaultLoadBalancerCategory.java | 8 ++---
.../category/ExistingLoadBalancerCategory.java | 4 +--
.../manager/lb/category/LBDataContext.java | 6 ++--
.../lb/category/LoadBalancerCategory.java | 2 +-
.../ServiceLevelLoadBalancerCategory.java | 8 ++---
.../manager/CartridgeSubscriptionManager.java | 6 ++--
.../ApplicationCartridgeSubscription.java | 2 +-
.../subscription/CartridgeSubscription.java | 6 ++--
.../subscription/DataCartridgeSubscription.java | 6 ++--
.../FrameworkCartridgeSubscription.java | 2 +-
.../InternalRepoBasedCartridgeSubscription.java | 2 +-
.../subscription/LBCartridgeSubscription.java | 6 ++--
.../subscription/PersistenceContext.java | 2 +-
.../manager/subscription/SubscriptionData.java | 4 +--
.../factory/CartridgeSubscriptionFactory.java | 2 +-
.../filter/LBCreationSubscriptionFilter.java | 8 ++---
.../subscription/filter/SubscriptionFilter.java | 4 +--
.../SubscriptionMultiTenantBehaviour.java | 4 +--
.../utils/CartridgeSubscriptionUtils.java | 12 +++----
.../utils/ApplicationManagementUtil.java | 10 +++---
.../manager/test/CartridgeSubscriptionTest.java | 2 +-
.../manager/test/LookupDataHolderTest.java | 2 +-
37 files changed, 114 insertions(+), 114 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/behaviour/CartridgeMgtBehaviour.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/behaviour/CartridgeMgtBehaviour.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/behaviour/CartridgeMgtBehaviour.java
index e3f303e..797935c 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/behaviour/CartridgeMgtBehaviour.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/behaviour/CartridgeMgtBehaviour.java
@@ -20,9 +20,9 @@ package org.apache.stratos.manager.behaviour;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
-import org.apache.stratos.cloud.controller.domain.xsd.Persistence;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.Persistence;
+import org.apache.stratos.common.Properties;
import org.apache.stratos.manager.client.CloudControllerServiceClient;
import org.apache.stratos.manager.dao.Cluster;
import org.apache.stratos.manager.exception.ADCException;
@@ -38,7 +38,7 @@ import org.apache.stratos.manager.subscriber.Subscriber;
import org.apache.stratos.manager.subscription.utils.CartridgeSubscriptionUtils;
import org.apache.stratos.manager.utils.ApplicationManagementUtil;
import org.apache.stratos.manager.utils.CartridgeConstants;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
import java.io.Serializable;
import java.util.Map;
@@ -92,7 +92,7 @@ public abstract class CartridgeMgtBehaviour implements Serializable {
// get the payload parameters defined in the cartridge definition file for this cartridge type
if (cartridgeInfo.getProperties() != null && cartridgeInfo.getProperties().length != 0) {
- for (org.apache.stratos.cloud.controller.stub.pojo.Property property : cartridgeInfo.getProperties()) {
+ for (org.apache.stratos.common.Property property : cartridgeInfo.getProperties()) {
// check if a property is related to the payload. Currently this is done by checking if the
// property name starts with 'payload_parameter.' suffix. If so the payload param name will
// be taken as the substring from the index of '.' to the end of the property name.
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/AutoscalerServiceClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/AutoscalerServiceClient.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/AutoscalerServiceClient.java
index 4dba8d2..4211b0b 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/AutoscalerServiceClient.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/AutoscalerServiceClient.java
@@ -24,16 +24,16 @@ import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.transport.http.HTTPConstants;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.autoscaler.applications.pojo.xsd.ApplicationContext;
-import org.apache.stratos.autoscaler.pojo.xsd.ServiceGroup;
+import org.apache.stratos.autoscaler.stub.pojo.ApplicationContext;
+import org.apache.stratos.autoscaler.stub.pojo.ServiceGroup;
import org.apache.stratos.autoscaler.stub.*;
-import org.apache.stratos.autoscaler.stub.kubernetes.KubernetesGroup;
-import org.apache.stratos.autoscaler.stub.kubernetes.KubernetesHost;
-import org.apache.stratos.autoscaler.stub.kubernetes.KubernetesMaster;
-import org.apache.stratos.autoscaler.stub.policy.model.AutoscalePolicy;
-import org.apache.stratos.autoscaler.stub.policy.model.DeploymentPolicy;
-import org.apache.stratos.cloud.controller.domain.xsd.Partition;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
+import org.apache.stratos.common.kubernetes.KubernetesGroup;
+import org.apache.stratos.common.kubernetes.KubernetesHost;
+import org.apache.stratos.common.kubernetes.KubernetesMaster;
+import org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy;
+import org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy;
+import org.apache.stratos.cloud.controller.stub.domain.Partition;
+import org.apache.stratos.common.Properties;
import org.apache.stratos.manager.internal.DataHolder;
import org.apache.stratos.manager.utils.CartridgeConstants;
@@ -130,37 +130,37 @@ public class AutoscalerServiceClient {
return partitionGroups;
}
- public org.apache.stratos.autoscaler.stub.policy.model.AutoscalePolicy[] getAutoScalePolicies()
+ public org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy[] getAutoScalePolicies()
throws RemoteException {
- org.apache.stratos.autoscaler.stub.policy.model.AutoscalePolicy[] autoscalePolicies;
+ org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy[] autoscalePolicies;
autoscalePolicies = stub.getAllAutoScalingPolicy();
return autoscalePolicies;
}
- public org.apache.stratos.autoscaler.stub.policy.model.AutoscalePolicy getAutoScalePolicy(
+ public org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy getAutoScalePolicy(
String autoscalingPolicyId) throws RemoteException {
- org.apache.stratos.autoscaler.stub.policy.model.AutoscalePolicy autoscalePolicy;
+ org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy autoscalePolicy;
autoscalePolicy = stub.getAutoscalingPolicy(autoscalingPolicyId);
return autoscalePolicy;
}
- public org.apache.stratos.autoscaler.stub.policy.model.DeploymentPolicy[] getDeploymentPolicies()
+ public org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy[] getDeploymentPolicies()
throws RemoteException {
- org.apache.stratos.autoscaler.stub.policy.model.DeploymentPolicy[] deploymentPolicies;
+ org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy[] deploymentPolicies;
deploymentPolicies = stub.getAllDeploymentPolicies();
return deploymentPolicies;
}
- public org.apache.stratos.autoscaler.stub.policy.model.DeploymentPolicy[] getDeploymentPolicies(
+ public org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy[] getDeploymentPolicies(
String cartridgeType) throws RemoteException {
- org.apache.stratos.autoscaler.stub.policy.model.DeploymentPolicy[] deploymentPolicies;
+ org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy[] deploymentPolicies;
deploymentPolicies = stub
.getValidDeploymentPoliciesforCartridge(cartridgeType);
@@ -181,9 +181,9 @@ public class AutoscalerServiceClient {
return stub.checkServiceLBExistenceAgainstPolicy(serviceName, deploymentPolicyId);
}
- public org.apache.stratos.autoscaler.stub.policy.model.DeploymentPolicy getDeploymentPolicy(String deploymentPolicyId) throws RemoteException {
+ public org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy getDeploymentPolicy(String deploymentPolicyId) throws RemoteException {
- org.apache.stratos.autoscaler.stub.policy.model.DeploymentPolicy deploymentPolicy;
+ org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy deploymentPolicy;
deploymentPolicy = stub.getDeploymentPolicy(deploymentPolicyId);
return deploymentPolicy;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/CloudControllerServiceClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/CloudControllerServiceClient.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/CloudControllerServiceClient.java
index 8acfa9b..e900c60 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/CloudControllerServiceClient.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/CloudControllerServiceClient.java
@@ -25,14 +25,15 @@ import org.apache.axis2.transport.http.HTTPConstants;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.stratos.cloud.controller.stub.*;
-import org.apache.stratos.cloud.controller.stub.pojo.*;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
-import org.apache.stratos.cloud.controller.domain.xsd.ClusterContext;
-import org.apache.stratos.cloud.controller.domain.xsd.Persistence;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeConfig;
-import org.apache.stratos.cloud.controller.domain.xsd.Registrant;
-import org.apache.stratos.cloud.controller.domain.xsd.ServiceGroup;
-import org.apache.stratos.cloud.controller.domain.xsd.Dependencies;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.ClusterContext;
+import org.apache.stratos.cloud.controller.stub.domain.Persistence;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeConfig;
+import org.apache.stratos.cloud.controller.stub.domain.Registrant;
+import org.apache.stratos.cloud.controller.stub.domain.ServiceGroup;
+import org.apache.stratos.cloud.controller.stub.domain.Dependencies;
+import org.apache.stratos.common.Properties;
+import org.apache.stratos.common.Property;
import org.apache.stratos.manager.internal.DataHolder;
import org.apache.stratos.manager.utils.CartridgeConstants;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/cartridge/CartridgeDeployer.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/cartridge/CartridgeDeployer.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/cartridge/CartridgeDeployer.java
index d33dfd8..0d1a8ea 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/cartridge/CartridgeDeployer.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/cartridge/CartridgeDeployer.java
@@ -18,7 +18,7 @@
*/
package org.apache.stratos.manager.deploy.cartridge;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeConfig;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeConfig;
import org.apache.stratos.manager.exception.ADCException;
public abstract class CartridgeDeployer {
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/cartridge/DefaultCartridgeDeployer.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/cartridge/DefaultCartridgeDeployer.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/cartridge/DefaultCartridgeDeployer.java
index 1843545..b080a9f 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/cartridge/DefaultCartridgeDeployer.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/cartridge/DefaultCartridgeDeployer.java
@@ -20,7 +20,7 @@ package org.apache.stratos.manager.deploy.cartridge;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeConfig;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeConfig;
import org.apache.stratos.manager.client.CloudControllerServiceClient;
import org.apache.stratos.manager.exception.ADCException;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/Service.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/Service.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/Service.java
index d539fa8..c5fb786 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/Service.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/Service.java
@@ -19,8 +19,8 @@
package org.apache.stratos.manager.deploy.service;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
+import org.apache.stratos.common.Properties;
import org.apache.stratos.manager.behaviour.CartridgeMgtBehaviour;
import org.apache.stratos.manager.dao.Cluster;
import org.apache.stratos.manager.exception.ADCException;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/ServiceDeploymentManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/ServiceDeploymentManager.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/ServiceDeploymentManager.java
index 22430ba..a56dcdf 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/ServiceDeploymentManager.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/ServiceDeploymentManager.java
@@ -22,10 +22,10 @@ package org.apache.stratos.manager.deploy.service;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.stratos.cloud.controller.stub.CloudControllerServiceUnregisteredCartridgeExceptionException;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
-import org.apache.stratos.cloud.controller.domain.xsd.LoadbalancerConfig;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
-import org.apache.stratos.cloud.controller.stub.pojo.Property;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.LoadbalancerConfig;
+import org.apache.stratos.common.Properties;
+import org.apache.stratos.common.Property;
import org.apache.stratos.common.constants.StratosConstants;
import org.apache.stratos.manager.client.CloudControllerServiceClient;
import org.apache.stratos.manager.deploy.service.multitenant.MultiTenantService;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/MultiTenantService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/MultiTenantService.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/MultiTenantService.java
index d411910..6111f8d 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/MultiTenantService.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/MultiTenantService.java
@@ -19,7 +19,7 @@
package org.apache.stratos.manager.deploy.service.multitenant;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
import org.apache.stratos.manager.deploy.service.Service;
public class MultiTenantService extends Service {
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/lb/DefaultLBService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/lb/DefaultLBService.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/lb/DefaultLBService.java
index dc81b96..4892c8f 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/lb/DefaultLBService.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/lb/DefaultLBService.java
@@ -21,9 +21,9 @@ package org.apache.stratos.manager.deploy.service.multitenant.lb;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
-import org.apache.stratos.cloud.controller.domain.xsd.ClusterContext;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.ClusterContext;
+import org.apache.stratos.common.Properties;
import org.apache.stratos.manager.client.AutoscalerServiceClient;
import org.apache.stratos.manager.client.CloudControllerServiceClient;
import org.apache.stratos.manager.dao.Cluster;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/lb/ExistingLBService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/lb/ExistingLBService.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/lb/ExistingLBService.java
index 36867e7..7d935be 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/lb/ExistingLBService.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/lb/ExistingLBService.java
@@ -19,8 +19,8 @@
package org.apache.stratos.manager.deploy.service.multitenant.lb;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
+import org.apache.stratos.common.Properties;
import org.apache.stratos.manager.dao.Cluster;
import org.apache.stratos.manager.exception.ADCException;
import org.apache.stratos.manager.exception.AlreadySubscribedException;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/lb/LBService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/lb/LBService.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/lb/LBService.java
index 414135b..2ca815e 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/lb/LBService.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/lb/LBService.java
@@ -19,8 +19,8 @@
package org.apache.stratos.manager.deploy.service.multitenant.lb;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
+import org.apache.stratos.common.Properties;
import org.apache.stratos.manager.deploy.service.Service;
import org.apache.stratos.manager.exception.ADCException;
import org.apache.stratos.manager.exception.AlreadySubscribedException;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/lb/MultiTenantLBService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/lb/MultiTenantLBService.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/lb/MultiTenantLBService.java
index d232b63..228bea1 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/lb/MultiTenantLBService.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/lb/MultiTenantLBService.java
@@ -19,8 +19,8 @@
package org.apache.stratos.manager.deploy.service.multitenant.lb;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
+import org.apache.stratos.common.Properties;
import org.apache.stratos.manager.deploy.service.Service;
import org.apache.stratos.manager.exception.ADCException;
import org.apache.stratos.manager.exception.UnregisteredCartridgeException;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/lb/ServiceAwareLBService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/lb/ServiceAwareLBService.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/lb/ServiceAwareLBService.java
index c57cc64..c83879a 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/lb/ServiceAwareLBService.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/deploy/service/multitenant/lb/ServiceAwareLBService.java
@@ -21,9 +21,9 @@ package org.apache.stratos.manager.deploy.service.multitenant.lb;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
-import org.apache.stratos.cloud.controller.domain.xsd.ClusterContext;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.ClusterContext;
+import org.apache.stratos.common.Properties;
import org.apache.stratos.manager.client.AutoscalerServiceClient;
import org.apache.stratos.manager.client.CloudControllerServiceClient;
import org.apache.stratos.manager.dao.Cluster;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/dto/Cartridge.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/dto/Cartridge.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/dto/Cartridge.java
index 136fa37..94efad9 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/dto/Cartridge.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/dto/Cartridge.java
@@ -21,8 +21,8 @@ package org.apache.stratos.manager.dto;
-import org.apache.stratos.cloud.controller.domain.xsd.Persistence;
-import org.apache.stratos.cloud.controller.domain.xsd.PortMapping;
+import org.apache.stratos.cloud.controller.stub.domain.Persistence;
+import org.apache.stratos.cloud.controller.stub.domain.PortMapping;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.Arrays;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/deployer/DefaultServiceGroupDeployer.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/deployer/DefaultServiceGroupDeployer.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/deployer/DefaultServiceGroupDeployer.java
index ab839e5..83c82b5 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/deployer/DefaultServiceGroupDeployer.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/deployer/DefaultServiceGroupDeployer.java
@@ -22,10 +22,9 @@ package org.apache.stratos.manager.grouping.deployer;
import org.apache.axis2.AxisFault;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.autoscaler.pojo.xsd.Dependencies;
-import org.apache.stratos.autoscaler.pojo.xsd.ServiceGroup;
-import org.apache.stratos.autoscaler.stub.AutoScalerServiceAutoScalerExceptionException;
-import org.apache.stratos.autoscaler.stub.AutoScalerServiceInvalidServiceGroupExceptionException;
+import org.apache.stratos.autoscaler.stub.pojo.Dependencies;
+import org.apache.stratos.autoscaler.stub.pojo.ServiceGroup;
+import org.apache.stratos.autoscaler.stub.exception.*;
import org.apache.stratos.cloud.controller.stub.CloudControllerServiceUnregisteredCartridgeExceptionException;
import org.apache.stratos.manager.client.AutoscalerServiceClient;
import org.apache.stratos.manager.client.CloudControllerServiceClient;
@@ -313,7 +312,7 @@ public class DefaultServiceGroupDeployer implements ServiceGroupDeployer {
servicegroupDef.setName(serviceGroup.getName());
String[] cartridges = serviceGroup.getCartridges();
String[] subGroups = serviceGroup.getSubGroups();
- org.apache.stratos.autoscaler.pojo.xsd.Dependencies deps = serviceGroup.getDependencies();
+ org.apache.stratos.autoscaler.stub.pojo.Dependencies deps = serviceGroup.getDependencies();
if (deps != null) {
DependencyDefinitions depsDef = new DependencyDefinitions();
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/lb/category/DefaultLoadBalancerCategory.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/lb/category/DefaultLoadBalancerCategory.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/lb/category/DefaultLoadBalancerCategory.java
index 8dab167..b6bf7ce 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/lb/category/DefaultLoadBalancerCategory.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/lb/category/DefaultLoadBalancerCategory.java
@@ -21,10 +21,10 @@ package org.apache.stratos.manager.lb.category;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
-import org.apache.stratos.cloud.controller.domain.xsd.ClusterContext;
-import org.apache.stratos.cloud.controller.domain.xsd.Persistence;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.ClusterContext;
+import org.apache.stratos.cloud.controller.stub.domain.Persistence;
+import org.apache.stratos.common.Properties;
import org.apache.stratos.manager.client.AutoscalerServiceClient;
import org.apache.stratos.manager.client.CloudControllerServiceClient;
import org.apache.stratos.manager.dao.Cluster;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/lb/category/ExistingLoadBalancerCategory.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/lb/category/ExistingLoadBalancerCategory.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/lb/category/ExistingLoadBalancerCategory.java
index 2af0e6b..a1d31f7 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/lb/category/ExistingLoadBalancerCategory.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/lb/category/ExistingLoadBalancerCategory.java
@@ -19,8 +19,8 @@
package org.apache.stratos.manager.lb.category;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
-import org.apache.stratos.cloud.controller.domain.xsd.Persistence;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.Persistence;
import org.apache.stratos.common.Properties;
import org.apache.stratos.manager.dao.Cluster;
import org.apache.stratos.manager.exception.ADCException;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/lb/category/LBDataContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/lb/category/LBDataContext.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/lb/category/LBDataContext.java
index 22a8b44..c1631d0 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/lb/category/LBDataContext.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/lb/category/LBDataContext.java
@@ -20,9 +20,9 @@
package org.apache.stratos.manager.lb.category;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
-import org.apache.stratos.cloud.controller.stub.pojo.Property;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
+import org.apache.stratos.common.Properties;
+import org.apache.stratos.common.Property;
import java.util.ArrayList;
import java.util.List;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/lb/category/LoadBalancerCategory.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/lb/category/LoadBalancerCategory.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/lb/category/LoadBalancerCategory.java
index 1914f5a..69bb2cb 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/lb/category/LoadBalancerCategory.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/lb/category/LoadBalancerCategory.java
@@ -21,7 +21,7 @@ package org.apache.stratos.manager.lb.category;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
import org.apache.stratos.manager.behaviour.CartridgeMgtBehaviour;
import org.apache.stratos.manager.dao.Cluster;
import org.apache.stratos.manager.deploy.service.Service;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/lb/category/ServiceLevelLoadBalancerCategory.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/lb/category/ServiceLevelLoadBalancerCategory.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/lb/category/ServiceLevelLoadBalancerCategory.java
index dd7904f..1b8b61b 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/lb/category/ServiceLevelLoadBalancerCategory.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/lb/category/ServiceLevelLoadBalancerCategory.java
@@ -21,10 +21,10 @@ package org.apache.stratos.manager.lb.category;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
-import org.apache.stratos.cloud.controller.domain.xsd.ClusterContext;
-import org.apache.stratos.cloud.controller.domain.xsd.Persistence;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.ClusterContext;
+import org.apache.stratos.cloud.controller.stub.domain.Persistence;
+import org.apache.stratos.common.Properties;
import org.apache.stratos.manager.client.AutoscalerServiceClient;
import org.apache.stratos.manager.client.CloudControllerServiceClient;
import org.apache.stratos.manager.dao.Cluster;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/manager/CartridgeSubscriptionManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/manager/CartridgeSubscriptionManager.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/manager/CartridgeSubscriptionManager.java
index 92b4495..2c4f466 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/manager/CartridgeSubscriptionManager.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/manager/CartridgeSubscriptionManager.java
@@ -21,11 +21,11 @@ package org.apache.stratos.manager.manager;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
-import org.apache.stratos.cloud.controller.domain.xsd.Persistence;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.Persistence;
import org.apache.stratos.cloud.controller.stub.CloudControllerServiceUnregisteredCartridgeExceptionException;
import org.apache.stratos.cloud.controller.stub.pojo.*;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
+import org.apache.stratos.common.Properties;
import org.apache.stratos.manager.client.CloudControllerServiceClient;
import org.apache.stratos.manager.dao.CartridgeSubscriptionInfo;
import org.apache.stratos.manager.deploy.service.Service;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/ApplicationCartridgeSubscription.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/ApplicationCartridgeSubscription.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/ApplicationCartridgeSubscription.java
index de2a7fa..161f83f 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/ApplicationCartridgeSubscription.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/ApplicationCartridgeSubscription.java
@@ -21,7 +21,7 @@ package org.apache.stratos.manager.subscription;
import org.apache.stratos.manager.repository.Repository;
import org.apache.stratos.manager.subscription.tenancy.SubscriptionTenancyBehaviour;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
public class ApplicationCartridgeSubscription extends CartridgeSubscription {
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/CartridgeSubscription.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/CartridgeSubscription.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/CartridgeSubscription.java
index de176cb..c649b41 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/CartridgeSubscription.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/CartridgeSubscription.java
@@ -21,9 +21,9 @@ package org.apache.stratos.manager.subscription;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
-import org.apache.stratos.cloud.controller.domain.xsd.Persistence;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.Persistence;
+import org.apache.stratos.common.Properties;
import org.apache.stratos.manager.dao.CartridgeSubscriptionInfo;
import org.apache.stratos.manager.dao.Cluster;
import org.apache.stratos.manager.exception.*;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/DataCartridgeSubscription.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/DataCartridgeSubscription.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/DataCartridgeSubscription.java
index 4962afd..d1bf60f 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/DataCartridgeSubscription.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/DataCartridgeSubscription.java
@@ -19,8 +19,8 @@
package org.apache.stratos.manager.subscription;
-import org.apache.stratos.cloud.controller.domain.xsd.Persistence;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
+import org.apache.stratos.cloud.controller.stub.domain.Persistence;
+import org.apache.stratos.common.Properties;
import org.apache.stratos.manager.dao.CartridgeSubscriptionInfo;
import org.apache.stratos.manager.dao.DataCartridge;
import org.apache.stratos.manager.exception.ADCException;
@@ -28,7 +28,7 @@ import org.apache.stratos.manager.exception.UnregisteredCartridgeException;
import org.apache.stratos.manager.repository.Repository;
import org.apache.stratos.manager.subscription.tenancy.SubscriptionTenancyBehaviour;
import org.apache.stratos.manager.utils.ApplicationManagementUtil;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
import java.util.HashMap;
import java.util.Map;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/FrameworkCartridgeSubscription.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/FrameworkCartridgeSubscription.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/FrameworkCartridgeSubscription.java
index 218d362..2501da3 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/FrameworkCartridgeSubscription.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/FrameworkCartridgeSubscription.java
@@ -24,7 +24,7 @@ import org.apache.commons.logging.LogFactory;
import org.apache.stratos.manager.exception.*;
import org.apache.stratos.manager.repository.Repository;
import org.apache.stratos.manager.subscription.tenancy.SubscriptionTenancyBehaviour;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
public class FrameworkCartridgeSubscription extends CartridgeSubscription {
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/InternalRepoBasedCartridgeSubscription.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/InternalRepoBasedCartridgeSubscription.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/InternalRepoBasedCartridgeSubscription.java
index d875ac6..57e5349 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/InternalRepoBasedCartridgeSubscription.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/InternalRepoBasedCartridgeSubscription.java
@@ -21,7 +21,7 @@ package org.apache.stratos.manager.subscription;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
import org.apache.stratos.manager.exception.ADCException;
import org.apache.stratos.manager.exception.InvalidRepositoryException;
import org.apache.stratos.manager.exception.RepositoryCredentialsRequiredException;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/LBCartridgeSubscription.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/LBCartridgeSubscription.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/LBCartridgeSubscription.java
index 0f5451d..31d1f2f 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/LBCartridgeSubscription.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/LBCartridgeSubscription.java
@@ -21,9 +21,9 @@ package org.apache.stratos.manager.subscription;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
-import org.apache.stratos.cloud.controller.domain.xsd.Persistence;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.Persistence;
+import org.apache.stratos.common.Properties;
import org.apache.stratos.manager.dao.CartridgeSubscriptionInfo;
import org.apache.stratos.manager.exception.*;
import org.apache.stratos.manager.lb.category.LoadBalancerCategory;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/PersistenceContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/PersistenceContext.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/PersistenceContext.java
index 63a13a1..b01e553 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/PersistenceContext.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/PersistenceContext.java
@@ -21,7 +21,7 @@ package org.apache.stratos.manager.subscription;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.stub.pojo.Property;
+import org.apache.stratos.common.Property;
public class PersistenceContext {
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/SubscriptionData.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/SubscriptionData.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/SubscriptionData.java
index 3371d3f..23fd891 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/SubscriptionData.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/SubscriptionData.java
@@ -19,8 +19,8 @@
package org.apache.stratos.manager.subscription;
-import org.apache.stratos.cloud.controller.domain.xsd.Persistence;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
+import org.apache.stratos.cloud.controller.stub.domain.Persistence;
+import org.apache.stratos.common.Properties;
import java.util.Collections;
import java.util.HashSet;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/factory/CartridgeSubscriptionFactory.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/factory/CartridgeSubscriptionFactory.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/factory/CartridgeSubscriptionFactory.java
index eaa9b3a..029e090 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/factory/CartridgeSubscriptionFactory.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/factory/CartridgeSubscriptionFactory.java
@@ -21,7 +21,7 @@ package org.apache.stratos.manager.subscription.factory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
import org.apache.stratos.manager.exception.ADCException;
import org.apache.stratos.manager.lb.category.LBDataContext;
import org.apache.stratos.manager.lb.category.LoadBalancerCategory;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/filter/LBCreationSubscriptionFilter.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/filter/LBCreationSubscriptionFilter.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/filter/LBCreationSubscriptionFilter.java
index 7c8fc5b..2d25bf7 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/filter/LBCreationSubscriptionFilter.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/filter/LBCreationSubscriptionFilter.java
@@ -23,10 +23,10 @@ import java.util.Random;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
-import org.apache.stratos.cloud.controller.domain.xsd.LoadbalancerConfig;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
-import org.apache.stratos.cloud.controller.stub.pojo.Property;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.LoadbalancerConfig;
+import org.apache.stratos.common.Properties;
+import org.apache.stratos.common.Property;
import org.apache.stratos.common.constants.StratosConstants;
import org.apache.stratos.manager.exception.ADCException;
import org.apache.stratos.manager.exception.AlreadySubscribedException;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/filter/SubscriptionFilter.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/filter/SubscriptionFilter.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/filter/SubscriptionFilter.java
index 896c789..99bb511 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/filter/SubscriptionFilter.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/filter/SubscriptionFilter.java
@@ -18,8 +18,8 @@
*/
package org.apache.stratos.manager.subscription.filter;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
+import org.apache.stratos.common.Properties;
import org.apache.stratos.manager.exception.ADCException;
import org.apache.stratos.manager.subscription.SubscriptionData;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/tenancy/SubscriptionMultiTenantBehaviour.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/tenancy/SubscriptionMultiTenantBehaviour.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/tenancy/SubscriptionMultiTenantBehaviour.java
index 6f53ba3..b52bfa1 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/tenancy/SubscriptionMultiTenantBehaviour.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/tenancy/SubscriptionMultiTenantBehaviour.java
@@ -21,8 +21,8 @@ package org.apache.stratos.manager.subscription.tenancy;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
-import org.apache.stratos.cloud.controller.domain.xsd.Persistence;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.Persistence;
import org.apache.stratos.common.Properties;
import org.apache.stratos.manager.dao.Cluster;
import org.apache.stratos.manager.deploy.service.Service;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/utils/CartridgeSubscriptionUtils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/utils/CartridgeSubscriptionUtils.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/utils/CartridgeSubscriptionUtils.java
index f9812fa..2f8be77 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/utils/CartridgeSubscriptionUtils.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/subscription/utils/CartridgeSubscriptionUtils.java
@@ -23,12 +23,12 @@ import org.apache.axis2.AxisFault;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.autoscaler.stub.policy.model.DeploymentPolicy;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
-import org.apache.stratos.cloud.controller.domain.xsd.LoadbalancerConfig;
-import org.apache.stratos.cloud.controller.domain.xsd.PortMapping;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
-import org.apache.stratos.cloud.controller.stub.pojo.Property;
+import org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.LoadbalancerConfig;
+import org.apache.stratos.cloud.controller.stub.domain.PortMapping;
+import org.apache.stratos.common.Properties;
+import org.apache.stratos.common.Property;
//import org.apache.stratos.cloud.controller.stub.pojo.*;
import org.apache.stratos.common.constants.StratosConstants;
import org.apache.stratos.manager.client.AutoscalerServiceClient;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/utils/ApplicationManagementUtil.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/utils/ApplicationManagementUtil.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/utils/ApplicationManagementUtil.java
index 199a529..99e7088 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/utils/ApplicationManagementUtil.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/utils/ApplicationManagementUtil.java
@@ -35,11 +35,11 @@ import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.engine.AxisConfiguration;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
-import org.apache.stratos.cloud.controller.domain.xsd.Persistence;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.Persistence;
import org.apache.stratos.cloud.controller.stub.CloudControllerServiceUnregisteredCartridgeExceptionException;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
-import org.apache.stratos.cloud.controller.stub.pojo.Property;
+import org.apache.stratos.common.Properties;
+import org.apache.stratos.common.Property;
import org.apache.stratos.manager.client.CloudControllerServiceClient;
import org.apache.stratos.manager.dao.CartridgeSubscriptionInfo;
import org.apache.stratos.manager.dao.DataCartridge;
@@ -107,7 +107,7 @@ public class ApplicationManagementUtil {
List<PortMapping> portMappings = new ArrayList<PortMapping>();
if (cartridgeInfo.getPortMappings() != null) {
- for (org.apache.stratos.cloud.controller.domain.xsd.PortMapping portMapping : cartridgeInfo.getPortMappings()) {
+ for (org.apache.stratos.cloud.controller.stub.domain.PortMapping portMapping : cartridgeInfo.getPortMappings()) {
PortMapping portMap = new PortMapping();
portMap.setPrimaryPort(portMapping.getPort());
portMap.setProxyPort(portMapping.getProxyPort());
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/test/java/org/apache/stratos/manager/test/CartridgeSubscriptionTest.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/test/java/org/apache/stratos/manager/test/CartridgeSubscriptionTest.java b/components/org.apache.stratos.manager/src/test/java/org/apache/stratos/manager/test/CartridgeSubscriptionTest.java
index b519378..4528d2f 100644
--- a/components/org.apache.stratos.manager/src/test/java/org/apache/stratos/manager/test/CartridgeSubscriptionTest.java
+++ b/components/org.apache.stratos.manager/src/test/java/org/apache/stratos/manager/test/CartridgeSubscriptionTest.java
@@ -20,7 +20,7 @@
package org.apache.stratos.manager.test;
import junit.framework.TestCase;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
import org.apache.stratos.manager.exception.ADCException;
import org.apache.stratos.manager.subscription.CartridgeSubscription;
import org.apache.stratos.manager.subscription.factory.CartridgeSubscriptionFactory;
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7a3046/components/org.apache.stratos.manager/src/test/java/org/apache/stratos/manager/test/LookupDataHolderTest.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/test/java/org/apache/stratos/manager/test/LookupDataHolderTest.java b/components/org.apache.stratos.manager/src/test/java/org/apache/stratos/manager/test/LookupDataHolderTest.java
index 7804758..7147f20 100644
--- a/components/org.apache.stratos.manager/src/test/java/org/apache/stratos/manager/test/LookupDataHolderTest.java
+++ b/components/org.apache.stratos.manager/src/test/java/org/apache/stratos/manager/test/LookupDataHolderTest.java
@@ -20,7 +20,7 @@
package org.apache.stratos.manager.test;
import junit.framework.TestCase;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
import org.apache.stratos.manager.exception.ADCException;
import org.apache.stratos.manager.exception.PersistenceManagerException;
import org.apache.stratos.manager.retriever.DataInsertionAndRetrievalManager;
[09/13] stratos git commit: Rest endpoint changes after recent
refactoring.
Posted by ni...@apache.org.
Rest endpoint changes after recent refactoring.
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/9c59f47a
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/9c59f47a
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/9c59f47a
Branch: refs/heads/master
Commit: 9c59f47a86da6694b6fb7ef99134c5b1b1fc5217
Parents: 1f7a304
Author: Nirmal Fernando <ni...@gmail.com>
Authored: Sun Nov 30 12:47:00 2014 +0530
Committer: Nirmal Fernando <ni...@gmail.com>
Committed: Sun Nov 30 12:47:24 2014 +0530
----------------------------------------------------------------------
.../rest/endpoint/api/StratosApiV40Utils.java | 16 ++++++++--------
.../rest/endpoint/api/StratosApiV41Utils.java | 6 +++---
.../bean/util/converter/PojoConverter.java | 20 ++++++++++----------
3 files changed, 21 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/9c59f47a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV40Utils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV40Utils.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV40Utils.java
index 2420d3c..943ff32 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV40Utils.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV40Utils.java
@@ -24,8 +24,8 @@ import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.stratos.autoscaler.stub.policy.model.DeploymentPolicy;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeConfig;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeConfig;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
import org.apache.stratos.cloud.controller.stub.pojo.Property;
import org.apache.stratos.autoscaler.stub.AutoScalerServiceInvalidPartitionExceptionException;
import org.apache.stratos.autoscaler.stub.AutoScalerServiceInvalidPolicyExceptionException;
@@ -176,7 +176,7 @@ public class StratosApiV40Utils {
AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
if (autoscalerServiceClient != null) {
- org.apache.stratos.cloud.controller.domain.xsd.Partition partition =
+ org.apache.stratos.cloud.controller.stub.domain.Partition partition =
PojoConverter.convertToCCPartitionPojo(partitionBean);
// try {
@@ -274,7 +274,7 @@ public class StratosApiV40Utils {
public static Partition[] getAvailablePartitions () throws RestAPIException {
- org.apache.stratos.cloud.controller.domain.xsd.Partition[] partitions = null;
+ org.apache.stratos.cloud.controller.stub.domain.Partition[] partitions = null;
AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
if (autoscalerServiceClient != null) {
// try {
@@ -293,7 +293,7 @@ public class StratosApiV40Utils {
public static Partition[] getPartitionsOfDeploymentPolicy(String deploymentPolicyId)
throws RestAPIException {
- org.apache.stratos.cloud.controller.domain.xsd.Partition[] partitions = null;
+ org.apache.stratos.cloud.controller.stub.domain.Partition[] partitions = null;
AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
// if (autoscalerServiceClient != null) {
// try {
@@ -314,7 +314,7 @@ public class StratosApiV40Utils {
public static Partition[]
getPartitionsOfGroup(String deploymentPolicyId, String groupId) throws RestAPIException {
- org.apache.stratos.cloud.controller.domain.xsd.Partition[] partitions = null;
+ org.apache.stratos.cloud.controller.stub.domain.Partition[] partitions = null;
AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
// if (autoscalerServiceClient != null) {
// try {
@@ -334,7 +334,7 @@ public class StratosApiV40Utils {
public static Partition getPartition (String partitionId) throws RestAPIException {
- org.apache.stratos.cloud.controller.domain.xsd.Partition partition = null;
+ org.apache.stratos.cloud.controller.stub.domain.Partition partition = null;
AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
// if (autoscalerServiceClient != null) {
// try {
@@ -1260,4 +1260,4 @@ public class StratosApiV40Utils {
stratosApiResponse.setMessage("Successfully removed domains from cartridge subscription");
return stratosApiResponse;
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/9c59f47a/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 2fd1523..056c688 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
@@ -26,8 +26,8 @@ import org.apache.commons.logging.LogFactory;
import org.apache.stratos.autoscaler.applications.pojo.xsd.ApplicationContext;
import org.apache.stratos.autoscaler.stub.*;
import org.apache.stratos.autoscaler.stub.policy.model.DeploymentPolicy;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeConfig;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeConfig;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
import org.apache.stratos.cloud.controller.stub.CloudControllerServiceInvalidCartridgeTypeExceptionException;
import org.apache.stratos.cloud.controller.stub.CloudControllerServiceUnregisteredCartridgeExceptionException;
import org.apache.stratos.cloud.controller.stub.pojo.Properties;
@@ -1855,4 +1855,4 @@ public class StratosApiV41Utils {
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/9c59f47a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/util/converter/PojoConverter.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/util/converter/PojoConverter.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/util/converter/PojoConverter.java
index aa80402..34018ab 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/util/converter/PojoConverter.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/util/converter/PojoConverter.java
@@ -31,7 +31,7 @@ import org.apache.stratos.autoscaler.applications.pojo.xsd.GroupContext;
import org.apache.stratos.autoscaler.applications.pojo.xsd.SubscribableInfoContext;
import org.apache.stratos.autoscaler.stub.pojo.PropertiesE;
import org.apache.stratos.autoscaler.stub.pojo.PropertyE;
-import org.apache.stratos.cloud.controller.domain.xsd.*;
+import org.apache.stratos.cloud.controller.stub.domain.*;
import org.apache.stratos.cloud.controller.stub.pojo.Properties;
import org.apache.stratos.cloud.controller.stub.pojo.Property;
import org.apache.stratos.manager.composite.application.beans.ApplicationDefinition;
@@ -296,11 +296,11 @@ public class PojoConverter {
return networkInterfaces;
}
- public static org.apache.stratos.cloud.controller.domain.xsd.Partition convertToCCPartitionPojo
+ public static org.apache.stratos.cloud.controller.stub.domain.Partition convertToCCPartitionPojo
(Partition partitionBean) {
- org.apache.stratos.cloud.controller.domain.xsd.Partition partition = new
- org.apache.stratos.cloud.controller.domain.xsd.Partition();
+ org.apache.stratos.cloud.controller.stub.domain.Partition partition = new
+ org.apache.stratos.cloud.controller.stub.domain.Partition();
partition.setId(partitionBean.id);
partition.setDescription(partitionBean.description);
@@ -453,11 +453,11 @@ public class PojoConverter {
return cluster1;
}
- private static org.apache.stratos.cloud.controller.domain.xsd.Partition[] convertToCCPartitionPojos
+ private static org.apache.stratos.cloud.controller.stub.domain.Partition[] convertToCCPartitionPojos
(List<Partition> partitionList) {
- org.apache.stratos.cloud.controller.domain.xsd.Partition[] partitions =
- new org.apache.stratos.cloud.controller.domain.xsd.Partition[partitionList.size()];
+ org.apache.stratos.cloud.controller.stub.domain.Partition[] partitions =
+ new org.apache.stratos.cloud.controller.stub.domain.Partition[partitionList.size()];
for (int i = 0; i < partitionList.size(); i++) {
partitions[i] = convertToCCPartitionPojo(partitionList.get(i));
}
@@ -465,7 +465,7 @@ public class PojoConverter {
return partitions;
}
- public static Partition[] populatePartitionPojos(org.apache.stratos.cloud.controller.domain.xsd.Partition[]
+ public static Partition[] populatePartitionPojos(org.apache.stratos.cloud.controller.stub.domain.Partition[]
partitions) {
Partition[] partitionBeans;
@@ -481,7 +481,7 @@ public class PojoConverter {
return partitionBeans;
}
- public static Partition populatePartitionPojo(org.apache.stratos.cloud.controller.domain.xsd.Partition
+ public static Partition populatePartitionPojo(org.apache.stratos.cloud.controller.stub.domain.Partition
partition) {
Partition partitionBeans = new Partition();
@@ -702,7 +702,7 @@ public class PojoConverter {
return networkPartitionGroupsBeans;
}
- private static List<Partition> getPartitionList(org.apache.stratos.cloud.controller.domain.xsd.Partition[]
+ private static List<Partition> getPartitionList(org.apache.stratos.cloud.controller.stub.domain.Partition[]
partitions) {
List<Partition> partitionList = new ArrayList<Partition>();
[07/13] stratos git commit: Moving to an impl package.
Posted by ni...@apache.org.
Moving to an impl package.
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/f0fcf7de
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/f0fcf7de
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/f0fcf7de
Branch: refs/heads/master
Commit: f0fcf7debd90b4228a11db7da1bde030aed74998
Parents: f17f55c
Author: Nirmal Fernando <ni...@gmail.com>
Authored: Sun Nov 30 12:35:19 2014 +0530
Committer: Nirmal Fernando <ni...@gmail.com>
Committed: Sun Nov 30 12:47:23 2014 +0530
----------------------------------------------------------------------
.../services/CloudControllerServiceImpl.java | 2148 ------------------
.../impl/CloudControllerServiceImpl.java | 2148 ++++++++++++++++++
2 files changed, 2148 insertions(+), 2148 deletions(-)
----------------------------------------------------------------------
[05/13] stratos git commit: Moving to an impl package.
Posted by ni...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/f0fcf7de/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
new file mode 100644
index 0000000..b9d891f
--- /dev/null
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
@@ -0,0 +1,2148 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.stratos.cloud.controller.services;
+
+import com.google.common.collect.ImmutableSet;
+import com.google.common.net.InetAddresses;
+import org.apache.commons.collections.ListUtils;
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.cloud.controller.concurrent.PartitionValidatorCallable;
+import org.apache.stratos.cloud.controller.concurrent.ScheduledThreadExecutor;
+import org.apache.stratos.cloud.controller.concurrent.ThreadExecutor;
+import org.apache.stratos.cloud.controller.context.CloudControllerContext;
+import org.apache.stratos.cloud.controller.domain.*;
+import org.apache.stratos.cloud.controller.domain.Cartridge;
+import org.apache.stratos.cloud.controller.domain.Dependencies;
+import org.apache.stratos.cloud.controller.domain.Partition;
+import org.apache.stratos.cloud.controller.exception.*;
+import org.apache.stratos.cloud.controller.functions.ContainerClusterContextToKubernetesService;
+import org.apache.stratos.cloud.controller.functions.ContainerClusterContextToReplicationController;
+import org.apache.stratos.cloud.controller.functions.PodToMemberContext;
+import org.apache.stratos.cloud.controller.iaas.Iaas;
+import org.apache.stratos.cloud.controller.registry.Deserializer;
+import org.apache.stratos.cloud.controller.messaging.publisher.CartridgeInstanceDataPublisher;
+import org.apache.stratos.cloud.controller.registry.RegistryManager;
+import org.apache.stratos.cloud.controller.messaging.topology.TopologyBuilder;
+import org.apache.stratos.cloud.controller.messaging.topology.TopologyEventPublisher;
+import org.apache.stratos.cloud.controller.messaging.topology.TopologyManager;
+import org.apache.stratos.cloud.controller.util.CloudControllerConstants;
+import org.apache.stratos.cloud.controller.util.CloudControllerUtil;
+import org.apache.stratos.cloud.controller.util.PodActivationWatcher;
+import org.apache.stratos.cloud.controller.iaas.validators.PartitionValidator;
+import org.apache.stratos.common.*;
+import org.apache.stratos.common.constants.StratosConstants;
+import org.apache.stratos.kubernetes.client.KubernetesApiClient;
+import org.apache.stratos.kubernetes.client.exceptions.KubernetesClientException;
+import org.apache.stratos.kubernetes.client.model.Label;
+import org.apache.stratos.kubernetes.client.model.Pod;
+import org.apache.stratos.kubernetes.client.model.ReplicationController;
+import org.apache.stratos.kubernetes.client.model.Service;
+import org.apache.stratos.messaging.domain.topology.*;
+import org.apache.stratos.messaging.event.topology.MemberReadyToShutdownEvent;
+import org.jclouds.compute.ComputeService;
+import org.jclouds.compute.domain.NodeMetadata;
+import org.jclouds.compute.domain.NodeMetadataBuilder;
+import org.jclouds.compute.domain.Template;
+import org.jclouds.rest.ResourceNotFoundException;
+import org.wso2.carbon.registry.core.exceptions.RegistryException;
+
+import java.util.*;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.Future;
+
+/**
+ * Cloud Controller Service is responsible for starting up new server instances,
+ * terminating already started instances, providing pending instance count etc.
+ */
+public class CloudControllerServiceImpl implements CloudControllerService {
+
+ private static final Log LOG = LogFactory.getLog(CloudControllerServiceImpl.class);
+ public static final String IS_LOAD_BALANCER = "load.balancer";
+
+ private CloudControllerContext dataHolder = CloudControllerContext
+ .getInstance();
+
+ public CloudControllerServiceImpl() {
+ // acquire serialized data from registry
+ acquireData();
+ }
+
+ private void acquireData() {
+
+ Object obj = RegistryManager.getInstance().retrieve();
+ if (obj != null) {
+ try {
+ Object dataObj = Deserializer
+ .deserializeFromByteArray((byte[]) obj);
+ if (dataObj instanceof CloudControllerContext) {
+ CloudControllerContext serializedObj = (CloudControllerContext) dataObj;
+ CloudControllerContext currentData = CloudControllerContext
+ .getInstance();
+
+ // assign necessary data
+ currentData.setClusterIdToContext(serializedObj.getClusterIdToContext());
+ currentData.setMemberIdToContext(serializedObj.getMemberIdToContext());
+ currentData.setClusterIdToMemberContext(serializedObj.getClusterIdToMemberContext());
+ currentData.setCartridges(serializedObj.getCartridges());
+ currentData.setKubClusterIdToKubClusterContext(serializedObj.getKubClusterIdToKubClusterContext());
+ currentData.setServiceGroups(serializedObj.getServiceGroups());
+
+ if (LOG.isDebugEnabled()) {
+
+ LOG.debug("Cloud Controller Data is retrieved from registry.");
+ }
+ } else {
+ if (LOG.isDebugEnabled()) {
+
+ LOG.debug("Cloud Controller Data cannot be found in registry.");
+ }
+ }
+ } catch (Exception e) {
+
+ String msg = "Unable to acquire data from Registry. Hence, any historical data will not get reflected.";
+ LOG.warn(msg, e);
+ }
+
+ }
+ }
+
+ public void deployCartridgeDefinition(CartridgeConfig cartridgeConfig) throws InvalidCartridgeDefinitionException,
+ InvalidIaasProviderException {
+
+ handleNullObject(cartridgeConfig, "Invalid Cartridge Definition: Definition is null.");
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Cartridge definition: " + cartridgeConfig.toString());
+ }
+
+ Cartridge cartridge = null;
+ try {
+ // cartridge can never be null
+ cartridge = CloudControllerUtil.toCartridge(cartridgeConfig);
+ } catch (Exception e) {
+ String msg =
+ "Invalid Cartridge Definition: Cartridge Type: " +
+ cartridgeConfig.getType() +
+ ". Cause: Cannot instantiate a Cartridge Instance with the given Config. " + e.getMessage();
+ LOG.error(msg, e);
+ throw new InvalidCartridgeDefinitionException(msg, e);
+ }
+
+ List<IaasProvider> iaases = cartridge.getIaases();
+
+ if (!StratosConstants.KUBERNETES_DEPLOYER_TYPE.equals(cartridge.getDeployerType())) {
+ if (iaases == null || iaases.isEmpty()) {
+ String msg = "Invalid Cartridge Definition: Cartridge Type: "
+ + cartridgeConfig.getType()
+ + ". Cause: Iaases of this Cartridge is null or empty.";
+ LOG.error(msg);
+ throw new InvalidCartridgeDefinitionException(msg);
+ }
+
+ if (iaases == null || iaases.isEmpty()) {
+ String msg = "Invalid Cartridge Definition: Cartridge Type: " +
+ cartridgeConfig.getType() +
+ ". Cause: Iaases of this Cartridge is null or empty.";
+ LOG.error(msg);
+ throw new InvalidCartridgeDefinitionException(msg);
+ }
+
+ for (IaasProvider iaasProvider : iaases) {
+ CloudControllerUtil.getIaas(iaasProvider);
+ }
+ }
+
+ // TODO transaction begins
+ String cartridgeType = cartridge.getType();
+ if (dataHolder.getCartridge(cartridgeType) != null) {
+ Cartridge cartridgeToBeRemoved = dataHolder.getCartridge(cartridgeType);
+ // undeploy
+ try {
+ undeployCartridgeDefinition(cartridgeToBeRemoved.getType());
+ } catch (InvalidCartridgeTypeException e) {
+ //ignore
+ }
+ populateNewCartridge(cartridge, cartridgeToBeRemoved);
+ }
+
+ dataHolder.addCartridge(cartridge);
+
+ // persist
+ persist();
+
+ List<Cartridge> cartridgeList = new ArrayList<Cartridge>();
+ cartridgeList.add(cartridge);
+
+ TopologyBuilder.handleServiceCreated(cartridgeList);
+ // transaction ends
+
+ LOG.info("Successfully deployed the Cartridge definition: " + cartridgeType);
+ }
+
+ private void populateNewCartridge(Cartridge cartridge,
+ Cartridge cartridgeToBeRemoved) {
+
+ List<IaasProvider> newIaasProviders = cartridge.getIaases();
+ Map<String, IaasProvider> oldPartitionToIaasMap = cartridgeToBeRemoved.getPartitionToIaasProvider();
+
+ for (Entry<String, IaasProvider> entry : oldPartitionToIaasMap.entrySet()) {
+ if (entry == null) {
+ continue;
+ }
+ String partitionId = entry.getKey();
+ IaasProvider oldIaasProvider = entry.getValue();
+ if (newIaasProviders.contains(oldIaasProvider)) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Copying a partition from the Cartridge that is undeployed, to the new Cartridge. "
+ + "[partition id] : " + partitionId + " [cartridge type] " + cartridge.getType());
+ }
+ cartridge.addIaasProvider(partitionId, newIaasProviders.get(newIaasProviders.indexOf(oldIaasProvider)));
+ }
+ }
+
+ }
+
+ public void undeployCartridgeDefinition(String cartridgeType) throws InvalidCartridgeTypeException {
+
+ Cartridge cartridge = null;
+ if ((cartridge = dataHolder.getCartridge(cartridgeType)) != null) {
+ if (dataHolder.getCartridges().remove(cartridge)) {
+ // invalidate partition validation cache
+ dataHolder.removeFromCartridgeTypeToPartitionIds(cartridgeType);
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Partition cache invalidated for cartridge " + cartridgeType);
+ }
+
+ persist();
+
+ // sends the service removed event
+ List<Cartridge> cartridgeList = new ArrayList<Cartridge>();
+ cartridgeList.add(cartridge);
+ TopologyBuilder.handleServiceRemoved(cartridgeList);
+
+ if (LOG.isInfoEnabled()) {
+ LOG.info("Successfully undeployed the Cartridge definition: " + cartridgeType);
+ }
+ return;
+ }
+ }
+ String msg = "Cartridge [type] " + cartridgeType + " is not a deployed Cartridge type.";
+ LOG.error(msg);
+ throw new InvalidCartridgeTypeException(msg);
+ }
+
+ public void deployServiceGroup(ServiceGroup servicegroup) throws InvalidServiceGroupException {
+
+ if (servicegroup == null) {
+ String msg = "Invalid ServiceGroup Definition: Definition is null.";
+ LOG.error(msg);
+ throw new IllegalArgumentException(msg);
+
+ }
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("CloudControllerServiceImpl:deployServiceGroup:" + servicegroup.getName());
+ }
+
+ String[] subGroups = servicegroup.getCartridges();
+
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("CloudControllerServiceImpl:deployServiceGroup:subGroups" + subGroups);
+ if (subGroups != null) {
+ LOG.debug("CloudControllerServiceImpl:deployServiceGroup:subGroups:size" + subGroups.length);
+ } else {
+ LOG.debug("CloudControllerServiceImpl:deployServiceGroup:subGroups: is null");
+ }
+ }
+
+
+ Dependencies dependencies = servicegroup.getDependencies();
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("CloudControllerServiceImpl:deployServiceGroup:dependencies" + dependencies);
+ }
+
+ if (dependencies != null) {
+ String[] startupOrders = dependencies.getStartupOrders();
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("CloudControllerServiceImpl:deployServiceGroup:startupOrders" + startupOrders);
+
+ if (startupOrders != null) {
+ LOG.debug("CloudControllerServiceImpl:deployServiceGroup:startupOrder:size" + startupOrders.length);
+ } else {
+ LOG.debug("CloudControllerServiceImpl:deployServiceGroup:startupOrder: is null");
+ }
+ }
+ }
+
+ dataHolder.addServiceGroup(servicegroup);
+
+ this.persist();
+
+ }
+
+ public void undeployServiceGroup(String name) throws InvalidServiceGroupException {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("CloudControllerServiceImpl:undeployServiceGroup: " + name);
+ }
+
+ ServiceGroup serviceGroup = null;
+
+ serviceGroup = dataHolder.getServiceGroup(name);
+
+ if (serviceGroup != null) {
+ if (dataHolder.getServiceGroups().remove(serviceGroup)) {
+ persist();
+ if (LOG.isInfoEnabled()) {
+ LOG.info("Successfully undeployed the Service Group definition: " + serviceGroup);
+ }
+ return;
+ }
+ }
+
+ String msg = "ServiceGroup " + name + " is not a deployed Service Group definition";
+ LOG.error(msg);
+ throw new InvalidServiceGroupException(msg);
+
+ }
+
+ @Override
+ public ServiceGroup getServiceGroup(String name) throws InvalidServiceGroupException {
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("getServiceGroupDefinition:" + name);
+ }
+
+ ServiceGroup serviceGroup = this.dataHolder.getServiceGroup(name);
+
+ if (serviceGroup == null) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("getServiceGroupDefinition: no entry found for service group " + name);
+ }
+ String msg = "ServiceGroup " + name + " is not a deployed Service Group definition";
+ throw new InvalidServiceGroupException(msg);
+ }
+
+ return serviceGroup;
+ }
+
+ public String[] getServiceGroupSubGroups(String name) throws InvalidServiceGroupException {
+ ServiceGroup serviceGroup = this.getServiceGroup(name);
+ if (serviceGroup == null) {
+ throw new InvalidServiceGroupException("Invalid ServiceGroup " + serviceGroup);
+ }
+
+ return serviceGroup.getSubGroups();
+ }
+
+ /**
+ *
+ */
+ public String[] getServiceGroupCartridges(String name) throws InvalidServiceGroupException {
+ ServiceGroup serviceGroup = this.getServiceGroup(name);
+ if (serviceGroup == null) {
+ throw new InvalidServiceGroupException("Invalid ServiceGroup " + serviceGroup);
+ }
+ String[] cs = serviceGroup.getCartridges();
+ return cs;
+
+ }
+
+ public Dependencies getServiceGroupDependencies(String name) throws InvalidServiceGroupException {
+ ServiceGroup serviceGroup = this.getServiceGroup(name);
+ if (serviceGroup == null) {
+ throw new InvalidServiceGroupException("Invalid ServiceGroup " + serviceGroup);
+ }
+ return serviceGroup.getDependencies();
+ }
+
+ @Override
+ public MemberContext startInstance(MemberContext memberContext) throws
+ UnregisteredCartridgeException, InvalidIaasProviderException {
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("CloudControllerServiceImpl:startInstance");
+ }
+
+ handleNullObject(memberContext, "Instance start-up failed. Member is null.");
+
+ String clusterId = memberContext.getClusterId();
+ Partition partition = memberContext.getPartition();
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Received an instance spawn request : " + memberContext);
+ }
+
+ Template template = null;
+
+ handleNullObject(partition, "Instance start-up failed. Specified Partition is null. " +
+ memberContext);
+
+ String partitionId = partition.getId();
+ ClusterContext ctxt = dataHolder.getClusterContext(clusterId);
+
+ handleNullObject(ctxt, "Instance start-up failed. Invalid cluster id. " + memberContext);
+
+ String cartridgeType = ctxt.getCartridgeType();
+
+ Cartridge cartridge = dataHolder.getCartridge(cartridgeType);
+
+ if (cartridge == null) {
+ String msg =
+ "Instance start-up failed. No matching Cartridge found [type] " + cartridgeType + ". " +
+ memberContext.toString();
+ LOG.error(msg);
+ throw new UnregisteredCartridgeException(msg);
+ }
+
+ memberContext.setCartridgeType(cartridgeType);
+
+
+ IaasProvider iaasProvider = cartridge.getIaasProviderOfPartition(partitionId);
+ if (iaasProvider == null) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("IaasToPartitionMap " + cartridge.hashCode()
+ + " for cartridge " + cartridgeType + " and for partition: " + partitionId);
+ }
+ String msg = "Instance start-up failed. "
+ + "There's no IaaS provided for the partition: "
+ + partitionId
+ + " and for the Cartridge type: "
+ + cartridgeType
+ + ". Only following "
+ + "partitions can be found in this Cartridge: "
+ + cartridge.getPartitionToIaasProvider().keySet()
+ .toString() + ". " + memberContext.toString()
+ + ". ";
+ LOG.fatal(msg);
+ throw new InvalidIaasProviderException(msg);
+ }
+ String type = iaasProvider.getType();
+ try {
+ // generating the Unique member ID...
+ String memberID = generateMemberId(clusterId);
+ memberContext.setMemberId(memberID);
+ // have to add memberID to the payload
+ StringBuilder payload = new StringBuilder(ctxt.getPayload());
+ addToPayload(payload, "MEMBER_ID", memberID);
+ addToPayload(payload, "LB_CLUSTER_ID", memberContext.getLbClusterId());
+ addToPayload(payload, "NETWORK_PARTITION_ID", memberContext.getNetworkPartitionId());
+ addToPayload(payload, "PARTITION_ID", partitionId);
+ if (memberContext.getProperties() != null) {
+ org.apache.stratos.common.Properties properties = memberContext.getProperties();
+ if (properties != null) {
+ for (Property prop : properties.getProperties()) {
+ addToPayload(payload, prop.getName(), prop.getValue());
+ }
+ }
+ }
+
+ Iaas iaas = iaasProvider.getIaas();
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Payload: " + payload.toString());
+ }
+
+ if (iaas == null) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Iaas is null of Iaas Provider: " + type + ". Trying to build IaaS...");
+ }
+ try {
+ iaas = CloudControllerUtil.getIaas(iaasProvider);
+ } catch (InvalidIaasProviderException e) {
+ String msg = "Instance start up failed. " + memberContext.toString() +
+ "Unable to build Iaas of this IaasProvider [Provider] : " + type + ". Cause: " + e.getMessage();
+ LOG.error(msg, e);
+ throw new InvalidIaasProviderException(msg, e);
+ }
+
+ }
+
+ if (ctxt.isVolumeRequired()) {
+ if (ctxt.getVolumes() != null) {
+ for (Volume volume : ctxt.getVolumes()) {
+
+ if (volume.getId() == null) {
+ // create a new volume
+ createVolumeAndSetInClusterContext(volume, iaasProvider);
+ }
+ }
+ }
+ }
+
+ if (ctxt.isVolumeRequired()) {
+ addToPayload(payload, "PERSISTENCE_MAPPING", getPersistencePayload(ctxt, iaas).toString());
+ }
+ iaasProvider.setPayload(payload.toString().getBytes());
+ iaas.setDynamicPayload();
+
+ template = iaasProvider.getTemplate();
+
+ if (template == null) {
+ String msg =
+ "Failed to start an instance. " +
+ memberContext.toString() +
+ ". Reason : Jclouds Template is null for iaas provider [type]: " + iaasProvider.getType();
+ LOG.error(msg);
+ throw new InvalidIaasProviderException(msg);
+ }
+
+ //Start instance start up in a new thread
+ ThreadExecutor exec = ThreadExecutor.getInstance();
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Cloud Controller is starting the instance start up thread.");
+ }
+ exec.execute(new JcloudsInstanceCreator(memberContext, iaasProvider, cartridgeType));
+
+ LOG.info("Instance is successfully starting up. " + memberContext.toString());
+
+ return memberContext;
+
+ } catch (Exception e) {
+ String msg = "Failed to start an instance. " + memberContext.toString() + " Cause: " + e.getMessage();
+ LOG.error(msg, e);
+ throw new IllegalStateException(msg, e);
+ }
+
+ }
+
+ private void createVolumeAndSetInClusterContext(Volume volume,
+ IaasProvider iaasProvider) {
+ // iaas cannot be null at this state #startInstance method
+ Iaas iaas = iaasProvider.getIaas();
+ int sizeGB = volume.getSize();
+ String snapshotId = volume.getSnapshotId();
+ if (StringUtils.isNotEmpty(volume.getVolumeId())) {
+ // volumeID is specified, so not creating additional volumes
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Volume creation is skipping since a volume ID is specified. [Volume ID]" + volume.getVolumeId());
+ }
+ volume.setId(volume.getVolumeId());
+ } else {
+ String volumeId = iaas.createVolume(sizeGB, snapshotId);
+ volume.setId(volumeId);
+ }
+
+ volume.setIaasType(iaasProvider.getType());
+ }
+
+
+ private StringBuilder getPersistencePayload(ClusterContext ctx, Iaas iaas) {
+ StringBuilder persistencePayload = new StringBuilder();
+ if (isPersistenceMappingAvailable(ctx)) {
+ for (Volume volume : ctx.getVolumes()) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Adding persistence mapping " + volume.toString());
+ }
+ if (persistencePayload.length() != 0) {
+ persistencePayload.append("|");
+ }
+
+ persistencePayload.append(iaas.getIaasDevice(volume.getDevice()));
+ persistencePayload.append("|");
+ persistencePayload.append(volume.getId());
+ persistencePayload.append("|");
+ persistencePayload.append(volume.getMappingPath());
+ }
+ }
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Persistence payload is" + persistencePayload.toString());
+ }
+ return persistencePayload;
+ }
+
+ private boolean isPersistenceMappingAvailable(ClusterContext ctx) {
+ return ctx.getVolumes() != null && ctx.isVolumeRequired();
+ }
+
+ private void addToPayload(StringBuilder payload, String name, String value) {
+ payload.append(",");
+ payload.append(name + "=" + value);
+ }
+
+ /**
+ * Persist data in registry.
+ */
+ private void persist() {
+ try {
+ RegistryManager.getInstance().persist(
+ dataHolder);
+ } catch (RegistryException e) {
+
+ String msg = "Failed to persist the Cloud Controller data in registry. Further, transaction roll back also failed.";
+ LOG.fatal(msg);
+ throw new CloudControllerException(msg, e);
+ }
+ }
+
+ private String generateMemberId(String clusterId) {
+ UUID memberId = UUID.randomUUID();
+ return clusterId + memberId.toString();
+ }
+
+ @Override
+ public void terminateInstance(String memberId) throws InvalidMemberException, InvalidCartridgeTypeException {
+
+ handleNullObject(memberId, "Termination failed. Null member id.");
+
+ MemberContext ctxt = dataHolder.getMemberContextOfMemberId(memberId);
+
+ if (ctxt == null) {
+ String msg = "Termination failed. Invalid Member Id: " + memberId;
+ LOG.error(msg);
+ throw new InvalidMemberException(msg);
+ }
+
+ if (ctxt.getNodeId() == null && ctxt.getInstanceId() == null) {
+ // sending member terminated since this instance isn't reachable.
+ if (LOG.isInfoEnabled()){
+ LOG.info(String.format(
+ "Member cannot be terminated because it is not reachable. [member] %s [nodeId] %s [instanceId] %s. Removing member from topology.",
+ ctxt.getMemberId(),
+ ctxt.getNodeId(),
+ ctxt.getInstanceId()));
+ }
+
+ logTermination(ctxt);
+ }
+
+ // check if status == active, if true, then this is a termination on member faulty
+ Topology topology;
+ try {
+ TopologyManager.acquireReadLock();
+ topology = TopologyManager.getTopology();
+ } finally {
+ TopologyManager.releaseReadLock();
+ }
+
+ org.apache.stratos.messaging.domain.topology.Service service = topology.getService(ctxt.getCartridgeType());
+
+ if (service != null) {
+ Cluster cluster = service.getCluster(ctxt.getClusterId());
+
+ if (cluster != null) {
+ Member member = cluster.getMember(memberId);
+
+ if (member != null) {
+ // change member status if termination on a faulty member
+ if(fixMemberStatus(member, topology)){
+ // set the time this member was added to ReadyToShutdown status
+ ctxt.setObsoleteInitTime(System.currentTimeMillis());
+ }
+
+ // check if ready to shutdown member is expired and send
+ // member terminated if it is.
+ if (isMemberExpired(member, ctxt.getObsoleteInitTime(), ctxt.getObsoleteExpiryTime())) {
+ if (LOG.isInfoEnabled()) {
+ LOG.info(String.format(
+ "Member pending termination in ReadyToShutdown state exceeded expiry time. This member has to be manually deleted: %s",
+ ctxt.getMemberId()));
+ }
+
+ logTermination(ctxt);
+ return;
+ }
+ }
+ }
+ }
+
+ ThreadExecutor exec = ThreadExecutor.getInstance();
+ exec.execute(new InstanceTerminator(ctxt));
+
+ }
+
+ /**
+ * Check if a member has been in the ReadyToShutdown status for a specified expiry time
+ *
+ * @param member
+ * @param initTime
+ * @param expiryTime
+ * @return
+ */
+ private boolean isMemberExpired(Member member, long initTime, long expiryTime) {
+ if (member.getStatus() == MemberStatus.ReadyToShutDown) {
+ if (initTime == 0){
+ // obsolete init time hasn't been set, i.e. not a member detected faulty.
+ // this is a graceful shutdown
+ return false;
+ }
+
+ // member detected faulty, calculate ready to shutdown waiting period
+ long timeInReadyToShutdownStatus = System.currentTimeMillis() - initTime;
+ return timeInReadyToShutdownStatus >= expiryTime;
+ }
+
+ return false;
+ }
+
+
+ /**
+ * Corrects the member status upon termination call if the member is in an Active state
+ *
+ * @param member The {@link org.apache.stratos.messaging.domain.topology.Member} object that is being
+ * checked for status
+ * @param topology The {@link org.apache.stratos.messaging.domain.topology.Topology} object to update
+ * the topology if needed.
+ *
+ */
+ private boolean fixMemberStatus(Member member, Topology topology) {
+ if (member.getStatus() == MemberStatus.Activated) {
+ MemberReadyToShutdownEvent memberReadyToShutdownEvent = new MemberReadyToShutdownEvent(
+ member.getServiceName(),
+ member.getClusterId(),
+ member.getNetworkPartitionId(),
+ member.getPartitionId(),
+ member.getMemberId(),
+ member.getInstanceId());
+
+ try {
+ TopologyManager.acquireWriteLock();
+ member.setStatus(MemberStatus.ReadyToShutDown);
+ LOG.info("Member Ready to shut down event adding status started");
+
+ TopologyManager.updateTopology(topology);
+ } finally {
+ TopologyManager.releaseWriteLock();
+ }
+
+ TopologyEventPublisher.sendMemberReadyToShutdownEvent(memberReadyToShutdownEvent);
+ //publishing data
+ CartridgeInstanceDataPublisher.publish(member.getMemberId(),
+ member.getPartitionId(),
+ member.getNetworkPartitionId(),
+ member.getClusterId(),
+ member.getServiceName(),
+ MemberStatus.ReadyToShutDown.toString(),
+ null);
+
+ return true;
+ }
+
+ return false;
+ }
+
+
+ private class InstanceTerminator implements Runnable {
+
+ private MemberContext ctxt;
+
+ public InstanceTerminator(MemberContext ctxt) {
+ this.ctxt = ctxt;
+ }
+
+ @Override
+ public void run() {
+
+ String memberId = ctxt.getMemberId();
+ String clusterId = ctxt.getClusterId();
+ String partitionId = ctxt.getPartition().getId();
+ String cartridgeType = ctxt.getCartridgeType();
+ String nodeId = ctxt.getNodeId();
+
+ try {
+ // these will never be null, since we do not add null values for these.
+ Cartridge cartridge = dataHolder.getCartridge(cartridgeType);
+
+ LOG.info("Starting to terminate an instance with member id : " + memberId +
+ " in partition id: " + partitionId + " of cluster id: " + clusterId +
+ " and of cartridge type: " + cartridgeType);
+
+ if (cartridge == null) {
+ String msg =
+ "Termination of Member Id: " + memberId + " failed. " +
+ "Cannot find a matching Cartridge for type: " +
+ cartridgeType;
+ LOG.error(msg);
+ throw new InvalidCartridgeTypeException(msg);
+ }
+
+ // if no matching node id can be found.
+ if (nodeId == null) {
+
+ String msg =
+ "Termination failed. Cannot find a node id for Member Id: " +
+ memberId;
+
+ // log information
+ logTermination(ctxt);
+ LOG.error(msg);
+ throw new InvalidMemberException(msg);
+ }
+
+ IaasProvider iaasProvider = cartridge.getIaasProviderOfPartition(partitionId);
+
+ // terminate it!
+ terminate(iaasProvider, nodeId, ctxt);
+
+ // log information
+ logTermination(ctxt);
+
+ } catch (Exception e) {
+ String msg =
+ "Instance termination failed. " + ctxt.toString();
+ LOG.error(msg, e);
+ throw new CloudControllerException(msg, e);
+ }
+
+ }
+ }
+
+ private class JcloudsInstanceCreator implements Runnable {
+
+ private MemberContext memberContext;
+ private IaasProvider iaasProvider;
+ private String cartridgeType;
+
+ public JcloudsInstanceCreator(MemberContext memberContext, IaasProvider iaasProvider,
+ String cartridgeType) {
+ this.memberContext = memberContext;
+ this.iaasProvider = iaasProvider;
+ this.cartridgeType = cartridgeType;
+ }
+
+ @Override
+ public void run() {
+
+
+ String clusterId = memberContext.getClusterId();
+ Partition partition = memberContext.getPartition();
+ ClusterContext ctxt = dataHolder.getClusterContext(clusterId);
+ Iaas iaas = iaasProvider.getIaas();
+ String publicIp = null;
+
+ NodeMetadata node = null;
+ // generate the group id from domain name and sub domain name.
+ // Should have lower-case ASCII letters, numbers, or dashes.
+ // Should have a length between 3-15
+ String str = clusterId.length() > 10 ? clusterId.substring(0, 10) : clusterId.substring(0, clusterId.length());
+ String group = str.replaceAll("[^a-z0-9-]", "");
+
+ try {
+ ComputeService computeService = iaasProvider
+ .getComputeService();
+ Template template = iaasProvider.getTemplate();
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Cloud Controller is delegating request to start an instance for "
+ + memberContext + " to Jclouds layer.");
+ }
+ // create and start a node
+ Set<? extends NodeMetadata> nodes = computeService
+ .createNodesInGroup(group, 1, template);
+ node = nodes.iterator().next();
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Cloud Controller received a response for the request to start "
+ + memberContext + " from Jclouds layer.");
+ }
+
+ if (node == null) {
+ String msg = "Null response received for instance start-up request to Jclouds.\n"
+ + memberContext.toString();
+ LOG.error(msg);
+ throw new IllegalStateException(msg);
+ }
+
+ // node id
+ String nodeId = node.getId();
+ if (nodeId == null) {
+ String msg = "Node id of the starting instance is null.\n"
+ + memberContext.toString();
+ LOG.fatal(msg);
+ throw new IllegalStateException(msg);
+ }
+
+ memberContext.setNodeId(nodeId);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Node id was set. " + memberContext.toString());
+ }
+
+ // attach volumes
+ if (ctxt.isVolumeRequired()) {
+ // remove region prefix
+ String instanceId = nodeId.indexOf('/') != -1 ? nodeId
+ .substring(nodeId.indexOf('/') + 1, nodeId.length())
+ : nodeId;
+ memberContext.setInstanceId(instanceId);
+ if (ctxt.getVolumes() != null) {
+ for (Volume volume : ctxt.getVolumes()) {
+ try {
+ iaas.attachVolume(instanceId, volume.getId(),
+ volume.getDevice());
+ } catch (Exception e) {
+ // continue without throwing an exception, since
+ // there is an instance already running
+ LOG.error("Attaching Volume to Instance [ "
+ + instanceId + " ] failed!", e);
+ }
+ }
+ }
+ }
+
+ } catch (Exception e) {
+ String msg = "Failed to start an instance. " + memberContext.toString() + " Cause: " + e.getMessage();
+ LOG.error(msg, e);
+ throw new IllegalStateException(msg, e);
+ }
+
+ try {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("IP allocation process started for " + memberContext);
+ }
+ String autoAssignIpProp =
+ iaasProvider.getProperty(CloudControllerConstants.AUTO_ASSIGN_IP_PROPERTY);
+
+ String pre_defined_ip =
+ iaasProvider.getProperty(CloudControllerConstants.FLOATING_IP_PROPERTY);
+
+ // reset ip
+ String ip = "";
+
+ // default behavior is autoIpAssign=false
+ if (autoAssignIpProp == null ||
+ (autoAssignIpProp != null && autoAssignIpProp.equals("false"))) {
+
+ // check if floating ip is well defined in cartridge definition
+ if (pre_defined_ip != null) {
+ if (isValidIpAddress(pre_defined_ip)) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("CloudControllerServiceImpl:IpAllocator:pre_defined_ip: invoking associatePredefinedAddress" + pre_defined_ip);
+ }
+ ip = iaas.associatePredefinedAddress(node, pre_defined_ip);
+
+ if (ip == null || "".equals(ip) || !pre_defined_ip.equals(ip)) {
+ // throw exception and stop instance creation
+ String msg = "Error occurred while allocating predefined floating ip address: " + pre_defined_ip +
+ " / allocated ip:" + ip +
+ " - terminating node:" + memberContext.toString();
+ LOG.error(msg);
+ // terminate instance
+ terminate(iaasProvider,
+ node.getId(), memberContext);
+ throw new CloudControllerException(msg);
+ }
+ } else {
+ String msg = "Invalid floating ip address configured: " + pre_defined_ip +
+ " - terminating node:" + memberContext.toString();
+ LOG.error(msg);
+ // terminate instance
+ terminate(iaasProvider,
+ node.getId(), memberContext);
+ throw new CloudControllerException(msg);
+ }
+
+ } else {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("CloudControllerServiceImpl:IpAllocator:no (valid) predefined floating ip configured, "
+ + "selecting available one from pool");
+ }
+ // allocate an IP address - manual IP assigning mode
+ ip = iaas.associateAddress(node);
+
+ if (ip != null) {
+ memberContext.setAllocatedIpAddress(ip);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Allocated an ip address: "
+ + memberContext.toString());
+ } else if (LOG.isInfoEnabled()) {
+ LOG.info("Allocated ip address [ " + memberContext.getAllocatedIpAddress() +
+ " ] to member with id: " + memberContext.getMemberId());
+ }
+ }
+ }
+
+ if (ip == null) {
+ String msg = "No IP address found. IP allocation failed for " + memberContext;
+ LOG.error(msg);
+ throw new CloudControllerException(msg);
+ }
+
+ // build the node with the new ip
+ node = NodeMetadataBuilder.fromNodeMetadata(node)
+ .publicAddresses(ImmutableSet.of(ip)).build();
+ }
+
+
+ // public ip
+ if (node.getPublicAddresses() != null &&
+ node.getPublicAddresses().iterator().hasNext()) {
+ ip = node.getPublicAddresses().iterator().next();
+ publicIp = ip;
+ memberContext.setPublicIpAddress(ip);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Retrieving Public IP Address : " + memberContext.toString());
+ } else if (LOG.isInfoEnabled()) {
+ LOG.info("Retrieving Public IP Address: " + memberContext.getPublicIpAddress() +
+ ", member id: " + memberContext.getMemberId());
+ }
+ }
+
+ // private IP
+ if (node.getPrivateAddresses() != null &&
+ node.getPrivateAddresses().iterator().hasNext()) {
+ ip = node.getPrivateAddresses().iterator().next();
+ memberContext.setPrivateIpAddress(ip);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Retrieving Private IP Address. " + memberContext.toString());
+ } else if (LOG.isInfoEnabled()) {
+ LOG.info("Retrieving Private IP Address: " + memberContext.getPrivateIpAddress() +
+ ", member id: " + memberContext.getMemberId());
+ }
+ }
+
+ dataHolder.addMemberContext(memberContext);
+
+ // persist in registry
+ persist();
+
+
+ // trigger topology
+ TopologyBuilder.handleMemberSpawned(cartridgeType, clusterId,
+ partition.getId(), ip, publicIp, memberContext);
+
+ String memberID = memberContext.getMemberId();
+
+ // update the topology with the newly spawned member
+ // publish data
+ CartridgeInstanceDataPublisher.publish(memberID,
+ memberContext.getPartition().getId(),
+ memberContext.getNetworkPartitionId(),
+ memberContext.getClusterId(),
+ cartridgeType,
+ MemberStatus.Created.toString(),
+ node);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Node details: " + node.toString());
+ }
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("IP allocation process ended for " + memberContext);
+ }
+
+ } catch (Exception e) {
+ String msg = "Error occurred while allocating an ip address. " + memberContext.toString();
+ LOG.error(msg, e);
+ throw new CloudControllerException(msg, e);
+ }
+
+
+ }
+ }
+
+ private boolean isValidIpAddress(String ip) {
+ boolean isValid = InetAddresses.isInetAddress(ip);
+ return isValid;
+ }
+
+ @Override
+ public void terminateAllInstances(String clusterId) throws InvalidClusterException {
+
+ LOG.info("Starting to terminate all instances of cluster : "
+ + clusterId);
+
+ handleNullObject(clusterId, "Instance termination failed. Cluster id is null.");
+
+ List<MemberContext> ctxts = dataHolder.getMemberContextsOfClusterId(clusterId);
+
+ if (ctxts == null) {
+ String msg = "Instance termination failed. No members found for cluster id: " + clusterId;
+ LOG.warn(msg);
+ return;
+ }
+
+ ThreadExecutor exec = ThreadExecutor.getInstance();
+ for (MemberContext memberContext : ctxts) {
+ exec.execute(new InstanceTerminator(memberContext));
+ }
+
+ }
+
+
+ /**
+ * A helper method to terminate an instance.
+ *
+ * @param iaasProvider
+ * @param ctxt
+ * @param nodeId
+ * @return will return the IaaSProvider
+ */
+ private IaasProvider terminate(IaasProvider iaasProvider,
+ String nodeId, MemberContext ctxt) {
+ Iaas iaas = iaasProvider.getIaas();
+ if (iaas == null) {
+
+ try {
+ iaas = CloudControllerUtil.getIaas(iaasProvider);
+ } catch (InvalidIaasProviderException e) {
+ String msg =
+ "Instance termination failed. " + ctxt.toString() +
+ ". Cause: Unable to build Iaas of this " + iaasProvider.toString();
+ LOG.error(msg, e);
+ throw new CloudControllerException(msg, e);
+ }
+
+ }
+
+ //detach volumes if any
+ detachVolume(iaasProvider, ctxt);
+
+ // destroy the node
+ iaasProvider.getComputeService().destroyNode(nodeId);
+
+ // release allocated IP address
+ if (ctxt.getAllocatedIpAddress() != null) {
+ iaas.releaseAddress(ctxt.getAllocatedIpAddress());
+ }
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Member is terminated: " + ctxt.toString());
+ } else if (LOG.isInfoEnabled()) {
+ LOG.info("Member with id " + ctxt.getMemberId() + " is terminated");
+ }
+ return iaasProvider;
+ }
+
+ private void detachVolume(IaasProvider iaasProvider, MemberContext ctxt) {
+ String clusterId = ctxt.getClusterId();
+ ClusterContext clusterCtxt = dataHolder.getClusterContext(clusterId);
+ if (clusterCtxt.getVolumes() != null) {
+ for (Volume volume : clusterCtxt.getVolumes()) {
+ try {
+ String volumeId = volume.getId();
+ if (volumeId == null) {
+ return;
+ }
+ Iaas iaas = iaasProvider.getIaas();
+ iaas.detachVolume(ctxt.getInstanceId(), volumeId);
+ } catch (ResourceNotFoundException ignore) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug(ignore);
+ }
+ }
+ }
+ }
+ }
+
+ private void logTermination(MemberContext memberContext) {
+
+ if (memberContext == null) {
+ return;
+ }
+
+ String partitionId = memberContext.getPartition() == null ? null : memberContext.getPartition().getId();
+
+ //updating the topology
+ TopologyBuilder.handleMemberTerminated(memberContext.getCartridgeType(),
+ memberContext.getClusterId(), memberContext.getNetworkPartitionId(),
+ partitionId, memberContext.getMemberId());
+
+ //publishing data
+ CartridgeInstanceDataPublisher.publish(memberContext.getMemberId(),
+ partitionId,
+ memberContext.getNetworkPartitionId(),
+ memberContext.getClusterId(),
+ memberContext.getCartridgeType(),
+ MemberStatus.Terminated.toString(),
+ null);
+
+ // update data holders
+ dataHolder.removeMemberContext(memberContext.getMemberId(), memberContext.getClusterId());
+
+ // persist
+ persist();
+
+ }
+
+ @Override
+ public boolean registerService(Registrant registrant)
+ throws UnregisteredCartridgeException {
+
+ String cartridgeType = registrant.getCartridgeType();
+ handleNullObject(cartridgeType, "Service registration failed. Cartridge Type is null.");
+
+ String clusterId = registrant.getClusterId();
+ handleNullObject(clusterId, "Service registration failed. Cluster id is null.");
+
+ String payload = registrant.getPayload();
+ handleNullObject(payload, "Service registration failed. Payload is null.");
+
+ String hostName = registrant.getHostName();
+ handleNullObject(hostName, "Service registration failed. Hostname is null.");
+
+ Cartridge cartridge = null;
+ if ((cartridge = dataHolder.getCartridge(cartridgeType)) == null) {
+
+ String msg = "Registration of cluster: " + clusterId +
+ " failed. - Unregistered Cartridge type: " + cartridgeType;
+ LOG.error(msg);
+ throw new UnregisteredCartridgeException(msg);
+ }
+
+ Properties props = CloudControllerUtil.toJavaUtilProperties(registrant.getProperties());
+ String property = props.getProperty(IS_LOAD_BALANCER);
+ boolean isLb = property != null ? Boolean.parseBoolean(property) : false;
+
+ //TODO fix the properties issue
+ /*ClusterContext ctxt = buildClusterContext(cartridge, clusterId,
+ payload, hostName, props, isLb, registrant.getPersistence());
+
+
+ dataHolder.addClusterContext(ctxt);*/
+ TopologyBuilder.handleClusterCreated(registrant, isLb);
+
+ persist();
+
+ LOG.info("Successfully registered: " + registrant);
+
+ return true;
+ }
+
+ private ClusterContext buildClusterContext(Cartridge cartridge,
+ String clusterId, String payload, String hostName,
+ org.apache.stratos.common.Properties props, boolean isLb, Persistence persistence) {
+ //TODO fix properties issue
+ // initialize ClusterContext
+ ClusterContext ctxt = new ClusterContext(clusterId, cartridge.getType(), payload,
+ hostName, isLb, props);
+
+ /*String property;
+ property = props.get(Constants.GRACEFUL_SHUTDOWN_TIMEOUT);
+ long timeout = property != null ? Long.parseLong(property) : 30000;
+
+ boolean persistanceRequired = false;
+ if(persistence != null){
+ persistanceRequired = persistence.isPersistanceRequired();
+ }
+
+ if(persistanceRequired){
+ ctxt.setVolumes(persistence.getVolumes());
+ ctxt.setVolumeRequired(true);
+ }else{
+ ctxt.setVolumeRequired(false);
+ }
+ ctxt.setTimeoutInMillis(timeout);
+ return ctxt;
+ ;*/
+ return null;
+ }
+
+ @Override
+ public String[] getRegisteredCartridges() {
+ // get the list of cartridges registered
+ List<Cartridge> cartridges = dataHolder
+ .getCartridges();
+
+ if (cartridges == null) {
+ LOG.info("No registered Cartridge found.");
+ return new String[0];
+ }
+
+ String[] cartridgeTypes = new String[cartridges.size()];
+ int i = 0;
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Registered Cartridges : \n");
+ }
+ for (Cartridge cartridge : cartridges) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug(cartridge);
+ }
+ cartridgeTypes[i] = cartridge.getType();
+ i++;
+ }
+
+ return cartridgeTypes;
+ }
+
+ @Override
+ public CartridgeInfo getCartridgeInfo(String cartridgeType)
+ throws UnregisteredCartridgeException {
+ Cartridge cartridge = dataHolder
+ .getCartridge(cartridgeType);
+
+ if (cartridge != null) {
+
+ return CloudControllerUtil.toCartridgeInfo(cartridge);
+
+ }
+
+ String msg = "Cannot find a Cartridge having a type of "
+ + cartridgeType + ". Hence unable to find information.";
+ LOG.error(msg);
+ throw new UnregisteredCartridgeException(msg);
+ }
+
+ @Override
+ public void unregisterService(String clusterId) throws UnregisteredClusterException {
+ final String clusterId_ = clusterId;
+
+ ClusterContext ctxt = dataHolder.getClusterContext(clusterId_);
+
+ handleNullObject(ctxt, "Service unregistration failed. Invalid cluster id: " + clusterId);
+
+ String cartridgeType = ctxt.getCartridgeType();
+
+ Cartridge cartridge = dataHolder.getCartridge(cartridgeType);
+
+ if (cartridge == null) {
+ String msg =
+ "Service unregistration failed. No matching Cartridge found [type] " + cartridgeType + ". ";
+ LOG.error(msg);
+ throw new UnregisteredClusterException(msg);
+ }
+
+ // if it's a kubernetes cluster
+ if (StratosConstants.KUBERNETES_DEPLOYER_TYPE.equals(cartridge.getDeployerType())) {
+ unregisterDockerService(clusterId_);
+
+ } else {
+
+// TopologyBuilder.handleClusterMaintenanceMode(dataHolder.getClusterContext(clusterId_));
+
+ Runnable terminateInTimeout = new Runnable() {
+ @Override
+ public void run() {
+ ClusterContext ctxt = dataHolder.getClusterContext(clusterId_);
+ if (ctxt == null) {
+ String msg = "Service unregistration failed. Cluster not found: " + clusterId_;
+ LOG.error(msg);
+ return;
+ }
+ Collection<Member> members = TopologyManager.getTopology().
+ getService(ctxt.getCartridgeType()).getCluster(clusterId_).getMembers();
+ //finding the responding members from the existing members in the topology.
+ int sizeOfRespondingMembers = 0;
+ for (Member member : members) {
+ if (member.getStatus().getCode() >= MemberStatus.Activated.getCode()) {
+ sizeOfRespondingMembers++;
+ }
+ }
+
+ long endTime = System.currentTimeMillis() + ctxt.getTimeoutInMillis() * sizeOfRespondingMembers;
+ while (System.currentTimeMillis() < endTime) {
+ CloudControllerUtil.sleep(1000);
+
+ }
+
+ // if there're still alive members
+ if (members.size() > 0) {
+ //forcefully terminate them
+ for (Member member : members) {
+
+ try {
+ terminateInstance(member.getMemberId());
+ } catch (Exception e) {
+ // we are not gonna stop the execution due to errors.
+ LOG.warn("Instance termination failed of member [id] " + member.getMemberId(), e);
+ }
+ }
+ }
+ }
+ };
+ Runnable unregister = new Runnable() {
+ public void run() {
+ ClusterContext ctxt = dataHolder.getClusterContext(clusterId_);
+ if (ctxt == null) {
+ String msg = "Service unregistration failed. Cluster not found: " + clusterId_;
+ LOG.error(msg);
+ return;
+ }
+ Collection<Member> members = TopologyManager.getTopology().
+ getService(ctxt.getCartridgeType()).getCluster(clusterId_).getMembers();
+ // TODO why end time is needed?
+ // long endTime = System.currentTimeMillis() + ctxt.getTimeoutInMillis() * members.size();
+
+ while (members.size() > 0) {
+ //waiting until all the members got removed from the Topology/ timed out
+ CloudControllerUtil.sleep(1000);
+ }
+
+ LOG.info("Unregistration of service cluster: " + clusterId_);
+ deleteVolumes(ctxt);
+ onClusterRemoval(clusterId_);
+ }
+
+ private void deleteVolumes(ClusterContext ctxt) {
+ if (ctxt.isVolumeRequired()) {
+ Cartridge cartridge = dataHolder.getCartridge(ctxt.getCartridgeType());
+ if (cartridge != null && cartridge.getIaases() != null && ctxt.getVolumes() != null) {
+ for (Volume volume : ctxt.getVolumes()) {
+ if (volume.getId() != null) {
+ String iaasType = volume.getIaasType();
+ //Iaas iaas = dataHolder.getIaasProvider(iaasType).getIaas();
+ Iaas iaas = cartridge.getIaasProvider(iaasType).getIaas();
+ if (iaas != null) {
+ try {
+ // delete the volumes if remove on unsubscription is true.
+ if (volume.isRemoveOntermination()) {
+ iaas.deleteVolume(volume.getId());
+ volume.setId(null);
+ }
+ } catch (Exception ignore) {
+ if (LOG.isErrorEnabled()) {
+ LOG.error("Error while deleting volume [id] " + volume.getId(), ignore);
+ }
+ }
+ }
+ }
+ }
+
+ }
+ }
+ }
+ };
+ new Thread(terminateInTimeout).start();
+ new Thread(unregister).start();
+ }
+ }
+
+ @Override
+ public void unregisterDockerService(String clusterId)
+ throws UnregisteredClusterException {
+
+ // terminate all kubernetes units
+ try {
+ terminateAllContainers(clusterId);
+ } catch (InvalidClusterException e) {
+ String msg = "Docker instance termination fails for cluster: " + clusterId;
+ LOG.error(msg, e);
+ throw new UnregisteredClusterException(msg, e);
+ }
+ // send cluster removal notifications and update the state
+ onClusterRemoval(clusterId);
+ }
+
+
+ @Override
+ public boolean validateDeploymentPolicy(String cartridgeType, Partition[] partitions)
+ throws InvalidPartitionException, InvalidCartridgeTypeException {
+
+ Map<String, List<String>> validatedCache = dataHolder.getCartridgeTypeToPartitionIds();
+ List<String> validatedPartitions = new ArrayList<String>();
+
+ if (validatedCache.containsKey(cartridgeType)) {
+ // cache hit for this cartridge
+ // get list of partitions
+ validatedPartitions = validatedCache.get(cartridgeType);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Partition validation cache hit for cartridge type: " + cartridgeType);
+ }
+
+ }
+
+ Map<String, IaasProvider> partitionToIaasProviders =
+ new ConcurrentHashMap<String, IaasProvider>();
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Deployment policy validation started for cartridge type: " + cartridgeType);
+ }
+
+ Cartridge cartridge = dataHolder.getCartridge(cartridgeType);
+
+ if (cartridge == null) {
+ String msg = "Invalid Cartridge Type: " + cartridgeType;
+ LOG.error(msg);
+ throw new InvalidCartridgeTypeException(msg);
+ }
+
+ Map<String, Future<IaasProvider>> jobList = new HashMap<String, Future<IaasProvider>>();
+
+ for (Partition partition : partitions) {
+
+ if (validatedPartitions.contains(partition.getId())) {
+ // partition cache hit
+ continue;
+ }
+
+ Callable<IaasProvider> worker = new PartitionValidatorCallable(
+ partition, cartridge);
+ Future<IaasProvider> job = CloudControllerContext.getInstance()
+ .getExecutor().submit(worker);
+ jobList.put(partition.getId(), job);
+ }
+
+ // Retrieve the results of the concurrently performed sanity checks.
+ for (Entry<String, Future<IaasProvider>> entry : jobList.entrySet()) {
+ if (entry == null) {
+ continue;
+ }
+ String partitionId = entry.getKey();
+ Future<IaasProvider> job = entry.getValue();
+ try {
+ // add to a temporary Map
+ partitionToIaasProviders.put(partitionId, job.get());
+
+ // add to cache
+ this.dataHolder.addToCartridgeTypeToPartitionIdMap(cartridgeType, partitionId);
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Partition " + partitionId + " added to the cache against cartridge type: " + cartridgeType);
+ }
+ } catch (Exception e) {
+ LOG.error(e.getMessage(), e);
+ throw new InvalidPartitionException(e.getMessage(), e);
+ }
+ }
+
+ // if and only if the deployment policy valid
+ cartridge.addIaasProviders(partitionToIaasProviders);
+
+ // persist data
+ persist();
+
+ LOG.info("All partitions " + CloudControllerUtil.getPartitionIds(partitions) +
+ " were validated successfully, against the Cartridge: " + cartridgeType);
+
+ return true;
+ }
+
+ private void onClusterRemoval(final String clusterId) {
+ ClusterContext ctxt = dataHolder.getClusterContext(clusterId);
+ TopologyBuilder.handleClusterRemoved(ctxt);
+ dataHolder.removeClusterContext(clusterId);
+ dataHolder.removeMemberContextsOfCluster(clusterId);
+ persist();
+ }
+
+ @Override
+ public boolean validatePartition(Partition partition) throws InvalidPartitionException {
+ handleNullObject(partition, "Partition validation failed. Partition is null.");
+ String provider = partition.getProvider();
+ handleNullObject(provider, "Partition [" + partition.getId() + "] validation failed. Partition provider is null.");
+ IaasProvider iaasProvider = dataHolder.getIaasProvider(provider);
+
+ if (iaasProvider == null) {
+ String msg =
+ "Invalid Partition - " + partition.toString() + ". Cause: Iaas Provider " +
+ "is null for Partition Provider: " + provider;
+ LOG.error(msg);
+ throw new InvalidPartitionException(msg);
+ }
+
+ Iaas iaas = iaasProvider.getIaas();
+
+ if (iaas == null) {
+
+ try {
+ iaas = CloudControllerUtil.getIaas(iaasProvider);
+ } catch (InvalidIaasProviderException e) {
+ String msg =
+ "Invalid Partition - " + partition.toString() +
+ ". Cause: Unable to build Iaas of this IaasProvider [Provider] : " + provider + ". " + e.getMessage();
+ LOG.error(msg, e);
+ throw new InvalidPartitionException(msg, e);
+ }
+
+ }
+
+ PartitionValidator validator = iaas.getPartitionValidator();
+ validator.setIaasProvider(iaasProvider);
+ validator.validate(partition.getId(),
+ CloudControllerUtil.toJavaUtilProperties(partition.getProperties()));
+
+ return true;
+ }
+
+ public ClusterContext getClusterContext(String clusterId) {
+
+ return dataHolder.getClusterContext(clusterId);
+ }
+
+ @Override
+ public MemberContext[] startContainers(ContainerClusterContext containerClusterContext)
+ throws UnregisteredCartridgeException {
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("CloudControllerServiceImpl:startContainers");
+ }
+
+ handleNullObject(containerClusterContext, "Container start-up failed. ContainerClusterContext is null.");
+
+ String clusterId = containerClusterContext.getClusterId();
+ handleNullObject(clusterId, "Container start-up failed. Cluster id is null.");
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Received a container spawn request : " + containerClusterContext.toString());
+ }
+
+ ClusterContext ctxt = dataHolder.getClusterContext(clusterId);
+ handleNullObject(ctxt, "Container start-up failed. Invalid cluster id. " + containerClusterContext.toString());
+
+ String cartridgeType = ctxt.getCartridgeType();
+
+ Cartridge cartridge = dataHolder.getCartridge(cartridgeType);
+
+ if (cartridge == null) {
+ String msg =
+ "Instance start-up failed. No matching Cartridge found [type] " + cartridgeType + ". " +
+ containerClusterContext.toString();
+ LOG.error(msg);
+ throw new UnregisteredCartridgeException(msg);
+ }
+
+ try {
+ String minReplicas = validateProperty(StratosConstants.KUBERNETES_MIN_REPLICAS, ctxt);
+ String kubernetesClusterId = validateProperty(StratosConstants.KUBERNETES_CLUSTER_ID, ctxt);
+ String kubernetesMasterIp = validateProperty(StratosConstants.KUBERNETES_MASTER_IP, containerClusterContext);
+ String kubernetesPortRange = validateProperty(StratosConstants.KUBERNETES_PORT_RANGE, containerClusterContext);
+
+ KubernetesClusterContext kubClusterContext = getKubernetesClusterContext(kubernetesClusterId, kubernetesMasterIp, kubernetesPortRange);
+
+ KubernetesApiClient kubApi = kubClusterContext.getKubApi();
+
+ // first let's create a replication controller.
+ ContainerClusterContextToReplicationController controllerFunction = new ContainerClusterContextToReplicationController();
+ ReplicationController controller = controllerFunction.apply(containerClusterContext);
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Cloud Controller is delegating request to start a replication controller " + controller +
+ " for " + containerClusterContext + " to Kubernetes layer.");
+ }
+
+ kubApi.createReplicationController(controller);
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Cloud Controller successfully started the controller "
+ + controller + " via Kubernetes layer.");
+ }
+
+ // secondly let's create a kubernetes service proxy to load balance these containers
+ ContainerClusterContextToKubernetesService serviceFunction = new ContainerClusterContextToKubernetesService();
+ Service service = serviceFunction.apply(containerClusterContext);
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Cloud Controller is delegating request to start a service " + service +
+ " for " + containerClusterContext + " to Kubernetes layer.");
+ }
+
+ kubApi.createService(service);
+
+ // set host port and update
+ Property allocatedServiceHostPortProp = new Property();
+ allocatedServiceHostPortProp.setName(StratosConstants.ALLOCATED_SERVICE_HOST_PORT);
+ allocatedServiceHostPortProp.setValue(String.valueOf(service.getPort()));
+ ctxt.getProperties().addProperty(allocatedServiceHostPortProp);
+ dataHolder.addClusterContext(ctxt);
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Cloud Controller successfully started the service "
+ + controller + " via Kubernetes layer.");
+ }
+
+ // create a label query
+ Label l = new Label();
+ l.setName(clusterId);
+ // execute the label query
+ Pod[] newlyCreatedPods = new Pod[0];
+ int expectedCount = Integer.parseInt(minReplicas);
+
+ for (int i = 0; i < expectedCount; i++) {
+ newlyCreatedPods = kubApi.getSelectedPods(new Label[]{l});
+
+ if (LOG.isDebugEnabled()) {
+
+ LOG.debug("Pods Count: " + newlyCreatedPods.length + " for cluster: " + clusterId);
+ }
+ if (newlyCreatedPods.length == expectedCount) {
+ break;
+ }
+ Thread.sleep(10000);
+ }
+
+ if (newlyCreatedPods.length == 0) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug(String.format("Pods are not created for cluster : %s, hence deleting the service", clusterId));
+ }
+ terminateAllContainers(clusterId);
+ return new MemberContext[0];
+ }
+
+ if (LOG.isDebugEnabled()) {
+
+ LOG.debug(String.format("Pods created : %s for cluster : %s", newlyCreatedPods.length, clusterId));
+ }
+
+ List<MemberContext> memberContexts = new ArrayList<MemberContext>();
+
+ PodToMemberContext podToMemberContextFunc = new PodToMemberContext();
+ // generate Member Contexts
+ for (Pod pod : newlyCreatedPods) {
+ MemberContext context = podToMemberContextFunc.apply(pod);
+ context.setCartridgeType(cartridgeType);
+ context.setClusterId(clusterId);
+
+ context.setProperties(CloudControllerUtil.addProperty(context
+ .getProperties(), StratosConstants.ALLOCATED_SERVICE_HOST_PORT,
+ String.valueOf(service.getPort())));
+
+ dataHolder.addMemberContext(context);
+
+ // wait till Pod status turns to running and send member spawned.
+ ScheduledThreadExecutor exec = ScheduledThreadExecutor.getInstance();
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Cloud Controller is starting the instance start up thread.");
+ }
+ dataHolder.addScheduledFutureJob(context.getMemberId(), exec.schedule(new PodActivationWatcher(pod.getId(), context, kubApi), 5000));
+
+ memberContexts.add(context);
+ }
+
+ // persist in registry
+ persist();
+
+ LOG.info("Kubernetes entities are successfully starting up: " + memberContexts);
+
+ return memberContexts.toArray(new MemberContext[0]);
+
+ } catch (Exception e) {
+ String msg = "Failed to start an instance. " + containerClusterContext.toString() + " Cause: " + e.getMessage();
+ LOG.error(msg, e);
+ throw new IllegalStateException(msg, e);
+ }
+ }
+
+ private String validateProperty(String property, ClusterContext ctxt) {
+
+ String propVal = CloudControllerUtil.getProperty(ctxt.getProperties(), property);
+ handleNullObject(propVal, "Property validation failed. Cannot find '" + property + "' in " + ctxt);
+ return propVal;
+ }
+
+ private String validateProperty(String property, ContainerClusterContext ctxt) {
+
+ String propVal = CloudControllerUtil.getProperty(ctxt.getProperties(), property);
+ handleNullObject(propVal, "Property validation failed. '" + property + "' in " + ctxt);
+ return propVal;
+
+ }
+
+ private KubernetesClusterContext getKubernetesClusterContext(
+ String kubernetesClusterId, String kubernetesMasterIp,
+ String kubernetesPortRange) {
+
+ KubernetesClusterContext origCtxt = dataHolder.getKubernetesClusterContext(kubernetesClusterId);
+ KubernetesClusterContext newCtxt = new KubernetesClusterContext(kubernetesClusterId, kubernetesPortRange, kubernetesMasterIp);
+
+ if (origCtxt == null) {
+ dataHolder.addKubernetesClusterContext(newCtxt);
+ return newCtxt;
+ }
+
+ if (!origCtxt.equals(newCtxt)) {
+ // if for some reason master IP etc. have changed
+ newCtxt.setAvailableHostPorts(origCtxt.getAvailableHostPorts());
+ dataHolder.addKubernetesClusterContext(newCtxt);
+ return newCtxt;
+ } else {
+ return origCtxt;
+ }
+ }
+
+ @Override
+ public MemberContext[] terminateAllContainers(String clusterId)
+ throws InvalidClusterException {
+
+ ClusterContext ctxt = dataHolder.getClusterContext(clusterId);
+ handleNullObject(ctxt, "Kubernetes units temrination failed. Invalid cluster id. " + clusterId);
+
+ String kubernetesClusterId = CloudControllerUtil.getProperty(ctxt.getProperties(),
+ StratosConstants.KUBERNETES_CLUSTER_ID);
+ handleNullObject(kubernetesClusterId, "Kubernetes units termination failed. Cannot find '" +
+ StratosConstants.KUBERNETES_CLUSTER_ID + "'. " + ctxt);
+
+ KubernetesClusterContext kubClusterContext = dataHolder.getKubernetesClusterContext(kubernetesClusterId);
+ handleNullObject(kubClusterContext, "Kubernetes units termination failed. Cannot find a matching Kubernetes Cluster for cluster id: "
+ + kubernetesClusterId);
+
+ KubernetesApiClient kubApi = kubClusterContext.getKubApi();
+ // delete the service
+ try {
+ kubApi.deleteService(CloudControllerUtil.getCompatibleId(clusterId));
+ } catch (KubernetesClientException e) {
+ // we're not going to throw this error, but proceed with other deletions
+ LOG.error("Failed to delete Kubernetes service with id: " + clusterId, e);
+ }
+
+ // set replicas=0 for the replication controller
+ try {
+ kubApi.updateReplicationController(clusterId, 0);
+ } catch (KubernetesClientException e) {
+ // we're not going to throw this error, but proceed with other deletions
+ LOG.error("Failed to update Kubernetes Controller with id: " + clusterId, e);
+ }
+
+ // delete pods forcefully
+ try {
+ // create a label query
+ Label l = new Label();
+ l.setName(clusterId);
+ // execute the label query
+ Pod[] pods = kubApi.getSelectedPods(new Label[]{l});
+
+ for (Pod pod : pods) {
+ try {
+ // delete pods forcefully
+ kubApi.deletePod(pod.getId());
+ } catch (KubernetesClientException ignore) {
+ // we can't do nothing here
+ LOG.warn(String.format("Failed to delete Pod [%s] forcefully!", pod.getId()));
+ }
+ }
+ } catch (KubernetesClientException e) {
+ // we're not going to throw this error, but proceed with other deletions
+ LOG.error("Failed to delete pods forcefully for cluster: " + clusterId, e);
+ }
+
+ // delete the replication controller.
+ try {
+ kubApi.deleteReplicationController(clusterId);
+ } catch (KubernetesClientException e) {
+ String msg = "Failed to delete Kubernetes Controller with id: " + clusterId;
+ LOG.error(msg, e);
+ throw new InvalidClusterException(msg, e);
+ }
+
+ String allocatedPort = CloudControllerUtil.getProperty(ctxt.getProperties(),
+ StratosConstants.ALLOCATED_SERVICE_HOST_PORT);
+
+ if (allocatedPort != null) {
+ kubClusterContext.deallocateHostPort(Integer
+ .parseInt(allocatedPort));
+ } else {
+ LOG.warn("Host port dealloacation failed due to a missing property: "
+ + StratosConstants.ALLOCATED_SERVICE_HOST_PORT);
+ }
+
+ List<MemberContext> membersToBeRemoved = dataHolder.getMemberContextsOfClusterId(clusterId);
+
+ for (MemberContext memberContext : membersToBeRemoved) {
+ logTermination(memberContext);
+ }
+
+ // persist
+ persist();
+
+ return membersToBeRemoved.toArray(new MemberContext[0]);
+ }
+
+ @Override
+ public MemberContext[] updateContainers(String clusterId, int replicas)
+ throws UnregisteredCartridgeException {
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("CloudControllerServiceImpl:updateContainers for cluster : " + clusterId);
+ }
+
+ ClusterContext ctxt = dataHolder.getClusterContext(clusterId);
+ handleNullObject(ctxt, "Container update failed. Invalid cluster id. " + clusterId);
+
+ String cartridgeType = ctxt.getCartridgeType();
+
+ Cartridge cartridge = dataHolder.getCartridge(cartridgeType);
+
+ if (cartridge == null) {
+ String msg =
+ "Container update failed. No matching Cartridge found [type] " + cartridgeType
+ + ". [cluster id] " + clusterId;
+ LOG.error(msg);
+ throw new UnregisteredCartridgeException(msg);
+ }
+
+ try {
+ String kubernetesClusterId = validateProperty(StratosConstants.KUBERNETES_CLUSTER_ID, ctxt);
+
+ KubernetesClusterContext kubClusterContext = dataHolder.getKubernetesClusterContext(kubernetesClusterId);
+
+ if (kubClusterContext == null) {
+ String msg =
+ "Instance start-up failed. No matching Kubernetes Context Found for [id] " + kubernetesClusterId
+ + ". [cluster id] " + clusterId;
+ LOG.error(msg);
+ throw new UnregisteredCartridgeException(msg);
+ }
+
+ KubernetesApiClient kubApi = kubClusterContext.getKubApi();
+ // create a label query
+ Label l = new Label();
+ l.setName(clusterId);
+
+ // get the current pods - useful when scale down
+ Pod[] previousStatePods = kubApi.getSelectedPods(new Label[]{l});
+
+ // update the replication controller - cluster id = replication controller id
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Cloud Controller is delegating request to update a replication controller " + clusterId +
+ " to Kubernetes layer.");
+ }
+
+ kubApi.updateReplicationController(clusterId, replicas);
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Cloud Controller successfully updated the controller "
+ + clusterId + " via Kubernetes layer.");
+ }
+
+ // execute the label query
+ Pod[] allPods = new Pod[0];
+
+ // wait replicas*5s time in the worst case ; best case = 0s
+ for (int i = 0; i < (replicas * previousStatePods.length + 1); i++) {
+ allPods = kubApi.getSelectedPods(new Label[]{l});
+
+ if (LOG.isDebugEnabled()) {
+
+ LOG.debug("Pods Count: " + allPods.length + " for cluster: " + clusterId);
+ }
+ if (allPods.length == replicas) {
+ break;
+ }
+ Thread.sleep(10000);
+ }
+
+ if (LOG.isDebugEnabled()) {
+
+ LOG.debug(String.format("Pods created : %s for cluster : %s", allPods.length, clusterId));
+ }
+
+ List<MemberContext> memberContexts = new ArrayList<MemberContext>();
+
+ PodToMemberContext podToMemberContextFunc = new PodToMemberContext();
+ // generate Member Contexts
+ for (Pod pod : allPods) {
+ MemberContext context;
+ // if member context does not exist -> a new member (scale up)
+ if ((context = dataHolder.getMemberContextOfMemberId(pod.getId())) == null) {
+
+ context = podToMemberContextFunc.apply(pod);
+ context.setCartridgeType(cartridgeType);
+ context.setClusterId(clusterId);
+
+ context.setProperties(CloudControllerUtil.addProperty(context
+ .getProperties(), StratosConstants.ALLOCATED_SERVICE_HOST_PORT,
+ CloudControllerUtil.getProperty(ctxt.getProperties(),
+ StratosConstants.ALLOCATED_SERVICE_HOST_PORT)));
+
+ // wait till Pod status turns to running and send member spawned.
+ ScheduledThreadExecutor exec = ScheduledThreadExecutor.getInstance();
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Cloud Controller is starting the instance start up thread.");
+ }
+ dataHolder.addScheduledFutureJob(context.getMemberId(), exec.schedule(new PodActivationWatcher(pod.getId(), context, kubApi), 5000));
+
+ memberContexts.add(context);
+
+ }
+ // publish data
+ // TODO
+// CartridgeInstanceDataPublisher.publish(context.getMemberId(), null, null, context.getClusterId(), cartridgeType, MemberStatus.Created.toString(), node);
+
+ }
+
+ if (memberContexts.isEmpty()) {
+ // terminated members
+ @SuppressWarnings("unchecked")
+ List<Pod> difference = ListUtils.subtract(Arrays.asList(previousStatePods), Arrays.asList(allPods));
+ for (Pod pod : difference) {
+ if (pod != null) {
+ MemberContext context = dataHolder.getMemberContextOfMemberId(pod.getId());
+ logTermination(context);
+ memberContexts.add(context);
+ }
+ }
+ }
+
+
+ // persist in registry
+ persist();
+
+ LOG.info("Kubernetes entities are successfully starting up. " + memberContexts);
+
+ return memberContexts.toArray(new MemberContext[0]);
+
+ } catch (Exception e) {
+ String msg = "Failed to update containers belong to cluster " + clusterId + ". Cause: " + e.getMessage();
+ LOG.error(msg, e);
+ throw new IllegalStateException(msg, e);
+ }
+ }
+
+ @Override
+ public void updateClusterStatus(String serviceName, String clusterId, String instanceId, ClusterStatus status) {
+ //TODO
+ }
+
+ @Override
+ public MemberContext terminateContainer(String memberId) throws MemberTerminationFailedException {
+
+ handleNullObject(memberId, "Failed to terminate member. Invalid Member id. [Member id] " + memberId);
+
+ MemberContext memberContext = dataHolder.getMemberContextOfMemberId(memberId);
+
+ handleNullObject(memberContext, "Failed to terminate member. Member id not found. [Member id] " + memberId);
+
+ String clusterId = memberContext.getClusterId();
+
+ handleNullObject(clusterId, "Failed to terminate member. Cluster id is null. [Member id] " + memberId);
+
+ ClusterContext ctxt = dataHolder.getClusterContext(clusterId);
+
+ handleNullObject(ctxt,
+ String.format("Failed to terminate member [Member id] %s. Invalid cluster id %s ", memberId, clusterId));
+
+ String kubernetesClusterId = CloudControllerUtil.getProperty(ctxt.getProperties(),
+ StratosConstants.KUBERNETES_CLUSTER_ID);
+
+ handleNullObject(kubernetesClusterId, String.format("Failed to terminate member [Member id] %s. Cannot find '" +
+ StratosConstants.KUBERNETES_CLUSTER_ID + "' in [cluster context] %s ", memberId, ctxt));
+
+ KubernetesClusterContext kubClusterContext = dataHolder.getKubernetesClusterContext(kubernetesClusterId);
+
+ handleNullObject(kubClusterContext, String.format("Failed to terminate member [Member id] %s. Cannot find a matching Kubernetes Cluster in [cluster context] %s ", memberId, ctxt));
+
+ KubernetesApiClient kubApi = kubClusterContext.getKubApi();
+ // delete the Pod
+ try {
+ // member id = pod id
+ kubApi.deletePod(memberId);
+
+ MemberContext memberToBeRemoved = dataHolder.getMemberContextOfMemberId(memberId);
+
+ logTermination(memberToBeRemoved);
+
+ return memberToBeRemoved;
+
+ } catch (KubernetesClientException e) {
+ String msg = String.format("Failed to terminate member [Member id] %s", memberId);
+ LOG.error(msg, e);
+ throw new MemberTerminationFailedException(msg, e);
+ }
+ }
+
+ private void handleNullObject(Object obj, String errorMsg) {
+ if (obj == null) {
+ LOG.error(errorMsg);
+ throw new IllegalArgumentException(errorMsg);
+ }
+ }
+
+ @Override
+ public void createApplicationClusters(String appId, ApplicationClusterContext[] appClustersContexts) throws
+ ApplicationClusterRegistrationException {
+
+ // Create a Cluster Context obj. for each of the Clusters in the Application
+ if (appClustersContexts == null || appClustersContexts.length == 0) {
+ String errorMsg = "No application cluster information found, unable to create clusters";
+ LOG.error(errorMsg);
+ throw new ApplicationClusterRegistrationException(errorMsg);
+ }
+ List<Cluster> clusters = new ArrayList<Cluster>();
+
+
+ for (ApplicationClusterContext appClusterCtxt : appClustersContexts) {
+ dataHolder.addClusterContext(new ClusterContext(appClusterCtxt.getClusterId(),
+ appClusterCtxt.getCartridgeType(), appClusterCtxt.getTextPayload(),
+ appClusterCtxt.getHostName(), appClusterCtxt.isLbCluster(), appClusterCtxt.getProperties()));
+ // create Cluster objects
+ Cluster newCluster = new Cluster(appClusterCtxt.getCartridgeType(), appClusterCtxt.getClusterId(),
+ appClusterCtxt.getDeploymentPolicyName(), appCl
<TRUNCATED>
[13/13] stratos git commit: Refactoring autoscaler after latest CC
changes.
Posted by ni...@apache.org.
Refactoring autoscaler after latest CC changes.
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/de799354
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/de799354
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/de799354
Branch: refs/heads/master
Commit: de799354f53396c9072cea3bec9701f1cece4e17
Parents: 48e7c23
Author: Nirmal Fernando <ni...@gmail.com>
Authored: Sun Nov 30 12:41:39 2014 +0530
Committer: Nirmal Fernando <ni...@gmail.com>
Committed: Sun Nov 30 12:47:24 2014 +0530
----------------------------------------------------------------------
.../algorithm/AutoscaleAlgorithm.java | 3 +--
.../autoscaler/algorithm/OneAfterAnother.java | 2 +-
.../autoscaler/algorithm/RoundRobin.java | 2 +-
.../autoscaler/api/AutoScalerServiceImpl.java | 6 ++---
.../applications/ApplicationUtils.java | 8 +++---
.../applications/parser/ApplicationParser.java | 2 +-
.../parser/DefaultApplicationParser.java | 6 ++---
.../pojo/ApplicationClusterContext.java | 2 +-
.../applications/pojo/ApplicationContext.java | 2 +-
.../pojo/SubscribableInfoContext.java | 2 +-
.../client/CloudControllerClient.java | 28 +++++++++-----------
.../autoscaler/commands/PartitionsCommands.java | 4 +--
.../context/cluster/AbstractClusterContext.java | 2 +-
.../context/cluster/ClusterContextFactory.java | 10 +++----
.../cluster/KubernetesClusterContext.java | 10 +++----
.../partition/ClusterLevelPartitionContext.java | 12 ++++-----
.../partition/GroupLevelPartitionContext.java | 2 +-
.../context/partition/PartitionContext.java | 2 +-
.../ClusterLevelNetworkPartitionContext.java | 2 +-
.../GroupLevelNetworkPartitionContext.java | 2 +-
.../interfaces/AutoScalerServiceInterface.java | 2 +-
.../internal/AutoscalerServerComponent.java | 4 +--
.../monitor/cluster/AbstractClusterMonitor.java | 2 +-
.../monitor/cluster/ClusterMonitorFactory.java | 2 +-
.../KubernetesServiceClusterMonitor.java | 6 ++---
.../monitor/cluster/VMClusterMonitor.java | 4 +--
.../cluster/VMServiceClusterMonitor.java | 6 ++---
.../autoscaler/pojo/policy/PolicyManager.java | 2 +-
.../policy/deployment/DeploymentPolicy.java | 2 +-
.../deployment/partition/PartitionManager.java | 2 +-
.../ApplicationLevelNetworkPartition.java | 4 +--
.../network/ChildLevelNetworkPartition.java | 2 +-
.../autoscaler/registry/RegistryManager.java | 2 +-
.../autoscaler/rule/RuleTasksDelegator.java | 2 +-
.../stratos/autoscaler/util/AutoscalerUtil.java | 4 +--
.../stratos/autoscaler/TestDelegator.java | 4 +--
.../stratos/autoscaler/TestMinimumRule.java | 5 ++--
.../autoscaler/TestObsoletedMemberRule.java | 4 +--
.../src/test/resources/autoscaler.drl | 4 +--
.../resources/test-minimum-autoscaler-rule.drl | 4 +--
.../test-terminating-obsoleted-members-rule.drl | 4 +--
41 files changed, 87 insertions(+), 93 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/algorithm/AutoscaleAlgorithm.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/algorithm/AutoscaleAlgorithm.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/algorithm/AutoscaleAlgorithm.java
index fa79521..bcc1bce 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/algorithm/AutoscaleAlgorithm.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/algorithm/AutoscaleAlgorithm.java
@@ -20,7 +20,7 @@
package org.apache.stratos.autoscaler.algorithm;
import org.apache.stratos.autoscaler.context.partition.network.ClusterLevelNetworkPartitionContext;
-import org.apache.stratos.cloud.controller.domain.xsd.Partition;
+import org.apache.stratos.cloud.controller.stub.domain.Partition;
/**
@@ -51,7 +51,6 @@ public interface AutoscaleAlgorithm {
*/
public Partition getNextScaleUpPartition(ClusterLevelNetworkPartitionContext clusterLevelNetworkPartitionContext, String clusterId);
-
/**
* Returns a {@link Partition} to scale down from the given {@link org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network.NetworkPartition} according to algorithm
* @param clusterLevelNetworkPartitionContext {@link org.apache.stratos.autoscaler.context.partition.network.ClusterLevelNetworkPartitionContext} which need the {@link Partition}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/algorithm/OneAfterAnother.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/algorithm/OneAfterAnother.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/algorithm/OneAfterAnother.java
index da58265..beabe3e 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/algorithm/OneAfterAnother.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/algorithm/OneAfterAnother.java
@@ -22,7 +22,7 @@ package org.apache.stratos.autoscaler.algorithm;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.stratos.autoscaler.context.partition.network.ClusterLevelNetworkPartitionContext;
-import org.apache.stratos.cloud.controller.domain.xsd.Partition;
+import org.apache.stratos.cloud.controller.stub.domain.Partition;
import java.util.Arrays;
import java.util.List;
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/algorithm/RoundRobin.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/algorithm/RoundRobin.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/algorithm/RoundRobin.java
index 5cd0455..5c6dc54 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/algorithm/RoundRobin.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/algorithm/RoundRobin.java
@@ -22,7 +22,7 @@ package org.apache.stratos.autoscaler.algorithm;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.stratos.autoscaler.context.partition.network.ClusterLevelNetworkPartitionContext;
-import org.apache.stratos.cloud.controller.domain.xsd.Partition;
+import org.apache.stratos.cloud.controller.stub.domain.Partition;
import java.util.Arrays;
import java.util.List;
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java
index 93b6c89..0809e9c 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java
@@ -44,9 +44,9 @@ import org.apache.stratos.autoscaler.pojo.policy.PolicyManager;
import org.apache.stratos.autoscaler.pojo.policy.autoscale.AutoscalePolicy;
import org.apache.stratos.autoscaler.pojo.policy.deployment.DeploymentPolicy;
import org.apache.stratos.autoscaler.registry.RegistryManager;
-import org.apache.stratos.cloud.controller.domain.xsd.Partition;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
-import org.apache.stratos.cloud.controller.stub.pojo.Property;
+import org.apache.stratos.cloud.controller.stub.domain.Partition;
+import org.apache.stratos.common.Properties;
+import org.apache.stratos.common.Property;
import org.apache.stratos.common.kubernetes.KubernetesGroup;
import org.apache.stratos.common.kubernetes.KubernetesHost;
import org.apache.stratos.common.kubernetes.KubernetesMaster;
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/ApplicationUtils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/ApplicationUtils.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/ApplicationUtils.java
index fe8dccd..dc81eb9 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/ApplicationUtils.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/ApplicationUtils.java
@@ -25,9 +25,9 @@ import org.apache.stratos.autoscaler.applications.payload.BasicPayloadData;
import org.apache.stratos.autoscaler.applications.payload.PayloadData;
import org.apache.stratos.autoscaler.applications.payload.PayloadFactory;
import org.apache.stratos.autoscaler.exception.application.ApplicationDefinitionException;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
-import org.apache.stratos.cloud.controller.domain.xsd.PortMapping;
-import org.apache.stratos.cloud.controller.stub.pojo.Property;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
+import org.apache.stratos.cloud.controller.stub.domain.PortMapping;
+import org.apache.stratos.common.Property;
import java.util.*;
import java.util.regex.Pattern;
@@ -193,7 +193,7 @@ public class ApplicationUtils {
public static PayloadData createPayload(String appId, String groupName, CartridgeInfo cartridgeInfo, String subscriptionKey, int tenantId, String clusterId,
String hostName, String repoUrl, String alias, Map<String, String> customPayloadEntries, String[] dependencyAliases,
- org.apache.stratos.cloud.controller.stub.pojo.Properties properties)
+ org.apache.stratos.common.Properties properties)
throws ApplicationDefinitionException {
//Create the payload
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/ApplicationParser.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/ApplicationParser.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/ApplicationParser.java
index e03dcd4..bb47dbd 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/ApplicationParser.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/ApplicationParser.java
@@ -22,7 +22,7 @@ package org.apache.stratos.autoscaler.applications.parser;
import org.apache.stratos.autoscaler.applications.pojo.ApplicationClusterContext;
import org.apache.stratos.autoscaler.exception.application.ApplicationDefinitionException;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
+import org.apache.stratos.common.Properties;
import org.apache.stratos.messaging.domain.applications.Application;
import java.util.Map;
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/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 752f62b..7361b46 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
@@ -32,13 +32,13 @@ import org.apache.stratos.autoscaler.exception.application.ApplicationDefinition
import org.apache.stratos.autoscaler.exception.cartridge.CartridgeInformationException;
import org.apache.stratos.autoscaler.pojo.ServiceGroup;
import org.apache.stratos.autoscaler.registry.RegistryManager;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
-import org.apache.stratos.cloud.controller.stub.pojo.Property;
+import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
+import org.apache.stratos.common.Property;
import org.apache.stratos.messaging.domain.applications.Application;
import org.apache.stratos.messaging.domain.applications.ClusterDataHolder;
import org.apache.stratos.messaging.domain.applications.DependencyOrder;
import org.apache.stratos.messaging.domain.applications.Group;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
+import org.apache.stratos.common.Properties;
import java.util.*;
import javax.crypto.Cipher;
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/ApplicationClusterContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/ApplicationClusterContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/ApplicationClusterContext.java
index 98c6655..f1d89e4 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/ApplicationClusterContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/ApplicationClusterContext.java
@@ -19,7 +19,7 @@
package org.apache.stratos.autoscaler.applications.pojo;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
+import org.apache.stratos.common.Properties;
public class ApplicationClusterContext {
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/ApplicationContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/ApplicationContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/ApplicationContext.java
index ab7c3d6..b6227b2 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/ApplicationContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/ApplicationContext.java
@@ -19,7 +19,7 @@
package org.apache.stratos.autoscaler.applications.pojo;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
+import org.apache.stratos.common.Properties;
import java.io.Serializable;
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/SubscribableInfoContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/SubscribableInfoContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/SubscribableInfoContext.java
index 3c02e93..ecc8899 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/SubscribableInfoContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/SubscribableInfoContext.java
@@ -21,7 +21,7 @@ package org.apache.stratos.autoscaler.applications.pojo;
import java.io.Serializable;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
+import org.apache.stratos.common.Properties;
public class SubscribableInfoContext implements Serializable {
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/CloudControllerClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/CloudControllerClient.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/CloudControllerClient.java
index 9eba7c8..ba31970 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/CloudControllerClient.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/CloudControllerClient.java
@@ -33,17 +33,13 @@ import org.apache.stratos.autoscaler.exception.partition.PartitionValidationExce
import org.apache.stratos.autoscaler.pojo.policy.deployment.DeploymentPolicy;
import org.apache.stratos.autoscaler.kubernetes.KubernetesManager;
import org.apache.stratos.autoscaler.util.ConfUtil;
-import org.apache.stratos.cloud.controller.domain.xsd.ContainerClusterContext;
import org.apache.stratos.cloud.controller.stub.*;
-import org.apache.stratos.cloud.controller.domain.xsd.Partition;
-import org.apache.stratos.cloud.controller.domain.xsd.MemberContext;
-import org.apache.stratos.cloud.controller.domain.xsd.CartridgeInfo;
-import org.apache.stratos.cloud.controller.stub.pojo.*;
+import org.apache.stratos.cloud.controller.stub.domain.*;
+import org.apache.stratos.common.Properties;
+import org.apache.stratos.common.Property;
import org.apache.stratos.common.constants.StratosConstants;
import org.apache.stratos.common.kubernetes.KubernetesGroup;
import org.apache.stratos.common.kubernetes.KubernetesMaster;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
-import org.apache.stratos.cloud.controller.stub.pojo.Property;
import java.rmi.RemoteException;
import java.util.ArrayList;
@@ -172,8 +168,8 @@ public class CloudControllerClient {
minCountProp.setName("MIN_COUNT");
minCountProp.setValue(String.valueOf(minMemberCount));
- memberContextProps.addProperties(isPrimaryProp);
- memberContextProps.addProperties(minCountProp);
+ memberContextProps.addProperty(isPrimaryProp);
+ memberContextProps.addProperty(minCountProp);
member.setProperties(memberContextProps);
@@ -223,10 +219,10 @@ public class CloudControllerClient {
public synchronized void createApplicationClusters(String appId,
Set<ApplicationClusterContext> appClusterContexts) {
- List<org.apache.stratos.cloud.controller.domain.xsd.ApplicationClusterContext> contextDTOs =
- new ArrayList<org.apache.stratos.cloud.controller.domain.xsd.ApplicationClusterContext>();
+ List<org.apache.stratos.cloud.controller.stub.domain.ApplicationClusterContext> contextDTOs =
+ new ArrayList<org.apache.stratos.cloud.controller.stub.domain.ApplicationClusterContext>();
for(ApplicationClusterContext context : appClusterContexts) {
- org.apache.stratos.cloud.controller.domain.xsd.ApplicationClusterContext dto = new org.apache.stratos.cloud.controller.domain.xsd.ApplicationClusterContext();
+ org.apache.stratos.cloud.controller.stub.domain.ApplicationClusterContext dto = new org.apache.stratos.cloud.controller.stub.domain.ApplicationClusterContext();
dto.setClusterId(context.getClusterId());
dto.setAutoscalePolicyName(context.getAutoscalePolicyName());
dto.setDeploymentPolicyName(context.getDeploymentPolicyName());
@@ -239,8 +235,8 @@ public class CloudControllerClient {
contextDTOs.add(dto);
}
- org.apache.stratos.cloud.controller.domain.xsd.ApplicationClusterContext[] applicationClusterContextDTOs =
- new org.apache.stratos.cloud.controller.domain.xsd.ApplicationClusterContext[contextDTOs.size()];
+ org.apache.stratos.cloud.controller.stub.domain.ApplicationClusterContext[] applicationClusterContextDTOs =
+ new org.apache.stratos.cloud.controller.stub.domain.ApplicationClusterContext[contextDTOs.size()];
contextDTOs.toArray(applicationClusterContextDTOs);
try {
stub.createApplicationClusters(appId, applicationClusterContextDTOs);
@@ -342,11 +338,11 @@ public class CloudControllerClient {
Property kubernetesClusterMasterIPProps = new Property();
kubernetesClusterMasterIPProps.setName(StratosConstants.KUBERNETES_MASTER_IP);
kubernetesClusterMasterIPProps.setValue(kubernetesMasterIP);
- memberContextProps.addProperties(kubernetesClusterMasterIPProps);
+ memberContextProps.addProperty(kubernetesClusterMasterIPProps);
Property kubernetesClusterPortRangeProps = new Property();
kubernetesClusterPortRangeProps.setName(StratosConstants.KUBERNETES_PORT_RANGE);
kubernetesClusterPortRangeProps.setValue(portRange);
- memberContextProps.addProperties(kubernetesClusterPortRangeProps);
+ memberContextProps.addProperty(kubernetesClusterPortRangeProps);
context.setProperties(memberContextProps);
long startTime = System.currentTimeMillis();
MemberContext[] memberContexts = stub.startContainers(context);
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/commands/PartitionsCommands.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/commands/PartitionsCommands.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/commands/PartitionsCommands.java
index e63b727..f1586c6 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/commands/PartitionsCommands.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/commands/PartitionsCommands.java
@@ -21,7 +21,7 @@
//
//import org.apache.commons.lang.StringUtils;
//import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.PartitionManager;
-//import org.apache.stratos.cloud.controller.domain.xsd.Partition;
+//import org.apache.stratos.cloud.controller.stub.domain.Partition;
//import org.eclipse.osgi.framework.console.CommandInterpreter;
//import org.eclipse.osgi.framework.console.CommandProvider;
//
@@ -50,4 +50,4 @@
// }
// }
// }
-//}
\ No newline at end of file
+//}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/AbstractClusterContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/AbstractClusterContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/AbstractClusterContext.java
index 14d6748..a2e0472 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/AbstractClusterContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/AbstractClusterContext.java
@@ -21,7 +21,7 @@ package org.apache.stratos.autoscaler.context.cluster;
import org.apache.commons.configuration.XMLConfiguration;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.domain.xsd.MemberContext;
+import org.apache.stratos.cloud.controller.stub.domain.MemberContext;
import org.apache.stratos.common.constants.StratosConstants;
import java.io.Serializable;
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContextFactory.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContextFactory.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContextFactory.java
index fed2ad1..476f237 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContextFactory.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContextFactory.java
@@ -32,10 +32,10 @@ import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network.Ch
import org.apache.stratos.autoscaler.pojo.policy.PolicyManager;
import org.apache.stratos.autoscaler.pojo.policy.autoscale.AutoscalePolicy;
import org.apache.stratos.autoscaler.pojo.policy.deployment.DeploymentPolicy;
-import org.apache.stratos.cloud.controller.domain.xsd.Partition;
-import org.apache.stratos.cloud.controller.domain.xsd.MemberContext;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
-import org.apache.stratos.cloud.controller.stub.pojo.Property;
+import org.apache.stratos.cloud.controller.stub.domain.Partition;
+import org.apache.stratos.cloud.controller.stub.domain.MemberContext;
+import org.apache.stratos.common.Properties;
+import org.apache.stratos.common.Property;
import org.apache.stratos.common.constants.StratosConstants;
import org.apache.stratos.messaging.domain.topology.Cluster;
import org.apache.stratos.messaging.domain.topology.Member;
@@ -412,7 +412,7 @@ public class ClusterContextFactory {
Property property = new Property();
property.setName((String) e.getKey());
property.setValue((String) e.getValue());
- props.addProperties(property);
+ props.addProperty(property);
}
return props;
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/KubernetesClusterContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/KubernetesClusterContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/KubernetesClusterContext.java
index 0542086..040c4ea 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/KubernetesClusterContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/KubernetesClusterContext.java
@@ -35,7 +35,7 @@ import org.apache.stratos.autoscaler.pojo.policy.autoscale.LoadAverage;
import org.apache.stratos.autoscaler.pojo.policy.autoscale.MemoryConsumption;
import org.apache.stratos.autoscaler.pojo.policy.autoscale.RequestsInFlight;
import org.apache.stratos.autoscaler.util.ConfUtil;
-import org.apache.stratos.cloud.controller.domain.xsd.MemberContext;
+import org.apache.stratos.cloud.controller.stub.domain.MemberContext;
import org.apache.stratos.common.constants.StratosConstants;
/*
@@ -369,14 +369,14 @@ public class KubernetesClusterContext extends AbstractClusterContext {
}
/**
- * Removes the {@link org.apache.stratos.cloud.controller.domain.xsd.MemberContext} object mapping
+ * Removes the {@link org.apache.stratos.cloud.controller.stub.domain.MemberContext} object mapping
* to the specified member id from the specified MemberContext collection
*
- * @param iterator The {@link java.util.Iterator} for the collection containing {@link org.apache.stratos.cloud.controller.domain.xsd.MemberContext}
+ * @param iterator The {@link java.util.Iterator} for the collection containing {@link org.apache.stratos.cloud.controller.stub.domain.MemberContext}
* objects
- * @param memberId Member Id {@link String} for the {@link org.apache.stratos.cloud.controller.domain.xsd.MemberContext}
+ * @param memberId Member Id {@link String} for the {@link org.apache.stratos.cloud.controller.stub.domain.MemberContext}
* to be removed
- * @return {@link org.apache.stratos.cloud.controller.domain.xsd.MemberContext} object if
+ * @return {@link org.apache.stratos.cloud.controller.stub.domain.MemberContext} object if
* object found and removed, null if otherwise.
*/
private MemberContext removeMemberFrom(Iterator<MemberContext> iterator, String memberId) {
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/ClusterLevelPartitionContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/ClusterLevelPartitionContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/ClusterLevelPartitionContext.java
index 38dab09..69e3a41 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/ClusterLevelPartitionContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/ClusterLevelPartitionContext.java
@@ -23,8 +23,8 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.stratos.autoscaler.context.member.MemberStatsContext;
import org.apache.stratos.autoscaler.util.ConfUtil;
-import org.apache.stratos.cloud.controller.domain.xsd.Partition;
-import org.apache.stratos.cloud.controller.domain.xsd.MemberContext;
+import org.apache.stratos.cloud.controller.stub.domain.Partition;
+import org.apache.stratos.cloud.controller.stub.domain.MemberContext;
import java.io.Serializable;
import java.util.*;
@@ -300,14 +300,14 @@ public class ClusterLevelPartitionContext extends PartitionContext implements Se
}
/**
- * Removes the {@link org.apache.stratos.cloud.controller.domain.xsd.MemberContext} object mapping
+ * Removes the {@link org.apache.stratos.cloud.controller.stub.domain.MemberContext} object mapping
* to the specified member id from the specified MemberContext collection
*
- * @param iterator The {@link java.util.Iterator} for the collection containing {@link org.apache.stratos.cloud.controller.domain.xsd.MemberContext}
+ * @param iterator The {@link java.util.Iterator} for the collection containing {@link org.apache.stratos.cloud.controller.stub.domain.MemberContext}
* objects
- * @param memberId Member Id {@link String} for the {@link org.apache.stratos.cloud.controller.domain.xsd.MemberContext}
+ * @param memberId Member Id {@link String} for the {@link org.apache.stratos.cloud.controller.stub.domain.MemberContext}
* to be removed
- * @return {@link org.apache.stratos.cloud.controller.domain.xsd.MemberContext} object if
+ * @return {@link org.apache.stratos.cloud.controller.stub.domain.MemberContext} object if
* object found and removed, null if otherwise.
*/
private MemberContext removeMemberFrom(Iterator<MemberContext> iterator, String memberId) {
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/GroupLevelPartitionContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/GroupLevelPartitionContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/GroupLevelPartitionContext.java
index 9475130..ee02bd3 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/GroupLevelPartitionContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/GroupLevelPartitionContext.java
@@ -23,7 +23,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.stratos.autoscaler.context.member.MemberStatsContext;
import org.apache.stratos.autoscaler.util.ConfUtil;
-import org.apache.stratos.cloud.controller.domain.xsd.Partition;
+import org.apache.stratos.cloud.controller.stub.domain.Partition;
import org.apache.stratos.common.constants.StratosConstants;
import org.apache.stratos.messaging.domain.instance.Instance;
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/PartitionContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/PartitionContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/PartitionContext.java
index e94da59..ebc92a1 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/PartitionContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/PartitionContext.java
@@ -20,7 +20,7 @@ package org.apache.stratos.autoscaler.context.partition;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.domain.xsd.Partition;
+import org.apache.stratos.cloud.controller.stub.domain.Partition;
import java.io.Serializable;
import java.util.*;
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/network/ClusterLevelNetworkPartitionContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/network/ClusterLevelNetworkPartitionContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/network/ClusterLevelNetworkPartitionContext.java
index f1def4d..3ed80c7 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/network/ClusterLevelNetworkPartitionContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/network/ClusterLevelNetworkPartitionContext.java
@@ -25,7 +25,7 @@ import org.apache.stratos.autoscaler.context.partition.ClusterLevelPartitionCont
import org.apache.stratos.autoscaler.pojo.policy.autoscale.LoadAverage;
import org.apache.stratos.autoscaler.pojo.policy.autoscale.MemoryConsumption;
import org.apache.stratos.autoscaler.pojo.policy.autoscale.RequestsInFlight;
-import org.apache.stratos.cloud.controller.domain.xsd.Partition;
+import org.apache.stratos.cloud.controller.stub.domain.Partition;
import java.io.Serializable;
import java.util.Arrays;
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/network/GroupLevelNetworkPartitionContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/network/GroupLevelNetworkPartitionContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/network/GroupLevelNetworkPartitionContext.java
index d62185e..a9f7f56 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/network/GroupLevelNetworkPartitionContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/network/GroupLevelNetworkPartitionContext.java
@@ -21,7 +21,7 @@ package org.apache.stratos.autoscaler.context.partition.network;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.stratos.autoscaler.context.partition.GroupLevelPartitionContext;
-import org.apache.stratos.cloud.controller.domain.xsd.Partition;
+import org.apache.stratos.cloud.controller.stub.domain.Partition;
import java.io.Serializable;
import java.util.Arrays;
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/interfaces/AutoScalerServiceInterface.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/interfaces/AutoScalerServiceInterface.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/interfaces/AutoScalerServiceInterface.java
index 141b90f..dce5b73 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/interfaces/AutoScalerServiceInterface.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/interfaces/AutoScalerServiceInterface.java
@@ -29,7 +29,7 @@ import org.apache.stratos.autoscaler.exception.application.ApplicationDefinition
import org.apache.stratos.autoscaler.exception.policy.InvalidPolicyException;
import org.apache.stratos.autoscaler.pojo.ServiceGroup;
import org.apache.stratos.autoscaler.pojo.policy.autoscale.AutoscalePolicy;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
+import org.apache.stratos.common.Properties;
import org.apache.stratos.common.kubernetes.KubernetesGroup;
import org.apache.stratos.common.kubernetes.KubernetesHost;
import org.apache.stratos.common.kubernetes.KubernetesMaster;
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/internal/AutoscalerServerComponent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/internal/AutoscalerServerComponent.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/internal/AutoscalerServerComponent.java
index 4d6f3d0..7db577c 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/internal/AutoscalerServerComponent.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/internal/AutoscalerServerComponent.java
@@ -34,7 +34,7 @@ import org.apache.stratos.autoscaler.registry.RegistryManager;
import org.apache.stratos.autoscaler.status.processor.cluster.ClusterStatusProcessorChain;
import org.apache.stratos.autoscaler.status.processor.group.GroupStatusProcessorChain;
import org.apache.stratos.autoscaler.util.ServiceReferenceHolder;
-import org.apache.stratos.cloud.controller.domain.xsd.Partition;
+import org.apache.stratos.cloud.controller.stub.domain.Partition;
import org.apache.stratos.common.kubernetes.KubernetesGroup;
import org.osgi.service.component.ComponentContext;
import org.wso2.carbon.ntask.core.service.TaskService;
@@ -181,4 +181,4 @@ public class AutoscalerServerComponent {
}
ServiceReferenceHolder.getInstance().setTaskService(null);
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/AbstractClusterMonitor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/AbstractClusterMonitor.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/AbstractClusterMonitor.java
index 77b405e..646e327 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/AbstractClusterMonitor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/AbstractClusterMonitor.java
@@ -29,7 +29,7 @@ import org.apache.stratos.autoscaler.monitor.events.builder.MonitorStatusEventBu
import org.apache.stratos.autoscaler.monitor.events.MonitorScalingEvent;
import org.apache.stratos.autoscaler.monitor.events.MonitorStatusEvent;
import org.apache.stratos.autoscaler.rule.AutoscalerRuleEvaluator;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
+import org.apache.stratos.common.Properties;
import org.apache.stratos.messaging.domain.applications.Application;
import org.apache.stratos.messaging.domain.applications.ApplicationStatus;
import org.apache.stratos.messaging.domain.applications.Group;
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/ClusterMonitorFactory.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/ClusterMonitorFactory.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/ClusterMonitorFactory.java
index cdefd89..5b49cd9 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/ClusterMonitorFactory.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/ClusterMonitorFactory.java
@@ -23,7 +23,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.stratos.autoscaler.exception.partition.PartitionValidationException;
import org.apache.stratos.autoscaler.exception.policy.PolicyValidationException;
-import org.apache.stratos.cloud.controller.domain.xsd.MemberContext;
+import org.apache.stratos.cloud.controller.stub.domain.MemberContext;
import org.apache.stratos.common.constants.StratosConstants;
import org.apache.stratos.messaging.domain.topology.Cluster;
import org.apache.stratos.messaging.domain.topology.ClusterStatus;
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/KubernetesServiceClusterMonitor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/KubernetesServiceClusterMonitor.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/KubernetesServiceClusterMonitor.java
index bf659be..1564deb 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/KubernetesServiceClusterMonitor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/KubernetesServiceClusterMonitor.java
@@ -34,8 +34,8 @@ import org.apache.stratos.autoscaler.pojo.policy.autoscale.AutoscalePolicy;
import org.apache.stratos.autoscaler.rule.AutoscalerRuleEvaluator;
import org.apache.stratos.autoscaler.util.AutoScalerConstants;
import org.apache.stratos.autoscaler.util.ConfUtil;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
-import org.apache.stratos.cloud.controller.stub.pojo.Property;
+import org.apache.stratos.common.Properties;
+import org.apache.stratos.common.Property;
import org.apache.stratos.common.constants.StratosConstants;
import org.apache.stratos.messaging.domain.topology.ClusterStatus;
@@ -235,4 +235,4 @@ public final class KubernetesServiceClusterMonitor extends KubernetesClusterMoni
public void onParentScalingEvent(MonitorScalingEvent scalingEvent) {
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/VMClusterMonitor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/VMClusterMonitor.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/VMClusterMonitor.java
index 3ede090..00e1879 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/VMClusterMonitor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/VMClusterMonitor.java
@@ -33,8 +33,8 @@ import org.apache.stratos.autoscaler.exception.InvalidArgumentException;
import org.apache.stratos.autoscaler.exception.cartridge.TerminationException;
import org.apache.stratos.autoscaler.rule.AutoscalerRuleEvaluator;
import org.apache.stratos.autoscaler.status.processor.StatusChecker;
-import org.apache.stratos.cloud.controller.domain.xsd.MemberContext;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
+import org.apache.stratos.cloud.controller.stub.domain.MemberContext;
+import org.apache.stratos.common.Properties;
import org.apache.stratos.messaging.domain.topology.Cluster;
import org.apache.stratos.messaging.domain.topology.Member;
import org.apache.stratos.messaging.domain.topology.Service;
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/VMServiceClusterMonitor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/VMServiceClusterMonitor.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/VMServiceClusterMonitor.java
index 5f23269..adbf233 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/VMServiceClusterMonitor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/VMServiceClusterMonitor.java
@@ -32,9 +32,9 @@ import org.apache.stratos.autoscaler.monitor.events.MonitorStatusEvent;
import org.apache.stratos.autoscaler.rule.AutoscalerRuleEvaluator;
import org.apache.stratos.autoscaler.util.AutoScalerConstants;
import org.apache.stratos.autoscaler.util.ConfUtil;
-import org.apache.stratos.cloud.controller.domain.xsd.MemberContext;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
-import org.apache.stratos.cloud.controller.stub.pojo.Property;
+import org.apache.stratos.cloud.controller.stub.domain.MemberContext;
+import org.apache.stratos.common.Properties;
+import org.apache.stratos.common.Property;
import org.apache.stratos.common.constants.StratosConstants;
import org.apache.stratos.messaging.domain.applications.ApplicationStatus;
import org.apache.stratos.messaging.domain.applications.GroupStatus;
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/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 56794a6..31a1f74 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
@@ -32,7 +32,7 @@ import org.apache.stratos.autoscaler.exception.policy.InvalidPolicyException;
//import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.PartitionManager;
import org.apache.stratos.autoscaler.pojo.policy.autoscale.AutoscalePolicy;
import org.apache.stratos.autoscaler.registry.RegistryManager;
-import org.apache.stratos.cloud.controller.domain.xsd.Partition;
+import org.apache.stratos.cloud.controller.stub.domain.Partition;
/**
* Manager class for the purpose of managing Autoscale/Deployment policy definitions.
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/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 66268c2..1605b74 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
@@ -21,7 +21,7 @@ package org.apache.stratos.autoscaler.pojo.policy.deployment;
import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network.ApplicationLevelNetworkPartition;
import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network.ChildLevelNetworkPartition;
-import org.apache.stratos.cloud.controller.domain.xsd.Partition;
+import org.apache.stratos.cloud.controller.stub.domain.Partition;
import java.io.Serializable;
import java.util.ArrayList;
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/PartitionManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/PartitionManager.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/PartitionManager.java
index 60ac097..29db039 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/PartitionManager.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/PartitionManager.java
@@ -29,7 +29,7 @@
//import org.apache.stratos.autoscaler.exception.partition.InvalidPartitionException;
//import org.apache.stratos.autoscaler.exception.partition.PartitionValidationException;
//import org.apache.stratos.autoscaler.registry.RegistryManager;
-//import org.apache.stratos.cloud.controller.domain.xsd.Partition;
+//import org.apache.stratos.cloud.controller.stub.domain.Partition;
//
//import java.util.ArrayList;
//import java.util.HashMap;
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ApplicationLevelNetworkPartition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ApplicationLevelNetworkPartition.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ApplicationLevelNetworkPartition.java
index da4f727..af44624 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ApplicationLevelNetworkPartition.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ApplicationLevelNetworkPartition.java
@@ -19,11 +19,11 @@
package org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network;
-import org.apache.stratos.cloud.controller.domain.xsd.Partition;
-
import java.io.Serializable;
import java.util.Arrays;
+import org.apache.stratos.cloud.controller.stub.domain.Partition;
+
/**
* The model class for NetworkPartition definition.
*/
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ChildLevelNetworkPartition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ChildLevelNetworkPartition.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ChildLevelNetworkPartition.java
index cd40a39..0319fe9 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ChildLevelNetworkPartition.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ChildLevelNetworkPartition.java
@@ -19,7 +19,7 @@
package org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network;
-import org.apache.stratos.cloud.controller.domain.xsd.Partition;
+import org.apache.stratos.cloud.controller.stub.domain.Partition;
import java.io.Serializable;
import java.util.Arrays;
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/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 dfaee67..b8bbd22 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
@@ -33,7 +33,7 @@ import org.apache.stratos.autoscaler.util.AutoScalerConstants;
import org.apache.stratos.autoscaler.util.Deserializer;
import org.apache.stratos.autoscaler.util.Serializer;
import org.apache.stratos.autoscaler.util.ServiceReferenceHolder;
-import org.apache.stratos.cloud.controller.domain.xsd.Partition;
+import org.apache.stratos.cloud.controller.stub.domain.Partition;
import org.apache.stratos.common.kubernetes.KubernetesGroup;
import org.apache.stratos.messaging.domain.applications.Application;
import org.wso2.carbon.context.PrivilegedCarbonContext;
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java
index a6c0c1c..50c59b8 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java
@@ -37,7 +37,7 @@ import org.apache.stratos.autoscaler.monitor.cluster.AbstractClusterMonitor;
import org.apache.stratos.autoscaler.monitor.cluster.VMClusterMonitor;
import org.apache.stratos.autoscaler.monitor.cluster.VMServiceClusterMonitor;
//import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.PartitionManager;
-import org.apache.stratos.cloud.controller.domain.xsd.MemberContext;
+import org.apache.stratos.cloud.controller.stub.domain.MemberContext;
import org.apache.stratos.common.constants.StratosConstants;
import org.apache.stratos.messaging.domain.topology.Cluster;
import org.apache.stratos.messaging.domain.topology.Member;
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/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 18b1dc4..455e795 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
@@ -28,8 +28,8 @@ import org.apache.axiom.om.OMElement;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.stratos.autoscaler.registry.RegistryManager;
-import org.apache.stratos.cloud.controller.stub.pojo.Properties;
-import org.apache.stratos.cloud.controller.stub.pojo.Property;
+import org.apache.stratos.common.Properties;
+import org.apache.stratos.common.Property;
import org.apache.stratos.messaging.domain.applications.Application;
import org.apache.stratos.messaging.domain.applications.Applications;
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/test/java/org/apache/stratos/autoscaler/TestDelegator.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/test/java/org/apache/stratos/autoscaler/TestDelegator.java b/components/org.apache.stratos.autoscaler/src/test/java/org/apache/stratos/autoscaler/TestDelegator.java
index 1d24171..e16b420 100644
--- a/components/org.apache.stratos.autoscaler/src/test/java/org/apache/stratos/autoscaler/TestDelegator.java
+++ b/components/org.apache.stratos.autoscaler/src/test/java/org/apache/stratos/autoscaler/TestDelegator.java
@@ -22,7 +22,7 @@ package org.apache.stratos.autoscaler;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
-import org.apache.stratos.cloud.controller.domain.xsd.MemberContext;
+import org.apache.stratos.cloud.controller.stub.domain.MemberContext;
/**
* Helper class to keep the state of the consequence of a rule.
@@ -54,4 +54,4 @@ public class TestDelegator {
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/test/java/org/apache/stratos/autoscaler/TestMinimumRule.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/test/java/org/apache/stratos/autoscaler/TestMinimumRule.java b/components/org.apache.stratos.autoscaler/src/test/java/org/apache/stratos/autoscaler/TestMinimumRule.java
index af60d37..091f06b 100644
--- a/components/org.apache.stratos.autoscaler/src/test/java/org/apache/stratos/autoscaler/TestMinimumRule.java
+++ b/components/org.apache.stratos.autoscaler/src/test/java/org/apache/stratos/autoscaler/TestMinimumRule.java
@@ -24,8 +24,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.stratos.autoscaler.context.partition.ClusterLevelPartitionContext;
import org.apache.stratos.autoscaler.util.ConfUtil;
-import org.apache.stratos.cloud.controller.stub.pojo.*;
-import org.apache.stratos.cloud.controller.domain.xsd.MemberContext;
+import org.apache.stratos.cloud.controller.stub.domain.MemberContext;
import org.drools.KnowledgeBase;
import org.drools.KnowledgeBaseFactory;
import org.drools.builder.*;
@@ -100,4 +99,4 @@ public class TestMinimumRule {
public static String get() {
return "null";
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/test/java/org/apache/stratos/autoscaler/TestObsoletedMemberRule.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/test/java/org/apache/stratos/autoscaler/TestObsoletedMemberRule.java b/components/org.apache.stratos.autoscaler/src/test/java/org/apache/stratos/autoscaler/TestObsoletedMemberRule.java
index 2798e68..562753a 100644
--- a/components/org.apache.stratos.autoscaler/src/test/java/org/apache/stratos/autoscaler/TestObsoletedMemberRule.java
+++ b/components/org.apache.stratos.autoscaler/src/test/java/org/apache/stratos/autoscaler/TestObsoletedMemberRule.java
@@ -24,7 +24,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.stratos.autoscaler.context.partition.ClusterLevelPartitionContext;
import org.apache.stratos.autoscaler.util.ConfUtil;
-import org.apache.stratos.cloud.controller.domain.xsd.MemberContext;
+import org.apache.stratos.cloud.controller.stub.domain.MemberContext;
import org.drools.KnowledgeBase;
import org.drools.KnowledgeBaseFactory;
import org.drools.builder.*;
@@ -177,4 +177,4 @@ public class TestObsoletedMemberRule {
public static String get() {
return "null";
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/test/resources/autoscaler.drl
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/test/resources/autoscaler.drl b/components/org.apache.stratos.autoscaler/src/test/resources/autoscaler.drl
index 06c45e1..9dbf2c7 100644
--- a/components/org.apache.stratos.autoscaler/src/test/resources/autoscaler.drl
+++ b/components/org.apache.stratos.autoscaler/src/test/resources/autoscaler.drl
@@ -38,8 +38,8 @@ import org.apache.stratos.autoscaler.rule.AutoscalerRuleEvaluator;
import org.apache.commons.logging.Log;
import org.apache.stratos.autoscaler.pojo.policy.deployment.DeploymentPolicy;
import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network.NetworkPartition;
-import org.apache.stratos.cloud.controller.domain.xsd.Partition;
-import org.apache.stratos.cloud.controller.domain.xsd.MemberContext;
+import org.apache.stratos.cloud.controller.stub.domain.Partition;
+import org.apache.stratos.cloud.controller.stub.domain.MemberContext;
global org.apache.stratos.autoscaler.pojo.policy.PolicyManager $manager;
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/test/resources/test-minimum-autoscaler-rule.drl
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/test/resources/test-minimum-autoscaler-rule.drl b/components/org.apache.stratos.autoscaler/src/test/resources/test-minimum-autoscaler-rule.drl
index 3597b38..0f38cac 100644
--- a/components/org.apache.stratos.autoscaler/src/test/resources/test-minimum-autoscaler-rule.drl
+++ b/components/org.apache.stratos.autoscaler/src/test/resources/test-minimum-autoscaler-rule.drl
@@ -37,8 +37,8 @@ import org.apache.stratos.autoscaler.rule.AutoscalerRuleEvaluator;
import org.apache.commons.logging.Log;
import org.apache.stratos.autoscaler.pojo.policy.deployment.DeploymentPolicy;
import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network.NetworkPartition;
-import org.apache.stratos.cloud.controller.domain.xsd.Partition;
-import org.apache.stratos.cloud.controller.domain.xsd.MemberContext;
+import org.apache.stratos.cloud.controller.stub.domain.Partition;
+import org.apache.stratos.cloud.controller.stub.domain.MemberContext;
global org.apache.stratos.autoscaler.pojo.policy.PolicyManager $manager;
http://git-wip-us.apache.org/repos/asf/stratos/blob/de799354/components/org.apache.stratos.autoscaler/src/test/resources/test-terminating-obsoleted-members-rule.drl
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/test/resources/test-terminating-obsoleted-members-rule.drl b/components/org.apache.stratos.autoscaler/src/test/resources/test-terminating-obsoleted-members-rule.drl
index 6756565..41d3639 100644
--- a/components/org.apache.stratos.autoscaler/src/test/resources/test-terminating-obsoleted-members-rule.drl
+++ b/components/org.apache.stratos.autoscaler/src/test/resources/test-terminating-obsoleted-members-rule.drl
@@ -37,8 +37,8 @@ import org.apache.stratos.autoscaler.rule.AutoscalerRuleEvaluator;
import org.apache.commons.logging.Log;
import org.apache.stratos.autoscaler.pojo.policy.deployment.DeploymentPolicy;
import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network.NetworkPartition;
-import org.apache.stratos.cloud.controller.domain.xsd.Partition;
-import org.apache.stratos.cloud.controller.domain.xsd.MemberContext;
+import org.apache.stratos.cloud.controller.stub.domain.Partition;
+import org.apache.stratos.cloud.controller.stub.domain.MemberContext;
global org.apache.stratos.autoscaler.pojo.policy.PolicyManager $manager;