You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by re...@apache.org on 2013/11/11 21:06:28 UTC
git commit: adding the wsdl changes to stub and auto scaler
Updated Branches:
refs/heads/master 18b8ce2f7 -> 69edd281d
adding the wsdl changes to stub and auto scaler
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/69edd281
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/69edd281
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/69edd281
Branch: refs/heads/master
Commit: 69edd281dc105554e420dc506086ed7713fbdd74
Parents: 18b8ce2
Author: rekathiru <rt...@gmail.com>
Authored: Mon Nov 11 13:06:13 2013 -0700
Committer: rekathiru <rt...@gmail.com>
Committed: Mon Nov 11 13:06:13 2013 -0700
----------------------------------------------------------------------
.../cloud/controller/CloudControllerClient.java | 31 ++---
.../main/resources/CloudControllerService.wsdl | 113 ++++++-------------
2 files changed, 53 insertions(+), 91 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/69edd281/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/cloud/controller/CloudControllerClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/cloud/controller/CloudControllerClient.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/cloud/controller/CloudControllerClient.java
index 169e29c..a6de3df 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/cloud/controller/CloudControllerClient.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/cloud/controller/CloudControllerClient.java
@@ -28,7 +28,6 @@ import org.apache.stratos.autoscaler.exception.TerminationException;
import org.apache.stratos.autoscaler.policy.model.Partition;
import org.apache.stratos.autoscaler.util.ConfUtil;
import org.apache.stratos.cloud.controller.stub.CloudControllerServiceStub;
-import org.apache.stratos.cloud.controller.util.xsd.LocationScope;
import java.rmi.RemoteException;
@@ -57,13 +56,15 @@ public class CloudControllerClient {
//call CC spawnInstances method
log.info("Calling CC for spawning instances in cluster " + clusterId);
- LocationScope locationScope = new LocationScope();
- locationScope.setCloud(partition.getIaas());
- locationScope.setRegion(partition.getZone());
+ org.apache.stratos.messaging.domain.topology.xsd.Partition partitionTopology = new
+ org.apache.stratos.messaging.domain.topology.xsd.Partition();
+ partitionTopology.setId(partition.getId());
+ /*locationScope.setCloud(partition.getIaas());
+ locationScope.setRegion(partition.getZone());*/
try {
for(int i =0; i< memberCountToBeIncreased; i++){
- stub.startInstance(clusterId, locationScope);
+ stub.startInstance(clusterId, partitionTopology);
}
} catch (RemoteException e) {
log.error("Error occurred in cloud controller side while spawning instance");
@@ -73,12 +74,14 @@ public class CloudControllerClient {
public void spawnAnInstance(Partition partition, String clusterId) throws SpawningException {
log.info("Calling CC for spawning an instance in cluster " + clusterId);
- LocationScope locationScope = new LocationScope();
- locationScope.setCloud(partition.getIaas());
- locationScope.setRegion(partition.getZone());
+ org.apache.stratos.messaging.domain.topology.xsd.Partition partitionTopology = new
+ org.apache.stratos.messaging.domain.topology.xsd.Partition();
+ partitionTopology.setId(partition.getId());
+ /*locationScope.setCloud(partition.getIaas());
+ locationScope.setRegion(partition.getZone());*/
try {
- stub.startInstance(clusterId, locationScope);
+ stub.startInstance(clusterId, partitionTopology);
} catch (RemoteException e) {
log.error("Error occurred in cloud controller side while spawning instance");
@@ -90,12 +93,14 @@ public class CloudControllerClient {
//call CC terminate method
log.info("Calling CC for terminating an instance in cluster " + clusterId);
- LocationScope locationScope = new LocationScope();
- locationScope.setCloud(partition.getIaas());
- locationScope.setRegion(partition.getZone());
+ org.apache.stratos.messaging.domain.topology.xsd.Partition partitionTopology = new
+ org.apache.stratos.messaging.domain.topology.xsd.Partition();
+ partitionTopology.setId(partition.getId());
+ /*locationScope.setCloud(partition.getIaas());
+ locationScope.setRegion(partition.getZone());*/
try {
- stub.terminateInstance(clusterId, locationScope);
+ stub.terminateInstance(clusterId, partitionTopology);
} catch (RemoteException e) {
log.error("Error occurred in cloud controller side while terminating instance");
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/69edd281/service-stubs/org.apache.stratos.lb.cartridge.autoscaler.service.stub/src/main/resources/CloudControllerService.wsdl
----------------------------------------------------------------------
diff --git a/service-stubs/org.apache.stratos.lb.cartridge.autoscaler.service.stub/src/main/resources/CloudControllerService.wsdl b/service-stubs/org.apache.stratos.lb.cartridge.autoscaler.service.stub/src/main/resources/CloudControllerService.wsdl
index 3147092..0d86152 100644
--- a/service-stubs/org.apache.stratos.lb.cartridge.autoscaler.service.stub/src/main/resources/CloudControllerService.wsdl
+++ b/service-stubs/org.apache.stratos.lb.cartridge.autoscaler.service.stub/src/main/resources/CloudControllerService.wsdl
@@ -1,6 +1,22 @@
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://impl.controller.cloud.stratos.apache.org" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax25="http://util.controller.cloud.stratos.apache.org/xsd" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ax23="http://exception.controller.cloud.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" 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.controller.cloud.stratos.apache.org">
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax27="http://util.controller.cloud.stratos.apache.org/xsd" xmlns:ns="http://impl.controller.cloud.stratos.apache.org" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax25="http://topology.domain.messaging.stratos.apache.org/xsd" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ax23="http://exception.controller.cloud.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" 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.controller.cloud.stratos.apache.org">
<wsdl:documentation>CloudControllerService</wsdl:documentation>
<wsdl:types>
+ <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://topology.domain.messaging.stratos.apache.org/xsd">
+ <xs:complexType name="Partition">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="scope" nillable="true" type="ax25:Scope"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="Scope">
+ <xs:complexContent>
+ <xs:extension base="xs:Enum">
+ <xs:sequence/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:schema>
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://exception.controller.cloud.stratos.apache.org/xsd">
<xs:complexType name="UnregisteredServiceException">
<xs:sequence/>
@@ -9,8 +25,9 @@
<xs:sequence/>
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ax26="http://util.controller.cloud.stratos.apache.org/xsd" xmlns:ax24="http://exception.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://impl.controller.cloud.stratos.apache.org">
+ <xs:schema xmlns:ax28="http://util.controller.cloud.stratos.apache.org/xsd" xmlns:ax26="http://topology.domain.messaging.stratos.apache.org/xsd" xmlns:ax24="http://exception.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://impl.controller.cloud.stratos.apache.org">
<xs:import namespace="http://exception.controller.cloud.stratos.apache.org/xsd"/>
+ <xs:import namespace="http://topology.domain.messaging.stratos.apache.org/xsd"/>
<xs:import namespace="http://util.controller.cloud.stratos.apache.org/xsd"/>
<xs:element name="CloudControllerServiceUnregisteredServiceException">
<xs:complexType>
@@ -47,26 +64,12 @@
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="terminateLastlySpawnedInstance">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="terminateLastlySpawnedInstanceResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
<xs:element name="terminateInstances">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="noOfInstances" type="xs:int"/>
<xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="locationScope" nillable="true" type="ax25:LocationScope"/>
+ <xs:element minOccurs="0" name="partition" nillable="true" type="ax25:Partition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -81,7 +84,7 @@
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="locationScope" nillable="true" type="ax25:LocationScope"/>
+ <xs:element minOccurs="0" name="partition" nillable="true" type="ax25:Partition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -110,7 +113,7 @@
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="locationScope" nillable="true" type="ax25:LocationScope"/>
+ <xs:element minOccurs="0" name="partition" nillable="true" type="ax25:Partition"/>
<xs:element minOccurs="0" name="noOfInstancesToBeSpawned" type="xs:int"/>
</xs:sequence>
</xs:complexType>
@@ -126,7 +129,7 @@
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="locationScope" nillable="true" type="ax25:LocationScope"/>
+ <xs:element minOccurs="0" name="partition" nillable="true" type="ax25:Partition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -151,7 +154,7 @@
<xs:element minOccurs="0" name="tenantRange" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="cartridgeType" 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:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"/>
<xs:element minOccurs="0" name="payload" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="autoScalerPolicyName" nillable="true" type="xs:string"/>
</xs:sequence>
@@ -200,24 +203,15 @@
<xs:element name="getCartridgeInfoResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax25:CartridgeInfo"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax27:CartridgeInfo"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://util.controller.cloud.stratos.apache.org/xsd">
- <xs:complexType name="LocationScope">
- <xs:sequence>
- <xs:element minOccurs="0" name="cloud" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="host" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="network" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="region" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="zone" nillable="true" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
<xs:complexType name="Properties">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax25:Property"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax27:Property"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Property">
@@ -228,15 +222,15 @@
</xs:complexType>
<xs:complexType name="CartridgeInfo">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="appTypes" nillable="true" type="ax25:AppType"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="appTypes" nillable="true" type="ax27:AppType"/>
<xs:element minOccurs="0" name="baseDir" 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="multiTenant" type="xs:boolean"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="portMappings" nillable="true" type="ax25:PortMapping"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax25:Property"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="portMappings" nillable="true" type="ax27:PortMapping"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax27:Property"/>
<xs:element minOccurs="0" name="provider" 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"/>
@@ -329,12 +323,6 @@
<wsdl:message name="terminateInstancesResponse">
<wsdl:part name="parameters" element="ns:terminateInstancesResponse"/>
</wsdl:message>
- <wsdl:message name="terminateLastlySpawnedInstanceRequest">
- <wsdl:part name="parameters" element="ns:terminateLastlySpawnedInstance"/>
- </wsdl:message>
- <wsdl:message name="terminateLastlySpawnedInstanceResponse">
- <wsdl:part name="parameters" element="ns:terminateLastlySpawnedInstanceResponse"/>
- </wsdl:message>
<wsdl:portType name="CloudControllerServicePortType">
<wsdl:operation name="getPendingInstanceCount">
<wsdl:input message="ns:getPendingInstanceCountRequest" wsaw:Action="urn:getPendingInstanceCount"/>
@@ -383,10 +371,6 @@
<wsdl:input message="ns:terminateInstancesRequest" wsaw:Action="urn:terminateInstances"/>
<wsdl:output message="ns:terminateInstancesResponse" wsaw:Action="urn:terminateInstancesResponse"/>
</wsdl:operation>
- <wsdl:operation name="terminateLastlySpawnedInstance">
- <wsdl:input message="ns:terminateLastlySpawnedInstanceRequest" wsaw:Action="urn:terminateLastlySpawnedInstance"/>
- <wsdl:output message="ns:terminateLastlySpawnedInstanceResponse" wsaw:Action="urn:terminateLastlySpawnedInstanceResponse"/>
- </wsdl:operation>
</wsdl:portType>
<wsdl:binding name="CloudControllerServiceSoap11Binding" type="ns:CloudControllerServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
@@ -498,15 +482,6 @@
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="terminateLastlySpawnedInstance">
- <soap:operation soapAction="urn:terminateLastlySpawnedInstance" style="document"/>
- <wsdl:input>
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
</wsdl:binding>
<wsdl:binding name="CloudControllerServiceSoap12Binding" type="ns:CloudControllerServicePortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
@@ -618,15 +593,6 @@
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="terminateLastlySpawnedInstance">
- <soap12:operation soapAction="urn:terminateLastlySpawnedInstance" style="document"/>
- <wsdl:input>
- <soap12:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap12:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
</wsdl:binding>
<wsdl:binding name="CloudControllerServiceHttpBinding" type="ns:CloudControllerServicePortType">
<http:binding verb="POST"/>
@@ -729,34 +695,25 @@
<mime:content type="text/xml" part="parameters"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="terminateLastlySpawnedInstance">
- <http:operation location="terminateLastlySpawnedInstance"/>
- <wsdl:input>
- <mime:content type="text/xml" part="parameters"/>
- </wsdl:input>
- <wsdl:output>
- <mime:content type="text/xml" part="parameters"/>
- </wsdl:output>
- </wsdl:operation>
</wsdl:binding>
<wsdl:service name="CloudControllerService">
<wsdl:port name="CloudControllerServiceHttpSoap11Endpoint" binding="ns:CloudControllerServiceSoap11Binding">
- <soap:address location="http://10.100.1.142:9764/services/CloudControllerService.CloudControllerServiceHttpSoap11Endpoint/"/>
+ <soap:address location="http://10.129.24.65:9763/services/CloudControllerService.CloudControllerServiceHttpSoap11Endpoint/"/>
</wsdl:port>
<wsdl:port name="CloudControllerServiceHttpsSoap11Endpoint" binding="ns:CloudControllerServiceSoap11Binding">
- <soap:address location="https://10.100.1.142:9444/services/CloudControllerService.CloudControllerServiceHttpsSoap11Endpoint/"/>
+ <soap:address location="https://10.129.24.65:9443/services/CloudControllerService.CloudControllerServiceHttpsSoap11Endpoint/"/>
</wsdl:port>
<wsdl:port name="CloudControllerServiceHttpSoap12Endpoint" binding="ns:CloudControllerServiceSoap12Binding">
- <soap12:address location="http://10.100.1.142:9764/services/CloudControllerService.CloudControllerServiceHttpSoap12Endpoint/"/>
+ <soap12:address location="http://10.129.24.65:9763/services/CloudControllerService.CloudControllerServiceHttpSoap12Endpoint/"/>
</wsdl:port>
<wsdl:port name="CloudControllerServiceHttpsSoap12Endpoint" binding="ns:CloudControllerServiceSoap12Binding">
- <soap12:address location="https://10.100.1.142:9444/services/CloudControllerService.CloudControllerServiceHttpsSoap12Endpoint/"/>
+ <soap12:address location="https://10.129.24.65:9443/services/CloudControllerService.CloudControllerServiceHttpsSoap12Endpoint/"/>
</wsdl:port>
<wsdl:port name="CloudControllerServiceHttpEndpoint" binding="ns:CloudControllerServiceHttpBinding">
- <http:address location="http://10.100.1.142:9764/services/CloudControllerService.CloudControllerServiceHttpEndpoint/"/>
+ <http:address location="http://10.129.24.65:9763/services/CloudControllerService.CloudControllerServiceHttpEndpoint/"/>
</wsdl:port>
<wsdl:port name="CloudControllerServiceHttpsEndpoint" binding="ns:CloudControllerServiceHttpBinding">
- <http:address location="https://10.100.1.142:9444/services/CloudControllerService.CloudControllerServiceHttpsEndpoint/"/>
+ <http:address location="https://10.129.24.65:9443/services/CloudControllerService.CloudControllerServiceHttpsEndpoint/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
\ No newline at end of file