You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by hu...@apache.org on 2014/01/23 09:07:02 UTC

[1/3] git commit: updated refs/heads/master to c2da280

Updated Branches:
  refs/heads/master 62ef61794 -> c2da28034


Fix a bug found by findbug, compare Long objects with equals instead of ==


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d19157fb
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d19157fb
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d19157fb

Branch: refs/heads/master
Commit: d19157fbb169eec029d1efee9ddd06e6b6aad9a4
Parents: 62ef617
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Thu Jan 23 07:59:43 2014 +0100
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Thu Jan 23 09:06:32 2014 +0100

----------------------------------------------------------------------
 utils/src/com/cloud/utils/net/NetUtils.java | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d19157fb/utils/src/com/cloud/utils/net/NetUtils.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/net/NetUtils.java b/utils/src/com/cloud/utils/net/NetUtils.java
index 8e994f1..f64b230 100755
--- a/utils/src/com/cloud/utils/net/NetUtils.java
+++ b/utils/src/com/cloud/utils/net/NetUtils.java
@@ -41,13 +41,14 @@ import org.apache.commons.lang.SystemUtils;
 import org.apache.commons.net.util.SubnetUtils;
 import org.apache.log4j.Logger;
 
-import com.cloud.utils.IteratorUtil;
-import com.cloud.utils.Pair;
-import com.cloud.utils.script.Script;
 import com.googlecode.ipv6.IPv6Address;
 import com.googlecode.ipv6.IPv6AddressRange;
 import com.googlecode.ipv6.IPv6Network;
 
+import com.cloud.utils.IteratorUtil;
+import com.cloud.utils.Pair;
+import com.cloud.utils.script.Script;
+
 public class NetUtils {
     protected final static Logger s_logger = Logger.getLogger(NetUtils.class);
     public final static String HTTP_PORT = "80";
@@ -832,7 +833,7 @@ public class NetUtils {
             if (cidrALong[1] < cidrBLong[1]) {
                 //this implies cidrA is super set of cidrB
                 return supersetOrSubset.isSuperset;
-            } else if (cidrALong[1] == cidrBLong[1]) {
+            } else if (cidrALong[1].equals(cidrBLong[1])) {
                 //this implies both the cidrs are equal
                 return supersetOrSubset.sameSubnet;
             }
@@ -1209,7 +1210,7 @@ public class NetUtils {
 
     public static boolean isValidIpv6(String ip) {
         try {
-            IPv6Address address = IPv6Address.fromString(ip);
+            IPv6Address.fromString(ip);
         } catch (IllegalArgumentException ex) {
             return false;
         }
@@ -1218,7 +1219,7 @@ public class NetUtils {
 
     public static boolean isValidIp6Cidr(String ip6Cidr) {
         try {
-            IPv6Network network = IPv6Network.fromString(ip6Cidr);
+            IPv6Network.fromString(ip6Cidr);
         } catch (IllegalArgumentException ex) {
             return false;
         }


[3/3] git commit: updated refs/heads/master to c2da280

Posted by hu...@apache.org.
Add a zipped version of the hyperv image that we can store in the archives on the jenkins server


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c2da2803
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c2da2803
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c2da2803

Branch: refs/heads/master
Commit: c2da2803476d55e814ec0d849482bd07c4f9f8f1
Parents: 9d735dd
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Thu Jan 23 09:06:00 2014 +0100
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Thu Jan 23 09:06:33 2014 +0100

----------------------------------------------------------------------
 .../storage/motion/XenServerStorageMotionStrategy.java       | 8 ++++----
 tools/appliance/build.sh                                     | 6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c2da2803/plugins/hypervisors/xen/src/org/apache/cloudstack/storage/motion/XenServerStorageMotionStrategy.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/org/apache/cloudstack/storage/motion/XenServerStorageMotionStrategy.java b/plugins/hypervisors/xen/src/org/apache/cloudstack/storage/motion/XenServerStorageMotionStrategy.java
index f2bf472..e8217f7 100644
--- a/plugins/hypervisors/xen/src/org/apache/cloudstack/storage/motion/XenServerStorageMotionStrategy.java
+++ b/plugins/hypervisors/xen/src/org/apache/cloudstack/storage/motion/XenServerStorageMotionStrategy.java
@@ -106,7 +106,7 @@ public class XenServerStorageMotionStrategy implements DataMotionStrategy {
         try {
             VMInstanceVO instance = instanceDao.findById(vmTo.getId());
             if (instance != null) {
-                if (srcHost.getClusterId() == destHost.getClusterId()) {
+                if (srcHost.getClusterId().equals(destHost.getClusterId())) {
                     answer = migrateVmWithVolumesWithinCluster(instance, vmTo, srcHost, destHost, volumeMap);
                 } else {
                     answer = migrateVmWithVolumesAcrossCluster(instance, vmTo, srcHost, destHost, volumeMap);
@@ -126,7 +126,7 @@ public class XenServerStorageMotionStrategy implements DataMotionStrategy {
     }
 
     private Answer migrateVmWithVolumesAcrossCluster(VMInstanceVO vm, VirtualMachineTO to, Host srcHost, Host destHost, Map<VolumeInfo, DataStore> volumeToPool)
-        throws AgentUnavailableException {
+            throws AgentUnavailableException {
 
         // Initiate migration of a virtual machine with it's volumes.
         try {
@@ -153,7 +153,7 @@ public class XenServerStorageMotionStrategy implements DataMotionStrategy {
             }
 
             MigrateWithStorageSendCommand sendCmd =
-                new MigrateWithStorageSendCommand(to, receiveAnswer.getVolumeToSr(), receiveAnswer.getNicToNetwork(), receiveAnswer.getToken());
+                    new MigrateWithStorageSendCommand(to, receiveAnswer.getVolumeToSr(), receiveAnswer.getNicToNetwork(), receiveAnswer.getToken());
             MigrateWithStorageSendAnswer sendAnswer = (MigrateWithStorageSendAnswer)agentMgr.send(srcHost.getId(), sendCmd);
             if (sendAnswer == null) {
                 s_logger.error("Migration with storage of vm " + vm + " to host " + destHost + " failed.");
@@ -184,7 +184,7 @@ public class XenServerStorageMotionStrategy implements DataMotionStrategy {
     }
 
     private Answer migrateVmWithVolumesWithinCluster(VMInstanceVO vm, VirtualMachineTO to, Host srcHost, Host destHost, Map<VolumeInfo, DataStore> volumeToPool)
-        throws AgentUnavailableException {
+            throws AgentUnavailableException {
 
         // Initiate migration of a virtual machine with it's volumes.
         try {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c2da2803/tools/appliance/build.sh
----------------------------------------------------------------------
diff --git a/tools/appliance/build.sh b/tools/appliance/build.sh
index ddcaec9..2e8bc88 100644
--- a/tools/appliance/build.sh
+++ b/tools/appliance/build.sh
@@ -101,9 +101,9 @@ echo "$appliance exported for VMWare: dist/$appliance-$build_date-$branch-vmware
 
 # Export for HyperV
 vboxmanage clonehd $hdd_uuid $appliance-$build_date-$branch-hyperv.vhd --format VHD
-# HyperV doesn't support import a zipped image from S3
-#bzip2 $appliance-$build_date-$branch-hyperv.vhd
+# HyperV doesn't support import a zipped image from S3, but we create a zipped version to save space on the jenkins box
+zip $appliance-$build_date-$branch-hyperv.vhd.zip $appliance-$build_date-$branch-hyperv.vhd
 echo "$appliance exported for HyperV: dist/$appliance-$build_date-$branch-hyperv.vhd"
 
-mv *-hyperv.vhd *.bz2 *.ova dist/
+mv *-hyperv.vhd *-hyperv.vhd.zip *.bz2 *.ova dist/
 


[2/3] git commit: updated refs/heads/master to c2da280

Posted by hu...@apache.org.
Add a profile that enables findbugs checks at build time. Use -Penablefindbugs to enable findbugs.

Add a bit of reporting configuration so the mvn site target includes javadoc and a findbugs report


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9d735dd2
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9d735dd2
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9d735dd2

Branch: refs/heads/master
Commit: 9d735dd28828cd87489e5e10d0db6d68ed0287f9
Parents: d19157f
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Thu Jan 23 09:03:22 2014 +0100
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Thu Jan 23 09:06:33 2014 +0100

----------------------------------------------------------------------
 pom.xml | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 75 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9d735dd2/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 8fd1f54..8d84261 100644
--- a/pom.xml
+++ b/pom.xml
@@ -469,6 +469,19 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>findbugs-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>cloudstack-findbugs</id>
+            <phase>none</phase>
+            <goals>
+              <goal>check</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
     <pluginManagement>
       <plugins>
@@ -577,6 +590,15 @@
             </execution>
           </executions>
         </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-site-plugin</artifactId>
+          <version>3.3</version>
+          <configuration>
+            <port>9000</port>
+            <tempWebappDirectory>${basedir}/target/site/tempdir</tempWebappDirectory>
+          </configuration>
+        </plugin>
         <!--This plugin's configuration is used to store Eclipse m2e settings only. 
           It has no influence on the Maven build itself. -->
         <plugin>
@@ -840,9 +862,44 @@
             </formats>
           </configuration>
         </plugin>
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>findbugs-maven-plugin</artifactId>
+          <version>2.5.3</version>
+          <configuration>
+            <effort>Max</effort>
+            <threshold>High</threshold>
+            <xmlOutput>true</xmlOutput>
+            <failOnError>false</failOnError>
+          </configuration>
+          <executions>
+            <execution>
+              <id>cloudstack-findbugs</id>
+              <goals>
+                <goal>check</goal>
+              </goals>
+            </execution>
+          </executions>
+        </plugin>
       </plugins>
     </pluginManagement>
   </build>
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>findbugs-maven-plugin</artifactId>
+        <configuration>
+          <threshold>Low</threshold><!-- High|Normal|Low|Exp|Ignore -->
+          <effort>Default</effort><!-- Min|Default|Max -->
+        </configuration>
+      </plugin>
+      <plugin>
+         <groupId>org.apache.maven.plugins</groupId>
+         <artifactId>maven-javadoc-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </reporting>
   <profiles>
     <profile>
       <id>awsapi</id>
@@ -916,5 +973,23 @@
         </plugins>
       </build>
     </profile>  
+    <profile>
+      <id>enablefindbugs</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>findbugs-maven-plugin</artifactId>
+              <executions>
+                <execution>
+                  <id>cloudstack-findbugs</id>
+                  <phase>process-classes</phase>
+                  <inherited>true</inherited>
+                </execution>
+              </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>  
   </profiles>
 </project>