cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [24/32] git commit: updated refs/heads/ui-vpc-redesign to f3cc57f
Date Fri, 24 May 2013 18:10:03 GMT
fixing disassociateIpAddress API to call 'releasePortableIpAddress'
network service method for portable ip address. Also fix ensures events
coresponding to the portabl ip are generated correctly.


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

Branch: refs/heads/ui-vpc-redesign
Commit: b000781bfc25b8df1b7b1c8c76bf57484a4c4f03
Parents: 8b9d6d8
Author: Murali Reddy <muralimmreddy@gmail.com>
Authored: Fri May 24 18:51:24 2013 +0530
Committer: Murali Reddy <muralimmreddy@gmail.com>
Committed: Fri May 24 18:54:04 2013 +0530

----------------------------------------------------------------------
 api/src/com/cloud/event/EventTypes.java            |    2 +-
 .../command/user/address/AssociateIPAddrCmd.java   |    6 +++++-
 .../user/address/DisassociateIPAddrCmd.java        |    8 ++++++--
 3 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b000781b/api/src/com/cloud/event/EventTypes.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/event/EventTypes.java b/api/src/com/cloud/event/EventTypes.java
index fcac8e8..da96294 100755
--- a/api/src/com/cloud/event/EventTypes.java
+++ b/api/src/com/cloud/event/EventTypes.java
@@ -103,7 +103,7 @@ public class EventTypes {
     public static final String EVENT_NET_IP_ASSIGN = "NET.IPASSIGN";
     public static final String EVENT_NET_IP_RELEASE = "NET.IPRELEASE";
     public static final String EVENT_PORTABLE_IP_ASSIGN = "PORTABLE.IPASSIGN";
-    public static final String EVENT_PORTABLE_IP_RELEASE = "PORTABLEIPRELEASE";
+    public static final String EVENT_PORTABLE_IP_RELEASE = "PORTABLE.IPRELEASE";
     public static final String EVENT_NET_RULE_ADD = "NET.RULEADD";
     public static final String EVENT_NET_RULE_DELETE = "NET.RULEDELETE";
     public static final String EVENT_NET_RULE_MODIFY = "NET.RULEMODIFY";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b000781b/api/src/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java
b/api/src/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java
index f37e820..b99ca63 100644
--- a/api/src/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java
@@ -191,7 +191,11 @@ public class AssociateIPAddrCmd extends BaseAsyncCreateCmd {
 
     @Override
     public String getEventType() {
-        return EventTypes.EVENT_NET_IP_ASSIGN;
+        if (isPortable()) {
+            return EventTypes.EVENT_PORTABLE_IP_ASSIGN;
+        } else {
+            return EventTypes.EVENT_NET_IP_ASSIGN;
+        }
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b000781b/api/src/org/apache/cloudstack/api/command/user/address/DisassociateIPAddrCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/address/DisassociateIPAddrCmd.java
b/api/src/org/apache/cloudstack/api/command/user/address/DisassociateIPAddrCmd.java
index 41691ea..3d431f4 100644
--- a/api/src/org/apache/cloudstack/api/command/user/address/DisassociateIPAddrCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/address/DisassociateIPAddrCmd.java
@@ -78,7 +78,7 @@ public class DisassociateIPAddrCmd extends BaseAsyncCmd {
         if (!isPortable(id)) {
             result = _networkService.releaseIpAddress(getIpAddressId());
         } else {
-            result = _networkService.releaseIpAddress(getIpAddressId());
+            result = _networkService.releasePortableIpAddress(getIpAddressId());
         }
         if (result) {
             SuccessResponse response = new SuccessResponse(getCommandName());
@@ -90,7 +90,11 @@ public class DisassociateIPAddrCmd extends BaseAsyncCmd {
 
     @Override
     public String getEventType() {
-        return EventTypes.EVENT_NET_IP_RELEASE;
+        if (!isPortable(id)) {
+            return EventTypes.EVENT_NET_IP_RELEASE;
+        } else {
+            return EventTypes.EVENT_PORTABLE_IP_RELEASE;
+        }
     }
 
     @Override


Mime
View raw message