cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject [4/4] git commit: updated refs/heads/master to b59e3aa
Date Thu, 08 Aug 2013 09:17:23 GMT
Reverting the range of commits that broke the build

This reverts commits 30c33415..f6a2c817bc

Signed-off-by: Prasanna Santhanam <tsp@apache.org>


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

Branch: refs/heads/master
Commit: b59e3aaefced03d40d5b4b63c421c69743bcd387
Parents: a440072
Author: Prasanna Santhanam <tsp@apache.org>
Authored: Thu Aug 8 14:33:15 2013 +0530
Committer: Prasanna Santhanam <tsp@apache.org>
Committed: Thu Aug 8 14:46:56 2013 +0530

----------------------------------------------------------------------
 .../apache/cloudstack/config/Configuration.java |  84 --------
 .../api/command/test/AddClusterCmdTest.java     |  15 +-
 .../api/command/test/AddHostCmdTest.java        |  29 +--
 client/pom.xml                                  |   7 +
 client/tomcatconf/applicationContext.xml.in     |   1 -
 client/tomcatconf/componentContext.xml.in       |   2 +-
 client/tomcatconf/nonossComponentContext.xml.in |   2 +-
 engine/compute/pom.xml                          |  52 +++++
 .../cloudstack/compute/ComputeOrchestrator.java |  34 +++
 .../compute/ComputeOrchestratorImpl.java        |  42 ++++
 .../cloudstack/platform/planning/Concierge.java |  36 ++++
 engine/pom.xml                                  |   1 +
 .../cloud/configuration/ConfigurationVO.java    | 109 ++++++++++
 .../configuration/dao/ConfigurationDao.java     |  69 +++++++
 .../configuration/dao/ConfigurationDaoImpl.java | 205 ++++++++++++++++++
 .../src/com/cloud/keystore/KeystoreDaoImpl.java |  10 +-
 .../cloud/storage/dao/VMTemplateDaoImpl.java    |   4 +-
 .../cache/manager/StorageCacheManagerImpl.java  |   5 +-
 .../StorageCacheReplacementAlgorithmLRU.java    |   5 +-
 .../motion/AncientDataMotionStrategy.java       |   3 +-
 .../storage/image/TemplateServiceImpl.java      |   3 +-
 .../storage/test/ChildTestConfiguration.java    |   3 +-
 .../snapshot/XenserverSnapshotStrategy.java     |   3 +-
 .../cloudstack/storage/LocalHostEndpoint.java   |   5 +-
 .../allocator/AbstractStoragePoolAllocator.java |   2 +-
 .../GarbageCollectingStoragePoolAllocator.java  |   3 +-
 .../allocator/LocalStoragePoolAllocator.java    |   3 +-
 .../storage/datastore/DataStoreManagerImpl.java |  15 +-
 .../storage/image/BaseImageStoreDriverImpl.java |   5 +-
 .../image/db/TemplateDataStoreDaoImpl.java      |  24 +--
 .../storage/volume/VolumeServiceImpl.java       |   3 +-
 framework/cluster/pom.xml                       |  12 --
 .../com/cloud/cluster/ClusterManagerImpl.java   |  27 +--
 .../cluster/ClusterServiceServletAdapter.java   |  10 +-
 .../cluster/ClusterServiceServletImpl.java      |   2 +-
 framework/config/pom.xml                        |  45 ----
 .../framework/config/ConfigDepot.java           |  27 ---
 .../framework/config/ConfigDepotAdmin.java      |  36 ----
 .../framework/config/ConfigDepotImpl.java       | 106 ----------
 .../cloudstack/framework/config/ConfigKey.java  |  84 --------
 .../framework/config/ConfigValue.java           |  78 -------
 .../framework/config/Configurable.java          |  32 ---
 .../framework/config/ConfigurationVO.java       | 175 ----------------
 .../framework/config/ScopedConfigValue.java     |  43 ----
 .../framework/config/dao/ConfigurationDao.java  |  70 -------
 .../config/dao/ConfigurationDaoImpl.java        | 206 -------------------
 .../framework/config/ConfigDepotAdminTest.java  | 131 ------------
 framework/db/pom.xml                            |   2 +-
 .../src/com/cloud/utils/db/GenericDaoBase.java  |   6 +-
 framework/jobs/pom.xml                          |   5 -
 .../jobs/impl/AsyncJobManagerImpl.java          |  20 +-
 framework/pom.xml                               |   5 +-
 .../affinity/HostAntiAffinityProcessor.java     |   3 +-
 .../admin/ratelimit/ResetApiLimitCmd.java       |   2 +-
 .../command/user/ratelimit/GetApiLimitCmd.java  |   2 +-
 .../ratelimit/ApiRateLimitServiceImpl.java      |   4 +-
 .../cloudstack/ratelimit/ApiRateLimitTest.java  |   3 +-
 .../dedicated/DedicatedResourceManagerImpl.java |   2 +-
 .../dedicated/manager/DedicatedApiUnitTest.java |   2 +-
 .../implicitplanner/ImplicitPlannerTest.java    |   2 +-
 .../baremetal/manager/BareMetalDiscoverer.java  |   3 +-
 .../baremetal/manager/BareMetalPlanner.java     |   3 +-
 .../networkservice/BareMetalResourceBase.java   |  11 +-
 .../networkservice/BaremetalPxeManagerImpl.java |   2 +-
 .../com/cloud/ucs/manager/UcsManagerImpl.java   |   3 +-
 .../com/cloud/hypervisor/guru/VMwareGuru.java   |   5 +-
 .../hypervisor/vmware/VmwareDatacenterVO.java   |   8 +-
 .../vmware/manager/VmwareManagerImpl.java       |   2 +-
 .../vmware/VmwareDatacenterApiUnitTest.java     |   2 +-
 .../element/ElasticLoadBalancerElement.java     |   3 +-
 .../lb/ElasticLoadBalancerManagerImpl.java      |   2 +-
 .../element/F5ExternalLoadBalancerElement.java  |   4 +-
 .../lb/InternalLoadBalancerVMManagerImpl.java   |   2 +-
 .../LbChildTestConfiguration.java               |   3 +-
 .../JuniperSRXExternalFirewallElement.java      |   5 +-
 .../cloud/network/element/MidoNetElement.java   |   6 +-
 .../cloud/network/element/NetscalerElement.java |   4 +-
 .../guru/NiciraNvpGuestNetworkGuruTest.java     |   2 +-
 .../cloud/network/ovs/OvsTunnelManagerImpl.java |   3 +-
 .../cloudstack/network/element/SspElement.java  |   3 +-
 .../network/element/SspElementTest.java         |   3 +-
 plugins/pom.xml                                 |  10 -
 .../driver/CloudStackImageStoreDriverImpl.java  |   4 +-
 .../driver/S3ImageStoreDriverImpl.java          |   4 +-
 .../server/auth/LDAPUserAuthenticator.java      |   3 +-
 .../server/auth/test/AuthenticatorTest.java     |  43 ++--
 pom.xml                                         |   9 +-
 server/pom.xml                                  |   5 -
 .../cloud/agent/manager/AgentManagerImpl.java   |  56 +++--
 .../manager/ClusteredAgentManagerImpl.java      |  49 ++---
 .../allocator/impl/FirstFitAllocator.java       |   3 +-
 .../impl/UserConcentratedAllocator.java         |   3 +-
 .../authn/impl/BasicAgentAuthManager.java       |   3 +-
 .../src/com/cloud/alert/AlertManagerImpl.java   |   4 +-
 server/src/com/cloud/api/ApiDBUtils.java        |   2 +-
 server/src/com/cloud/api/ApiServer.java         |   4 +-
 .../com/cloud/api/query/QueryManagerImpl.java   |   2 +-
 .../api/query/dao/AffinityGroupJoinDaoImpl.java |   5 +-
 .../api/query/dao/DomainRouterJoinDaoImpl.java  |   3 +-
 .../cloud/api/query/dao/HostJoinDaoImpl.java    |   3 +-
 .../api/query/dao/ImageStoreJoinDaoImpl.java    |   3 +-
 .../cloud/api/query/dao/ProjectJoinDaoImpl.java |   3 +-
 .../api/query/dao/ResourceTagJoinDaoImpl.java   |   3 +-
 .../api/query/dao/SecurityGroupJoinDaoImpl.java |   3 +-
 .../api/query/dao/StoragePoolJoinDaoImpl.java   |   4 +-
 .../api/query/dao/TemplateJoinDaoImpl.java      |   2 +-
 .../cloud/api/query/dao/UserVmJoinDaoImpl.java  |   3 +-
 .../cloud/api/query/dao/VolumeJoinDaoImpl.java  |   2 +-
 .../com/cloud/capacity/CapacityManagerImpl.java |   4 +-
 server/src/com/cloud/configuration/Config.java  |   9 +
 .../configuration/ConfigurationManagerImpl.java |  17 +-
 .../AgentBasedConsoleProxyManager.java          |   3 +-
 .../com/cloud/consoleproxy/AgentHookBase.java   |   4 +-
 .../ConsoleProxyBalanceAllocator.java           |   3 +-
 .../consoleproxy/ConsoleProxyManagerImpl.java   |   2 +-
 .../consoleproxy/StaticConsoleProxyManager.java |   3 +-
 .../deploy/DeploymentPlanningManagerImpl.java   |   4 +-
 .../src/com/cloud/deploy/FirstFitPlanner.java   |   3 +-
 .../ha/HighAvailabilityManagerExtImpl.java      |   3 +-
 .../cloud/ha/HighAvailabilityManagerImpl.java   |   2 +-
 .../hypervisor/CloudZonesStartupProcessor.java  |   3 +-
 .../kvm/discoverer/LibvirtServerDiscoverer.java |   3 +-
 .../network/ExternalDeviceUsageManagerImpl.java |   3 +-
 .../ExternalFirewallDeviceManagerImpl.java      |   5 +-
 .../network/ExternalIpAddressAllocator.java     |   3 +-
 .../ExternalLoadBalancerDeviceManagerImpl.java  |   3 +-
 .../ExternalNetworkDeviceManagerImpl.java       |   3 +-
 .../cloud/network/Ipv6AddressManagerImpl.java   |   3 +-
 .../com/cloud/network/NetworkManagerImpl.java   |   2 +-
 .../src/com/cloud/network/NetworkModelImpl.java |   3 +-
 .../com/cloud/network/NetworkServiceImpl.java   |   2 +-
 .../cloud/network/NetworkUsageManagerImpl.java  |   2 +-
 .../com/cloud/network/SshKeysDistriMonitor.java |   3 +-
 .../cloud/network/as/AutoScaleManagerImpl.java  |   2 +-
 .../network/element/VirtualRouterElement.java   |   7 +-
 .../network/firewall/FirewallManagerImpl.java   |   2 +-
 .../cloud/network/guru/ControlNetworkGuru.java  |   3 +-
 .../cloud/network/guru/GuestNetworkGuru.java    |   2 +-
 .../network/lb/LBHealthCheckManagerImpl.java    |   3 +-
 .../lb/LoadBalancingRulesManagerImpl.java       |   2 +-
 .../VirtualNetworkApplianceManagerImpl.java     |   3 +-
 .../security/SecurityGroupManagerImpl.java      |  44 ++--
 .../com/cloud/network/vpc/VpcManagerImpl.java   |   2 +-
 .../network/vpn/RemoteAccessVpnManagerImpl.java |   2 +-
 .../network/vpn/Site2SiteVpnManagerImpl.java    |   2 +-
 .../com/cloud/projects/ProjectManagerImpl.java  |   2 +-
 .../src/com/cloud/resource/DiscovererBase.java  |   3 +-
 .../com/cloud/resource/ResourceManagerImpl.java |   2 +-
 .../resourcelimit/ResourceLimitManagerImpl.java |   4 +-
 .../com/cloud/server/ConfigurationServer.java   |   3 +-
 .../cloud/server/ConfigurationServerImpl.java   |  22 +-
 .../com/cloud/server/ManagementServerImpl.java  |   9 +-
 server/src/com/cloud/server/StatsCollector.java |   2 +-
 .../cloud/servlet/RegisterCompleteServlet.java  |   2 +-
 .../com/cloud/storage/StorageManagerImpl.java   |   2 +-
 .../com/cloud/storage/VolumeManagerImpl.java    |   3 +-
 .../storage/download/DownloadMonitorImpl.java   |   3 +-
 .../secondary/SecondaryStorageManagerImpl.java  |   2 +-
 .../storage/snapshot/SnapshotManagerImpl.java   |   3 +-
 .../storage/snapshot/SnapshotSchedulerImpl.java |   2 +-
 .../cloud/storage/upload/UploadMonitorImpl.java |   2 +-
 .../com/cloud/template/TemplateAdapterBase.java |   2 +-
 .../com/cloud/template/TemplateManagerImpl.java |   2 +-
 .../src/com/cloud/usage/UsageServiceImpl.java   |   2 +-
 .../src/com/cloud/user/AccountManagerImpl.java  |   2 +-
 server/src/com/cloud/vm/UserVmManagerImpl.java  |   2 +-
 .../com/cloud/vm/VirtualMachineManagerImpl.java |   8 +-
 .../vm/snapshot/VMSnapshotManagerImpl.java      |   2 +-
 .../GlobalLoadBalancingRulesServiceImpl.java    |   2 +-
 .../SecurityGroupManagerTestConfiguration.java  |   3 +-
 .../vm/DeploymentPlanningManagerImplTest.java   |   6 +-
 server/test/com/cloud/vm/UserVmManagerTest.java |   2 +-
 .../cloud/vm/VirtualMachineManagerImplTest.java |   2 +-
 .../vm/snapshot/VMSnapshotManagerTest.java      |   4 +-
 server/test/com/cloud/vpc/VpcTest.java          |   2 +-
 .../com/cloud/vpc/VpcTestConfiguration.java     |   3 +-
 .../cloud/vpc/dao/MockConfigurationDaoImpl.java |   5 +-
 .../networkoffering/ChildTestConfiguration.java |   2 +-
 .../CreateNetworkOfferingTest.java              |   4 +-
 .../privategw/AclOnPrivateGwTest.java           |   6 +-
 ...GlobalLoadBalancingRulesServiceImplTest.java |   2 +-
 .../LocalNfsSecondaryStorageResource.java       |   4 +-
 .../resource/SecondaryStorageDiscoverer.java    |   3 +-
 setup/db/db/schema-420to430.sql                 |   7 -
 .../com/cloud/usage/UsageAlertManagerImpl.java  |   3 +-
 usage/src/com/cloud/usage/UsageManagerImpl.java |   5 +-
 .../usage/UsageManagerTestConfiguration.java    |   3 +-
 .../apache/cloudstack/config/ConfigDepot.java   |  25 +++
 .../org/apache/cloudstack/config/ConfigKey.java |  98 +++++++++
 .../apache/cloudstack/config/ConfigValue.java   |  76 +++++++
 .../apache/cloudstack/config/Configurable.java  |  21 ++
 .../apache/cloudstack/config/Configuration.java |  33 +++
 .../cloud/hypervisor/vmware/mo/ClusterMO.java   |   2 +-
 .../hypervisor/vmware/mo/DatacenterMO.java      |   2 +-
 .../com/cloud/hypervisor/vmware/mo/HostMO.java  |   2 +-
 .../hypervisor/vmware/mo/PerfManagerMO.java     |   2 +-
 .../hypervisor/vmware/mo/VirtualMachineMO.java  |   2 +-
 197 files changed, 1174 insertions(+), 1655 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/api/src/org/apache/cloudstack/config/Configuration.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/config/Configuration.java b/api/src/org/apache/cloudstack/config/Configuration.java
deleted file mode 100644
index a8031a5..0000000
--- a/api/src/org/apache/cloudstack/config/Configuration.java
+++ /dev/null
@@ -1,84 +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 org.apache.cloudstack.config;
-
-import java.util.Date;
-
-/**
- * Configuration represents one global configuration parameter for CloudStack.
- * Its scope should indicate whether this parameter can be set at different
- * organization levels in CloudStack.
- *
- */
-public interface Configuration {
-
-    /**
-     * @return Category of the parameter.
-     */
-    String getCategory();
-
-    /**
-     * @return Server instance that uses this parameter.
-     */
-    String getInstance();
-
-    /**
-     * @return Component that introduced this parameter.
-     */
-    String getComponent();
-
-    /**
-     * @return Name of the parameter.
-     */
-    String getName();
-
-    /**
-     * @return Value set by the administrator.  Defaults to the defaultValue.
-     */
-    String getValue();
-
-    /**
-     * @return Description of the value and the range of the value.
-     */
-    String getDescription();
-
-    /**
-     * @return Default value for this parameter.  Null indicates this parameter is optional.
-     */
-    String getDefaultValue();
-
-    /**
-     * @return Scope for the parameter.  Null indicates that this parameter is
-     * always global.  A non-null value indicates that this parameter can be
-     * set at a certain organization level.
-     */
-    String getScope();
-
-    /**
-     * @return can the configuration parameter be changed without restarting the server.
-     */
-    boolean isDynamic();
-
-    /**
-     * @return The date this VO was updated by the components.  Note that this is not
-     * a date for when an administrator updates the value.  This is when the system
-     * updated this value.  By searching on this field gives you all the config
-     * parameters that have changed in an upgrade.  Null value indicates that this
-     * parameter is no longer used and can be deleted.
-     */
-    Date getUpdated();
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/api/test/org/apache/cloudstack/api/command/test/AddClusterCmdTest.java
----------------------------------------------------------------------
diff --git a/api/test/org/apache/cloudstack/api/command/test/AddClusterCmdTest.java b/api/test/org/apache/cloudstack/api/command/test/AddClusterCmdTest.java
index ab79b17..90759fe 100644
--- a/api/test/org/apache/cloudstack/api/command/test/AddClusterCmdTest.java
+++ b/api/test/org/apache/cloudstack/api/command/test/AddClusterCmdTest.java
@@ -16,26 +16,25 @@
 // under the License.
 package org.apache.cloudstack.api.command.test;
 
-import java.util.Arrays;
-
 import junit.framework.Assert;
 import junit.framework.TestCase;
 
+import org.apache.cloudstack.api.ResponseGenerator;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.command.admin.cluster.AddClusterCmd;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
 import org.mockito.Mockito;
 
-import org.apache.cloudstack.api.ResponseGenerator;
-import org.apache.cloudstack.api.ServerApiException;
-import org.apache.cloudstack.api.command.admin.cluster.AddClusterCmd;
-
 import com.cloud.exception.DiscoveryException;
 import com.cloud.exception.ResourceInUseException;
 import com.cloud.org.Cluster;
 import com.cloud.resource.ResourceService;
 
+import edu.emory.mathcs.backport.java.util.Arrays;
+
 public class AddClusterCmdTest extends TestCase {
 
     private AddClusterCmd addClusterCmd;
@@ -45,7 +44,6 @@ public class AddClusterCmdTest extends TestCase {
     @Rule
     public ExpectedException expectedException = ExpectedException.none();
 
-    @Override
     @Before
     public void setUp() {
         /*
@@ -112,7 +110,8 @@ public class AddClusterCmdTest extends TestCase {
         Cluster cluster = Mockito.mock(Cluster.class);
         Cluster[] clusterArray = new Cluster[] { cluster };
 
-        Mockito.doReturn(Arrays.asList(clusterArray)).when(resourceService).discoverCluster(addClusterCmd);
+        Mockito.when(resourceService.discoverCluster(addClusterCmd))
+                .thenReturn(Arrays.asList(clusterArray));
 
         addClusterCmd.execute();
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/api/test/org/apache/cloudstack/api/command/test/AddHostCmdTest.java
----------------------------------------------------------------------
diff --git a/api/test/org/apache/cloudstack/api/command/test/AddHostCmdTest.java b/api/test/org/apache/cloudstack/api/command/test/AddHostCmdTest.java
index eb78e7b..531f511 100644
--- a/api/test/org/apache/cloudstack/api/command/test/AddHostCmdTest.java
+++ b/api/test/org/apache/cloudstack/api/command/test/AddHostCmdTest.java
@@ -16,28 +16,27 @@
 // under the License.
 package org.apache.cloudstack.api.command.test;
 
-import java.util.Arrays;
-
 import junit.framework.Assert;
 import junit.framework.TestCase;
 
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-import org.mockito.Mockito;
-
 import org.apache.cloudstack.api.ResponseGenerator;
 import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.command.admin.host.AddHostCmd;
 import org.apache.cloudstack.api.response.HostResponse;
 import org.apache.cloudstack.api.response.ListResponse;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.mockito.Mockito;
 
 import com.cloud.exception.DiscoveryException;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.host.Host;
 import com.cloud.resource.ResourceService;
 
+import edu.emory.mathcs.backport.java.util.Arrays;
+
 public class AddHostCmdTest extends TestCase {
 
     private AddHostCmd addHostCmd;
@@ -47,7 +46,6 @@ public class AddHostCmdTest extends TestCase {
     @Rule
     public ExpectedException expectedException = ExpectedException.none();
 
-    @Override
     @Before
     public void setUp() {
         resourceService = Mockito.mock(ResourceService.class);
@@ -127,12 +125,14 @@ public class AddHostCmdTest extends TestCase {
 
         HostResponse responseHost = new HostResponse();
         responseHost.setName("Test");
-        Mockito.doReturn(Arrays.asList(mockArray)).when(resourceService).discoverHosts(addHostCmd);
-        Mockito.when(responseGenerator.createHostResponse(host)).thenReturn(responseHost);
+        Mockito.when(resourceService.discoverHosts(addHostCmd)).thenReturn(
+                Arrays.asList(mockArray));
+        Mockito.when(responseGenerator.createHostResponse(host)).thenReturn(
+                responseHost);
         addHostCmd.execute();
         Mockito.verify(responseGenerator).createHostResponse(host);
-        @SuppressWarnings("unchecked")
-        ListResponse<HostResponse> actualResponse = ((ListResponse<HostResponse>)addHostCmd.getResponseObject());
+        ListResponse<HostResponse> actualResponse = ((ListResponse<HostResponse>) addHostCmd
+                .getResponseObject());
         Assert.assertEquals(responseHost, actualResponse.getResponses().get(0));
         Assert.assertEquals("addhostresponse", actualResponse.getResponseName());
 
@@ -144,7 +144,8 @@ public class AddHostCmdTest extends TestCase {
         addHostCmd._resourceService = resourceService;
 
         try {
-            Mockito.when(resourceService.discoverHosts(addHostCmd)).thenThrow(DiscoveryException.class);
+            Mockito.when(resourceService.discoverHosts(addHostCmd)).thenThrow(
+                    DiscoveryException.class);
         } catch (InvalidParameterValueException e) {
             e.printStackTrace();
         } catch (IllegalArgumentException e) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/client/pom.xml
----------------------------------------------------------------------
diff --git a/client/pom.xml b/client/pom.xml
index 1afe5b8..bebf86a 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -195,6 +195,13 @@
       <artifactId>cloud-engine-components-api</artifactId>
       <version>${project.version}</version>
     </dependency>
+
+    <dependency>
+      <groupId>org.apache.cloudstack</groupId>
+      <artifactId>cloud-engine-compute</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
     <dependency>
       <groupId>org.apache.cloudstack</groupId>
       <artifactId>cloud-engine-network</artifactId>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/client/tomcatconf/applicationContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/applicationContext.xml.in b/client/tomcatconf/applicationContext.xml.in
index 26cd047..b832b09 100644
--- a/client/tomcatconf/applicationContext.xml.in
+++ b/client/tomcatconf/applicationContext.xml.in
@@ -81,7 +81,6 @@
   </bean>
 
   <bean id="messageBus" class = "org.apache.cloudstack.framework.messagebus.MessageBusBase" />
-  <bean id="configDepot" class = "org.apache.cloudstack.framework.config.ConfigDepotImpl" />
 
   <!--
     DAO with customized configuration

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/client/tomcatconf/componentContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/componentContext.xml.in b/client/tomcatconf/componentContext.xml.in
index e0552aa..5ca0750 100644
--- a/client/tomcatconf/componentContext.xml.in
+++ b/client/tomcatconf/componentContext.xml.in
@@ -46,7 +46,7 @@
 -->
   
   <bean id="databaseUpgradeChecker" class="com.cloud.upgrade.DatabaseUpgradeChecker" />
-  <bean id="configurationDaoImpl" class="org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl" />
+  <bean id="configurationDaoImpl" class="com.cloud.configuration.dao.ConfigurationDaoImpl" />
   <bean id="GlobalLoadBalancingRulesServiceImpl" class ="org.apache.cloudstack.region.gslb.GlobalLoadBalancingRulesServiceImpl" />
 
   <!--

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/client/tomcatconf/nonossComponentContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/nonossComponentContext.xml.in b/client/tomcatconf/nonossComponentContext.xml.in
index 2be071e..e9290db 100644
--- a/client/tomcatconf/nonossComponentContext.xml.in
+++ b/client/tomcatconf/nonossComponentContext.xml.in
@@ -52,7 +52,7 @@
   <!--
     DAO with customized configuration under non-OSS deployment
   -->
-  <bean id="configurationDaoImpl" class="org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl">
+  <bean id="configurationDaoImpl" class="com.cloud.configuration.dao.ConfigurationDaoImpl">
     <property name="configParams">
       <map>
         <entry key="premium" value="true" />

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/engine/compute/pom.xml
----------------------------------------------------------------------
diff --git a/engine/compute/pom.xml b/engine/compute/pom.xml
new file mode 100644
index 0000000..9ad9ebc
--- /dev/null
+++ b/engine/compute/pom.xml
@@ -0,0 +1,52 @@
+<!--
+  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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>cloud-engine-compute</artifactId>
+  <name>Apache CloudStack Cloud Engine Compute Component</name>
+  <parent>
+    <groupId>org.apache.cloudstack</groupId>
+    <artifactId>cloud-engine</artifactId>
+    <version>4.3.0-SNAPSHOT</version>
+    <relativePath>../pom.xml</relativePath>
+  </parent>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.cloudstack</groupId>
+      <artifactId>cloud-engine-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.cloudstack</groupId>
+      <artifactId>cloud-framework-ipc</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.cloudstack</groupId>
+      <artifactId>cloud-engine-components-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+  </dependencies>
+  <build>
+    <defaultGoal>install</defaultGoal>
+    <sourceDirectory>src</sourceDirectory>
+    <testSourceDirectory>test</testSourceDirectory>
+  </build>
+</project>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/engine/compute/src/org/apache/cloudstack/compute/ComputeOrchestrator.java
----------------------------------------------------------------------
diff --git a/engine/compute/src/org/apache/cloudstack/compute/ComputeOrchestrator.java b/engine/compute/src/org/apache/cloudstack/compute/ComputeOrchestrator.java
new file mode 100755
index 0000000..dc5027e
--- /dev/null
+++ b/engine/compute/src/org/apache/cloudstack/compute/ComputeOrchestrator.java
@@ -0,0 +1,34 @@
+/*
+ * 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 org.apache.cloudstack.compute;
+
+import java.util.logging.Handler;
+
+public interface ComputeOrchestrator {
+    /**
+     * start the vm
+     * @param vm vm
+     * @param reservationId
+     */
+    void start(String vm, String reservationId, Handler handler);
+
+    void cancel(String reservationId);
+
+    void stop(String vm, String reservationId);
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/engine/compute/src/org/apache/cloudstack/compute/ComputeOrchestratorImpl.java
----------------------------------------------------------------------
diff --git a/engine/compute/src/org/apache/cloudstack/compute/ComputeOrchestratorImpl.java b/engine/compute/src/org/apache/cloudstack/compute/ComputeOrchestratorImpl.java
new file mode 100755
index 0000000..12d4533
--- /dev/null
+++ b/engine/compute/src/org/apache/cloudstack/compute/ComputeOrchestratorImpl.java
@@ -0,0 +1,42 @@
+/*
+ * 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 org.apache.cloudstack.compute;
+
+import java.util.logging.Handler;
+
+
+public class ComputeOrchestratorImpl implements ComputeOrchestrator {
+
+    @Override
+    public void cancel(String reservationId) {
+    }
+
+    @Override
+    public void stop(String vm, String reservationId) {
+        // Retrieve the VM
+        // Locate the HypervisorGuru based on the VM type
+        // Call HypervisorGuru to stop the VM
+    }
+
+    @Override
+    public void start(String vm, String reservationId, Handler handler) {
+        // TODO Auto-generated method stub
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/engine/planning/src/org/apache/cloudstack/platform/planning/Concierge.java
----------------------------------------------------------------------
diff --git a/engine/planning/src/org/apache/cloudstack/platform/planning/Concierge.java b/engine/planning/src/org/apache/cloudstack/platform/planning/Concierge.java
new file mode 100755
index 0000000..97dfb2b
--- /dev/null
+++ b/engine/planning/src/org/apache/cloudstack/platform/planning/Concierge.java
@@ -0,0 +1,36 @@
+/*
+ * 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 org.apache.cloudstack.platform.planning;
+
+import org.apache.cloudstack.framework.ipc.Ipc;
+
+public interface Concierge {
+    @Ipc(topic="cs.concierge.reserve")
+    String reserve(String vm, String planner, Long until);
+
+    @Ipc(topic="cs.concierge.cancel")
+    String cancel(String reservationId);
+
+    @Ipc(topic="cs.concierge.claim")
+    String claim(String reservationId);
+
+    @Ipc(topic="cs.concierge.reserveAnother")
+    String reserveAnother(String reservationId);
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/engine/pom.xml
----------------------------------------------------------------------
diff --git a/engine/pom.xml b/engine/pom.xml
index 040246a..25a2fa4 100644
--- a/engine/pom.xml
+++ b/engine/pom.xml
@@ -32,6 +32,7 @@
   </build>
   <modules>
     <module>api</module>
+    <module>compute</module>
     <module>orchestration</module>
     <module>storage</module>
     <module>storage/volume</module>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/engine/schema/src/com/cloud/configuration/ConfigurationVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/configuration/ConfigurationVO.java b/engine/schema/src/com/cloud/configuration/ConfigurationVO.java
new file mode 100644
index 0000000..c0e02b5
--- /dev/null
+++ b/engine/schema/src/com/cloud/configuration/ConfigurationVO.java
@@ -0,0 +1,109 @@
+// 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.configuration;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+import org.apache.cloudstack.config.Configuration;
+
+import com.cloud.utils.crypt.DBEncryptionUtil;
+
+@Entity
+@Table(name="configuration")
+public class ConfigurationVO implements Configuration{
+	@Column(name="instance")
+    private String instance;
+
+	@Column(name="component")
+	private String component;
+
+	@Id
+	@Column(name="name")
+    private String name;
+
+	@Column(name="value", length=4095)
+    private String value;
+
+	@Column(name="description", length=1024)
+    private String description;
+
+	@Column(name="category")
+	private String category;
+
+	protected ConfigurationVO() {}
+
+	public ConfigurationVO(String category, String instance, String component, String name, String value, String description) {
+		this.category = category;
+		this.instance = instance;
+		this.component = component;
+		this.name = name;
+		this.value = value;
+		this.description = description;
+	}
+
+	public String getCategory() {
+		return category;
+	}
+
+	public void setCategory(String category) {
+		this.category = category;
+	}
+
+	public String getInstance() {
+		return instance;
+	}
+
+	public void setInstance(String instance) {
+		this.instance = instance;
+	}
+
+	public String getComponent() {
+	    return component;
+	}
+
+	public void setComponent(String component) {
+		this.component = component;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getValue() {
+		return (("Hidden".equals(getCategory()) || "Secure".equals(getCategory())) ? DBEncryptionUtil.decrypt(value) : value);
+	}
+
+	public void setValue(String value) {
+		this.value = value;
+	}
+
+	public String getDescription() {
+		return description;
+	}
+
+	public void setDescription(String description) {
+		this.description = description;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/engine/schema/src/com/cloud/configuration/dao/ConfigurationDao.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/configuration/dao/ConfigurationDao.java b/engine/schema/src/com/cloud/configuration/dao/ConfigurationDao.java
new file mode 100644
index 0000000..77a25b1
--- /dev/null
+++ b/engine/schema/src/com/cloud/configuration/dao/ConfigurationDao.java
@@ -0,0 +1,69 @@
+// 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.configuration.dao;
+
+import java.util.Map;
+import java.util.List;
+
+import com.cloud.configuration.ConfigurationVO;
+import com.cloud.utils.db.GenericDao;
+
+public interface ConfigurationDao extends GenericDao<ConfigurationVO, String> {
+
+	/**
+	 *
+	 *    1. params passed in.
+	 *    2. configuration for the instance.
+	 *    3. configuration for the DEFAULT instance.
+	 *
+	 * @param params parameters from the components.xml which will override the database values.
+	 * @return a consolidated look at the configuration parameters.
+	 */
+    public Map<String, String> getConfiguration(String instance, Map<String, ? extends Object> params);
+
+    public Map<String, String> getConfiguration(Map<String, ? extends Object> params);
+
+    public Map<String, String> getConfiguration();
+
+    /**
+     * Updates a configuration value
+     * @param value the new value
+     * @return true if success, false if failure
+     */
+    public boolean update(String name, String value);
+
+    /**
+     * Gets the value for the specified configuration name
+     * @return value
+     */
+    public String getValue(String name);
+
+    public String getValueAndInitIfNotExist(String name, String category, String initValue);
+
+
+    /**
+     * returns whether or not this is a premium configuration
+     * @return true if premium configuration, false otherwise
+     */
+    boolean isPremium();
+
+    ConfigurationVO findByName(String name);
+
+	boolean update(String name, String category, String value);
+
+	void invalidateCache();
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/engine/schema/src/com/cloud/configuration/dao/ConfigurationDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/configuration/dao/ConfigurationDaoImpl.java b/engine/schema/src/com/cloud/configuration/dao/ConfigurationDaoImpl.java
new file mode 100644
index 0000000..853ae6b
--- /dev/null
+++ b/engine/schema/src/com/cloud/configuration/dao/ConfigurationDaoImpl.java
@@ -0,0 +1,205 @@
+// 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.configuration.dao;
+
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.PostConstruct;
+import javax.ejb.Local;
+import javax.naming.ConfigurationException;
+
+import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
+
+import com.cloud.configuration.ConfigurationVO;
+import com.cloud.utils.component.ComponentLifecycle;
+import com.cloud.utils.crypt.DBEncryptionUtil;
+import com.cloud.utils.db.DB;
+import com.cloud.utils.db.GenericDaoBase;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+import com.cloud.utils.db.Transaction;
+import com.cloud.utils.exception.CloudRuntimeException;
+
+@Component
+@Local(value={ConfigurationDao.class})
+public class ConfigurationDaoImpl extends GenericDaoBase<ConfigurationVO, String> implements ConfigurationDao {
+    private static final Logger s_logger = Logger.getLogger(ConfigurationDaoImpl.class);
+    private Map<String, String> _configs = null;
+    private boolean _premium;
+
+    final SearchBuilder<ConfigurationVO> InstanceSearch;
+    final SearchBuilder<ConfigurationVO> NameSearch;
+
+    public static final String UPDATE_CONFIGURATION_SQL = "UPDATE configuration SET value = ? WHERE name = ?";
+
+    public ConfigurationDaoImpl () {
+        InstanceSearch = createSearchBuilder();
+        InstanceSearch.and("instance", InstanceSearch.entity().getInstance(), SearchCriteria.Op.EQ);
+
+        NameSearch = createSearchBuilder();
+        NameSearch.and("name", NameSearch.entity().getName(), SearchCriteria.Op.EQ);
+        setRunLevel(ComponentLifecycle.RUN_LEVEL_SYSTEM_BOOTSTRAP);
+    }
+
+    @Override
+    public boolean isPremium() {
+        return _premium;
+    }
+
+    @Override
+    public void invalidateCache() {
+	_configs = null;
+    }
+
+    @Override
+    public Map<String, String> getConfiguration(String instance, Map<String, ? extends Object> params) {
+        if (_configs == null) {
+            _configs = new HashMap<String, String>();
+
+            SearchCriteria<ConfigurationVO> sc = InstanceSearch.create();
+            sc.setParameters("instance", "DEFAULT");
+
+            List<ConfigurationVO> configurations = listIncludingRemovedBy(sc);
+
+            for (ConfigurationVO config : configurations) {
+		if (config.getValue() != null)
+			_configs.put(config.getName(), config.getValue());
+            }
+
+            if(!"DEFAULT".equals(instance)){
+		//Default instance params are already added, need not add again
+		sc = InstanceSearch.create();
+		sc.setParameters("instance", instance);
+
+		configurations = listIncludingRemovedBy(sc);
+
+		for (ConfigurationVO config : configurations) {
+			if (config.getValue() != null)
+				_configs.put(config.getName(), config.getValue());
+		}
+            }
+
+        }
+
+        mergeConfigs(_configs, params);
+        return _configs;
+    }
+
+    @Override
+    public Map<String, String> getConfiguration(Map<String, ? extends Object> params) {
+        return getConfiguration("DEFAULT", params);
+    }
+
+    @Override
+    public Map<String, String> getConfiguration() {
+        return getConfiguration("DEFAULT", new HashMap<String, Object>());
+    }
+
+    protected void mergeConfigs(Map<String, String> dbParams, Map<String, ? extends Object> xmlParams) {
+        for (Map.Entry<String, ? extends Object> param : xmlParams.entrySet()) {
+            dbParams.put(param.getKey(), (String)param.getValue());
+        }
+    }
+
+    @Override
+	public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
+	super.configure(name, params);
+
+	Object premium = params.get("premium");
+        _premium = (premium != null) && ((String) premium).equals("true");
+
+        return true;
+    }
+
+    //Use update method with category instead
+    @Override @Deprecated
+    public boolean update(String name, String value) {
+	Transaction txn = Transaction.currentTxn();
+		try {
+			PreparedStatement stmt = txn.prepareStatement(UPDATE_CONFIGURATION_SQL);
+			stmt.setString(1, value);
+			stmt.setString(2, name);
+			stmt.executeUpdate();
+			return true;
+		} catch (Exception e) {
+			s_logger.warn("Unable to update Configuration Value", e);
+		}
+		return false;
+    }
+
+    @Override
+    public boolean update(String name, String category, String value) {
+	Transaction txn = Transaction.currentTxn();
+		try {
+			value = ("Hidden".equals(category) || "Secure".equals(category)) ? DBEncryptionUtil.encrypt(value) : value;
+			PreparedStatement stmt = txn.prepareStatement(UPDATE_CONFIGURATION_SQL);
+			stmt.setString(1, value);
+			stmt.setString(2, name);
+			stmt.executeUpdate();
+			return true;
+		} catch (Exception e) {
+			s_logger.warn("Unable to update Configuration Value", e);
+		}
+		return false;
+    }
+
+    @Override
+    public String getValue(String name) {
+	ConfigurationVO config =  findByName(name);
+        return (config == null) ? null : config.getValue();
+    }
+
+    @Override
+    @DB
+    public String getValueAndInitIfNotExist(String name, String category, String initValue) {
+        String returnValue = initValue;
+        try {
+            ConfigurationVO config = findByName(name);
+            if (config != null) {
+                if (config.getValue() != null) {
+                    returnValue = config.getValue();
+                } else {
+                    update(name, category, initValue);
+                }
+            } else {
+                if (category.equals("Hidden") || category.equals("Secure")) {
+                    initValue = DBEncryptionUtil.encrypt(initValue);
+                }
+                ConfigurationVO newConfig = new ConfigurationVO(category, "DEFAULT", "management-server", name, initValue, "");
+                persist(newConfig);
+            }
+            return returnValue;
+        } catch (Exception e) {
+            s_logger.warn("Unable to update Configuration Value", e);
+            throw new CloudRuntimeException("Unable to initialize configuration variable: " + name);
+
+        }
+    }
+
+    @Override
+    public ConfigurationVO findByName(String name) {
+        SearchCriteria<ConfigurationVO> sc = NameSearch.create();
+        sc.setParameters("name", name);
+        return findOneIncludingRemovedBy(sc);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/engine/schema/src/com/cloud/keystore/KeystoreDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/keystore/KeystoreDaoImpl.java b/engine/schema/src/com/cloud/keystore/KeystoreDaoImpl.java
index f53f228..0ea97c7 100644
--- a/engine/schema/src/com/cloud/keystore/KeystoreDaoImpl.java
+++ b/engine/schema/src/com/cloud/keystore/KeystoreDaoImpl.java
@@ -17,7 +17,6 @@
 package com.cloud.keystore;
 
 import java.sql.PreparedStatement;
-import java.util.Collections;
 import java.util.Comparator;
 import java.util.List;
 
@@ -33,6 +32,8 @@ import com.cloud.utils.db.SearchCriteria.Op;
 import com.cloud.utils.db.Transaction;
 import com.cloud.utils.exception.CloudRuntimeException;
 
+import edu.emory.mathcs.backport.java.util.Collections;
+
 @Component
 @Local(value={KeystoreDao.class})
 public class KeystoreDaoImpl extends GenericDaoBase<KeystoreVO, Long> implements KeystoreDao {
@@ -53,8 +54,7 @@ public class KeystoreDaoImpl extends GenericDaoBase<KeystoreVO, Long> implements
 	public List<KeystoreVO> findCertChain() {
 		SearchCriteria<KeystoreVO> sc =  CertChainSearch.create();
 		List<KeystoreVO> ks = listBy(sc);
-		Collections.sort(ks, new Comparator() { @Override
-        public int compare(Object o1, Object o2) {
+		Collections.sort(ks, new Comparator() { public int compare(Object o1, Object o2) {
 			Integer seq1 = ((KeystoreVO)o1).getIndex();
 			Integer seq2 = ((KeystoreVO)o2).getIndex();
 			return seq1.compareTo(seq2);
@@ -99,7 +99,7 @@ public class KeystoreDaoImpl extends GenericDaoBase<KeystoreVO, Long> implements
 	@Override
 	@DB
 	public void save(String alias, String certificate, Integer index, String domainSuffix) {
-		KeystoreVO ks = findByName(alias);
+		KeystoreVO ks = this.findByName(alias);
 		if (ks != null) {
 			ks.setCertificate(certificate);
 			ks.setName(alias);
@@ -112,7 +112,7 @@ public class KeystoreDaoImpl extends GenericDaoBase<KeystoreVO, Long> implements
 			newks.setName(alias);
 			newks.setIndex(index);
 			newks.setDomainSuffix(domainSuffix);
-			persist(newks);
+			this.persist(newks);
 		}
 	}
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/engine/schema/src/com/cloud/storage/dao/VMTemplateDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/VMTemplateDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/VMTemplateDaoImpl.java
index 9f255c9..9243225 100755
--- a/engine/schema/src/com/cloud/storage/dao/VMTemplateDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/VMTemplateDaoImpl.java
@@ -30,14 +30,12 @@ import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
 import com.cloud.storage.VMTemplateStorageResourceAssoc;
-
-import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreDao;
 import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreVO;
-
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
+import com.cloud.configuration.dao.ConfigurationDao;
 import com.cloud.dc.dao.DataCenterDao;
 import com.cloud.domain.dao.DomainDao;
 import com.cloud.host.Host;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/engine/storage/cache/src/org/apache/cloudstack/storage/cache/manager/StorageCacheManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/cache/src/org/apache/cloudstack/storage/cache/manager/StorageCacheManagerImpl.java b/engine/storage/cache/src/org/apache/cloudstack/storage/cache/manager/StorageCacheManagerImpl.java
index 083b7c1..a810772 100644
--- a/engine/storage/cache/src/org/apache/cloudstack/storage/cache/manager/StorageCacheManagerImpl.java
+++ b/engine/storage/cache/src/org/apache/cloudstack/storage/cache/manager/StorageCacheManagerImpl.java
@@ -19,6 +19,7 @@
 package org.apache.cloudstack.storage.cache.manager;
 
 import com.cloud.configuration.Config;
+import com.cloud.configuration.dao.ConfigurationDao;
 import com.cloud.storage.DataStoreRole;
 import com.cloud.utils.NumbersUtil;
 import com.cloud.utils.component.Manager;
@@ -28,20 +29,16 @@ import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.SearchCriteria2;
 import com.cloud.utils.db.SearchCriteriaService;
 import com.cloud.utils.exception.CloudRuntimeException;
-
 import org.apache.cloudstack.engine.subsystem.api.storage.*;
 import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.Event;
 import org.apache.cloudstack.framework.async.AsyncCallFuture;
-import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 import org.apache.cloudstack.storage.cache.allocator.StorageCacheAllocator;
 import org.apache.cloudstack.storage.datastore.ObjectInDataStoreManager;
 import org.apache.cloudstack.storage.datastore.db.ImageStoreVO;
-
 import org.apache.log4j.Logger;
 
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
-
 import java.util.*;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Executors;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/engine/storage/cache/src/org/apache/cloudstack/storage/cache/manager/StorageCacheReplacementAlgorithmLRU.java
----------------------------------------------------------------------
diff --git a/engine/storage/cache/src/org/apache/cloudstack/storage/cache/manager/StorageCacheReplacementAlgorithmLRU.java b/engine/storage/cache/src/org/apache/cloudstack/storage/cache/manager/StorageCacheReplacementAlgorithmLRU.java
index 424a8fb..440bf53 100644
--- a/engine/storage/cache/src/org/apache/cloudstack/storage/cache/manager/StorageCacheReplacementAlgorithmLRU.java
+++ b/engine/storage/cache/src/org/apache/cloudstack/storage/cache/manager/StorageCacheReplacementAlgorithmLRU.java
@@ -18,23 +18,20 @@
  */
 package org.apache.cloudstack.storage.cache.manager;
 import com.cloud.configuration.Config;
+import com.cloud.configuration.dao.ConfigurationDao;
 import com.cloud.utils.DateUtil;
 import com.cloud.utils.NumbersUtil;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.SearchCriteria2;
 import com.cloud.utils.db.SearchCriteriaService;
-
 import org.apache.cloudstack.engine.subsystem.api.storage.*;
-import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 import org.apache.cloudstack.storage.datastore.db.SnapshotDataStoreVO;
 import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreVO;
 import org.apache.cloudstack.storage.datastore.db.VolumeDataStoreVO;
-
 import org.apache.commons.lang.math.NumberUtils;
 
 import java.util.Calendar;
 import java.util.Date;
-
 import javax.annotation.PostConstruct;
 import javax.inject.Inject;
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
----------------------------------------------------------------------
diff --git a/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java b/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
index 8537a1c..5b791ab 100644
--- a/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
+++ b/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
@@ -39,14 +39,12 @@ import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo;
 import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo;
 import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
-import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 import org.apache.cloudstack.storage.command.CopyCommand;
 import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
 import org.apache.cloudstack.storage.datastore.db.SnapshotDataStoreDao;
 import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreDao;
 import org.apache.cloudstack.storage.datastore.db.VolumeDataStoreDao;
 import org.apache.cloudstack.storage.image.datastore.ImageStoreEntity;
-
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
@@ -59,6 +57,7 @@ import com.cloud.agent.api.to.DataTO;
 import com.cloud.agent.api.to.NfsTO;
 import com.cloud.agent.api.to.VirtualMachineTO;
 import com.cloud.configuration.Config;
+import com.cloud.configuration.dao.ConfigurationDao;
 import com.cloud.host.Host;
 import com.cloud.host.dao.HostDao;
 import com.cloud.hypervisor.Hypervisor.HypervisorType;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
index 0a7f31c..9eef399 100644
--- a/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
+++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
@@ -48,7 +48,6 @@ import org.apache.cloudstack.framework.async.AsyncCallFuture;
 import org.apache.cloudstack.framework.async.AsyncCallbackDispatcher;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
 import org.apache.cloudstack.framework.async.AsyncRpcContext;
-import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 import org.apache.cloudstack.storage.command.CommandResult;
 import org.apache.cloudstack.storage.command.DeleteCommand;
 import org.apache.cloudstack.storage.datastore.DataObjectManager;
@@ -58,7 +57,6 @@ import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreVO;
 import org.apache.cloudstack.storage.image.datastore.ImageStoreEntity;
 import org.apache.cloudstack.storage.image.store.TemplateObject;
 import org.apache.cloudstack.storage.to.TemplateObjectTO;
-
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
@@ -67,6 +65,7 @@ import com.cloud.agent.api.storage.ListTemplateAnswer;
 import com.cloud.agent.api.storage.ListTemplateCommand;
 import com.cloud.alert.AlertManager;
 import com.cloud.configuration.Config;
+import com.cloud.configuration.dao.ConfigurationDao;
 import com.cloud.dc.DataCenterVO;
 import com.cloud.dc.dao.ClusterDao;
 import com.cloud.dc.dao.DataCenterDao;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/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 86cafa8..817262c 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
@@ -21,12 +21,10 @@ import java.io.IOException;
 import org.apache.cloudstack.acl.APIChecker;
 import org.apache.cloudstack.engine.service.api.OrchestrationService;
 import org.apache.cloudstack.engine.subsystem.api.storage.EndPointSelector;
-import org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl;
 import org.apache.cloudstack.framework.rpc.RpcProvider;
 import org.apache.cloudstack.storage.cache.manager.StorageCacheManagerImpl;
 import org.apache.cloudstack.storage.test.ChildTestConfiguration.Library;
 import org.apache.cloudstack.test.utils.SpringUtils;
-
 import org.mockito.Mockito;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ComponentScan;
@@ -42,6 +40,7 @@ import com.cloud.alert.AlertManager;
 import com.cloud.capacity.dao.CapacityDaoImpl;
 import com.cloud.cluster.ClusteredAgentRebalanceService;
 import com.cloud.cluster.agentlb.dao.HostTransferMapDaoImpl;
+import com.cloud.configuration.dao.ConfigurationDaoImpl;
 import com.cloud.dc.ClusterDetailsDaoImpl;
 import com.cloud.dc.dao.ClusterDaoImpl;
 import com.cloud.dc.dao.DataCenterDaoImpl;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java
----------------------------------------------------------------------
diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java
index d860dea..3e6c508 100644
--- a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java
+++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java
@@ -21,15 +21,14 @@ import javax.inject.Inject;
 import org.apache.cloudstack.engine.subsystem.api.storage.*;
 import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.Event;
 import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.State;
-import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 import org.apache.cloudstack.storage.command.CreateObjectAnswer;
 import org.apache.cloudstack.storage.datastore.db.SnapshotDataStoreDao;
 import org.apache.cloudstack.storage.datastore.db.SnapshotDataStoreVO;
 import org.apache.cloudstack.storage.to.SnapshotObjectTO;
-
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
+import com.cloud.configuration.dao.ConfigurationDao;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.Snapshot;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/engine/storage/src/org/apache/cloudstack/storage/LocalHostEndpoint.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/LocalHostEndpoint.java b/engine/storage/src/org/apache/cloudstack/storage/LocalHostEndpoint.java
index 83d34a0..68faa47 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/LocalHostEndpoint.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/LocalHostEndpoint.java
@@ -22,12 +22,11 @@ import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.TimeUnit;
 
 import com.cloud.configuration.Config;
+import com.cloud.configuration.dao.ConfigurationDao;
+import com.cloud.configuration.dao.ConfigurationDaoImpl;
 import com.cloud.utils.component.ComponentContext;
-
 import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
-import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
-import org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl;
 import org.apache.cloudstack.storage.command.CopyCommand;
 import org.apache.cloudstack.storage.command.DownloadCommand;
 import org.apache.cloudstack.storage.resource.LocalNfsSecondaryStorageResource;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java b/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java
index 9d5d7a4..851377e 100755
--- a/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java
@@ -31,9 +31,9 @@ import org.apache.log4j.Logger;
 
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
 import org.apache.cloudstack.engine.subsystem.api.storage.StoragePoolAllocator;
-import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
 
+import com.cloud.configuration.dao.ConfigurationDao;
 import com.cloud.dc.ClusterVO;
 import com.cloud.dc.dao.ClusterDao;
 import com.cloud.deploy.DeploymentPlan;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/engine/storage/src/org/apache/cloudstack/storage/allocator/GarbageCollectingStoragePoolAllocator.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/allocator/GarbageCollectingStoragePoolAllocator.java b/engine/storage/src/org/apache/cloudstack/storage/allocator/GarbageCollectingStoragePoolAllocator.java
index 9c2c76f..15b4407 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/allocator/GarbageCollectingStoragePoolAllocator.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/GarbageCollectingStoragePoolAllocator.java
@@ -24,10 +24,9 @@ import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
 import org.apache.cloudstack.engine.subsystem.api.storage.StoragePoolAllocator;
-import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
-
 import org.apache.log4j.Logger;
 
+import com.cloud.configuration.dao.ConfigurationDao;
 import com.cloud.deploy.DeploymentPlan;
 import com.cloud.deploy.DeploymentPlanner.ExcludeList;
 import com.cloud.storage.StorageManager;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/engine/storage/src/org/apache/cloudstack/storage/allocator/LocalStoragePoolAllocator.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/allocator/LocalStoragePoolAllocator.java b/engine/storage/src/org/apache/cloudstack/storage/allocator/LocalStoragePoolAllocator.java
index 3ea2c46..e0d0145 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/allocator/LocalStoragePoolAllocator.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/LocalStoragePoolAllocator.java
@@ -26,13 +26,12 @@ import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
 import org.apache.cloudstack.engine.subsystem.api.storage.StoragePoolAllocator;
-import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
-
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.capacity.dao.CapacityDao;
+import com.cloud.configuration.dao.ConfigurationDao;
 import com.cloud.deploy.DeploymentPlan;
 import com.cloud.deploy.DeploymentPlanner.ExcludeList;
 import com.cloud.service.dao.ServiceOfferingDao;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java
index a9263a9..00d08d7 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java
@@ -18,21 +18,18 @@
  */
 package org.apache.cloudstack.storage.datastore;
 
-import java.util.Collections;
-import java.util.List;
-
-import javax.inject.Inject;
-
-import org.springframework.stereotype.Component;
-
+import com.cloud.storage.DataStoreRole;
+import com.cloud.utils.exception.CloudRuntimeException;
+import edu.emory.mathcs.backport.java.util.Collections;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
 import org.apache.cloudstack.engine.subsystem.api.storage.Scope;
 import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
 import org.apache.cloudstack.storage.image.datastore.ImageStoreProviderManager;
+import org.springframework.stereotype.Component;
 
-import com.cloud.storage.DataStoreRole;
-import com.cloud.utils.exception.CloudRuntimeException;
+import javax.inject.Inject;
+import java.util.List;
 
 @Component
 public class DataStoreManagerImpl implements DataStoreManager {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/engine/storage/src/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java b/engine/storage/src/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java
index 3a70d8f..fcbc5c9 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java
@@ -23,13 +23,13 @@ import com.cloud.agent.api.storage.DownloadAnswer;
 import com.cloud.agent.api.storage.Proxy;
 import com.cloud.agent.api.to.DataObjectType;
 import com.cloud.agent.api.to.DataTO;
+import com.cloud.configuration.dao.ConfigurationDao;
 import com.cloud.storage.VMTemplateStorageResourceAssoc;
 import com.cloud.storage.VMTemplateVO;
 import com.cloud.storage.VolumeVO;
 import com.cloud.storage.dao.VMTemplateDao;
 import com.cloud.storage.dao.VolumeDao;
 import com.cloud.storage.download.DownloadMonitor;
-
 import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult;
 import org.apache.cloudstack.engine.subsystem.api.storage.CreateCmdResult;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataObject;
@@ -39,18 +39,15 @@ import org.apache.cloudstack.engine.subsystem.api.storage.EndPointSelector;
 import org.apache.cloudstack.framework.async.AsyncCallbackDispatcher;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
 import org.apache.cloudstack.framework.async.AsyncRpcContext;
-import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 import org.apache.cloudstack.storage.command.CommandResult;
 import org.apache.cloudstack.storage.command.DeleteCommand;
 import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreDao;
 import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreVO;
 import org.apache.cloudstack.storage.datastore.db.VolumeDataStoreDao;
 import org.apache.cloudstack.storage.datastore.db.VolumeDataStoreVO;
-
 import org.apache.log4j.Logger;
 
 import javax.inject.Inject;
-
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.Date;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/engine/storage/src/org/apache/cloudstack/storage/image/db/TemplateDataStoreDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/db/TemplateDataStoreDaoImpl.java b/engine/storage/src/org/apache/cloudstack/storage/image/db/TemplateDataStoreDaoImpl.java
index 5f47de8..7388ca9 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/image/db/TemplateDataStoreDaoImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/image/db/TemplateDataStoreDaoImpl.java
@@ -17,7 +17,6 @@
 package org.apache.cloudstack.storage.image.db;
 
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
@@ -25,9 +24,6 @@ import java.util.Map;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
-import org.apache.log4j.Logger;
-import org.springframework.stereotype.Component;
-
 import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
@@ -36,16 +32,20 @@ import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreState
 import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
 import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreDao;
 import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreVO;
+import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
 
 import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.VMTemplateStorageResourceAssoc.Status;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.SearchCriteria.Op;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.SearchCriteria.Op;
 import com.cloud.utils.db.UpdateBuilder;
 
+import edu.emory.mathcs.backport.java.util.Collections;
+
 @Component
 public class TemplateDataStoreDaoImpl extends GenericDaoBase<TemplateDataStoreVO, Long> implements TemplateDataStoreDao {
     private static final Logger s_logger = Logger.getLogger(TemplateDataStoreDaoImpl.class);
@@ -250,11 +250,11 @@ public class TemplateDataStoreDaoImpl extends GenericDaoBase<TemplateDataStoreVO
     @Override
     public List<TemplateDataStoreVO> listByTemplateZoneDownloadStatus(long templateId, Long zoneId, Status... status) {
         // get all elgible image stores
-        List<DataStore> imgStores = _storeMgr.getImageStoresByScope(new ZoneScope(zoneId));
+        List<DataStore> imgStores = this._storeMgr.getImageStoresByScope(new ZoneScope(zoneId));
         if (imgStores != null) {
             List<TemplateDataStoreVO> result = new ArrayList<TemplateDataStoreVO>();
             for (DataStore store : imgStores) {
-                List<TemplateDataStoreVO> sRes = listByTemplateStoreDownloadStatus(templateId, store.getId(),
+                List<TemplateDataStoreVO> sRes = this.listByTemplateStoreDownloadStatus(templateId, store.getId(),
                         status);
                 if (sRes != null && sRes.size() > 0) {
                     result.addAll(sRes);
@@ -268,10 +268,10 @@ public class TemplateDataStoreDaoImpl extends GenericDaoBase<TemplateDataStoreVO
     @Override
     public TemplateDataStoreVO findByTemplateZoneDownloadStatus(long templateId, Long zoneId, Status... status) {
         // get all elgible image stores
-        List<DataStore> imgStores = _storeMgr.getImageStoresByScope(new ZoneScope(zoneId));
+        List<DataStore> imgStores = this._storeMgr.getImageStoresByScope(new ZoneScope(zoneId));
         if (imgStores != null) {
             for (DataStore store : imgStores) {
-                List<TemplateDataStoreVO> sRes = listByTemplateStoreDownloadStatus(templateId, store.getId(),
+                List<TemplateDataStoreVO> sRes = this.listByTemplateStoreDownloadStatus(templateId, store.getId(),
                         status);
                 if (sRes != null && sRes.size() > 0) {
                     Collections.shuffle(sRes);
@@ -326,13 +326,13 @@ public class TemplateDataStoreDaoImpl extends GenericDaoBase<TemplateDataStoreVO
         // get all elgible image stores
         List<DataStore> imgStores = null;
         if (role == DataStoreRole.Image) {
-            imgStores = _storeMgr.getImageStoresByScope(new ZoneScope(zoneId));
+            imgStores = this._storeMgr.getImageStoresByScope(new ZoneScope(zoneId));
         } else if (role == DataStoreRole.ImageCache) {
-            imgStores = _storeMgr.getImageCacheStores(new ZoneScope(zoneId));
+            imgStores = this._storeMgr.getImageCacheStores(new ZoneScope(zoneId));
         }
         if (imgStores != null) {
             for (DataStore store : imgStores) {
-                List<TemplateDataStoreVO> sRes = listByTemplateStore(templateId, store.getId());
+                List<TemplateDataStoreVO> sRes = this.listByTemplateStore(templateId, store.getId());
                 if (sRes != null && sRes.size() > 0) {
                     return sRes.get(0);
                 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
index e8fbf47..ee50880 100644
--- a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
+++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
@@ -48,7 +48,6 @@ import org.apache.cloudstack.framework.async.AsyncCallFuture;
 import org.apache.cloudstack.framework.async.AsyncCallbackDispatcher;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
 import org.apache.cloudstack.framework.async.AsyncRpcContext;
-import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 import org.apache.cloudstack.storage.command.CommandResult;
 import org.apache.cloudstack.storage.command.DeleteCommand;
 import org.apache.cloudstack.storage.datastore.DataObjectManager;
@@ -58,7 +57,6 @@ import org.apache.cloudstack.storage.datastore.PrimaryDataStoreProviderManager;
 import org.apache.cloudstack.storage.datastore.db.VolumeDataStoreDao;
 import org.apache.cloudstack.storage.datastore.db.VolumeDataStoreVO;
 import org.apache.cloudstack.storage.to.VolumeObjectTO;
-
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
@@ -69,6 +67,7 @@ import com.cloud.agent.api.to.VirtualMachineTO;
 import com.cloud.alert.AlertManager;
 import com.cloud.configuration.Config;
 import com.cloud.configuration.Resource.ResourceType;
+import com.cloud.configuration.dao.ConfigurationDao;
 import com.cloud.event.EventTypes;
 import com.cloud.event.UsageEventUtils;
 import com.cloud.exception.ConcurrentOperationException;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/framework/cluster/pom.xml
----------------------------------------------------------------------
diff --git a/framework/cluster/pom.xml b/framework/cluster/pom.xml
index fe8af4c..579dbcf 100644
--- a/framework/cluster/pom.xml
+++ b/framework/cluster/pom.xml
@@ -29,17 +29,5 @@
       <artifactId>cloud-framework-db</artifactId>
       <version>${project.version}</version>
     </dependency>
-    <dependency>
-      <groupId>org.apache.cloudstack</groupId>
-      <artifactId>cloud-framework-config</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.cloudstack</groupId>
-      <artifactId>cloud-api</artifactId>
-      <version>${project.version}</version>
-      <type>test-jar</type>
-      <scope>test</scope>
-    </dependency>
   </dependencies>
 </project>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/framework/cluster/src/com/cloud/cluster/ClusterManagerImpl.java
----------------------------------------------------------------------
diff --git a/framework/cluster/src/com/cloud/cluster/ClusterManagerImpl.java b/framework/cluster/src/com/cloud/cluster/ClusterManagerImpl.java
index 24e30a2..dd7a603 100644
--- a/framework/cluster/src/com/cloud/cluster/ClusterManagerImpl.java
+++ b/framework/cluster/src/com/cloud/cluster/ClusterManagerImpl.java
@@ -45,10 +45,9 @@ import javax.naming.ConfigurationException;
 
 import org.apache.log4j.Logger;
 
-import org.apache.cloudstack.framework.config.ConfigDepot;
-import org.apache.cloudstack.framework.config.ConfigKey;
-import org.apache.cloudstack.framework.config.ConfigValue;
-import org.apache.cloudstack.framework.config.Configurable;
+import org.apache.cloudstack.config.ConfigDepot;
+import org.apache.cloudstack.config.ConfigKey;
+import org.apache.cloudstack.config.ConfigValue;
 import org.apache.cloudstack.utils.identity.ManagementServerNode;
 
 import com.cloud.cluster.dao.ManagementServerHostDao;
@@ -69,7 +68,7 @@ import com.cloud.utils.mgmt.JmxUtil;
 import com.cloud.utils.net.NetUtils;
 
 @Local(value = { ClusterManager.class })
-public class ClusterManagerImpl extends ManagerBase implements ClusterManager, Configurable {
+public class ClusterManagerImpl extends ManagerBase implements ClusterManager {
     private static final Logger s_logger = Logger.getLogger(ClusterManagerImpl.class);
 
     private static final int EXECUTOR_SHUTDOWN_TIMEOUT = 1000; // 1 second
@@ -1028,10 +1027,10 @@ public class ClusterManagerImpl extends ManagerBase implements ClusterManager, C
         return true;
     }
 
-    protected final ConfigKey<Integer> HeartBeatInterval = new ConfigKey<Integer>(Integer.class, "cluster.heartbeat.interval", "management-server",
-            "1500", "Interval to check for the heart beat between management server nodes", false);
-    protected final ConfigKey<Integer> HeartBeatThreshold = new ConfigKey<Integer>(Integer.class, "cluster.heartbeat.threshold", "management-server",
-            "150000", "Threshold before self-fence the management server", true);
+    protected final ConfigKey<Integer> HeartBeatInterval = new ConfigKey<Integer>(Integer.class, "cluster.heartbeat.interval", "management-server", ClusterManager.class,
+            "1500", "Interval to check for the heart beat between management server nodes", false, "Seconds");
+    protected final ConfigKey<Integer> HeartBeatThreshold = new ConfigKey<Integer>(Integer.class, "cluster.heartbeat.threshold", "management-server", ClusterManager.class,
+            "150000", "Threshold before self-fence the management server", true, "Seconds");
     
     @Override
     public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
@@ -1112,16 +1111,6 @@ public class ClusterManagerImpl extends ManagerBase implements ClusterManager, C
         return pingManagementNode(mshost);
     }
 
-    @Override
-    public String getConfigComponentName() {
-        return ClusterManager.class.getSimpleName();
-    }
-
-    @Override
-    public ConfigKey<?>[] getConfigKeys() {
-        return new ConfigKey<?>[] {HeartBeatInterval, HeartBeatThreshold};
-    }
-
     private boolean pingManagementNode(ManagementServerHostVO mshost) {
 
         String targetIp = mshost.getServiceIP();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/framework/cluster/src/com/cloud/cluster/ClusterServiceServletAdapter.java
----------------------------------------------------------------------
diff --git a/framework/cluster/src/com/cloud/cluster/ClusterServiceServletAdapter.java b/framework/cluster/src/com/cloud/cluster/ClusterServiceServletAdapter.java
index 87e92f5..13b466d 100644
--- a/framework/cluster/src/com/cloud/cluster/ClusterServiceServletAdapter.java
+++ b/framework/cluster/src/com/cloud/cluster/ClusterServiceServletAdapter.java
@@ -31,9 +31,9 @@ import javax.naming.ConfigurationException;
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
-import org.apache.cloudstack.framework.config.ConfigDepot;
-import org.apache.cloudstack.framework.config.ConfigKey;
-import org.apache.cloudstack.framework.config.ConfigValue;
+import org.apache.cloudstack.config.ConfigDepot;
+import org.apache.cloudstack.config.ConfigKey;
+import org.apache.cloudstack.config.ConfigValue;
 
 import com.cloud.cluster.dao.ManagementServerHostDao;
 import com.cloud.utils.NumbersUtil;
@@ -125,8 +125,8 @@ public class ClusterServiceServletAdapter extends AdapterBase implements Cluster
     	return true;
     }
     
-    private final ConfigKey<Integer> ClusterMessageTimeOut = new ConfigKey<Integer>(Integer.class, "cluster.message.timeout.seconds", "Advance", "300",
-            "Time (in seconds) to wait before a inter-management server message post times out.", true);
+    private final ConfigKey<Integer> ClusterMessageTimeOut = new ConfigKey<Integer>(Integer.class, "cluster.message.timeout.seconds", "Advance", ClusterManager.class, "300",
+            "Time (in seconds) to wait before a inter-management server message post times out.", true, "Seconds");
 
     private void init() throws ConfigurationException {
     	if(_mshostDao != null)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/framework/cluster/src/com/cloud/cluster/ClusterServiceServletImpl.java
----------------------------------------------------------------------
diff --git a/framework/cluster/src/com/cloud/cluster/ClusterServiceServletImpl.java b/framework/cluster/src/com/cloud/cluster/ClusterServiceServletImpl.java
index 2a1d16e..c3ed3fe 100644
--- a/framework/cluster/src/com/cloud/cluster/ClusterServiceServletImpl.java
+++ b/framework/cluster/src/com/cloud/cluster/ClusterServiceServletImpl.java
@@ -27,7 +27,7 @@ import org.apache.commons.httpclient.methods.PostMethod;
 import org.apache.commons.httpclient.params.HttpClientParams;
 import org.apache.log4j.Logger;
 
-import org.apache.cloudstack.framework.config.ConfigValue;
+import org.apache.cloudstack.config.ConfigValue;
 
 public class ClusterServiceServletImpl implements ClusterService {
     private static final long serialVersionUID = 4574025200012566153L;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/framework/config/pom.xml
----------------------------------------------------------------------
diff --git a/framework/config/pom.xml b/framework/config/pom.xml
deleted file mode 100644
index 0d4344e..0000000
--- a/framework/config/pom.xml
+++ /dev/null
@@ -1,45 +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. -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>cloud-framework-config</artifactId>
-  <name>Apache CloudStack Framework - Configuration</name>
-  <parent>
-    <groupId>org.apache.cloudstack</groupId>
-    <artifactId>cloudstack-framework</artifactId>
-    <version>4.3.0-SNAPSHOT</version>
-    <relativePath>../pom.xml</relativePath>
-  </parent>
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.cloudstack</groupId>
-      <artifactId>cloud-utils</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.cloudstack</groupId>
-      <artifactId>cloud-framework-db</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.cloudstack</groupId>
-      <artifactId>cloud-api</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.cloudstack</groupId>
-      <artifactId>cloud-api</artifactId>
-      <version>${project.version}</version>
-      <type>test-jar</type>
-      <scope>test</scope>
-    </dependency>    
-  </dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b59e3aae/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
deleted file mode 100644
index 98363f3..0000000
--- a/framework/config/src/org/apache/cloudstack/framework/config/ConfigDepot.java
+++ /dev/null
@@ -1,27 +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 org.apache.cloudstack.framework.config;
-
-/**
- * ConfigDepot is a repository of configurations.
- *
- */
-public interface ConfigDepot {
-    <T> ConfigValue<T> get(ConfigKey<T> key);
-    
-    <T> ScopedConfigValue<T> getScopedValue(ConfigKey<T> key);
-}


Mime
View raw message