Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 54167D5A6 for ; Fri, 24 May 2013 18:10:00 +0000 (UTC) Received: (qmail 45747 invoked by uid 500); 24 May 2013 18:09:55 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 45476 invoked by uid 500); 24 May 2013 18:09:51 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 42862 invoked by uid 99); 24 May 2013 18:09:41 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 May 2013 18:09:41 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id EEFFCE6BC; Fri, 24 May 2013 18:09:40 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bfederle@apache.org To: commits@cloudstack.apache.org Date: Fri, 24 May 2013 18:10:03 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [24/32] git commit: updated refs/heads/ui-vpc-redesign to f3cc57f 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 Authored: Fri May 24 18:51:24 2013 +0530 Committer: Murali Reddy 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