cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alena1...@apache.org
Subject git commit: updated refs/heads/master to 24725f8
Date Thu, 24 Oct 2013 22:54:26 GMT
Updated Branches:
  refs/heads/master 3734af140 -> 24725f8e2


ResourceDetails:

1) Added support for Zone resource details
2) Renamed DcDetailsDao to DataCenterDetailsDao to follow the CS name convention for DataCenter related classes


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

Branch: refs/heads/master
Commit: 24725f8e21fd2151047ec4024f273646359c2b69
Parents: 3734af1
Author: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Authored: Thu Oct 24 14:25:37 2013 -0700
Committer: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Committed: Thu Oct 24 15:54:49 2013 -0700

----------------------------------------------------------------------
 .../org/apache/cloudstack/api/ApiConstants.java |   2 +-
 .../cloudstack/api/response/ZoneResponse.java   |   9 ++
 .../spring-engine-schema-core-daos-context.xml  |   2 +-
 .../src/com/cloud/dc/DataCenterDetailVO.java    |  79 +++++++++++
 engine/schema/src/com/cloud/dc/DcDetailVO.java  |  79 -----------
 .../src/com/cloud/dc/dao/DataCenterDaoImpl.java |   2 +-
 .../com/cloud/dc/dao/DataCenterDetailsDao.java  |  37 ++++++
 .../cloud/dc/dao/DataCenterDetailsDaoImpl.java  | 133 +++++++++++++++++++
 .../src/com/cloud/dc/dao/DcDetailsDao.java      |  37 ------
 .../src/com/cloud/dc/dao/DcDetailsDaoImpl.java  | 133 -------------------
 .../cloud/network/dao/NetworkDetailsDao.java    |   2 +-
 .../network/dao/NetworkDetailsDaoImpl.java      |   2 +-
 .../service/dao/ServiceOfferingDetailsDao.java  |   1 +
 .../dao/ServiceOfferingDetailsDaoImpl.java      |  13 ++
 .../storage/test/ChildTestConfiguration.java    |   4 +-
 server/src/com/cloud/api/ApiDBUtils.java        |  14 +-
 .../com/cloud/api/query/QueryManagerImpl.java   |   4 +-
 .../api/query/dao/DataCenterJoinDaoImpl.java    |   2 +
 .../configuration/ConfigurationManagerImpl.java |  10 +-
 .../hypervisor/CloudZonesStartupProcessor.java  |   8 +-
 .../metadata/ResourceMetaDataManagerImpl.java   |  17 ++-
 .../SecurityGroupManagerTestConfiguration.java  |   4 +-
 .../com/cloud/vpc/VpcTestConfiguration.java     |   4 +-
 .../networkoffering/ChildTestConfiguration.java |   4 +-
 24 files changed, 320 insertions(+), 282 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/24725f8e/api/src/org/apache/cloudstack/api/ApiConstants.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/ApiConstants.java b/api/src/org/apache/cloudstack/api/ApiConstants.java
index 61eeb95..e10c37b 100755
--- a/api/src/org/apache/cloudstack/api/ApiConstants.java
+++ b/api/src/org/apache/cloudstack/api/ApiConstants.java
@@ -521,7 +521,7 @@ public class ApiConstants {
     public static final String ROUTING = "isrouting";
     public static final String MAX_CONNECTIONS = "maxconnections";
     public static final String SERVICE_STATE = "servicestate";
-    public static final String RESOURCE_DETAIL = "resourcedetail";
+    public static final String RESOURCE_DETAILS = "resourcedetails";
     public static final String EXPUNGE = "expunge";
 
     public enum HostDetails {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/24725f8e/api/src/org/apache/cloudstack/api/response/ZoneResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/ZoneResponse.java b/api/src/org/apache/cloudstack/api/response/ZoneResponse.java
index 85f9ecf..2f93e91 100644
--- a/api/src/org/apache/cloudstack/api/response/ZoneResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/ZoneResponse.java
@@ -18,6 +18,7 @@ package org.apache.cloudstack.api.response;
 
 import java.util.LinkedHashSet;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 
 import org.apache.cloudstack.api.ApiConstants;
@@ -105,6 +106,10 @@ public class ZoneResponse extends BaseResponse {
             responseObject = ResourceTagResponse.class, since="4.3")
     private Set<ResourceTagResponse> tags;
     
+    @SerializedName(ApiConstants.RESOURCE_DETAILS)
+    @Param(description = "Meta data associated with the zone (key/value pairs)", since = "4.3.0")
+    private Map<String, String> resourceDetails;
+    
     
     public ZoneResponse(){
         tags = new LinkedHashSet<ResourceTagResponse>();
@@ -213,4 +218,8 @@ public class ZoneResponse extends BaseResponse {
     public void addTag(ResourceTagResponse tag){
         this.tags.add(tag);
     }
+    
+    public void setResourceDetails(Map<String, String> details) {
+        this.resourceDetails = details;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/24725f8e/engine/schema/resources/META-INF/cloudstack/core/spring-engine-schema-core-daos-context.xml
----------------------------------------------------------------------
diff --git a/engine/schema/resources/META-INF/cloudstack/core/spring-engine-schema-core-daos-context.xml b/engine/schema/resources/META-INF/cloudstack/core/spring-engine-schema-core-daos-context.xml
index f4bbb23..a70cd00 100644
--- a/engine/schema/resources/META-INF/cloudstack/core/spring-engine-schema-core-daos-context.xml
+++ b/engine/schema/resources/META-INF/cloudstack/core/spring-engine-schema-core-daos-context.xml
@@ -138,7 +138,7 @@
   <bean id="dataCenterJoinDaoImpl" class="com.cloud.api.query.dao.DataCenterJoinDaoImpl" />
   <bean id="dataCenterLinkLocalIpAddressDaoImpl" class="com.cloud.dc.dao.DataCenterLinkLocalIpAddressDaoImpl" />
   <bean id="dataCenterVnetDaoImpl" class="com.cloud.dc.dao.DataCenterVnetDaoImpl" />
-  <bean id="dcDetailsDaoImpl" class="com.cloud.dc.dao.DcDetailsDaoImpl" />
+  <bean id="dataCenterDetailsDaoImpl" class="com.cloud.dc.dao.DataCenterDetailsDaoImpl" />
   <bean id="engineDcDetailsDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.DcDetailsDaoImpl" />
   <bean id="diskOfferingJoinDaoImpl" class="com.cloud.api.query.dao.DiskOfferingJoinDaoImpl" />
   <bean id="domainDaoImpl" class="com.cloud.domain.dao.DomainDaoImpl" />

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/24725f8e/engine/schema/src/com/cloud/dc/DataCenterDetailVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/dc/DataCenterDetailVO.java b/engine/schema/src/com/cloud/dc/DataCenterDetailVO.java
new file mode 100644
index 0000000..4476a6f
--- /dev/null
+++ b/engine/schema/src/com/cloud/dc/DataCenterDetailVO.java
@@ -0,0 +1,79 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package com.cloud.dc;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+import org.apache.cloudstack.api.InternalIdentity;
+import org.apache.cloudstack.api.ResourceDetail;
+
+@Entity
+@Table(name="data_center_details")
+public class DataCenterDetailVO implements InternalIdentity, ResourceDetail {
+    @Id
+    @GeneratedValue(strategy=GenerationType.IDENTITY)
+    @Column(name="id")
+    private long id;
+    
+    @Column(name="dc_id")
+    private long dcId;
+    
+    @Column(name="name")
+    private String name;
+    
+    @Column(name="value")
+    private String value;
+    
+    protected DataCenterDetailVO() {
+    }
+    
+    public DataCenterDetailVO(long dcId, String name, String value) {
+        this.dcId = dcId;
+        this.name = name;
+        this.value = value;
+    }
+
+    public long getDcId() {
+        return dcId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    public long getId() {
+        return id;
+    }
+
+    @Override
+    public long getResourceDetail() {
+        return dcId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/24725f8e/engine/schema/src/com/cloud/dc/DcDetailVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/dc/DcDetailVO.java b/engine/schema/src/com/cloud/dc/DcDetailVO.java
deleted file mode 100644
index 158a8ed..0000000
--- a/engine/schema/src/com/cloud/dc/DcDetailVO.java
+++ /dev/null
@@ -1,79 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.dc;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-import org.apache.cloudstack.api.InternalIdentity;
-import org.apache.cloudstack.api.ResourceDetail;
-
-@Entity
-@Table(name="data_center_details")
-public class DcDetailVO implements InternalIdentity, ResourceDetail {
-    @Id
-    @GeneratedValue(strategy=GenerationType.IDENTITY)
-    @Column(name="id")
-    private long id;
-    
-    @Column(name="dc_id")
-    private long dcId;
-    
-    @Column(name="name")
-    private String name;
-    
-    @Column(name="value")
-    private String value;
-    
-    protected DcDetailVO() {
-    }
-    
-    public DcDetailVO(long dcId, String name, String value) {
-        this.dcId = dcId;
-        this.name = name;
-        this.value = value;
-    }
-
-    public long getDcId() {
-        return dcId;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public String getValue() {
-        return value;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-    }
-
-    public long getId() {
-        return id;
-    }
-
-    @Override
-    public long getResourceDetail() {
-        return dcId;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/24725f8e/engine/schema/src/com/cloud/dc/dao/DataCenterDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/dc/dao/DataCenterDaoImpl.java b/engine/schema/src/com/cloud/dc/dao/DataCenterDaoImpl.java
index e3b70a2..aaa372f 100755
--- a/engine/schema/src/com/cloud/dc/dao/DataCenterDaoImpl.java
+++ b/engine/schema/src/com/cloud/dc/dao/DataCenterDaoImpl.java
@@ -70,7 +70,7 @@ public class DataCenterDaoImpl extends GenericDaoBase<DataCenterVO, Long> implem
     @Inject protected DataCenterLinkLocalIpAddressDao _LinkLocalIpAllocDao = null;
     @Inject protected DataCenterVnetDao _vnetAllocDao = null;
     @Inject protected PodVlanDao _podVlanAllocDao = null;
-    @Inject protected DcDetailsDao _detailsDao = null;
+    @Inject protected DataCenterDetailsDao _detailsDao = null;
     @Inject protected AccountGuestVlanMapDao _accountGuestVlanMapDao = null;
 
     protected long _prefix;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/24725f8e/engine/schema/src/com/cloud/dc/dao/DataCenterDetailsDao.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/dc/dao/DataCenterDetailsDao.java b/engine/schema/src/com/cloud/dc/dao/DataCenterDetailsDao.java
new file mode 100644
index 0000000..2cc7df8
--- /dev/null
+++ b/engine/schema/src/com/cloud/dc/dao/DataCenterDetailsDao.java
@@ -0,0 +1,37 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package com.cloud.dc.dao;
+
+import java.util.List;
+import java.util.Map;
+
+import com.cloud.dc.DataCenterDetailVO;
+import com.cloud.utils.db.GenericDao;
+
+public interface DataCenterDetailsDao extends GenericDao<DataCenterDetailVO, Long> {
+    Map<String, String> findDetails(long dcId);
+    
+    void persist(long dcId, Map<String, String> details);
+    
+    DataCenterDetailVO findDetail(long dcId, String name);
+
+	void deleteDetails(long dcId);
+
+    void removeDetails(long id, String key);
+
+    List<DataCenterDetailVO> findDetailsList(long dcId);
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/24725f8e/engine/schema/src/com/cloud/dc/dao/DataCenterDetailsDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/dc/dao/DataCenterDetailsDaoImpl.java b/engine/schema/src/com/cloud/dc/dao/DataCenterDetailsDaoImpl.java
new file mode 100644
index 0000000..b8a36f0
--- /dev/null
+++ b/engine/schema/src/com/cloud/dc/dao/DataCenterDetailsDaoImpl.java
@@ -0,0 +1,133 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package com.cloud.dc.dao;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.ejb.Local;
+
+import com.cloud.vm.UserVmDetailVO;
+import org.apache.cloudstack.framework.config.ConfigKey;
+import org.apache.cloudstack.framework.config.ConfigKey.Scope;
+import org.apache.cloudstack.framework.config.ScopedConfigStorage;
+
+import com.cloud.dc.DataCenterDetailVO;
+import com.cloud.utils.db.GenericDaoBase;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+import com.cloud.utils.db.TransactionLegacy;
+
+@Local(value=DataCenterDetailsDao.class)
+public class DataCenterDetailsDaoImpl extends GenericDaoBase<DataCenterDetailVO, Long> implements DataCenterDetailsDao, ScopedConfigStorage {
+    protected final SearchBuilder<DataCenterDetailVO> DcSearch;
+    protected final SearchBuilder<DataCenterDetailVO> DetailSearch;
+    
+    public DataCenterDetailsDaoImpl() {
+        DcSearch = createSearchBuilder();
+        DcSearch.and("dcId", DcSearch.entity().getDcId(), SearchCriteria.Op.EQ);
+        DcSearch.done();
+        
+        DetailSearch = createSearchBuilder();
+        DetailSearch.and("dcId", DetailSearch.entity().getDcId(), SearchCriteria.Op.EQ);
+        DetailSearch.and("name", DetailSearch.entity().getName(), SearchCriteria.Op.EQ);
+        DetailSearch.done();
+    }
+
+    @Override
+    public DataCenterDetailVO findDetail(long dcId, String name) {
+        SearchCriteria<DataCenterDetailVO> sc = DetailSearch.create();
+        sc.setParameters("dcId", dcId);
+        sc.setParameters("name", name);
+        
+        return findOneIncludingRemovedBy(sc);
+    }
+
+    @Override
+    public Map<String, String> findDetails(long dcId) {
+        SearchCriteria<DataCenterDetailVO> sc = DcSearch.create();
+        sc.setParameters("dcId", dcId);
+        
+        List<DataCenterDetailVO> results = search(sc, null);
+        Map<String, String> details = new HashMap<String, String>(results.size());
+        for (DataCenterDetailVO result : results) {
+            details.put(result.getName(), result.getValue());
+        }
+        return details;
+    }
+
+    @Override
+    public List<DataCenterDetailVO> findDetailsList(long dcId) {
+        SearchCriteria<DataCenterDetailVO> sc = DcSearch.create();
+        sc.setParameters("dcId", dcId);
+
+        List<DataCenterDetailVO> results = search(sc, null);
+        return results;
+    }
+
+
+    @Override
+    public void deleteDetails(long dcId) {
+        SearchCriteria<DataCenterDetailVO> sc = DcSearch.create();
+        sc.setParameters("dcId", dcId);
+        
+        List<DataCenterDetailVO> results = search(sc, null);
+        for (DataCenterDetailVO result : results) {
+        	remove(result.getId());
+        }
+    }
+
+    @Override
+    public void removeDetails(long id, String key) {
+        if(key != null){
+            DataCenterDetailVO detail = findDetail(id, key);
+            if(detail != null){
+                remove(detail.getId());
+            }
+        }else {
+            deleteDetails(id);
+        }
+    }
+
+    @Override
+    public void persist(long dcId, Map<String, String> details) {
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
+        txn.start();
+        SearchCriteria<DataCenterDetailVO> sc = DcSearch.create();
+        sc.setParameters("dcId", dcId);
+        expunge(sc);
+        
+        for (Map.Entry<String, String> detail : details.entrySet()) {
+            DataCenterDetailVO vo = new DataCenterDetailVO(dcId, detail.getKey(), detail.getValue());
+            persist(vo);
+        }
+        txn.commit();
+    }
+
+    @Override
+    public Scope getScope() {
+        return ConfigKey.Scope.Zone;
+    }
+
+    @Override
+    public String getConfigValue(long id, ConfigKey<?> key) {
+        DataCenterDetailVO vo = findDetail(id, key.key());
+        return vo == null ? null : vo.getValue();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/24725f8e/engine/schema/src/com/cloud/dc/dao/DcDetailsDao.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/dc/dao/DcDetailsDao.java b/engine/schema/src/com/cloud/dc/dao/DcDetailsDao.java
deleted file mode 100644
index 814c7af..0000000
--- a/engine/schema/src/com/cloud/dc/dao/DcDetailsDao.java
+++ /dev/null
@@ -1,37 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.dc.dao;
-
-import java.util.List;
-import java.util.Map;
-
-import com.cloud.dc.DcDetailVO;
-import com.cloud.utils.db.GenericDao;
-
-public interface DcDetailsDao extends GenericDao<DcDetailVO, Long> {
-    Map<String, String> findDetails(long dcId);
-    
-    void persist(long dcId, Map<String, String> details);
-    
-    DcDetailVO findDetail(long dcId, String name);
-
-	void deleteDetails(long dcId);
-
-    void removeDetails(Long id, String key);
-
-    List<DcDetailVO> findDetailsList(long dcId);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/24725f8e/engine/schema/src/com/cloud/dc/dao/DcDetailsDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/dc/dao/DcDetailsDaoImpl.java b/engine/schema/src/com/cloud/dc/dao/DcDetailsDaoImpl.java
deleted file mode 100644
index 5f2b0b9..0000000
--- a/engine/schema/src/com/cloud/dc/dao/DcDetailsDaoImpl.java
+++ /dev/null
@@ -1,133 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.dc.dao;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.ejb.Local;
-
-import com.cloud.vm.UserVmDetailVO;
-import org.apache.cloudstack.framework.config.ConfigKey;
-import org.apache.cloudstack.framework.config.ConfigKey.Scope;
-import org.apache.cloudstack.framework.config.ScopedConfigStorage;
-
-import com.cloud.dc.DcDetailVO;
-import com.cloud.utils.db.GenericDaoBase;
-import com.cloud.utils.db.SearchBuilder;
-import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.TransactionLegacy;
-
-@Local(value=DcDetailsDao.class)
-public class DcDetailsDaoImpl extends GenericDaoBase<DcDetailVO, Long> implements DcDetailsDao, ScopedConfigStorage {
-    protected final SearchBuilder<DcDetailVO> DcSearch;
-    protected final SearchBuilder<DcDetailVO> DetailSearch;
-    
-    public DcDetailsDaoImpl() {
-        DcSearch = createSearchBuilder();
-        DcSearch.and("dcId", DcSearch.entity().getDcId(), SearchCriteria.Op.EQ);
-        DcSearch.done();
-        
-        DetailSearch = createSearchBuilder();
-        DetailSearch.and("dcId", DetailSearch.entity().getDcId(), SearchCriteria.Op.EQ);
-        DetailSearch.and("name", DetailSearch.entity().getName(), SearchCriteria.Op.EQ);
-        DetailSearch.done();
-    }
-
-    @Override
-    public DcDetailVO findDetail(long dcId, String name) {
-        SearchCriteria<DcDetailVO> sc = DetailSearch.create();
-        sc.setParameters("dcId", dcId);
-        sc.setParameters("name", name);
-        
-        return findOneIncludingRemovedBy(sc);
-    }
-
-    @Override
-    public Map<String, String> findDetails(long dcId) {
-        SearchCriteria<DcDetailVO> sc = DcSearch.create();
-        sc.setParameters("dcId", dcId);
-        
-        List<DcDetailVO> results = search(sc, null);
-        Map<String, String> details = new HashMap<String, String>(results.size());
-        for (DcDetailVO result : results) {
-            details.put(result.getName(), result.getValue());
-        }
-        return details;
-    }
-
-    @Override
-    public List<DcDetailVO> findDetailsList(long dcId) {
-        SearchCriteria<DcDetailVO> sc = DcSearch.create();
-        sc.setParameters("dcId", dcId);
-
-        List<DcDetailVO> results = search(sc, null);
-        return results;
-    }
-
-
-    @Override
-    public void deleteDetails(long dcId) {
-        SearchCriteria<DcDetailVO> sc = DcSearch.create();
-        sc.setParameters("dcId", dcId);
-        
-        List<DcDetailVO> results = search(sc, null);
-        for (DcDetailVO result : results) {
-        	remove(result.getId());
-        }
-    }
-
-    @Override
-    public void removeDetails(Long id, String key) {
-        if(key != null){
-            DcDetailVO detail = findDetail(id, key);
-            if(detail != null){
-                remove(detail.getId());
-            }
-        }else {
-            deleteDetails(id);
-        }
-    }
-
-    @Override
-    public void persist(long dcId, Map<String, String> details) {
-        TransactionLegacy txn = TransactionLegacy.currentTxn();
-        txn.start();
-        SearchCriteria<DcDetailVO> sc = DcSearch.create();
-        sc.setParameters("dcId", dcId);
-        expunge(sc);
-        
-        for (Map.Entry<String, String> detail : details.entrySet()) {
-            DcDetailVO vo = new DcDetailVO(dcId, detail.getKey(), detail.getValue());
-            persist(vo);
-        }
-        txn.commit();
-    }
-
-    @Override
-    public Scope getScope() {
-        return ConfigKey.Scope.Zone;
-    }
-
-    @Override
-    public String getConfigValue(long id, ConfigKey<?> key) {
-        DcDetailVO vo = findDetail(id, key.key());
-        return vo == null ? null : vo.getValue();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/24725f8e/engine/schema/src/com/cloud/network/dao/NetworkDetailsDao.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/dao/NetworkDetailsDao.java b/engine/schema/src/com/cloud/network/dao/NetworkDetailsDao.java
index f788534..930e8f8 100644
--- a/engine/schema/src/com/cloud/network/dao/NetworkDetailsDao.java
+++ b/engine/schema/src/com/cloud/network/dao/NetworkDetailsDao.java
@@ -30,6 +30,6 @@ public interface NetworkDetailsDao extends GenericDao<NetworkDetailVO, Long> {
 
     void deleteDetails(long networkId);
 
-    public void removeDetails(Long networkId, String key);
+    public void removeDetails(long networkId, String key);
 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/24725f8e/engine/schema/src/com/cloud/network/dao/NetworkDetailsDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/dao/NetworkDetailsDaoImpl.java b/engine/schema/src/com/cloud/network/dao/NetworkDetailsDaoImpl.java
index 453a95a..29bac95 100644
--- a/engine/schema/src/com/cloud/network/dao/NetworkDetailsDaoImpl.java
+++ b/engine/schema/src/com/cloud/network/dao/NetworkDetailsDaoImpl.java
@@ -80,7 +80,7 @@ public class NetworkDetailsDaoImpl extends GenericDaoBase<NetworkDetailVO, Long>
     }
 
     @Override
-    public void removeDetails(Long networkId, String key) {
+    public void removeDetails(long networkId, String key) {
         if(key != null){
             NetworkDetailVO detail = findDetail(networkId, key);
             if(detail != null){

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/24725f8e/engine/schema/src/com/cloud/service/dao/ServiceOfferingDetailsDao.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/service/dao/ServiceOfferingDetailsDao.java b/engine/schema/src/com/cloud/service/dao/ServiceOfferingDetailsDao.java
index 3816910..e6ff6e5 100644
--- a/engine/schema/src/com/cloud/service/dao/ServiceOfferingDetailsDao.java
+++ b/engine/schema/src/com/cloud/service/dao/ServiceOfferingDetailsDao.java
@@ -26,4 +26,5 @@ public interface ServiceOfferingDetailsDao extends GenericDao<ServiceOfferingDet
     void persist(long serviceOfferingId, Map<String, String> details);
     ServiceOfferingDetailsVO findDetail(long serviceOfferingId, String name);
     void deleteDetails(long serviceOfferingId);
+    void removeDetails(long offId, String key);
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/24725f8e/engine/schema/src/com/cloud/service/dao/ServiceOfferingDetailsDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/service/dao/ServiceOfferingDetailsDaoImpl.java b/engine/schema/src/com/cloud/service/dao/ServiceOfferingDetailsDaoImpl.java
index 70fd570..de99cf2 100644
--- a/engine/schema/src/com/cloud/service/dao/ServiceOfferingDetailsDaoImpl.java
+++ b/engine/schema/src/com/cloud/service/dao/ServiceOfferingDetailsDaoImpl.java
@@ -95,4 +95,17 @@ public class ServiceOfferingDetailsDaoImpl extends GenericDaoBase<ServiceOfferin
         }
         txn.commit();
     }
+    
+    @Override
+    public void removeDetails(long offId, String key) {
+        if(key != null){
+            ServiceOfferingDetailsVO detail = findDetail(offId, key);
+            if(detail != null){
+                remove(detail.getId());
+            }
+        }else {
+            deleteDetails(offId);
+        }
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/24725f8e/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/ChildTestConfiguration.java
----------------------------------------------------------------------
diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/ChildTestConfiguration.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/ChildTestConfiguration.java
index d5eea85..3804d4c 100644
--- a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/ChildTestConfiguration.java
+++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/ChildTestConfiguration.java
@@ -51,7 +51,7 @@ import com.cloud.dc.dao.DataCenterDaoImpl;
 import com.cloud.dc.dao.DataCenterIpAddressDaoImpl;
 import com.cloud.dc.dao.DataCenterLinkLocalIpAddressDaoImpl;
 import com.cloud.dc.dao.DataCenterVnetDaoImpl;
-import com.cloud.dc.dao.DcDetailsDaoImpl;
+import com.cloud.dc.dao.DataCenterDetailsDaoImpl;
 import com.cloud.dc.dao.HostPodDaoImpl;
 import com.cloud.dc.dao.PodVlanDaoImpl;
 import com.cloud.domain.dao.DomainDaoImpl;
@@ -104,7 +104,7 @@ import com.cloud.vm.snapshot.dao.VMSnapshotDaoImpl;
         HostPodDaoImpl.class, VMTemplateZoneDaoImpl.class, VMTemplateDetailsDaoImpl.class, HostDetailsDaoImpl.class,
         HostTagsDaoImpl.class, HostTransferMapDaoImpl.class, DataCenterIpAddressDaoImpl.class,
         DataCenterLinkLocalIpAddressDaoImpl.class, DataCenterVnetDaoImpl.class, PodVlanDaoImpl.class,
-        DcDetailsDaoImpl.class, DiskOfferingDaoImpl.class, StoragePoolHostDaoImpl.class, UserVmDaoImpl.class,
+        DataCenterDetailsDaoImpl.class, DiskOfferingDaoImpl.class, StoragePoolHostDaoImpl.class, UserVmDaoImpl.class,
         UserVmDetailsDaoImpl.class, ServiceOfferingDaoImpl.class, CapacityDaoImpl.class, SnapshotDaoImpl.class,
         VMSnapshotDaoImpl.class, OCFS2ManagerImpl.class, ClusterDetailsDaoImpl.class, SecondaryStorageVmDaoImpl.class,
         ConsoleProxyDaoImpl.class, StoragePoolWorkDaoImpl.class, StorageCacheManagerImpl.class, UserDaoImpl.class,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/24725f8e/server/src/com/cloud/api/ApiDBUtils.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiDBUtils.java b/server/src/com/cloud/api/ApiDBUtils.java
index 1eba98f..a14fdba 100755
--- a/server/src/com/cloud/api/ApiDBUtils.java
+++ b/server/src/com/cloud/api/ApiDBUtils.java
@@ -123,6 +123,7 @@ import com.cloud.dc.VlanVO;
 import com.cloud.dc.dao.AccountVlanMapDao;
 import com.cloud.dc.dao.ClusterDao;
 import com.cloud.dc.dao.DataCenterDao;
+import com.cloud.dc.dao.DataCenterDetailsDao;
 import com.cloud.dc.dao.HostPodDao;
 import com.cloud.dc.dao.VlanDao;
 import com.cloud.domain.DomainVO;
@@ -400,6 +401,8 @@ public class ApiDBUtils {
     static NetworkACLDao _networkACLDao;
     static ServiceOfferingDetailsDao _serviceOfferingDetailsDao;
     static AccountService _accountService;
+    static DataCenterDetailsDao _zoneDetailsDao;
+
 
 
     @Inject
@@ -513,8 +516,8 @@ public class ApiDBUtils {
     @Inject private NetworkACLDao networkACLDao;
     @Inject private ServiceOfferingDetailsDao serviceOfferingDetailsDao;
     @Inject private AccountService accountService;
-    @Inject
-    private ConfigurationManager configMgr;
+    @Inject private ConfigurationManager configMgr;
+    @Inject private DataCenterDetailsDao zoneDetailsDao;
 
     @PostConstruct
     void init() {
@@ -626,6 +629,8 @@ public class ApiDBUtils {
         _networkACLDao = networkACLDao;
         _serviceOfferingDetailsDao = serviceOfferingDetailsDao;
         _accountService = accountService;
+        _zoneDetailsDao = zoneDetailsDao;
+
     }
 
     // ///////////////////////////////////////////////////////////
@@ -1692,4 +1697,9 @@ public class ApiDBUtils {
     public static List<ResourceTagJoinVO> listResourceTagViewByResourceUUID(String resourceUUID, ResourceObjectType resourceType){
         return  _tagJoinDao.listBy(resourceUUID, resourceType);
     }
+    
+    public static Map<String, String> getZoneDetails(long zoneId) {
+        Map<String, String> details = _zoneDetailsDao.findDetails(zoneId);
+        return details.isEmpty() ? null : details;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/24725f8e/server/src/com/cloud/api/query/QueryManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/QueryManagerImpl.java b/server/src/com/cloud/api/query/QueryManagerImpl.java
index 79eb1b4..e92680f 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -129,7 +129,7 @@ import com.cloud.api.query.vo.UserAccountJoinVO;
 import com.cloud.api.query.vo.UserVmJoinVO;
 import com.cloud.api.query.vo.VolumeJoinVO;
 import com.cloud.dc.DedicatedResourceVO;
-import com.cloud.dc.dao.DcDetailsDao;
+import com.cloud.dc.dao.DataCenterDetailsDao;
 import com.cloud.dc.dao.DedicatedResourceDao;
 import com.cloud.domain.Domain;
 import com.cloud.domain.DomainVO;
@@ -328,7 +328,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
     private DedicatedResourceDao _dedicatedDao;
 
     @Inject
-    DcDetailsDao _dcDetailsDao;
+    DataCenterDetailsDao _dcDetailsDao;
 
     @Inject
     DomainManager _domainMgr;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/24725f8e/server/src/com/cloud/api/query/dao/DataCenterJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/DataCenterJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/DataCenterJoinDaoImpl.java
index 6e2649e..5198555 100644
--- a/server/src/com/cloud/api/query/dao/DataCenterJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/DataCenterJoinDaoImpl.java
@@ -105,6 +105,8 @@ public class DataCenterJoinDaoImpl extends GenericDaoBase<DataCenterJoinVO, Long
             zoneResponse.addTag(tagResponse);
         }
         
+        zoneResponse.setResourceDetails(ApiDBUtils.getZoneDetails(dataCenter.getId()));
+        
         zoneResponse.setObjectName("zone");
         return zoneResponse;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/24725f8e/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 32459bc..84ea2d2 100755
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -98,7 +98,7 @@ import com.cloud.dc.DataCenter.NetworkType;
 import com.cloud.dc.DataCenterIpAddressVO;
 import com.cloud.dc.DataCenterLinkLocalIpAddressVO;
 import com.cloud.dc.DataCenterVO;
-import com.cloud.dc.DcDetailVO;
+import com.cloud.dc.DataCenterDetailVO;
 import com.cloud.dc.DedicatedResourceVO;
 import com.cloud.dc.HostPodVO;
 import com.cloud.dc.Pod;
@@ -111,7 +111,7 @@ import com.cloud.dc.dao.ClusterDao;
 import com.cloud.dc.dao.DataCenterDao;
 import com.cloud.dc.dao.DataCenterIpAddressDao;
 import com.cloud.dc.dao.DataCenterLinkLocalIpAddressDao;
-import com.cloud.dc.dao.DcDetailsDao;
+import com.cloud.dc.dao.DataCenterDetailsDao;
 import com.cloud.dc.dao.DedicatedResourceDao;
 import com.cloud.dc.dao.HostPodDao;
 import com.cloud.dc.dao.PodVlanMapDao;
@@ -284,7 +284,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
     @Inject
     ConfigurationServer _configServer;
     @Inject
-    DcDetailsDao _dcDetailsDao;
+    DataCenterDetailsDao _dcDetailsDao;
     @Inject
     ClusterDetailsDao _clusterDetailsDao;
     @Inject
@@ -450,9 +450,9 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
                 if (zone == null) {
                     throw new InvalidParameterValueException("unable to find zone by id " + resourceId);
                 }
-                DcDetailVO dcDetailVO = _dcDetailsDao.findDetail(resourceId, name.toLowerCase());
+                DataCenterDetailVO dcDetailVO = _dcDetailsDao.findDetail(resourceId, name.toLowerCase());
                 if (dcDetailVO == null) {
-                    dcDetailVO = new DcDetailVO(resourceId, name, value);
+                    dcDetailVO = new DataCenterDetailVO(resourceId, name, value);
                     _dcDetailsDao.persist(dcDetailVO);
                 } else {
                     dcDetailVO.setValue(value);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/24725f8e/server/src/com/cloud/hypervisor/CloudZonesStartupProcessor.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/hypervisor/CloudZonesStartupProcessor.java b/server/src/com/cloud/hypervisor/CloudZonesStartupProcessor.java
index 9e4bee0..c056c67 100755
--- a/server/src/com/cloud/hypervisor/CloudZonesStartupProcessor.java
+++ b/server/src/com/cloud/hypervisor/CloudZonesStartupProcessor.java
@@ -38,11 +38,11 @@ import com.cloud.configuration.ConfigurationManager;
 import com.cloud.configuration.ZoneConfig;
 import com.cloud.dc.ClusterVO;
 import com.cloud.dc.DataCenterVO;
-import com.cloud.dc.DcDetailVO;
+import com.cloud.dc.DataCenterDetailVO;
 import com.cloud.dc.HostPodVO;
 import com.cloud.dc.dao.ClusterDao;
 import com.cloud.dc.dao.DataCenterDao;
-import com.cloud.dc.dao.DcDetailsDao;
+import com.cloud.dc.dao.DataCenterDetailsDao;
 import com.cloud.dc.dao.HostPodDao;
 import com.cloud.exception.ConnectionException;
 import com.cloud.host.Host;
@@ -69,7 +69,7 @@ public class CloudZonesStartupProcessor extends AdapterBase implements StartupCo
     @Inject DataCenterDao _zoneDao = null;
     @Inject HostDao _hostDao = null;
     @Inject HostPodDao _podDao = null;
-    @Inject DcDetailsDao _zoneDetailsDao = null;
+    @Inject DataCenterDetailsDao _zoneDetailsDao = null;
     
     @Inject AgentManager _agentManager = null;
     @Inject ConfigurationManager _configurationManager = null;
@@ -175,7 +175,7 @@ public class CloudZonesStartupProcessor extends AdapterBase implements StartupCo
     	}
         
         long zoneId = zone.getId();
-        DcDetailVO maxHostsInZone = _zoneDetailsDao.findDetail(zoneId, ZoneConfig.MaxHosts.key());
+        DataCenterDetailVO maxHostsInZone = _zoneDetailsDao.findDetail(zoneId, ZoneConfig.MaxHosts.key());
         if(maxHostsInZone != null){
         	long maxHosts = new Long(maxHostsInZone.getValue()).longValue();
         	long currentCountOfHosts = _hostDao.countRoutingHostsByDataCenter(zoneId);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/24725f8e/server/src/com/cloud/metadata/ResourceMetaDataManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/metadata/ResourceMetaDataManagerImpl.java b/server/src/com/cloud/metadata/ResourceMetaDataManagerImpl.java
index 4159a80..8fc7471 100644
--- a/server/src/com/cloud/metadata/ResourceMetaDataManagerImpl.java
+++ b/server/src/com/cloud/metadata/ResourceMetaDataManagerImpl.java
@@ -25,8 +25,8 @@ import javax.naming.ConfigurationException;
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
-import com.cloud.dc.DcDetailVO;
-import com.cloud.dc.dao.DcDetailsDao;
+import com.cloud.dc.DataCenterDetailVO;
+import com.cloud.dc.dao.DataCenterDetailsDao;
 import com.cloud.event.ActionEvent;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.InvalidParameterValueException;
@@ -45,7 +45,6 @@ import com.cloud.utils.db.DB;
 import com.cloud.utils.db.Transaction;
 import com.cloud.utils.db.TransactionCallback;
 import com.cloud.utils.db.TransactionStatus;
-import com.cloud.uuididentity.dao.IdentityDao;
 import com.cloud.vm.NicDetailVO;
 import com.cloud.vm.dao.NicDetailDao;
 import com.cloud.vm.dao.UserVmDetailsDao;
@@ -62,7 +61,7 @@ public class ResourceMetaDataManagerImpl extends ManagerBase implements Resource
     @Inject
     UserVmDetailsDao _userVmDetailDao;
     @Inject
-    DcDetailsDao _dcDetailsDao;
+    DataCenterDetailsDao _dcDetailsDao;
     @Inject
     NetworkDetailsDao _networkDetailsDao;
     @Inject
@@ -110,7 +109,7 @@ public class ResourceMetaDataManagerImpl extends ManagerBase implements Resource
                         }
 
                         long id = _taggedResourceMgr.getResourceId(resourceId, resourceType);
-                        // TODO - Have a better design here.
+                        // TODO - Have a better design here for getting the DAO.
                         if(resourceType == ResourceObjectType.Volume){
                             VolumeDetailVO v = new VolumeDetailVO(id, key, value);
                             _volumeDetailDao.persist(v);
@@ -118,7 +117,7 @@ public class ResourceMetaDataManagerImpl extends ManagerBase implements Resource
                             NicDetailVO n = new NicDetailVO(id, key, value);
                             _nicDetailDao.persist(n);
                         } else if (resourceType == ResourceObjectType.Zone){
-                             DcDetailVO dataCenterDetail = new DcDetailVO(id, key, value);
+                             DataCenterDetailVO dataCenterDetail = new DataCenterDetailVO(id, key, value);
                              _dcDetailsDao.persist(dataCenterDetail);
                         } else if (resourceType == ResourceObjectType.Network){
                             NetworkDetailVO networkDetail = new NetworkDetailVO(id, key, value);
@@ -151,7 +150,7 @@ public class ResourceMetaDataManagerImpl extends ManagerBase implements Resource
             throw new InvalidParameterValueException("The resource type " + resourceType + " is not supported by the API yet");
         }
         
-        // TODO - Have a better design here.
+        // TODO - Have a better design here for getting the DAO.
         if (resourceType == ResourceObjectType.Volume){
            _volumeDetailDao.removeDetails(id, key);
         } else if (resourceType == ResourceObjectType.Nic){
@@ -162,6 +161,10 @@ public class ResourceMetaDataManagerImpl extends ManagerBase implements Resource
             _templateDetailsDao.removeDetails(id, key);
         } else if (resourceType == ResourceObjectType.Zone){
             _dcDetailsDao.removeDetails(id, key);
+        } else if (resourceType == ResourceObjectType.ServiceOffering) {
+            _serviceOfferingDetailsDao.removeDetails(id, key);
+        } else if (resourceType == ResourceObjectType.Network) {
+            _networkDetailsDao.removeDetails(id, key);
         }
 
         return true;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/24725f8e/server/test/com/cloud/network/security/SecurityGroupManagerTestConfiguration.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/network/security/SecurityGroupManagerTestConfiguration.java b/server/test/com/cloud/network/security/SecurityGroupManagerTestConfiguration.java
index 4d3a453..ed290a5 100644
--- a/server/test/com/cloud/network/security/SecurityGroupManagerTestConfiguration.java
+++ b/server/test/com/cloud/network/security/SecurityGroupManagerTestConfiguration.java
@@ -41,7 +41,7 @@ import com.cloud.dc.dao.DataCenterDaoImpl;
 import com.cloud.dc.dao.DataCenterIpAddressDaoImpl;
 import com.cloud.dc.dao.DataCenterLinkLocalIpAddressDaoImpl;
 import com.cloud.dc.dao.DataCenterVnetDaoImpl;
-import com.cloud.dc.dao.DcDetailsDaoImpl;
+import com.cloud.dc.dao.DataCenterDetailsDaoImpl;
 import com.cloud.dc.dao.HostPodDaoImpl;
 import com.cloud.dc.dao.PodVlanDaoImpl;
 import com.cloud.domain.dao.DomainDaoImpl;
@@ -97,7 +97,7 @@ import com.cloud.vm.dao.VMInstanceDaoImpl;
         DataCenterLinkLocalIpAddressDaoImpl.class,
         DataCenterVnetDaoImpl.class,
         PodVlanDaoImpl.class,
-        DcDetailsDaoImpl.class,
+        DataCenterDetailsDaoImpl.class,
         SecurityGroupRuleDaoImpl.class,
         NicDaoImpl.class,
         SecurityGroupJoinDaoImpl.class},

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/24725f8e/server/test/com/cloud/vpc/VpcTestConfiguration.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vpc/VpcTestConfiguration.java b/server/test/com/cloud/vpc/VpcTestConfiguration.java
index 9a22587..d34c467 100644
--- a/server/test/com/cloud/vpc/VpcTestConfiguration.java
+++ b/server/test/com/cloud/vpc/VpcTestConfiguration.java
@@ -43,7 +43,7 @@ import com.cloud.dc.dao.DataCenterDaoImpl;
 import com.cloud.dc.dao.DataCenterIpAddressDaoImpl;
 import com.cloud.dc.dao.DataCenterLinkLocalIpAddressDaoImpl;
 import com.cloud.dc.dao.DataCenterVnetDaoImpl;
-import com.cloud.dc.dao.DcDetailsDaoImpl;
+import com.cloud.dc.dao.DataCenterDetailsDaoImpl;
 import com.cloud.dc.dao.HostPodDaoImpl;
 import com.cloud.dc.dao.PodVlanDaoImpl;
 import com.cloud.dc.dao.PodVlanMapDaoImpl;
@@ -153,7 +153,7 @@ import com.cloud.vpc.dao.MockVpcOfferingServiceMapDaoImpl;
         VMTemplateHostDaoImpl.class,
         MockVpcDaoImpl.class,
         VMTemplateDaoImpl.class,VMTemplateZoneDaoImpl.class,VMTemplateDetailsDaoImpl.class,DataCenterDaoImpl.class,DataCenterIpAddressDaoImpl.class,DataCenterLinkLocalIpAddressDaoImpl.class,DataCenterVnetDaoImpl.class,PodVlanDaoImpl.class,
-        DcDetailsDaoImpl.class,MockNetworkManagerImpl.class,MockVpcVirtualNetworkApplianceManager.class,
+        DataCenterDetailsDaoImpl.class,MockNetworkManagerImpl.class,MockVpcVirtualNetworkApplianceManager.class,
         EntityManagerImpl.class,LoadBalancerDaoImpl.class,FirewallRulesCidrsDaoImpl.class,VirtualRouterProviderDaoImpl.class,
         ProjectDaoImpl.class,ProjectAccountDaoImpl.class,MockVpcOfferingDaoImpl.class,
         MockConfigurationManagerImpl.class, MockNetworkOfferingServiceMapDaoImpl.class,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/24725f8e/server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java
----------------------------------------------------------------------
diff --git a/server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java b/server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java
index c32940b..d7ac3f7 100644
--- a/server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java
+++ b/server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java
@@ -61,7 +61,7 @@ import com.cloud.dc.dao.DataCenterDaoImpl;
 import com.cloud.dc.dao.DataCenterIpAddressDaoImpl;
 import com.cloud.dc.dao.DataCenterLinkLocalIpAddressDao;
 import com.cloud.dc.dao.DataCenterVnetDaoImpl;
-import com.cloud.dc.dao.DcDetailsDaoImpl;
+import com.cloud.dc.dao.DataCenterDetailsDaoImpl;
 import com.cloud.dc.dao.DedicatedResourceDao;
 import com.cloud.dc.dao.HostPodDaoImpl;
 import com.cloud.dc.dao.PodVlanDaoImpl;
@@ -154,7 +154,7 @@ import com.cloud.vm.dao.VMInstanceDaoImpl;
         DataCenterIpAddressDaoImpl.class,
         DataCenterVnetDaoImpl.class,
         PodVlanDaoImpl.class,
-        DcDetailsDaoImpl.class,
+        DataCenterDetailsDaoImpl.class,
         NicSecondaryIpDaoImpl.class,
         UserIpv6AddressDaoImpl.class,
         UserDaoImpl.class,


Mime
View raw message