stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lahiru Sandaruwan <lahi...@wso2.com>
Subject Re: What's the reason for adding a strange version? Fwd: [1/2] git commit: fix STRATOS-556: adding public ip associate option with VPC
Date Tue, 01 Apr 2014 03:29:39 GMT
Hi Nirmal,

This was mistake. Something happened before committing :). I have fixed it
in next commit immediately.

Thanks.


On Mon, Mar 31, 2014 at 8:26 PM, Nirmal Fernando <nirmal070125@gmail.com>wrote:

> Hi Lahiru,
>
> ---------- Forwarded message ----------
> From: <lahirus@apache.org>
> Date: Mon, Mar 31, 2014 at 10:08 PM
> Subject: [1/2] git commit: fix STRATOS-556: adding public ip associate
> option with VPC
> To: commits@stratos.incubator.apache.org
>
>
> Repository: incubator-stratos
> Updated Branches:
>   refs/heads/master d2499fbd4 -> 34e00b72e
>
>
> fix STRATOS-556: adding public ip associate option with VPC
>
>
> Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
> Commit:
> http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/36fd85f1
> Tree:
> http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/36fd85f1
> Diff:
> http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/36fd85f1
>
> Branch: refs/heads/master
> Commit: 36fd85f1caf552e1145636697e0ba8d26325251b
> Parents: de87ec6
> Author: Lahiru Sandaruwan <lahirus@apache.org>
> Authored: Mon Mar 31 09:36:31 2014 -0700
> Committer: Lahiru Sandaruwan <lahirus@apache.org>
> Committed: Mon Mar 31 09:36:31 2014 -0700
>
> ----------------------------------------------------------------------
>  .../org.apache.stratos.cloud.controller/pom.xml   |  2 +-
>  .../cloud/controller/iaases/AWSEC2Iaas.java       | 18 ++++++++++++++----
>  .../impl/CloudControllerServiceImpl.java          |  9 +++++----
>  .../controller/util/CloudControllerConstants.java |  2 +-
>  dependencies/pom.xml                              |  1 +
>  5 files changed, 22 insertions(+), 10 deletions(-)
> ----------------------------------------------------------------------
>
>
>
> http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/36fd85f1/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 582c02a..62e4da9 100644
> --- a/components/org.apache.stratos.cloud.controller/pom.xml
> +++ b/components/org.apache.stratos.cloud.controller/pom.xml
> @@ -194,7 +194,7 @@
>                 <dependency>
>                         <groupId>org.apache.jclouds.provider</groupId>
>                         <artifactId>aws-ec2</artifactId>
> -                       <version>${jclouds.version}</version>
> +                       <version>${<jclouds class="stratos
> "></jclouds>version}</version>
>
> *What does this version value means? Can you please explain? or is it a
> mistake?* *Can you please use
> <version>${jclouds.stratos.version}</version>?*
>
>
>                 </dependency>
>                 <dependency>
>                         <groupId>org.apache.jclouds.api</groupId>
>
>
> http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/36fd85f1/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/AWSEC2Iaas.java
> ----------------------------------------------------------------------
> diff --git
> a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/AWSEC2Iaas.java
> b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/AWSEC2Iaas.java
> index 0702ace..56afc82 100644
> ---
> a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/AWSEC2Iaas.java
> +++
> b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/AWSEC2Iaas.java
> @@ -144,6 +144,17 @@ public class AWSEC2Iaas extends Iaas {
>                                 .inboundPorts(new int[] {});
>
>                 // set EC2 specific options
> +
> +
> +        if
> (iaasInfo.getProperty(CloudControllerConstants.ASSOCIATE_PUBLIC_IP_ADDRESS)
> != null) {
> +              boolean associatePublicIp =
>  Boolean.parseBoolean(iaasInfo.getProperty(
> +
>  CloudControllerConstants.ASSOCIATE_PUBLIC_IP_ADDRESS));
> +            if(associatePublicIp){
> +                  template.getOptions().as(AWSEC2TemplateOptions.class)
> +                      .associatePublicIpAddress();
> +              }
> +        }
> +
>                 if
> (iaasInfo.getProperty(CloudControllerConstants.SUBNET_ID) != null) {
>
> template.getOptions().as(AWSEC2TemplateOptions.class)
>
> .subnetId(iaasInfo.getProperty(CloudControllerConstants.SUBNET_ID));
> @@ -158,9 +169,8 @@ public class AWSEC2Iaas extends Iaas {
>                 if
> (iaasInfo.getProperty(CloudControllerConstants.SECURITY_GROUPS) != null) {
>                         template.getOptions()
>                                         .as(AWSEC2TemplateOptions.class)
> -                                       .securityGroups(
> -
> iaasInfo.getProperty(CloudControllerConstants.SECURITY_GROUPS).split(
> -
> CloudControllerConstants.ENTRY_SEPARATOR));
> +
> .securityGroups(iaasInfo.getProperty(CloudControllerConstants.SECURITY_GROUPS).split(
> +                            CloudControllerConstants.ENTRY_SEPARATOR));
>
>                 }
>
> @@ -396,7 +406,7 @@ public class AWSEC2Iaas extends Iaas {
>
>          Set<AvailabilityZoneInfo> availabilityZones =
>
>  zoneRegionApi.describeAvailabilityZonesInRegion(region,
> -
>                              new DescribeAvailabilityZonesOptions[0]);
> +                                                              new
> DescribeAvailabilityZonesOptions[0]);
>          for (AvailabilityZoneInfo zoneInfo : availabilityZones) {
>              String configuredZone = zoneInfo.getZone();
>              if (zone.equalsIgnoreCase(configuredZone)) {
>
>
> http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/36fd85f1/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 adff085..625485e 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
> @@ -18,6 +18,7 @@
>   */
>  package org.apache.stratos.cloud.controller.impl;
>
> +import com.google.common.net.InetAddresses;
>  import org.apache.commons.logging.Log;
>  import org.apache.commons.logging.LogFactory;
>  import org.apache.stratos.cloud.controller.concurrent.ThreadExecutor;
> @@ -48,8 +49,6 @@ import java.util.*;
>  import java.util.Properties;
>  import java.util.concurrent.ConcurrentHashMap;
>
> -import com.google.common.net.InetAddresses;
> -
>  /**
>   * Cloud Controller Service is responsible for starting up new server
> instances,
>   * terminating already started instances, providing pending instance
> count etc.
> @@ -838,7 +837,8 @@ public class CloudControllerServiceImpl implements
> CloudControllerService {
>
>          ClusterContext ctxt = buildClusterContext(cartridge, clusterId,
>                                 payload, hostName, props, isLb);
> -
> +
> +
>                 dataHolder.addClusterContext(ctxt);
>             TopologyBuilder.handleClusterCreated(registrant, isLb);
>
> @@ -850,7 +850,8 @@ public class CloudControllerServiceImpl implements
> CloudControllerService {
>         private ClusterContext buildClusterContext(Cartridge cartridge,
>                         String clusterId, String payload, String hostName,
>                         Properties props, boolean isLb) {
> -
> +
> +
>                 // initialize ClusterContext
>                 ClusterContext ctxt = new ClusterContext(clusterId,
> cartridge.getType(), payload,
>                                 hostName, isLb);
>
>
> http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/36fd85f1/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerConstants.java
> ----------------------------------------------------------------------
> diff --git
> a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerConstants.java
> b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerConstants.java
> index 0418078..c7c77a2 100644
> ---
> a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerConstants.java
> +++
> b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerConstants.java
> @@ -250,7 +250,7 @@ public final class CloudControllerConstants {
>      public static final String TAGS = "tags";
>      public static final String AUTO_ASSIGN_IP = "autoAssignIp";
>      public static final String INSTANCE_TYPE = "instanceType";
> -
> +    public static final String ASSOCIATE_PUBLIC_IP_ADDRESS =
> "associatePublicIpAddress";
>      public static final String LB_CLUSTER_ID_COL = "lbclusterId";
>      public static final String NETWORK_INTERFACES = "networkInterfaces";
>      public static final String NETWORK_FIXED_IP = "fixedIp";
>
>
> http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/36fd85f1/dependencies/pom.xml
> ----------------------------------------------------------------------
> diff --git a/dependencies/pom.xml b/dependencies/pom.xml
> index 09b5fc8..3d37b55 100644
> --- a/dependencies/pom.xml
> +++ b/dependencies/pom.xml
> @@ -37,6 +37,7 @@
>      <modules>
>          <module>jclouds/apis/vcloud/1.7.1-stratos</module>
>          <module>jclouds/apis/openstack-nova/1.7.1-stratos</module>
> +        <module>jclouds/provider/aws-ec2/1.7.1-stratos</module>
>      </modules>
>  </project>
>
>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>



-- 
--
Lahiru Sandaruwan
Software Engineer,
Platform Technologies,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com cell: (+94) 773 325 954
blog: http://lahiruwrites.blogspot.com/
twitter: http://twitter.com/lahirus
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Mime
View raw message