You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ts...@apache.org on 2013/06/05 09:22:24 UTC

[2/5] git commit: updated refs/heads/master to f321acd

Removing unused simulator component library

And the components-simulator.xml configuration. Both are unused as we
use Spring injection now.

Remove unused rebootVM method

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


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

Branch: refs/heads/master
Commit: b2dccf618f3b279214bd89f22700979903a11d08
Parents: 956a596
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Tue Jun 4 19:21:22 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Wed Jun 5 12:37:29 2013 +0530

----------------------------------------------------------------------
 .../tomcatconf/components-simulator.xml.in         |   54 ------------
 .../simulator/resources/components-simulator.xml   |   66 ---------------
 .../com/cloud/agent/manager/MockVmManagerImpl.java |   22 -----
 .../configuration/SimulatorComponentLibrary.java   |   40 ---------
 4 files changed, 0 insertions(+), 182 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b2dccf61/agent-simulator/tomcatconf/components-simulator.xml.in
----------------------------------------------------------------------
diff --git a/agent-simulator/tomcatconf/components-simulator.xml.in b/agent-simulator/tomcatconf/components-simulator.xml.in
deleted file mode 100755
index 1b7df46..0000000
--- a/agent-simulator/tomcatconf/components-simulator.xml.in
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.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.
--->
-<components-simulator.xml>
-    <management-server class="com.cloud.server.ManagementServerSimulatorImpl" library="com.cloud.configuration.SimulatorComponentLibrary" extends="components.xml:management-server">
-        <dao name="Configuration configuration server" class="com.cloud.configuration.dao.ConfigurationDaoImpl">
-             <param name="premium">true</param>
-         </dao>
-        <adapters key="com.cloud.ha.Investigator">
-            <adapter name="SimpleInvestigator" class="com.cloud.ha.CheckOnAgentInvestigator"/>
-            <adapter name="PingInvestigator" class="com.cloud.ha.UserVmDomRInvestigator"/>
-			<adapter name="ManagementIPSysVMInvestigator" class="com.cloud.ha.ManagementIPSystemVMInvestigator"/>
-        </adapters>
-        <adapters key="com.cloud.resource.Discoverer">
-            <adapter name="Simulator Agent" class="com.cloud.resource.SimulatorDiscoverer"/>
-            <adapter name="XCP Agent" class="com.cloud.hypervisor.xen.discoverer.XcpServerDiscoverer"/>
-            <adapter name="SecondaryStorage" class="com.cloud.storage.secondary.SecondaryStorageDiscoverer"/>
-            <adapter name="KVM Agent" class="com.cloud.hypervisor.kvm.discoverer.KvmServerDiscoverer"/>
-            <adapter name="SecondaryStorage" class="com.cloud.resource.SimulatorSecondaryDiscoverer"/>
-        </adapters>
-       
-        <adapters key="com.cloud.hypervisor.HypervisorGuru">
-            <adapter name="SimulatorGuru" class="com.cloud.simulator.SimulatorGuru"/>
-            <adapter name="XenServerGuru" class="com.cloud.hypervisor.XenServerGuru"/>
-            <adapter name="KVMGuru" class="com.cloud.hypervisor.KVMGuru"/>
-        </adapters>
-        <adapters key="com.cloud.agent.StartupCommandProcessor">
-            <adapter name="BasicAgentAuthorizer" class="com.cloud.agent.manager.authn.impl.BasicAgentAuthManager"/>
-        </adapters>
-    </management-server>
-
-    <configuration-server class="com.cloud.server.ConfigurationServerImpl" extends="components.xml:configuration-server">
-        <dao name="Configuration configuration server" class="com.cloud.configuration.dao.ConfigurationDaoImpl" singleton="false">
-             <param name="premium">true</param>
-        </dao>
-    </configuration-server>
-    
-</components-simulator.xml>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b2dccf61/plugins/hypervisors/simulator/resources/components-simulator.xml
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/simulator/resources/components-simulator.xml b/plugins/hypervisors/simulator/resources/components-simulator.xml
deleted file mode 100644
index 2658e4d..0000000
--- a/plugins/hypervisors/simulator/resources/components-simulator.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.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.
--->
-<components-simulator.xml>
-    <system-integrity-checker class="com.cloud.upgrade.DatabaseUpgradeChecker">
-        <checker name="ManagementServerNode" class="com.cloud.cluster.ManagementServerNode"/>
-        <checker name="EncryptionSecretKeyChecker" class="com.cloud.utils.crypt.EncryptionSecretKeyChecker"/>
-        <checker name="DatabaseIntegrityChecker" class="com.cloud.upgrade.DatabaseIntegrityChecker"/>
-        <checker name="DatabaseUpgradeChecker" class="com.cloud.upgrade.PremiumDatabaseUpgradeChecker"/>
-    </system-integrity-checker>
-
-    <interceptor library="com.cloud.configuration.DefaultInterceptorLibrary"/>
-    <management-server class="com.cloud.server.ManagementServerSimulatorImpl" library="com.cloud.configuration.SimulatorComponentLibrary" extends="components.xml:management-server">
-        <dao name="Configuration configuration server" class="com.cloud.configuration.dao.ConfigurationDaoImpl">
-            <param name="premium">true</param>
-        </dao>
-        <adapters key="com.cloud.resource.Discoverer">
-            <adapter name="Simulator Agent" class="com.cloud.resource.SimulatorDiscoverer"/>
-            <adapter name="SimulatorSecondaryStorage" class="com.cloud.resource.SimulatorSecondaryDiscoverer"/>
-        </adapters>
-        <adapters key="com.cloud.hypervisor.HypervisorGuru">
-            <adapter name="SimulatorGuru" class="com.cloud.simulator.SimulatorGuru"/>
-        </adapters>
-    </management-server>
-    <configuration-server class="com.cloud.server.ConfigurationServerImpl" extends="components.xml:configuration-server">
-        <dao name="Configuration configuration server" class="com.cloud.configuration.dao.ConfigurationDaoImpl" singleton="false">
-            <param name="premium">true</param>
-        </dao>
-        <dao name="Snapshot policy defaults" class="com.cloud.storage.dao.SnapshotPolicyDaoImpl" singleton="false"/>
-        <dao name="DiskOffering configuration server" class="com.cloud.storage.dao.DiskOfferingDaoImpl" singleton="false"/>
-        <dao name="ServiceOffering configuration server" class="com.cloud.service.dao.ServiceOfferingDaoImpl" singleton="false"/>
-        <dao name="host zone configuration server" class="com.cloud.dc.dao.DataCenterDaoImpl" singleton="false"/>
-        <dao name="host pod configuration server" class="com.cloud.dc.dao.HostPodDaoImpl" singleton="false"/>
-        <dao name="DomainDao" class="com.cloud.domain.dao.DomainDaoImpl" singleton="false"/>
-        <dao name="NetworkOfferingDao" class="com.cloud.offerings.dao.NetworkOfferingDaoImpl" singleton="false"/>
-        <dao name="DataCenterDao" class="com.cloud.dc.dao.DataCenterDaoImpl" singleton="false"/>
-        <dao name="NetworkDao" class="com.cloud.network.dao.NetworkDaoImpl" singleton="false"/>
-        <dao name="IpAddressDao" class="com.cloud.network.dao.IPAddressDaoImpl" singleton="false"/>
-        <dao name="VlanDao" class="com.cloud.dc.dao.VlanDaoImpl" singleton="false"/>
-        <dao name="ResouceCountDao" class="com.cloud.configuration.dao.ResourceCountDaoImpl" singleton="false"/>
-        <dao name="AccountDao" class="com.cloud.user.dao.AccountDaoImpl" singleton="false"/>
-        <dao name="UserDao" class="com.cloud.user.dao.UserDaoImpl" singleton="false"/>
-        <dao name="NetworkOfferingServiceDao" class="com.cloud.offerings.dao.NetworkOfferingServiceMapDaoImpl" singleton="false"/>
-        <dao name="VirtualRouterProviderDao" class="com.cloud.network.dao.VirtualRouterProviderDaoImpl" singleton="false"/>
-        <dao name="IdentityDao" class="com.cloud.uuididentity.dao.IdentityDaoImpl" singleton="false"/>
-        <dao name="Site2SiteCustomerGatewayDao" class="com.cloud.network.dao.Site2SiteCustomerGatewayDaoImpl" singleton="false"/>
-        <dao name="Site2SiteVpnGatewayDao" class="com.cloud.network.dao.Site2SiteVpnGatewayDaoImpl" singleton="false"/>
-        <dao name="Site2SiteVpnConnectionDao" class="com.cloud.network.dao.Site2SiteVpnConnectionDaoImpl" singleton="false"/>
-    </configuration-server>
-</components-simulator.xml>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b2dccf61/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManagerImpl.java b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManagerImpl.java
index 356284c..6ee9d60 100644
--- a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManagerImpl.java
+++ b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockVmManagerImpl.java
@@ -193,28 +193,6 @@ public class MockVmManagerImpl extends ManagerBase implements MockVmManager {
         return null;
     }
 
-    public boolean rebootVM(String vmName) {
-        Transaction txn = Transaction.open(Transaction.SIMULATOR_DB);
-        try {
-            txn.start();
-            MockVm vm = _mockVmDao.findByVmName(vmName);
-            if (vm != null) {
-                vm.setState(State.Running);
-                _mockVmDao.update(vm.getId(), (MockVMVO) vm);
-
-            }
-            txn.commit();
-        } catch (Exception ex) {
-            txn.rollback();
-            throw new CloudRuntimeException("unable to reboot vm " + vmName, ex);
-        } finally {
-            txn.close();
-            txn = Transaction.open(Transaction.CLOUD_DB);
-            txn.close();
-        }
-        return true;
-    }
-
     @Override
     public Map<String, MockVMVO> getVms(String hostGuid) {
         Transaction txn = Transaction.open(Transaction.SIMULATOR_DB);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b2dccf61/plugins/hypervisors/simulator/src/com/cloud/configuration/SimulatorComponentLibrary.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/simulator/src/com/cloud/configuration/SimulatorComponentLibrary.java b/plugins/hypervisors/simulator/src/com/cloud/configuration/SimulatorComponentLibrary.java
deleted file mode 100644
index 373cae1..0000000
--- a/plugins/hypervisors/simulator/src/com/cloud/configuration/SimulatorComponentLibrary.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.configuration;
-
-
-//TODO: Remove this class after the managers are figured out.
-public class SimulatorComponentLibrary  {
-//	  @Override
-//	    protected void populateManagers() {
-//	        addManager("VM Manager", MockVmManagerImpl.class);
-//	        addManager("agent manager", MockAgentManagerImpl.class);
-//	        addManager("storage manager", MockStorageManagerImpl.class);
-//	        addManager("SimulatorManager", SimulatorManagerImpl.class);
-//	    }
-//
-//	    @Override
-//	    protected void populateDaos() {
-//	        addDao("mock Host", MockHostDaoImpl.class);
-//	        addDao("mock secondary storage", MockSecStorageDaoImpl.class);
-//	        addDao("mock storage pool", MockStoragePoolDaoImpl.class);
-//	        addDao("mock vm", MockVMDaoImpl.class);
-//	        addDao("mock volume", MockVolumeDaoImpl.class);
-//	        addDao("mock config", MockConfigurationDaoImpl.class);
-//	        addDao("mock security rules", MockSecurityRulesDaoImpl.class);
-//	    }
-}