CLOUDSTACK-4835: Update global configuration test cases failed in master 
Changes made in update/list configuration API to use ConfigDepot

CLOUDSTACK-4169: Scoped configuraion parameters logic moved to ConfigDepot

CLOUDSTACK-5163: missing parameters in configuration table


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

Branch: refs/heads/ui-restyle
Commit: c29cd9d3c72e119dc74ee7070c08fc6d88dbdf05
Parents: 7dceca5
Author: Harikrishna Patnala <[email protected]>
Authored: Fri Nov 15 12:16:51 2013 +0530
Committer: Koushik Das <[email protected]>
Committed: Fri Nov 15 12:19:31 2013 +0530

----------------------------------------------------------------------
 .../cloud/deploy/DeploymentClusterPlanner.java  | 10 +++++++++
 .../framework/config/ConfigDepot.java           |  4 ++++
 .../framework/config/impl/ConfigDepotImpl.java  | 17 ++++++++++++++-
 .../com/cloud/capacity/CapacityManagerImpl.java |  2 +-
 server/src/com/cloud/configuration/Config.java  |  2 --
 .../configuration/ConfigurationManagerImpl.java | 22 ++++++++++++++++----
 .../src/com/cloud/deploy/FirstFitPlanner.java   | 22 +++++++++++++++-----
 .../VirtualNetworkApplianceManagerImpl.java     | 13 +++++++++++-
 .../cloud/server/ConfigurationServerImpl.java   |  5 +++--
 .../networkoffering/ChildTestConfiguration.java |  6 ++++++
 10 files changed, 87 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c29cd9d3/api/src/com/cloud/deploy/DeploymentClusterPlanner.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/deploy/DeploymentClusterPlanner.java 
b/api/src/com/cloud/deploy/DeploymentClusterPlanner.java
index ca73267..b478223 100644
--- a/api/src/com/cloud/deploy/DeploymentClusterPlanner.java
+++ b/api/src/com/cloud/deploy/DeploymentClusterPlanner.java
@@ -20,10 +20,20 @@ import java.util.List;
 
 import com.cloud.exception.InsufficientServerCapacityException;
 import com.cloud.vm.VirtualMachineProfile;
+import org.apache.cloudstack.framework.config.ConfigKey;
 
 /**
  */
 public interface DeploymentClusterPlanner extends DeploymentPlanner {
+
+    static final String ClusterCPUCapacityDisableThresholdCK = 
"cluster.cpu.allocated.capacity.disablethreshold";
+    static final String ClusterMemoryCapacityDisableThresholdCK = 
"cluster.memory.allocated.capacity.disablethreshold";
+
+    static final ConfigKey<Float> ClusterCPUCapacityDisableThreshold = new 
ConfigKey<Float>(Float.class, ClusterCPUCapacityDisableThresholdCK, "Alert", 
"0.85",
+            "Percentage (as a value between 0 and 1) of cpu utilization above 
which allocators will disable using the cluster for low cpu available. Keep the 
corresponding notification threshold lower than this to be notified 
beforehand.", true, ConfigKey.Scope.Cluster, null);
+    static final ConfigKey<Float> ClusterMemoryCapacityDisableThreshold = new 
ConfigKey<Float>(Float.class, ClusterMemoryCapacityDisableThresholdCK, "Alert", 
"0.85",
+            "Percentage (as a value between 0 and 1) of memory utilization 
above which allocators will disable using the cluster for low memory available. 
Keep the corresponding notification threshold lower than this to be notified 
beforehand.", true, ConfigKey.Scope.Cluster, null);
+
     /**
      * This is called to determine list of possible clusters where a virtual
      * machine can be deployed.

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c29cd9d3/framework/config/src/org/apache/cloudstack/framework/config/ConfigDepot.java
----------------------------------------------------------------------
diff --git 
a/framework/config/src/org/apache/cloudstack/framework/config/ConfigDepot.java 
b/framework/config/src/org/apache/cloudstack/framework/config/ConfigDepot.java
index 2fd6efb..22452b9 100644
--- 
a/framework/config/src/org/apache/cloudstack/framework/config/ConfigDepot.java
+++ 
b/framework/config/src/org/apache/cloudstack/framework/config/ConfigDepot.java
@@ -16,6 +16,8 @@
 // under the License.
 package org.apache.cloudstack.framework.config;
 
+import java.util.List;
+
 /**
  * ConfigDepot is a repository of configurations.
  *
@@ -23,4 +25,6 @@ package org.apache.cloudstack.framework.config;
 public interface ConfigDepot {
 
     ConfigKey<?> get(String paramName);
+
+    List<ConfigKey<?>> getConfigListByScope(String scope);
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c29cd9d3/framework/config/src/org/apache/cloudstack/framework/config/impl/ConfigDepotImpl.java
----------------------------------------------------------------------
diff --git 
a/framework/config/src/org/apache/cloudstack/framework/config/impl/ConfigDepotImpl.java
 
b/framework/config/src/org/apache/cloudstack/framework/config/impl/ConfigDepotImpl.java
index 254e6d2..305d286 100644
--- 
a/framework/config/src/org/apache/cloudstack/framework/config/impl/ConfigDepotImpl.java
+++ 
b/framework/config/src/org/apache/cloudstack/framework/config/impl/ConfigDepotImpl.java
@@ -76,8 +76,14 @@ public class ConfigDepotImpl implements ConfigDepot, 
ConfigDepotAdmin {
 
     HashMap<String, Pair<String, ConfigKey<?>>> _allKeys = new HashMap<String, 
Pair<String, ConfigKey<?>>>(1007);
 
+    HashMap<ConfigKey.Scope, List<ConfigKey<?>>> _scopeLevelConfigsMap = new 
HashMap<ConfigKey.Scope, List<ConfigKey<?>>>();
+
     public ConfigDepotImpl() {
         ConfigKey.init(this);
+        _scopeLevelConfigsMap.put(ConfigKey.Scope.Zone, new 
ArrayList<ConfigKey<?>>());
+        _scopeLevelConfigsMap.put(ConfigKey.Scope.Cluster, new 
ArrayList<ConfigKey<?>>());
+        _scopeLevelConfigsMap.put(ConfigKey.Scope.StoragePool, new 
ArrayList<ConfigKey<?>>());
+        _scopeLevelConfigsMap.put(ConfigKey.Scope.Account, new 
ArrayList<ConfigKey<?>>());
     }
 
     @Override
@@ -108,7 +114,7 @@ public class ConfigDepotImpl implements ConfigDepot, 
ConfigDepotAdmin {
                                                 ": " + key.toString());
             }
             _allKeys.put(key.key(), new Pair<String, 
ConfigKey<?>>(configurable.getConfigComponentName(), key));
-            
+
             ConfigurationVO vo = _configDao.findById(key.key());
             if (vo == null) {
                 vo = new 
ConfigurationVO(configurable.getConfigComponentName(), key);
@@ -125,6 +131,10 @@ public class ConfigDepotImpl implements ConfigDepot, 
ConfigDepotAdmin {
                     _configDao.persist(vo);
                 }
             }
+            if (key.scope() != ConfigKey.Scope.Global) {
+                List<ConfigKey<?>> currentConfigs = 
_scopeLevelConfigsMap.get(key.scope());
+                currentConfigs.add(key);
+            }
         }
         
         _configured.add(configurable);
@@ -172,4 +182,9 @@ public class ConfigDepotImpl implements ConfigDepot, 
ConfigDepotAdmin {
         this._configurables = configurables;
     }
 
+    @Override
+    public List<ConfigKey<?>> getConfigListByScope(String scope) {
+        return _scopeLevelConfigsMap.get(ConfigKey.Scope.valueOf(scope));
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c29cd9d3/server/src/com/cloud/capacity/CapacityManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/capacity/CapacityManagerImpl.java 
b/server/src/com/cloud/capacity/CapacityManagerImpl.java
index 7245f14..7f73b2f 100755
--- a/server/src/com/cloud/capacity/CapacityManagerImpl.java
+++ b/server/src/com/cloud/capacity/CapacityManagerImpl.java
@@ -964,6 +964,6 @@ public class CapacityManagerImpl extends ManagerBase 
implements CapacityManager,
 
     @Override
     public ConfigKey<?>[] getConfigKeys() {
-        return new ConfigKey<?>[] {CpuOverprovisioningFactor, 
MemOverprovisioningFactor};
+        return new ConfigKey<?>[] {CpuOverprovisioningFactor, 
MemOverprovisioningFactor, StorageCapacityDisableThreshold, 
StorageOverprovisioningFactor, StorageAllocatedCapacityDisableThreshold};
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c29cd9d3/server/src/com/cloud/configuration/Config.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/Config.java 
b/server/src/com/cloud/configuration/Config.java
index bc805b7..fd26ff0 100755
--- a/server/src/com/cloud/configuration/Config.java
+++ b/server/src/com/cloud/configuration/Config.java
@@ -57,8 +57,6 @@ public enum Config {
        VlanCapacityThreshold("Alert", ManagementServer.class, Float.class, 
"zone.vlan.capacity.notificationthreshold", "0.75", "Percentage (as a value 
between 0 and 1) of Zone Vlan utilization above which alerts will be sent about 
low number of Zone Vlans.", null),
        DirectNetworkPublicIpCapacityThreshold("Alert", ManagementServer.class, 
Float.class, "zone.directnetwork.publicip.capacity.notificationthreshold", 
"0.75", "Percentage (as a value between 0 and 1) of Direct Network Public Ip 
Utilization above which alerts will be sent about low number of direct network 
public ips.", null),
        LocalStorageCapacityThreshold("Alert", ManagementServer.class, 
Float.class, "cluster.localStorage.capacity.notificationthreshold", "0.75", 
"Percentage (as a value between 0 and 1) of local storage utilization above 
which alerts will be sent about low local storage available.", null),
-       CPUCapacityDisableThreshold("Alert", ManagementServer.class, 
Float.class, "cluster.cpu.allocated.capacity.disablethreshold", "0.85", 
"Percentage (as a value between 0 and 1) of cpu utilization above which 
allocators will disable using the cluster for low cpu available. Keep the 
corresponding notification threshold lower than this to be notified 
beforehand.", null, ConfigKey.Scope.Cluster.toString()),
-       MemoryCapacityDisableThreshold("Alert", ManagementServer.class, 
Float.class, "cluster.memory.allocated.capacity.disablethreshold", "0.85", 
"Percentage (as a value between 0 and 1) of memory utilization above which 
allocators will disable using the cluster for low memory available. Keep the 
corresponding notification threshold lower than this to be notified 
beforehand.", null, ConfigKey.Scope.Cluster.toString()),
 
 
        // Storage

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c29cd9d3/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 82256ca..21651ad 100755
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -36,6 +36,8 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
+import com.cloud.deploy.DeploymentClusterPlanner;
+import org.apache.cloudstack.framework.config.ConfigDepot;
 import org.apache.log4j.Logger;
 
 import org.apache.cloudstack.acl.SecurityChecker;
@@ -117,6 +119,7 @@ import com.cloud.dc.dao.HostPodDao;
 import com.cloud.dc.dao.PodVlanMapDao;
 import com.cloud.dc.dao.VlanDao;
 import com.cloud.deploy.DataCenterDeployment;
+import com.cloud.deploy.DeploymentPlanner;
 import com.cloud.domain.Domain;
 import com.cloud.domain.DomainVO;
 import com.cloud.domain.dao.DomainDao;
@@ -215,6 +218,8 @@ ConfigurationManagerImpl extends ManagerBase implements 
ConfigurationManager, Co
     @Inject
     ConfigurationDao _configDao;
     @Inject
+    ConfigDepot _configDepot;
+    @Inject
     HostPodDao _podDao;
     @Inject
     AccountVlanMapDao _accountVlanMapDao;
@@ -372,8 +377,8 @@ ConfigurationManagerImpl extends ManagerBase implements 
ConfigurationManager, Co
         
weightBasedParametersForValidation.add(Config.LocalStorageCapacityThreshold.key());
         
weightBasedParametersForValidation.add(CapacityManager.StorageAllocatedCapacityDisableThreshold.key());
         
weightBasedParametersForValidation.add(CapacityManager.StorageCapacityDisableThreshold.key());
-        
weightBasedParametersForValidation.add(Config.CPUCapacityDisableThreshold.key());
-        
weightBasedParametersForValidation.add(Config.MemoryCapacityDisableThreshold.key());
+        
weightBasedParametersForValidation.add(DeploymentClusterPlanner.ClusterCPUCapacityDisableThreshold.key());
+        
weightBasedParametersForValidation.add(DeploymentClusterPlanner.ClusterMemoryCapacityDisableThreshold.key());
         
weightBasedParametersForValidation.add(Config.AgentLoadThreshold.key());
         
weightBasedParametersForValidation.add(Config.VmUserDispersionWeight.key());
 
@@ -625,8 +630,17 @@ ConfigurationManagerImpl extends ManagerBase implements 
ConfigurationManager, Co
                         + (((name.toLowerCase()).contains("password")) ? 
"*****" : (((value == null) ? "" : value))));
         // check if config value exists
         ConfigurationVO config = _configDao.findByName(name);
+        String catergory = null;
+
+        // FIX ME - All configuration parameters are not moved from 
config.java to configKey
         if (config == null) {
-            throw new InvalidParameterValueException("Config parameter with 
name " + name + " doesn't exist");
+            if ( _configDepot.get(name) == null ) {
+                s_logger.warn("Probably the component manager where 
configuration variable " + name + " is defined needs to implement Configurable 
interface");
+                throw new InvalidParameterValueException("Config parameter 
with name " + name + " doesn't exist");
+            }
+            catergory = _configDepot.get(name).category();
+        } else {
+            catergory = config.getCategory();
         }
 
         if (value == null) {
@@ -667,7 +681,7 @@ ConfigurationManagerImpl extends ManagerBase implements 
ConfigurationManager, Co
                     "cannot handle multiple IDs, provide only one ID 
corresponding to the scope");
         }
 
-        String updatedValue = updateConfiguration(userId, name, 
config.getCategory(), value, scope, id);
+        String updatedValue = updateConfiguration(userId, name, catergory, 
value, scope, id);
         if ((value == null && updatedValue == null) || 
updatedValue.equalsIgnoreCase(value)) {
             return _configDao.findByName(name);
         } else {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c29cd9d3/server/src/com/cloud/deploy/FirstFitPlanner.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/deploy/FirstFitPlanner.java 
b/server/src/com/cloud/deploy/FirstFitPlanner.java
index 64b1124..3707d3d 100755
--- a/server/src/com/cloud/deploy/FirstFitPlanner.java
+++ b/server/src/com/cloud/deploy/FirstFitPlanner.java
@@ -29,6 +29,8 @@ import javax.naming.ConfigurationException;
 
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
 import org.apache.cloudstack.engine.subsystem.api.storage.StoragePoolAllocator;
+import org.apache.cloudstack.framework.config.ConfigKey;
+import org.apache.cloudstack.framework.config.Configurable;
 import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
 
@@ -83,7 +85,7 @@ import com.cloud.vm.dao.UserVmDao;
 import com.cloud.vm.dao.VMInstanceDao;
 
 @Local(value=DeploymentPlanner.class)
-public class FirstFitPlanner extends PlannerBase implements 
DeploymentClusterPlanner {
+public class FirstFitPlanner extends PlannerBase implements 
DeploymentClusterPlanner, Configurable{
     private static final Logger s_logger = 
Logger.getLogger(FirstFitPlanner.class);
     @Inject protected HostDao _hostDao;
     @Inject protected DataCenterDao _dcDao;
@@ -246,11 +248,11 @@ public class FirstFitPlanner extends PlannerBase 
implements DeploymentClusterPla
         // if he changes these values
         Map<Short, Float> disableThresholdMap = new HashMap<Short, Float>();
 
-        String cpuDisableThresholdString = 
_configDao.getValue(Config.CPUCapacityDisableThreshold.key());
+        String cpuDisableThresholdString = 
ClusterCPUCapacityDisableThreshold.value().toString();
         float cpuDisableThreshold = 
NumbersUtil.parseFloat(cpuDisableThresholdString, 0.85F);
         disableThresholdMap.put(Capacity.CAPACITY_TYPE_CPU, 
cpuDisableThreshold);
 
-        String memoryDisableThresholdString = 
_configDao.getValue(Config.MemoryCapacityDisableThreshold.key());
+        String memoryDisableThresholdString = 
ClusterMemoryCapacityDisableThreshold.value().toString();
         float memoryDisableThreshold = 
NumbersUtil.parseFloat(memoryDisableThresholdString, 0.85F);
         disableThresholdMap.put(Capacity.CAPACITY_TYPE_MEMORY, 
memoryDisableThreshold);
 
@@ -283,10 +285,10 @@ public class FirstFitPlanner extends PlannerBase 
implements DeploymentClusterPla
             }
             if (capacity == Capacity.CAPACITY_TYPE_CPU) {
                 clustersCrossingThreshold = 
_capacityDao.listClustersCrossingThreshold(capacity,
-                        plan.getDataCenterId(), 
Config.CPUCapacityDisableThreshold.key(), cpu_requested);
+                        plan.getDataCenterId(), 
ClusterCPUCapacityDisableThreshold.key(), cpu_requested);
             } else if (capacity == Capacity.CAPACITY_TYPE_MEMORY) {
                 clustersCrossingThreshold = 
_capacityDao.listClustersCrossingThreshold(capacity,
-                        plan.getDataCenterId(), 
Config.MemoryCapacityDisableThreshold.key(), ram_requested);
+                        plan.getDataCenterId(), 
ClusterMemoryCapacityDisableThreshold.key(), ram_requested);
             }
 
             if (clustersCrossingThreshold != null && 
clustersCrossingThreshold.size() != 0) {
@@ -522,4 +524,14 @@ public class FirstFitPlanner extends PlannerBase 
implements DeploymentClusterPla
             DeploymentPlan plan, ExcludeList avoid) throws 
InsufficientServerCapacityException {
         return PlannerResourceUsage.Shared;
     }
+
+    @Override
+    public String getConfigComponentName() {
+        return DeploymentClusterPlanner.class.getSimpleName();
+    }
+
+    @Override
+    public ConfigKey<?>[] getConfigKeys() {
+        return new ConfigKey<?>[] {ClusterCPUCapacityDisableThreshold, 
ClusterMemoryCapacityDisableThreshold};
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c29cd9d3/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
----------------------------------------------------------------------
diff --git 
a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java 
b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
index a088a4a..806e3af 100755
--- 
a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
+++ 
b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
@@ -119,6 +119,7 @@ import org.apache.cloudstack.context.CallContext;
 import 
org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService;
 import org.apache.cloudstack.framework.config.ConfigDepot;
 import org.apache.cloudstack.framework.config.ConfigKey;
+import org.apache.cloudstack.framework.config.Configurable;
 import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 import org.apache.cloudstack.framework.jobs.AsyncJobManager;
 import org.apache.cloudstack.framework.jobs.impl.AsyncJobVO;
@@ -137,7 +138,7 @@ import java.util.concurrent.*;
  */
 @Local(value = { VirtualNetworkApplianceManager.class, 
VirtualNetworkApplianceService.class })
 public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements 
VirtualNetworkApplianceManager, VirtualNetworkApplianceService,
-        VirtualMachineGuru, Listener {
+        VirtualMachineGuru, Listener, Configurable {
     private static final Logger s_logger = 
Logger.getLogger(VirtualNetworkApplianceManagerImpl.class);
 
     @Inject
@@ -4097,4 +4098,14 @@ public class VirtualNetworkApplianceManagerImpl extends 
ManagerBase implements V
         }
         return jobIds;
     }
+
+    @Override
+    public String getConfigComponentName() {
+        return VirtualNetworkApplianceManagerImpl.class.getSimpleName();
+    }
+
+    @Override
+    public ConfigKey<?>[] getConfigKeys() {
+        return new ConfigKey<?>[] {UseExternalDnsServers};
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c29cd9d3/server/src/com/cloud/server/ConfigurationServerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ConfigurationServerImpl.java 
b/server/src/com/cloud/server/ConfigurationServerImpl.java
index 8459ada..4020926 100755
--- a/server/src/com/cloud/server/ConfigurationServerImpl.java
+++ b/server/src/com/cloud/server/ConfigurationServerImpl.java
@@ -44,6 +44,7 @@ import javax.naming.ConfigurationException;
 
 import org.apache.cloudstack.framework.config.ConfigDepot;
 import org.apache.cloudstack.framework.config.ConfigDepotAdmin;
+import org.apache.cloudstack.framework.config.ConfigKey;
 import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 import org.apache.cloudstack.framework.config.impl.ConfigurationVO;
 import org.apache.commons.codec.binary.Base64;
@@ -771,9 +772,9 @@ public class ConfigurationServerImpl extends ManagerBase 
implements Configuratio
     public List<ConfigurationVO> getConfigListByScope(String scope, Long 
resourceId) {
 
         // Getting the list of parameters defined at the scope
-        List<Config> configList = Config.getConfigListByScope(scope);
+        List<ConfigKey<?>> configList = 
_configDepot.getConfigListByScope(scope);
         List<ConfigurationVO> configVOList = new ArrayList<ConfigurationVO>();
-        for (Config param:configList){
+        for (ConfigKey<?> param:configList){
             ConfigurationVO configVo = _configDao.findByName(param.toString());
             
configVo.setValue(_configDepot.get(param.toString()).valueIn(resourceId).toString());
             configVOList.add(configVo);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c29cd9d3/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 d7ac3f7..78a2336 100644
--- 
a/server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java
+++ 
b/server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java
@@ -24,6 +24,7 @@ import javax.inject.Inject;
 import org.apache.cloudstack.acl.SecurityChecker;
 import org.apache.cloudstack.affinity.AffinityGroupService;
 import org.apache.cloudstack.affinity.dao.AffinityGroupDao;
+import org.apache.cloudstack.framework.config.ConfigDepot;
 import org.apache.cloudstack.region.PortableIpDaoImpl;
 import org.apache.cloudstack.region.dao.RegionDaoImpl;
 import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDaoImpl;
@@ -309,6 +310,11 @@ public class ChildTestConfiguration {
     }
 
     @Bean
+    public ConfigDepot configDepot() {
+        return Mockito.mock(ConfigDepot.class);
+    }
+
+    @Bean
     public CallContext userContext() {
         return Mockito.mock(CallContext.class);
     }

Reply via email to