You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ud...@apache.org on 2014/05/17 20:37:45 UTC
[1/2] git commit: feature to attach volumes from a volumeID
Repository: incubator-stratos
Updated Branches:
refs/heads/master 83905b2d3 -> ab383d81b
feature to attach volumes from a volumeID
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/f19ac322
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/f19ac322
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/f19ac322
Branch: refs/heads/master
Commit: f19ac322c9e2775b0661ba22095b53c5b24f6e52
Parents: 92d8d32
Author: Udara Liyanage <ud...@wso2.com>
Authored: Sun May 18 00:06:42 2014 +0530
Committer: Udara Liyanage <ud...@wso2.com>
Committed: Sun May 18 00:06:42 2014 +0530
----------------------------------------------------------------------
.../stratos/cli/RestCommandLineService.java | 6 ++++--
.../cli/beans/cartridge/CartridgeInfoBean.java | 12 ++++++++---
.../stratos/cli/commands/SubscribeCommand.java | 17 +++++++++++++++-
.../apache/stratos/cli/utils/CliConstants.java | 3 +++
.../impl/CloudControllerServiceImpl.java | 21 +++++++++++++++-----
.../stratos/cloud/controller/pojo/Volume.java | 13 +++++++++---
.../manager/CartridgeSubscriptionManager.java | 2 +-
.../subscription/PersistenceContext.java | 11 ++++++++++
.../stratos/messaging/util/Constants.java | 1 +
.../rest/endpoint/bean/CartridgeInfoBean.java | 5 +++++
.../bean/cartridge/definition/VolumeBean.java | 2 ++
.../bean/util/converter/PojoConverter.java | 1 +
.../rest/endpoint/services/ServiceUtils.java | 4 ++++
.../main/resources/CloudControllerService.wsdl | 13 ++++++------
14 files changed, 90 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f19ac322/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
index 10c9d9e..8299d0d 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
@@ -723,7 +723,7 @@ public class RestCommandLineService {
public void subscribe(String cartridgeType, String alias, String externalRepoURL, boolean privateRepo, String username,
String password,String asPolicy,
String depPolicy, String size, boolean remoOnTermination, boolean persistanceMapping,
- boolean enableCommits)
+ boolean enableCommits, String volumeId)
throws CommandException {
DefaultHttpClient httpClient = new DefaultHttpClient();
@@ -737,6 +737,7 @@ public class RestCommandLineService {
cartridgeInfoBean.setAutoscalePolicy(null);
cartridgeInfoBean.setDeploymentPolicy(null);
cartridgeInfoBean.setSize(size);
+
cartridgeInfoBean.setRemoveOnTermination(remoOnTermination);
cartridgeInfoBean.setPersistanceRequired(persistanceMapping);
cartridgeInfoBean.setCommitsEnabled(enableCommits);
@@ -759,6 +760,7 @@ public class RestCommandLineService {
cartridgeInfoBean.setRemoveOnTermination(remoOnTermination);
cartridgeInfoBean.setPersistanceRequired(persistanceMapping);
cartridgeInfoBean.setCommitsEnabled(enableCommits);
+ cartridgeInfoBean.setVolumeId(volumeId);
jsonSubscribeString = gson.toJson(cartridgeInfoBean, CartridgeInfoBean.class);
@@ -781,7 +783,7 @@ public class RestCommandLineService {
return;
}
- String subscriptionOutputJSON= subscriptionOutput.substring(20, subscriptionOutput.length() -1);
+ String subscriptionOutputJSON = subscriptionOutput.substring(20, subscriptionOutput.length() -1);
SubscriptionInfo subcriptionInfo = gson.fromJson(subscriptionOutputJSON, SubscriptionInfo.class);
System.out.format("You have successfully subscribed to %s cartridge with alias %s.%n", cartridgeType, alias);
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f19ac322/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/cartridge/CartridgeInfoBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/cartridge/CartridgeInfoBean.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/cartridge/CartridgeInfoBean.java
index 58d6f66..9e23120 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/cartridge/CartridgeInfoBean.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/beans/cartridge/CartridgeInfoBean.java
@@ -31,7 +31,7 @@ public class CartridgeInfoBean {
private String autoscalePolicy;
private String deploymentPolicy;
private String size;
-
+ private String volumeId;
boolean privateRepo;
private boolean removeOnTermination;
private boolean persistanceRequired;
@@ -140,6 +140,12 @@ public class CartridgeInfoBean {
public void setCommitsEnabled(boolean commitsEnabled) {
this.commitsEnabled = commitsEnabled;
}
-
-
+
+ public String getVolumeId() {
+ return volumeId;
+ }
+
+ public void setVolumeId(String volumeId) {
+ this.volumeId = volumeId;
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f19ac322/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/SubscribeCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/SubscribeCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/SubscribeCommand.java
index c30749c..6a9c623 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/SubscribeCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/SubscribeCommand.java
@@ -75,6 +75,10 @@ public class SubscribeCommand implements Command<StratosCommandContext> {
size.setArgName("volume-size");
options.addOption(size);
+ Option volumeId = new Option(CliConstants.VOLUME_ID_OPTION, CliConstants.VOLUME_ID_LONG_OPTION, true, "Volume-id");
+ volumeId.setArgName("volume-id");
+ options.addOption(volumeId);
+
Option persistance = new Option(CliConstants.PERSISTANCE_VOLUME_OPTION, CliConstants.PERSISTANCE_VOLUME_LONG_OPTION,
true, "Persistance-volume");
persistance.setArgName("persistance-volume");
@@ -133,6 +137,7 @@ public class SubscribeCommand implements Command<StratosCommandContext> {
String depPolicy = null;
String repoURL = null, username = "", password = "";
String size = null;
+ String volumeID = null;
boolean removeOnTermination = false;
boolean privateRepo = false;
@@ -194,6 +199,16 @@ public class SubscribeCommand implements Command<StratosCommandContext> {
}
size = commandLine.getOptionValue(CliConstants.VOLUME_SIZE_OPTION);
}
+
+ if (commandLine.hasOption(CliConstants.VOLUME_ID_OPTION)) {
+ if (logger.isTraceEnabled()) {
+ logger.trace("Volume id option is passed");
+
+ }
+ volumeID = commandLine.getOptionValue(CliConstants.VOLUME_ID_OPTION);
+ }
+
+
if (commandLine.hasOption(CliConstants.REMOVE_ON_TERMINATION_OPTION)) {
if (logger.isTraceEnabled()) {
logger.trace("Remove on termination option is passed");
@@ -277,7 +292,7 @@ public class SubscribeCommand implements Command<StratosCommandContext> {
RestCommandLineService.getInstance().subscribe(type, alias, repoURL, privateRepo, username,
password, asPolicy, depPolicy, size, removeOnTermination,
- persistanceMapping, commitsEnabled);
+ persistanceMapping, commitsEnabled, volumeID);
return CliConstants.SUCCESSFUL_CODE;
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f19ac322/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/utils/CliConstants.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/utils/CliConstants.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/utils/CliConstants.java
index 0f6a901..2e898f4 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/utils/CliConstants.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/utils/CliConstants.java
@@ -224,6 +224,9 @@ public class CliConstants {
public static final String VOLUME_SIZE_OPTION = "v";
public static final String VOLUME_SIZE_LONG_OPTION = "volume-size";
+ public static final String VOLUME_ID_OPTION = "vi";
+ public static final String VOLUME_ID_LONG_OPTION = "volume-id";
+
public static final String PERSISTANCE_VOLUME_OPTION = "pv";
public static final String PERSISTANCE_VOLUME_LONG_OPTION = "persistance-volume";
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f19ac322/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java
index 8f9f52e..c40c8f0 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java
@@ -417,18 +417,26 @@ public class CloudControllerServiceImpl implements CloudControllerService {
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();
- String volumeId = iaas.createVolume(sizeGB, snapshotId);
- volume.setId(volumeId);
+ 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(Cartridge cartridge, Iaas iaas) {
+
+ private StringBuilder getPersistencePayload(Cartridge cartridge, Iaas iaas) {
StringBuilder persistencePayload = new StringBuilder();
if(isPersistenceMappingAvailable(cartridge)){
for(Volume volume : cartridge.getPersistence().getVolumes()){
@@ -888,12 +896,14 @@ public class CloudControllerServiceImpl implements CloudControllerService {
property = props.getProperty(Constants.SHOULD_DELETE_VOLUME);
String property_volume_zize = props.getProperty(Constants.VOLUME_SIZE);
+ String property_volume_id = props.getProperty(Constants.VOLUME_ID);
List<Volume> cluster_volume_list = new LinkedList<Volume>();
for (Volume volume : cartridge_volumes) {
int volumeSize = StringUtils.isNotEmpty(property_volume_zize) ? Integer.parseInt(property_volume_zize) : volume.getSize();
boolean shouldDeleteVolume = StringUtils.isNotEmpty(property) ? Boolean.parseBoolean(property) : volume.isRemoveOntermination();
+ String volumeID = StringUtils.isNotEmpty(property_volume_id) ? property_volume_id : volume.getVolumeId();
Volume volume_cluster = new Volume();
volume_cluster.setSize(volumeSize);
@@ -901,6 +911,7 @@ public class CloudControllerServiceImpl implements CloudControllerService {
volume_cluster.setDevice(volume.getDevice());
volume_cluster.setIaasType(volume.getIaasType());
volume_cluster.setMappingPath(volume.getMappingPath());
+ volume_cluster.setVolumeId(volumeID);
cluster_volume_list.add(volume_cluster);
}
ctxt.setVolumes(cluster_volume_list.toArray(new Volume[cluster_volume_list.size()]));
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f19ac322/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/pojo/Volume.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/pojo/Volume.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/pojo/Volume.java
index e687898..b5e3b29 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/pojo/Volume.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/pojo/Volume.java
@@ -30,6 +30,7 @@ public class Volume implements Serializable {
private String mappingPath;
private String iaasType;
private String snapshotId;
+ private String volumeId;
public String toString () {
return "Persistence Required: " + ", Size: " + getSize() + ", device: " + getDevice() +
@@ -52,9 +53,7 @@ public class Volume implements Serializable {
this.device = device;
}
- public boolean isRemoveOntermination() {
- return removeOntermination;
- }
+ public boolean isRemoveOntermination() {return removeOntermination;}
public void setRemoveOntermination(boolean removeOntermination) {
this.removeOntermination = removeOntermination;
@@ -116,4 +115,12 @@ public class Volume implements Serializable {
public void setSnapshotId(String snapshotId) {
this.snapshotId = snapshotId;
}
+
+ public String getVolumeId() {
+ return volumeId;
+ }
+
+ public void setVolumeId(String volumeId) {
+ this.volumeId = volumeId;
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f19ac322/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 5f4b7e0..01a972c 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
@@ -606,7 +606,7 @@ public class CartridgeSubscriptionManager {
Properties persistenceMappingProperties = new Properties();
persistenceMappingProperties.setProperties(new Property[]{persistenceCtxt.getPersistanceRequiredProperty(), persistenceCtxt.getSizeProperty(),
- persistenceCtxt.getDeleteOnTerminationProperty()});
+ persistenceCtxt.getDeleteOnTerminationProperty(), persistenceCtxt.getVolumeIdProperty()});
return persistenceMappingProperties;
}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f19ac322/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 e3b4c13..63a13a1 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
@@ -30,11 +30,13 @@ public class PersistenceContext {
private Property persistanceRequiredProperty;
private Property sizeProperty;
private Property deleteOnTerminationProperty;
+ private Property volumeIdProperty;
public PersistenceContext () {
persistanceRequiredProperty = new Property();
sizeProperty = new Property();
deleteOnTerminationProperty = new Property();
+ volumeIdProperty = new Property();
}
@@ -64,4 +66,13 @@ public class PersistenceContext {
this.deleteOnTerminationProperty.setName(propertyName);
this.deleteOnTerminationProperty.setValue(propertyValue);
}
+
+ public Property getVolumeIdProperty() {
+ return volumeIdProperty;
+ }
+
+ public void setVolumeIdProperty(String propertyName, String propertyValue) {
+ this.volumeIdProperty.setName(propertyName);
+ this.volumeIdProperty.setValue(propertyValue);
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f19ac322/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/util/Constants.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/util/Constants.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/util/Constants.java
index 8b3c814..d624d6c 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/util/Constants.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/util/Constants.java
@@ -60,6 +60,7 @@ public class Constants {
public static final String IS_VOLUME_REQUIRED = "volume.required";
public static final String SHOULD_DELETE_VOLUME = "volume.delete.on.unsubscription";
public static final String VOLUME_SIZE = "volume.size.gb";
+ public static final String VOLUME_ID = "volume.id";
public static final String DEVICE_NAME = "volume.device.name";
public static final String GRACEFUL_SHUTDOWN_TIMEOUT = "graceful.shutdown.timeout";
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f19ac322/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/CartridgeInfoBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/CartridgeInfoBean.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/CartridgeInfoBean.java
index 7452a58..0f971c5 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/CartridgeInfoBean.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/CartridgeInfoBean.java
@@ -38,6 +38,7 @@ public class CartridgeInfoBean {
private boolean persistanceRequired;
private String size;
+ private String volumeId;
private boolean removeOnTermination;
private String serviceGroup;
@@ -163,4 +164,8 @@ public class CartridgeInfoBean {
public void setServiceGroup(String serviceGroup) {
this.serviceGroup = serviceGroup;
}
+
+ public String getVolumeId() {return volumeId;}
+
+ public void setVolumeId(String volumeId) {this.volumeId = volumeId;}
}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f19ac322/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/cartridge/definition/VolumeBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/cartridge/definition/VolumeBean.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/cartridge/definition/VolumeBean.java
index 9a1b212..a3a985a 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/cartridge/definition/VolumeBean.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/cartridge/definition/VolumeBean.java
@@ -33,6 +33,8 @@ public class VolumeBean {
public String snapshotId;
+ public String volumeId;
+
public String toString () {
return " [ Persistence Required : " + ", Size: " + size + ", device: " +
device + " remove on termination " + removeOnTermination +
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f19ac322/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 0162203..91f7aa7 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
@@ -160,6 +160,7 @@ public class PojoConverter {
volume.setRemoveOntermination(volumeBean[i].removeOnTermination);
volume.setMappingPath(volumeBean[i].mappingPath);
volume.setSnapshotId(volumeBean[i].snapshotId);
+ volume.setVolumeId(volumeBean[i].volumeId);
volumes[i] = volume;
}
persistence.setVolumes(volumes);
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f19ac322/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java
index 9dad927..424304a 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java
@@ -78,6 +78,7 @@ public class ServiceUtils {
public static final String SHOULD_DELETE_VOLUME = "volume.delete.on.unsubscription";
public static final String VOLUME_SIZE = "volume.size.gb";
public static final String DEVICE_NAME = "volume.device.name";
+ public static final String VOLUME_ID = "volume.id";
private static Log log = LogFactory.getLog(ServiceUtils.class);
private static CartridgeSubscriptionManager cartridgeSubsciptionManager = new CartridgeSubscriptionManager();
@@ -989,6 +990,9 @@ public class ServiceUtils {
persistenceContext.setPersistanceRequiredProperty(IS_VOLUME_REQUIRED, String.valueOf(cartridgeInfoBean.isPersistanceRequired()));
persistenceContext.setSizeProperty(VOLUME_SIZE, cartridgeInfoBean.getSize());
persistenceContext.setDeleteOnTerminationProperty(SHOULD_DELETE_VOLUME, String.valueOf(cartridgeInfoBean.isRemoveOnTermination()));
+ if(cartridgeInfoBean.getVolumeId() != null) {
+ persistenceContext.setVolumeIdProperty(VOLUME_ID, String.valueOf(cartridgeInfoBean.getVolumeId()));
+ }
subscriptionData.setPersistanceCtxt(persistenceContext);
}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f19ac322/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 e3728ae..b67a8c5 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
@@ -298,6 +298,7 @@
<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:sequence>
</xs:complexType>
<xs:complexType name="CartridgeInfo">
@@ -921,22 +922,22 @@
</wsdl:binding>
<wsdl:service name="CloudControllerService">
<wsdl:port name="CloudControllerServiceHttpSoap11Endpoint" binding="ns:CloudControllerServiceSoap11Binding">
- <soap:address location="http://10.134.187.73:9763/services/CloudControllerService.CloudControllerServiceHttpSoap11Endpoint/"></soap:address>
+ <soap:address location="http://192.168.1.4:9763/services/CloudControllerService.CloudControllerServiceHttpSoap11Endpoint/"></soap:address>
</wsdl:port>
<wsdl:port name="CloudControllerServiceHttpsSoap11Endpoint" binding="ns:CloudControllerServiceSoap11Binding">
- <soap:address location="https://10.134.187.73:9443/services/CloudControllerService.CloudControllerServiceHttpsSoap11Endpoint/"></soap:address>
+ <soap:address location="https://192.168.1.4:9443/services/CloudControllerService.CloudControllerServiceHttpsSoap11Endpoint/"></soap:address>
</wsdl:port>
<wsdl:port name="CloudControllerServiceHttpSoap12Endpoint" binding="ns:CloudControllerServiceSoap12Binding">
- <soap12:address location="http://10.134.187.73:9763/services/CloudControllerService.CloudControllerServiceHttpSoap12Endpoint/"></soap12:address>
+ <soap12:address location="http://192.168.1.4:9763/services/CloudControllerService.CloudControllerServiceHttpSoap12Endpoint/"></soap12:address>
</wsdl:port>
<wsdl:port name="CloudControllerServiceHttpsSoap12Endpoint" binding="ns:CloudControllerServiceSoap12Binding">
- <soap12:address location="https://10.134.187.73:9443/services/CloudControllerService.CloudControllerServiceHttpsSoap12Endpoint/"></soap12:address>
+ <soap12:address location="https://192.168.1.4:9443/services/CloudControllerService.CloudControllerServiceHttpsSoap12Endpoint/"></soap12:address>
</wsdl:port>
<wsdl:port name="CloudControllerServiceHttpEndpoint" binding="ns:CloudControllerServiceHttpBinding">
- <http:address location="http://10.134.187.73:9763/services/CloudControllerService.CloudControllerServiceHttpEndpoint/"></http:address>
+ <http:address location="http://192.168.1.4:9763/services/CloudControllerService.CloudControllerServiceHttpEndpoint/"></http:address>
</wsdl:port>
<wsdl:port name="CloudControllerServiceHttpsEndpoint" binding="ns:CloudControllerServiceHttpBinding">
- <http:address location="https://10.134.187.73:9443/services/CloudControllerService.CloudControllerServiceHttpsEndpoint/"></http:address>
+ <http:address location="https://192.168.1.4:9443/services/CloudControllerService.CloudControllerServiceHttpsEndpoint/"></http:address>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
\ No newline at end of file
[2/2] git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/incubator-stratos
Posted by ud...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-stratos
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/ab383d81
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/ab383d81
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/ab383d81
Branch: refs/heads/master
Commit: ab383d81b09a2bef0207070aa0b91d9e6ef24d71
Parents: f19ac32 83905b2
Author: Udara Liyanage <ud...@wso2.com>
Authored: Sun May 18 00:07:21 2014 +0530
Committer: Udara Liyanage <ud...@wso2.com>
Committed: Sun May 18 00:07:21 2014 +0530
----------------------------------------------------------------------
components/org.apache.stratos.cli/pom.xml | 6 ++++
.../src/test/python/README.md | 34 +++++++++++++++++++-
.../src/test/python/test_common.py | 8 ++---
.../src/test/python/test_interactive.py | 4 ++-
.../src/test/python/test_noninteractive.py | 4 ++-
.../src/test/python/wiremock.py | 19 ++++++++---
.../TenantAwareLoadBalanceEndpoint.java | 30 +++++++++++++++--
.../publisher/TenantSynzhronizerTask.java | 5 +--
8 files changed, 95 insertions(+), 15 deletions(-)
----------------------------------------------------------------------