cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [3/4] git commit: updated refs/heads/master to cb5ab37
Date Wed, 17 Jul 2013 23:22:26 GMT
Fixed a bunch of asserts


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

Branch: refs/heads/master
Commit: ee4d067c12768b4bb52097d92ce5d33a474b295c
Parents: 541f9d7
Author: ahuang <alex.huang@citrix.com>
Authored: Wed Jul 17 16:20:53 2013 -0700
Committer: ahuang <alex.huang@citrix.com>
Committed: Wed Jul 17 16:20:53 2013 -0700

----------------------------------------------------------------------
 .../datacenter/entity/api/db/EngineClusterVO.java     |  8 ++++----
 .../datacenter/entity/api/db/EngineDataCenterVO.java  |  6 +++---
 .../datacenter/entity/api/db/EngineHostPodVO.java     |  6 +++---
 .../engine/datacenter/entity/api/db/EngineHostVO.java | 12 ++++++------
 .../entity/api/db/dao/EngineHostDaoImpl.java          |  9 +++++----
 engine/schema/src/com/cloud/storage/UploadVO.java     | 14 +++++++-------
 .../cloudstack/network/dao/SspCredentialVO.java       |  6 +++---
 7 files changed, 31 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ee4d067c/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineClusterVO.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineClusterVO.java
b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineClusterVO.java
index 0034419..21db144 100644
--- a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineClusterVO.java
+++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineClusterVO.java
@@ -100,7 +100,7 @@ public class EngineClusterVO implements EngineCluster, Identity {
     @Enumerated(value=EnumType.STRING)
     @StateMachine(state=State.class, event=Event.class)
     @Column(name="engine_state", updatable=true, nullable=false, length=32)
-    protected State engineState = null;
+    protected State state = null;
 
 
     public EngineClusterVO() {
@@ -108,7 +108,7 @@ public class EngineClusterVO implements EngineCluster, Identity {
         allocationState = Grouping.AllocationState.Enabled;
 
         this.uuid = UUID.randomUUID().toString();
-        this.engineState = State.Disabled;
+        this.state = State.Disabled;
     }
 
     public EngineClusterVO(long dataCenterId, long podId, String name) {
@@ -119,7 +119,7 @@ public class EngineClusterVO implements EngineCluster, Identity {
         this.allocationState = Grouping.AllocationState.Enabled;
         this.managedState = ManagedState.Managed;
         this.uuid = UUID.randomUUID().toString();
-        this.engineState = State.Disabled;
+        this.state = State.Disabled;
     }
 
     @Override
@@ -238,6 +238,6 @@ public class EngineClusterVO implements EngineCluster, Identity {
     }
 
     public State getState() {
-        return engineState;
+        return state;
     }    
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ee4d067c/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineDataCenterVO.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineDataCenterVO.java
b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineDataCenterVO.java
index cdf08cc..4ac0662 100644
--- a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineDataCenterVO.java
+++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineDataCenterVO.java
@@ -158,7 +158,7 @@ public class EngineDataCenterVO implements EngineDataCenter, Identity
{
     @Enumerated(value=EnumType.STRING)
     @StateMachine(state=State.class, event=Event.class)
     @Column(name="engine_state", updatable=true, nullable=false, length=32)
-    protected State engineState = null;
+    protected State state = null;
 
 
     @Override
@@ -246,7 +246,7 @@ public class EngineDataCenterVO implements EngineDataCenter, Identity
{
         this.zoneToken = zoneToken;
         this.domain = domainSuffix;
         this.uuid = UUID.randomUUID().toString();
-        this.engineState = State.Disabled;
+        this.state = State.Disabled;
     }
 
     @Override
@@ -481,7 +481,7 @@ public class EngineDataCenterVO implements EngineDataCenter, Identity
{
     }
 
     public State getState() {
-        return engineState;
+        return state;
     }
 
 	@Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ee4d067c/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineHostPodVO.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineHostPodVO.java
b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineHostPodVO.java
index 65b9db5..9fcc349 100644
--- a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineHostPodVO.java
+++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineHostPodVO.java
@@ -92,7 +92,7 @@ public class EngineHostPodVO implements EnginePod, Identity {
     @Enumerated(value=EnumType.STRING)
     @StateMachine(state=State.class, event=Event.class)
     @Column(name="engine_state", updatable=true, nullable=false, length=32)
-    protected State engineState = null;
+    protected State state = null;
 
     public EngineHostPodVO(String name, long dcId, String gateway, String cidrAddress, int
cidrSize, String description) {
         this.name = name;
@@ -104,7 +104,7 @@ public class EngineHostPodVO implements EnginePod, Identity {
         this.allocationState = Grouping.AllocationState.Enabled;
         this.externalDhcp = false;
         this.uuid = UUID.randomUUID().toString();
-        this.engineState = State.Disabled;
+        this.state = State.Disabled;
     }
 
     /*
@@ -240,6 +240,6 @@ public class EngineHostPodVO implements EnginePod, Identity {
     }
 
     public State getState() {
-        return engineState;
+        return state;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ee4d067c/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineHostVO.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineHostVO.java
b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineHostVO.java
index 4b4a560..249c2db 100644
--- a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineHostVO.java
+++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineHostVO.java
@@ -383,7 +383,7 @@ public class EngineHostVO implements EngineHost, Identity {
     @Enumerated(value=EnumType.STRING)
     @StateMachine(state=State.class, event=Event.class)
     @Column(name="engine_state", updatable=true, nullable=false, length=32)
-    protected State engineState = null;
+    protected State orchestrationState = null;
 
 
     public EngineHostVO(String guid) {
@@ -393,12 +393,12 @@ public class EngineHostVO implements EngineHost, Identity {
         this.dom0MinMemory = 0;
         this.resourceState = ResourceState.Creating;
         this.uuid = UUID.randomUUID().toString();
-        this.engineState = State.Disabled;
+        this.orchestrationState = State.Disabled;
     }
 
     protected EngineHostVO() {
         this.uuid = UUID.randomUUID().toString();
-        this.engineState = State.Disabled;
+        this.orchestrationState = State.Disabled;
     }
 
     public EngineHostVO(long id,
@@ -433,7 +433,7 @@ public class EngineHostVO implements EngineHost, Identity {
         this.totalSize = totalSize;
         this.fsType = fsType;
         this.uuid = UUID.randomUUID().toString();
-        this.engineState = State.Disabled;
+        this.orchestrationState = State.Disabled;
     }
 
     public EngineHostVO(long id,
@@ -492,7 +492,7 @@ public class EngineHostVO implements EngineHost, Identity {
         this.dom0MinMemory = dom0MinMemory;
         this.storageUrl = url;
         this.uuid = UUID.randomUUID().toString();
-        this.engineState = State.Disabled;
+        this.orchestrationState = State.Disabled;
     }
 
     public void setPodId(Long podId) {
@@ -773,6 +773,6 @@ public class EngineHostVO implements EngineHost, Identity {
     }
 
     public State getOrchestrationState() {
-        return engineState;
+        return orchestrationState;
     }	
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ee4d067c/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostDaoImpl.java
b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostDaoImpl.java
index 3c34023..5ba65cc 100644
--- a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostDaoImpl.java
+++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostDaoImpl.java
@@ -29,11 +29,12 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 import javax.persistence.TableGenerator;
 
+import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
+
 import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity;
 import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State;
 import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostVO;
-import org.apache.log4j.Logger;
-import org.springframework.stereotype.Component;
 
 import com.cloud.host.Host;
 import com.cloud.host.Host.Type;
@@ -311,7 +312,7 @@ public class EngineHostDaoImpl extends GenericDaoBase<EngineHostVO,
Long> implem
 
         StateChangeSearch = createSearchBuilder();
         StateChangeSearch.and("id", StateChangeSearch.entity().getId(), SearchCriteria.Op.EQ);
-        StateChangeSearch.and("state", StateChangeSearch.entity().getState(), SearchCriteria.Op.EQ);
+        StateChangeSearch.and("state", StateChangeSearch.entity().getStatus(), SearchCriteria.Op.EQ);
         StateChangeSearch.done();
     }
 
@@ -336,7 +337,7 @@ public class EngineHostDaoImpl extends GenericDaoBase<EngineHostVO,
Long> implem
     @Override @DB
     public List<EngineHostVO> findAndUpdateDirectAgentToLoad(long lastPingSecondsAfter,
Long limit, long managementServerId) {
         Transaction txn = Transaction.currentTxn();
-        txn.start();       
+        txn.start();
         SearchCriteria<EngineHostVO> sc = UnmanagedDirectConnectSearch.create();
         sc.setParameters("lastPinged", lastPingSecondsAfter);
         //sc.setParameters("resourceStates", ResourceState.ErrorInMaintenance, ResourceState.Maintenance,
ResourceState.PrepareForMaintenance, ResourceState.Disabled);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ee4d067c/engine/schema/src/com/cloud/storage/UploadVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/UploadVO.java b/engine/schema/src/com/cloud/storage/UploadVO.java
index 63fadfa..37597e0 100755
--- a/engine/schema/src/com/cloud/storage/UploadVO.java
+++ b/engine/schema/src/com/cloud/storage/UploadVO.java
@@ -44,7 +44,7 @@ public class UploadVO implements Upload {
     private String uuid;
 
     @Column(name = "host_id")
-    private long storeId;
+    private long dataStoreId;
 
     @Column(name = "type_id")
     private long typeId;
@@ -85,11 +85,11 @@ public class UploadVO implements Upload {
 
     @Override
     public long getDataStoreId() {
-        return storeId;
+        return dataStoreId;
     }
 
     public void setDataStoreId(long hostId) {
-        this.storeId = hostId;
+        this.dataStoreId = hostId;
     }
 
     @Override
@@ -118,7 +118,7 @@ public class UploadVO implements Upload {
 
     public UploadVO(long hostId, long templateId) {
         super();
-        this.storeId = hostId;
+        this.dataStoreId = hostId;
         this.typeId = templateId;
         this.uuid = UUID.randomUUID().toString();
     }
@@ -126,7 +126,7 @@ public class UploadVO implements Upload {
     public UploadVO(long hostId, long typeId, Date lastUpdated, Status uploadState, Type
type, String uploadUrl,
             Mode mode) {
         super();
-        this.storeId = hostId;
+        this.dataStoreId = hostId;
         this.typeId = typeId;
         this.lastUpdated = lastUpdated;
         this.uploadState = uploadState;
@@ -139,7 +139,7 @@ public class UploadVO implements Upload {
     public UploadVO(long hostId, long typeId, Date lastUpdated, Status uploadState, int uploadPercent,
Type type,
             Mode mode) {
         super();
-        this.storeId = hostId;
+        this.dataStoreId = hostId;
         this.typeId = typeId;
         this.lastUpdated = lastUpdated;
         this.uploadState = uploadState;
@@ -179,7 +179,7 @@ public class UploadVO implements Upload {
     public boolean equals(Object obj) {
         if (obj instanceof UploadVO) {
             UploadVO other = (UploadVO) obj;
-            return (this.typeId == other.getTypeId() && this.storeId == other.getDataStoreId()
&& this.type == other
+            return (this.typeId == other.getTypeId() && this.dataStoreId == other.getDataStoreId()
&& this.type == other
                     .getType());
         }
         return false;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ee4d067c/plugins/network-elements/stratosphere-ssp/src/org/apache/cloudstack/network/dao/SspCredentialVO.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/stratosphere-ssp/src/org/apache/cloudstack/network/dao/SspCredentialVO.java
b/plugins/network-elements/stratosphere-ssp/src/org/apache/cloudstack/network/dao/SspCredentialVO.java
index 9c6cf14..1780296 100644
--- a/plugins/network-elements/stratosphere-ssp/src/org/apache/cloudstack/network/dao/SspCredentialVO.java
+++ b/plugins/network-elements/stratosphere-ssp/src/org/apache/cloudstack/network/dao/SspCredentialVO.java
@@ -32,7 +32,7 @@ public class SspCredentialVO {
     private long id;
 
     @Column(name="data_center_id")
-    private long dataCenterId; // Actually, this is zoneId
+    private long zoneId; // Actually, this is zoneId
 
     // XXX: We might want to restrict access to this by cloudstack privileges.
     @Column(name="username")
@@ -42,11 +42,11 @@ public class SspCredentialVO {
     private String password;
 
     public long getZoneId() {
-        return dataCenterId;
+        return zoneId;
     }
 
     public void setZoneId(long zoneId) {
-        this.dataCenterId = zoneId;
+        this.zoneId = zoneId;
     }
 
     public String getUsername() {


Mime
View raw message