cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kis...@apache.org
Subject git commit: updated refs/heads/4.4-forward to 2ab7bca
Date Tue, 27 May 2014 04:15:52 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.4-forward 30bd9b8fe -> 2ab7bcade


Fixed CLOUDSTACK-6756: usage id is not being returned for an ip in deleted ip range


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

Branch: refs/heads/4.4-forward
Commit: 2ab7bcade2f37cb17e071a6154fdae1d80e4ff99
Parents: 30bd9b8
Author: Rajani Karuturi <rajanikaruturi@gmail.com>
Authored: Fri May 23 15:50:06 2014 +0530
Committer: Kishan Kavala <kishan@cloud.com>
Committed: Tue May 27 09:32:05 2014 +0530

----------------------------------------------------------------------
 api/src/com/cloud/dc/Vlan.java                  |  6 ++++++
 api/src/com/cloud/network/IpAddress.java        |  5 ++++-
 .../src/com/cloud/network/addr/PublicIp.java    | 10 ++++++++++
 engine/schema/src/com/cloud/dc/VlanVO.java      | 20 ++++++++++++++++++++
 .../src/com/cloud/network/dao/IPAddressVO.java  | 17 +++++++++++++++++
 .../configuration/ConfigurationManagerImpl.java |  2 +-
 setup/db/db/schema-430to440.sql                 |  9 +++++++++
 7 files changed, 67 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2ab7bcad/api/src/com/cloud/dc/Vlan.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/dc/Vlan.java b/api/src/com/cloud/dc/Vlan.java
index ac9acda..dd12128 100644
--- a/api/src/com/cloud/dc/Vlan.java
+++ b/api/src/com/cloud/dc/Vlan.java
@@ -20,6 +20,8 @@ import org.apache.cloudstack.acl.InfrastructureEntity;
 import org.apache.cloudstack.api.Identity;
 import org.apache.cloudstack.api.InternalIdentity;
 
+import java.util.Date;
+
 public interface Vlan extends InfrastructureEntity, InternalIdentity, Identity {
     public enum VlanType {
         DirectAttached, VirtualNetwork
@@ -41,6 +43,10 @@ public interface Vlan extends InfrastructureEntity, InternalIdentity, Identity
{
 
     public Long getNetworkId();
 
+    public Date getRemoved();
+
+    public Date getCreated();
+
     public Long getPhysicalNetworkId();
 
     public String getIp6Gateway();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2ab7bcad/api/src/com/cloud/network/IpAddress.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/IpAddress.java b/api/src/com/cloud/network/IpAddress.java
index f831e27..2061771 100644
--- a/api/src/com/cloud/network/IpAddress.java
+++ b/api/src/com/cloud/network/IpAddress.java
@@ -86,7 +86,10 @@ public interface IpAddress extends ControlledEntity, Identity, InternalIdentity,
 
     Long getNetworkId();
 
-    @Override
     boolean isDisplay();
 
+    public Date getRemoved();
+
+    public Date getCreated();
+
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2ab7bcad/engine/components-api/src/com/cloud/network/addr/PublicIp.java
----------------------------------------------------------------------
diff --git a/engine/components-api/src/com/cloud/network/addr/PublicIp.java b/engine/components-api/src/com/cloud/network/addr/PublicIp.java
index a20e345..49cae4b 100644
--- a/engine/components-api/src/com/cloud/network/addr/PublicIp.java
+++ b/engine/components-api/src/com/cloud/network/addr/PublicIp.java
@@ -239,6 +239,16 @@ public class PublicIp implements PublicIpAddress {
     }
 
     @Override
+    public Date getRemoved() {
+        return _addr.getRemoved();
+    }
+
+    @Override
+    public Date getCreated() {
+        return _addr.getCreated();
+    }
+
+    @Override
     public Class<?> getEntityType() {
         return IpAddress.class;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2ab7bcad/engine/schema/src/com/cloud/dc/VlanVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/dc/VlanVO.java b/engine/schema/src/com/cloud/dc/VlanVO.java
index ff103b9..50106e0 100644
--- a/engine/schema/src/com/cloud/dc/VlanVO.java
+++ b/engine/schema/src/com/cloud/dc/VlanVO.java
@@ -16,6 +16,9 @@
 // under the License.
 package com.cloud.dc;
 
+import com.cloud.utils.db.GenericDao;
+
+import java.util.Date;
 import java.util.UUID;
 
 import javax.persistence.Column;
@@ -73,6 +76,13 @@ public class VlanVO implements Vlan {
     @Column(name = "uuid")
     String uuid;
 
+    @Column(name= GenericDao.REMOVED_COLUMN)
+    private Date removed;
+
+    @Column(name = GenericDao.CREATED_COLUMN)
+    private Date created;
+
+
     public VlanVO(VlanType vlanType, String vlanTag, String vlanGateway, String vlanNetmask,
long dataCenterId, String ipRange, Long networkId, Long physicalNetworkId,
             String ip6Gateway, String ip6Cidr, String ip6Range) {
         this.vlanType = vlanType;
@@ -151,6 +161,16 @@ public class VlanVO implements Vlan {
     }
 
     @Override
+    public Date getRemoved() {
+        return removed;
+    }
+
+    @Override
+    public Date getCreated() {
+        return created;
+    }
+
+    @Override
     public Long getPhysicalNetworkId() {
         return physicalNetworkId;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2ab7bcad/engine/schema/src/com/cloud/network/dao/IPAddressVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/dao/IPAddressVO.java b/engine/schema/src/com/cloud/network/dao/IPAddressVO.java
index de2d934..816e063 100644
--- a/engine/schema/src/com/cloud/network/dao/IPAddressVO.java
+++ b/engine/schema/src/com/cloud/network/dao/IPAddressVO.java
@@ -32,6 +32,7 @@ import javax.persistence.TemporalType;
 import javax.persistence.Transient;
 
 import com.cloud.network.IpAddress;
+import com.cloud.utils.db.GenericDao;
 import com.cloud.utils.net.Ip;
 
 /**
@@ -117,6 +118,12 @@ public class IPAddressVO implements IpAddress {
     @Column(name = "display", updatable = true, nullable = false)
     protected boolean display = true;
 
+    @Column(name= GenericDao.REMOVED_COLUMN)
+    private Date removed;
+
+    @Column(name = GenericDao.CREATED_COLUMN)
+    private Date created;
+
     protected IPAddressVO() {
         uuid = UUID.randomUUID().toString();
     }
@@ -351,4 +358,14 @@ public class IPAddressVO implements IpAddress {
     public Class<?> getEntityType() {
         return IpAddress.class;
     }
+
+    @Override
+    public Date getRemoved() {
+        return removed;
+    }
+
+    @Override
+    public Date getCreated() {
+        return created;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2ab7bcad/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
index 3f79a76..34a3d4f 100755
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -3171,7 +3171,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements
Configurati
             @Override
             public void doInTransactionWithoutResult(TransactionStatus status) {
         _publicIpAddressDao.deletePublicIPRange(vlanDbId);
-        _vlanDao.expunge(vlanDbId);
+        _vlanDao.remove(vlanDbId);
             }
         });
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2ab7bcad/setup/db/db/schema-430to440.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-430to440.sql b/setup/db/db/schema-430to440.sql
index 7fa93e7..85eb173 100644
--- a/setup/db/db/schema-430to440.sql
+++ b/setup/db/db/schema-430to440.sql
@@ -1695,3 +1695,12 @@ INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type,
hypervis
 INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version,
guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'KVM', 'default', 'FreeBSD
10', 226, now(), 0);
 INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version,
guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'KVM', 'default', 'Other
PV', 139, now(), 0);
 INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version,
guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'KVM', 'default', 'Other
PV', 140, now(), 0);
+
+alter table user_ip_address add column removed datetime DEFAULT NULL COMMENT 'date removed';
+alter table user_ip_address add column created datetime NULL COMMENT 'date created';
+
+alter table vlan add column removed datetime DEFAULT NULL COMMENT 'date removed';
+alter table vlan add column created datetime NULL COMMENT 'date created';
+
+alter table user_ip_address drop key public_ip_address;
+alter table user_ip_address add UNIQUE KEY public_ip_address (public_ip_address,source_network_id,
removed);
\ No newline at end of file


Mime
View raw message