mirror of https://github.com/apache/cloudstack.git
Merge remote-tracking branch 'origin/spring-modularization'
Conflicts: client/tomcatconf/applicationContext.xml.in client/tomcatconf/nonossComponentContext.xml.in client/tomcatconf/simulatorComponentContext.xml.in framework/db/src/com/cloud/utils/db/Transaction.java plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockAgentManagerImpl.java server/src/com/cloud/api/ApiServer.java server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
This commit is contained in:
commit
e3280bdba2
|
|
@ -0,0 +1,2 @@
|
|||
name=api-planner
|
||||
parent=planner
|
||||
|
|
@ -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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<bean id="UserDispersingPlanner" class="com.cloud.deploy.UserDispersingPlanner">
|
||||
<property name="name" value="UserDispersingPlanner" />
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
|
@ -57,7 +57,7 @@ public class CallContext {
|
|||
private User user;
|
||||
private final Map<Object, Object> context = new HashMap<Object, Object>();
|
||||
|
||||
private static EntityManager s_entityMgr;
|
||||
static EntityManager s_entityMgr;
|
||||
|
||||
public static void init(EntityManager entityMgr) {
|
||||
s_entityMgr = entityMgr;
|
||||
|
|
|
|||
|
|
@ -29,11 +29,11 @@
|
|||
</listener>
|
||||
|
||||
<listener>
|
||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
||||
<listener-class>org.apache.cloudstack.spring.module.web.CloudStackContextLoaderListener</listener-class>
|
||||
</listener>
|
||||
<context-param>
|
||||
<context-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
<param-value>classpath:applicationContext.xml, classpath:componentContext.xml</param-value>
|
||||
<param-value>classpath:META-INF/cloudstack/webApplicationContext.xml</param-value>
|
||||
</context-param>
|
||||
|
||||
<servlet>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,16 @@
|
|||
<version>4.3.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloud-framework-spring-module</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloud-framework-spring-lifecycle</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloud-plugin-storage-volume-solidfire</artifactId>
|
||||
|
|
@ -467,21 +477,6 @@
|
|||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>process-simulator-context</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target if="${simulator}">
|
||||
<echo>test</echo>
|
||||
<replaceregexp file="${basedir}/target/generated-webapp/WEB-INF/web.xml"
|
||||
match="classpath:componentContext.xml"
|
||||
replace="classpath:simulatorComponentContext.xml" byline="true"/>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>process-noredist-spring-context</id>
|
||||
<phase>process-resources</phase>
|
||||
|
|
@ -502,22 +497,6 @@
|
|||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>process-quickcloud-spring-context</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target if="${quickcloud}">
|
||||
<echo>quickcloud</echo>
|
||||
<replaceregexp
|
||||
file="${basedir}/target/generated-webapp/WEB-INF/classes/applicationContext.xml"
|
||||
match="com.cloud.consoleproxy.ConsoleProxyManagerImpl"
|
||||
replace="com.cloud.consoleproxy.StaticConsoleProxyManager" byline="true"/>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- there are the jasypt libs requires by some of the python scripts -->
|
||||
|
|
@ -730,5 +709,20 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>quickcloud</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>quickcloud</name>
|
||||
</property>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloud-quickcloud</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<!-- There is no reason to put anything here -->
|
||||
|
||||
</beans>
|
||||
|
|
@ -1,956 +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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
|
||||
|
||||
|
||||
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
|
||||
|
||||
<context:annotation-config />
|
||||
|
||||
<!--=====================================================================================================-->
|
||||
<!-- -->
|
||||
<!-- core OSS/non-OSS Common components -->
|
||||
<!-- -->
|
||||
<!--=====================================================================================================-->
|
||||
|
||||
<!--
|
||||
@DB support
|
||||
-->
|
||||
<bean id="componentContext" class="com.cloud.utils.component.ComponentContext" />
|
||||
<bean id="transactionContextBuilder" class="com.cloud.utils.db.TransactionContextBuilder" />
|
||||
<bean id="actionEventInterceptor" class="com.cloud.event.ActionEventInterceptor" />
|
||||
|
||||
<bean id="instantiatePostProcessor" class="com.cloud.utils.component.ComponentInstantiationPostProcessor">
|
||||
<property name="Interceptors">
|
||||
<list>
|
||||
<ref bean="transactionContextBuilder" />
|
||||
<ref bean="actionEventInterceptor" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Managed Context
|
||||
-->
|
||||
<bean id="ManagedContext" class="org.apache.cloudstack.managed.context.impl.DefaultManagedContext" >
|
||||
<property name="listeners">
|
||||
<list>
|
||||
<bean class="org.apache.cloudstack.context.CallContextListener" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean class="org.apache.cloudstack.managed.context.ManagedContextRunnable" factory-method="initializeGlobalContext"
|
||||
autowire-candidate="false" >
|
||||
<constructor-arg><ref bean="ManagedContext"/></constructor-arg>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
RPC/Async/EventBus
|
||||
-->
|
||||
|
||||
<bean id="onwireRegistry" class="org.apache.cloudstack.framework.serializer.OnwireClassRegistry"
|
||||
init-method="scan" >
|
||||
<property name="packages">
|
||||
<list>
|
||||
<value>org.apache.cloudstack.framework</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="messageSerializer" class="org.apache.cloudstack.framework.serializer.JsonMessageSerializer">
|
||||
<property name="onwireClassRegistry" ref="onwireRegistry" />
|
||||
</bean>
|
||||
|
||||
<bean id="transportProvider" class="org.apache.cloudstack.framework.server.ServerTransportProvider" init-method="initialize">
|
||||
<property name="workerPoolSize" value="5" />
|
||||
<property name="nodeId" value="Node1" />
|
||||
<property name="messageSerializer" ref="messageSerializer" />
|
||||
</bean>
|
||||
|
||||
<bean id="rpcProvider" class="org.apache.cloudstack.framework.rpc.RpcProviderImpl" init-method="initialize">
|
||||
<constructor-arg ref="transportProvider" />
|
||||
<property name="messageSerializer" ref="messageSerializer" />
|
||||
</bean>
|
||||
|
||||
<bean id="messageBus" class = "org.apache.cloudstack.framework.messagebus.MessageBusBase" />
|
||||
<bean id="configDepot" class = "org.apache.cloudstack.framework.config.impl.ConfigDepotImpl" />
|
||||
|
||||
<!--
|
||||
DAO with customized configuration
|
||||
-->
|
||||
<bean id="serviceOfferingDaoImpl" class="com.cloud.service.dao.ServiceOfferingDaoImpl">
|
||||
<property name="configParams">
|
||||
<map>
|
||||
<entry key="cache.size" value="50" />
|
||||
<entry key="cache.time.to.live" value="600" />
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="diskOfferingDaoImpl" class="com.cloud.storage.dao.DiskOfferingDaoImpl">
|
||||
<property name="configParams">
|
||||
<map>
|
||||
<entry key="cache.size" value="50" />
|
||||
<entry key="cache.time.to.live" value="600" />
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="dataCenterDaoImpl" class="com.cloud.dc.dao.DataCenterDaoImpl">
|
||||
<property name="configParams">
|
||||
<map>
|
||||
<entry key="cache.size" value="50" />
|
||||
<entry key="cache.time.to.live" value="600" />
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="hostPodDaoImpl" class="com.cloud.dc.dao.HostPodDaoImpl">
|
||||
<property name="configParams">
|
||||
<map>
|
||||
<entry key="cache.size" value="50" />
|
||||
<entry key="cache.time.to.live" value="600" />
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="vlanDaoImpl" class="com.cloud.dc.dao.VlanDaoImpl">
|
||||
<property name="configParams">
|
||||
<map>
|
||||
<entry key="cache.size" value="30" />
|
||||
<entry key="cache.time.to.live" value="3600" />
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="userDaoImpl" class="com.cloud.user.dao.UserDaoImpl">
|
||||
<property name="configParams">
|
||||
<map>
|
||||
<entry key="cache.size" value="5000" />
|
||||
<entry key="cache.time.to.live" value="300" />
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="VMTemplateDaoImpl" class="com.cloud.storage.dao.VMTemplateDaoImpl">
|
||||
<property name="configParams">
|
||||
<map>
|
||||
<entry key="cache.size" value="100" />
|
||||
<entry key="cache.time.to.live" value="600" />
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="hypervisorCapabilitiesDaoImpl" class="com.cloud.hypervisor.dao.HypervisorCapabilitiesDaoImpl">
|
||||
<property name="configParams">
|
||||
<map>
|
||||
<entry key="cache.size" value="100" />
|
||||
<entry key="cache.time.to.live" value="600" />
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="dedicatedResourceDaoImpl" class="com.cloud.dc.dao.DedicatedResourceDaoImpl">
|
||||
<property name="configParams">
|
||||
<map>
|
||||
<entry key="cache.size" value="30" />
|
||||
<entry key="cache.time.to.live" value="3600" />
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
DAOs with default configuration
|
||||
-->
|
||||
<bean id="accountDaoImpl" class="com.cloud.user.dao.AccountDaoImpl" />
|
||||
<bean id="accountDetailsDaoImpl" class="com.cloud.user.AccountDetailsDaoImpl" />
|
||||
<bean id="accountJoinDaoImpl" class="com.cloud.api.query.dao.AccountJoinDaoImpl" />
|
||||
<bean id="accountGuestVlanMapDaoImpl" class="com.cloud.network.dao.AccountGuestVlanMapDaoImpl" />
|
||||
<bean id="accountVlanMapDaoImpl" class="com.cloud.dc.dao.AccountVlanMapDaoImpl" />
|
||||
<bean id="alertDaoImpl" class="com.cloud.alert.dao.AlertDaoImpl" />
|
||||
<bean id="asyncJobJoinDaoImpl" class="com.cloud.api.query.dao.AsyncJobJoinDaoImpl" />
|
||||
<bean id="autoScalePolicyConditionMapDaoImpl" class="com.cloud.network.as.dao.AutoScalePolicyConditionMapDaoImpl" />
|
||||
<bean id="autoScalePolicyDaoImpl" class="com.cloud.network.as.dao.AutoScalePolicyDaoImpl" />
|
||||
<bean id="autoScaleVmGroupDaoImpl" class="com.cloud.network.as.dao.AutoScaleVmGroupDaoImpl" />
|
||||
<bean id="autoScaleVmGroupPolicyMapDaoImpl" class="com.cloud.network.as.dao.AutoScaleVmGroupPolicyMapDaoImpl" />
|
||||
<bean id="autoScaleVmProfileDaoImpl" class="com.cloud.network.as.dao.AutoScaleVmProfileDaoImpl" />
|
||||
<bean id="capacityDaoImpl" class="com.cloud.capacity.dao.CapacityDaoImpl" />
|
||||
<bean id="certificateDaoImpl" class="com.cloud.certificate.dao.CertificateDaoImpl" />
|
||||
<bean id="clusterDaoImpl" class="com.cloud.dc.dao.ClusterDaoImpl" />
|
||||
<bean id="clusterDetailsDaoImpl" class="com.cloud.dc.ClusterDetailsDaoImpl" />
|
||||
<bean id="clusterVSMMapDaoImpl" class="com.cloud.dc.dao.ClusterVSMMapDaoImpl" />
|
||||
<bean id="commandExecLogDaoImpl" class="com.cloud.secstorage.CommandExecLogDaoImpl" />
|
||||
<bean id="conditionDaoImpl" class="com.cloud.network.as.dao.ConditionDaoImpl" />
|
||||
<bean id="consoleProxyDaoImpl" class="com.cloud.vm.dao.ConsoleProxyDaoImpl" />
|
||||
<bean id="counterDaoImpl" class="com.cloud.network.as.dao.CounterDaoImpl" />
|
||||
<bean id="dataCenterIpAddressDaoImpl" class="com.cloud.dc.dao.DataCenterIpAddressDaoImpl" />
|
||||
<bean id="dataCenterJoinDaoImpl" class="com.cloud.api.query.dao.DataCenterJoinDaoImpl" />
|
||||
<bean id="dataCenterLinkLocalIpAddressDaoImpl" class="com.cloud.dc.dao.DataCenterLinkLocalIpAddressDaoImpl" />
|
||||
<bean id="dataCenterVnetDaoImpl" class="com.cloud.dc.dao.DataCenterVnetDaoImpl" />
|
||||
<bean id="dcDetailsDaoImpl" class="com.cloud.dc.dao.DcDetailsDaoImpl" />
|
||||
<bean id="engineDcDetailsDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.DcDetailsDaoImpl" />
|
||||
<bean id="diskOfferingJoinDaoImpl" class="com.cloud.api.query.dao.DiskOfferingJoinDaoImpl" />
|
||||
<bean id="domainDaoImpl" class="com.cloud.domain.dao.DomainDaoImpl" />
|
||||
<bean id="domainRouterDaoImpl" class="com.cloud.vm.dao.DomainRouterDaoImpl" />
|
||||
<bean id="domainRouterJoinDaoImpl" class="com.cloud.api.query.dao.DomainRouterJoinDaoImpl" />
|
||||
<bean id="elasticLbVmMapDaoImpl" class="com.cloud.network.lb.dao.ElasticLbVmMapDaoImpl" />
|
||||
<bean id="engineClusterDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineClusterDaoImpl" />
|
||||
<bean id="engineDataCenterDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineDataCenterDaoImpl" />
|
||||
<bean id="engineHostDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineHostDaoImpl" />
|
||||
<bean id="engineHostPodDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineHostPodDaoImpl" />
|
||||
<bean id="eventDaoImpl" class="com.cloud.event.dao.EventDaoImpl" />
|
||||
<bean id="eventJoinDaoImpl" class="com.cloud.event.dao.EventJoinDaoImpl" />
|
||||
<bean id="externalFirewallDeviceDaoImpl" class="com.cloud.network.dao.ExternalFirewallDeviceDaoImpl" />
|
||||
<bean id="externalLoadBalancerDeviceDaoImpl" class="com.cloud.network.dao.ExternalLoadBalancerDeviceDaoImpl" />
|
||||
<bean id="externalPublicIpStatisticsDaoImpl" class="com.cloud.usage.dao.ExternalPublicIpStatisticsDaoImpl" />
|
||||
<bean id="firewallRulesCidrsDaoImpl" class="com.cloud.network.dao.FirewallRulesCidrsDaoImpl" />
|
||||
<bean id="firewallRulesDaoImpl" class="com.cloud.network.dao.FirewallRulesDaoImpl" />
|
||||
<bean id="globalLoadBalancerDaoImpl" class="org.apache.cloudstack.region.gslb.GlobalLoadBalancerDaoImpl" />
|
||||
<bean id="globalLoadBalancerLbRuleMapDaoImpl" class="org.apache.cloudstack.region.gslb.GlobalLoadBalancerLbRuleMapDaoImpl" />
|
||||
<bean id="guestOSCategoryDaoImpl" class="com.cloud.storage.dao.GuestOSCategoryDaoImpl" />
|
||||
<bean id="guestOSDaoImpl" class="com.cloud.storage.dao.GuestOSDaoImpl" />
|
||||
<bean id="guestOSHypervisorDaoImpl" class="com.cloud.storage.dao.GuestOSHypervisorDaoImpl" />
|
||||
<bean id="highAvailabilityDaoImpl" class="com.cloud.ha.dao.HighAvailabilityDaoImpl" />
|
||||
<bean id="hostDaoImpl" class="com.cloud.host.dao.HostDaoImpl" />
|
||||
<bean id="engineHostDetailsDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.HostDetailsDaoImpl" />
|
||||
<bean id="hostDetailsDaoImpl" class="com.cloud.host.dao.HostDetailsDaoImpl" />
|
||||
<bean id="hostJoinDaoImpl" class="com.cloud.api.query.dao.HostJoinDaoImpl" />
|
||||
<bean id="engineHostTagsDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.HostTagsDaoImpl" />
|
||||
<bean id="hostTagsDaoImpl" class="com.cloud.host.dao.HostTagsDaoImpl" />
|
||||
<bean id="hostTransferMapDaoImpl" class="com.cloud.cluster.agentlb.dao.HostTransferMapDaoImpl" />
|
||||
<bean id="iPAddressDaoImpl" class="com.cloud.network.dao.IPAddressDaoImpl" />
|
||||
<bean id="identityDaoImpl" class="com.cloud.uuididentity.dao.IdentityDaoImpl" />
|
||||
<bean id="imageStoreDaoImpl" class="org.apache.cloudstack.storage.image.db.ImageStoreDaoImpl" />
|
||||
<bean id="imageStoreDetailsDaoImpl" class="org.apache.cloudstack.storage.image.db.ImageStoreDetailsDaoImpl" />
|
||||
<bean id="imageStoreJoinDaoImpl" class="com.cloud.api.query.dao.ImageStoreJoinDaoImpl" />
|
||||
<bean id="snapshotDataStoreDaoImpl" class="org.apache.cloudstack.storage.image.db.SnapshotDataStoreDaoImpl" />
|
||||
<bean id="templateDataStoreDaoImpl" class="org.apache.cloudstack.storage.image.db.TemplateDataStoreDaoImpl" />
|
||||
<bean id="templateJoinDaoImpl" class="com.cloud.api.query.dao.TemplateJoinDaoImpl" />
|
||||
<bean id="volumeDataStoreDaoImpl" class="org.apache.cloudstack.storage.image.db.VolumeDataStoreDaoImpl" />
|
||||
<bean id="inlineLoadBalancerNicMapDaoImpl" class="com.cloud.network.dao.InlineLoadBalancerNicMapDaoImpl" />
|
||||
<bean id="instanceGroupDaoImpl" class="com.cloud.vm.dao.InstanceGroupDaoImpl" />
|
||||
<bean id="instanceGroupJoinDaoImpl" class="com.cloud.api.query.dao.InstanceGroupJoinDaoImpl" />
|
||||
<bean id="instanceGroupVMMapDaoImpl" class="com.cloud.vm.dao.InstanceGroupVMMapDaoImpl" />
|
||||
<bean id="itWorkDaoImpl" class="com.cloud.vm.ItWorkDaoImpl" />
|
||||
<bean id="keystoreDaoImpl" class="com.cloud.keystore.KeystoreDaoImpl" />
|
||||
<bean id="lBHealthCheckPolicyDaoImpl" class="com.cloud.network.dao.LBHealthCheckPolicyDaoImpl" />
|
||||
<bean id="lBStickinessPolicyDaoImpl" class="com.cloud.network.dao.LBStickinessPolicyDaoImpl" />
|
||||
<bean id="launchPermissionDaoImpl" class="com.cloud.storage.dao.LaunchPermissionDaoImpl" />
|
||||
<bean id="loadBalancerDaoImpl" class="com.cloud.network.dao.LoadBalancerDaoImpl" />
|
||||
<bean id="loadBalancerVMMapDaoImpl" class="com.cloud.network.dao.LoadBalancerVMMapDaoImpl" />
|
||||
<bean id="managementServerHostDaoImpl" class="com.cloud.cluster.dao.ManagementServerHostDaoImpl" />
|
||||
<bean id="managementServerHostPeerDaoImpl" class="com.cloud.cluster.dao.ManagementServerHostPeerDaoImpl" />
|
||||
<bean id="networkAccountDaoImpl" class="com.cloud.network.dao.NetworkAccountDaoImpl" />
|
||||
<bean id="networkACLDaoImpl" class="com.cloud.network.vpc.dao.NetworkACLDaoImpl" />
|
||||
<bean id="networkACLItemDaoImpl" class="com.cloud.network.vpc.dao.NetworkACLItemDaoImpl" />
|
||||
<bean id="networkDaoImpl" class="com.cloud.network.dao.NetworkDaoImpl" />
|
||||
<bean id="networkDomainDaoImpl" class="com.cloud.network.dao.NetworkDomainDaoImpl" />
|
||||
<bean id="networkDetailsDaoImpl" class="com.cloud.network.dao.NetworkDetailsDaoImpl" />
|
||||
<bean id="networkExternalFirewallDaoImpl" class="com.cloud.network.dao.NetworkExternalFirewallDaoImpl" />
|
||||
<bean id="networkExternalLoadBalancerDaoImpl" class="com.cloud.network.dao.NetworkExternalLoadBalancerDaoImpl" />
|
||||
<bean id="networkOfferingDaoImpl" class="com.cloud.offerings.dao.NetworkOfferingDaoImpl" />
|
||||
<bean id="networkOfferingServiceMapDaoImpl" class="com.cloud.offerings.dao.NetworkOfferingServiceMapDaoImpl" />
|
||||
<bean id="networkOpDaoImpl" class="com.cloud.network.dao.NetworkOpDaoImpl" />
|
||||
<bean id="networkRuleConfigDaoImpl" class="com.cloud.network.dao.NetworkRuleConfigDaoImpl" />
|
||||
<bean id="networkServiceMapDaoImpl" class="com.cloud.network.dao.NetworkServiceMapDaoImpl" />
|
||||
<bean id="nicDaoImpl" class="com.cloud.vm.dao.NicDaoImpl" />
|
||||
<bean id="nicDetailDaoImpl" class="com.cloud.vm.dao.NicDetailDaoImpl" />
|
||||
<bean id="nicSecondaryIpDaoImpl" class="com.cloud.vm.dao.NicSecondaryIpDaoImpl" />
|
||||
<bean id="nicIpAliasDaoImpl" class="com.cloud.vm.dao.NicIpAliasDaoImpl" />
|
||||
<bean id="objectInDataStoreDaoImpl" class="org.apache.cloudstack.storage.db.ObjectInDataStoreDaoImpl" />
|
||||
<bean id="ovsTunnelInterfaceDaoImpl" class="com.cloud.network.ovs.dao.OvsTunnelInterfaceDaoImpl" />
|
||||
<bean id="ovsTunnelNetworkDaoImpl" class="com.cloud.network.ovs.dao.OvsTunnelNetworkDaoImpl" />
|
||||
<bean id="physicalNetworkDaoImpl" class="com.cloud.network.dao.PhysicalNetworkDaoImpl" />
|
||||
<bean id="physicalNetworkIsolationMethodDaoImpl" class="com.cloud.network.dao.PhysicalNetworkIsolationMethodDaoImpl" />
|
||||
<bean id="physicalNetworkServiceProviderDaoImpl" class="com.cloud.network.dao.PhysicalNetworkServiceProviderDaoImpl" />
|
||||
<bean id="physicalNetworkTagDaoImpl" class="com.cloud.network.dao.PhysicalNetworkTagDaoImpl" />
|
||||
<bean id="physicalNetworkTrafficTypeDaoImpl" class="com.cloud.network.dao.PhysicalNetworkTrafficTypeDaoImpl" />
|
||||
<bean id="podVlanDaoImpl" class="com.cloud.dc.dao.PodVlanDaoImpl" />
|
||||
<bean id="podVlanMapDaoImpl" class="com.cloud.dc.dao.PodVlanMapDaoImpl" />
|
||||
<bean id="PortableIpDaoImpl" class="org.apache.cloudstack.region.PortableIpDaoImpl" />
|
||||
<bean id="PortableIpRangeDaoImpl" class="org.apache.cloudstack.region.PortableIpRangeDaoImpl" />
|
||||
<bean id="portForwardingRulesDaoImpl" class="com.cloud.network.rules.dao.PortForwardingRulesDaoImpl" />
|
||||
<bean id="portProfileDaoImpl" class="com.cloud.network.dao.PortProfileDaoImpl" />
|
||||
<bean id="primaryDataStoreDaoImpl" class="org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDaoImpl" />
|
||||
<bean id="primaryDataStoreDetailsDaoImpl" class="org.apache.cloudstack.storage.volume.db.PrimaryDataStoreDetailsDaoImpl" />
|
||||
<bean id="privateIpDaoImpl" class="com.cloud.network.vpc.dao.PrivateIpDaoImpl" />
|
||||
<bean id="projectAccountDaoImpl" class="com.cloud.projects.dao.ProjectAccountDaoImpl" />
|
||||
<bean id="projectAccountJoinDaoImpl" class="com.cloud.api.query.dao.ProjectAccountJoinDaoImpl" />
|
||||
<bean id="projectDaoImpl" class="com.cloud.projects.dao.ProjectDaoImpl" />
|
||||
<bean id="projectInvitationDaoImpl" class="com.cloud.projects.dao.ProjectInvitationDaoImpl" />
|
||||
<bean id="projectInvitationJoinDaoImpl" class="com.cloud.api.query.dao.ProjectInvitationJoinDaoImpl" />
|
||||
<bean id="projectJoinDaoImpl" class="com.cloud.api.query.dao.ProjectJoinDaoImpl" />
|
||||
<bean id="regionDaoImpl" class="org.apache.cloudstack.region.dao.RegionDaoImpl" />
|
||||
<bean id="remoteAccessVpnDaoImpl" class="com.cloud.network.dao.RemoteAccessVpnDaoImpl" />
|
||||
<bean id="resourceCountDaoImpl" class="com.cloud.configuration.dao.ResourceCountDaoImpl" />
|
||||
<bean id="resourceLimitDaoImpl" class="com.cloud.configuration.dao.ResourceLimitDaoImpl" />
|
||||
<bean id="resourceTagJoinDaoImpl" class="com.cloud.api.query.dao.ResourceTagJoinDaoImpl" />
|
||||
<bean id="resourceTagsDaoImpl" class="com.cloud.tags.dao.ResourceTagsDaoImpl" />
|
||||
<bean id="routerNetworkDaoImpl" class="com.cloud.network.dao.RouterNetworkDaoImpl" />
|
||||
<bean id="sSHKeyPairDaoImpl" class="com.cloud.user.dao.SSHKeyPairDaoImpl" />
|
||||
<bean id="secondaryStorageVmDaoImpl" class="com.cloud.vm.dao.SecondaryStorageVmDaoImpl" />
|
||||
<bean id="securityGroupDaoImpl" class="com.cloud.network.security.dao.SecurityGroupDaoImpl" />
|
||||
<bean id="securityGroupJoinDaoImpl" class="com.cloud.api.query.dao.SecurityGroupJoinDaoImpl" />
|
||||
<bean id="securityGroupRuleDaoImpl" class="com.cloud.network.security.dao.SecurityGroupRuleDaoImpl" />
|
||||
<bean id="securityGroupRulesDaoImpl" class="com.cloud.network.security.dao.SecurityGroupRulesDaoImpl" />
|
||||
<bean id="securityGroupVMMapDaoImpl" class="com.cloud.network.security.dao.SecurityGroupVMMapDaoImpl" />
|
||||
<bean id="securityGroupWorkDaoImpl" class="com.cloud.network.security.dao.SecurityGroupWorkDaoImpl" />
|
||||
<bean id="serviceOfferingJoinDaoImpl" class="com.cloud.api.query.dao.ServiceOfferingJoinDaoImpl" />
|
||||
<bean id="site2SiteCustomerGatewayDaoImpl" class="com.cloud.network.dao.Site2SiteCustomerGatewayDaoImpl" />
|
||||
<bean id="site2SiteVpnConnectionDaoImpl" class="com.cloud.network.dao.Site2SiteVpnConnectionDaoImpl" />
|
||||
<bean id="site2SiteVpnGatewayDaoImpl" class="com.cloud.network.dao.Site2SiteVpnGatewayDaoImpl" />
|
||||
<bean id="snapshotDaoImpl" class="com.cloud.storage.dao.SnapshotDaoImpl" />
|
||||
<bean id="snapshotPolicyDaoImpl" class="com.cloud.storage.dao.SnapshotPolicyDaoImpl" />
|
||||
<bean id="snapshotScheduleDaoImpl" class="com.cloud.storage.dao.SnapshotScheduleDaoImpl" />
|
||||
<bean id="staticRouteDaoImpl" class="com.cloud.network.vpc.dao.StaticRouteDaoImpl" />
|
||||
<bean id="storageNetworkIpAddressDaoImpl" class="com.cloud.dc.dao.StorageNetworkIpAddressDaoImpl" />
|
||||
<bean id="storageNetworkIpRangeDaoImpl" class="com.cloud.dc.dao.StorageNetworkIpRangeDaoImpl" />
|
||||
<bean id="storagePoolDetailsDaoImpl" class="com.cloud.storage.dao.StoragePoolDetailsDaoImpl" />
|
||||
<bean id="storagePoolHostDaoImpl" class="com.cloud.storage.dao.StoragePoolHostDaoImpl" />
|
||||
<bean id="storagePoolJoinDaoImpl" class="com.cloud.api.query.dao.StoragePoolJoinDaoImpl" />
|
||||
<bean id="storagePoolWorkDaoImpl" class="com.cloud.storage.dao.StoragePoolWorkDaoImpl" />
|
||||
<bean id="templatePrimaryDataStoreDaoImpl" class="org.apache.cloudstack.storage.volume.db.TemplatePrimaryDataStoreDaoImpl" />
|
||||
<bean id="uploadDaoImpl" class="com.cloud.storage.dao.UploadDaoImpl" />
|
||||
<bean id="usageDaoImpl" class="com.cloud.usage.dao.UsageDaoImpl" />
|
||||
<bean id="usageEventDaoImpl" class="com.cloud.event.dao.UsageEventDaoImpl" />
|
||||
<bean id="usageIPAddressDaoImpl" class="com.cloud.usage.dao.UsageIPAddressDaoImpl" />
|
||||
<bean id="usageJobDaoImpl" class="com.cloud.usage.dao.UsageJobDaoImpl" />
|
||||
<bean id="usageLoadBalancerPolicyDaoImpl" class="com.cloud.usage.dao.UsageLoadBalancerPolicyDaoImpl" />
|
||||
<bean id="usageNetworkDaoImpl" class="com.cloud.usage.dao.UsageNetworkDaoImpl" />
|
||||
<bean id="usageNetworkOfferingDaoImpl" class="com.cloud.usage.dao.UsageNetworkOfferingDaoImpl" />
|
||||
<bean id="usagePortForwardingRuleDaoImpl" class="com.cloud.usage.dao.UsagePortForwardingRuleDaoImpl" />
|
||||
<bean id="usageSecurityGroupDaoImpl" class="com.cloud.usage.dao.UsageSecurityGroupDaoImpl" />
|
||||
<bean id="usageStorageDaoImpl" class="com.cloud.usage.dao.UsageStorageDaoImpl" />
|
||||
<bean id="usageVMInstanceDaoImpl" class="com.cloud.usage.dao.UsageVMInstanceDaoImpl" />
|
||||
<bean id="usageVPNUserDaoImpl" class="com.cloud.usage.dao.UsageVPNUserDaoImpl" />
|
||||
<bean id="usageVolumeDaoImpl" class="com.cloud.usage.dao.UsageVolumeDaoImpl" />
|
||||
<bean id="usageVmDiskDaoImpl" class="com.cloud.usage.dao.UsageVmDiskDaoImpl" />
|
||||
<bean id="userAccountDaoImpl" class="com.cloud.user.dao.UserAccountDaoImpl" />
|
||||
<bean id="userAccountJoinDaoImpl" class="com.cloud.api.query.dao.UserAccountJoinDaoImpl" />
|
||||
<bean id="userIpv6AddressDaoImpl" class="com.cloud.network.dao.UserIpv6AddressDaoImpl" />
|
||||
<bean id="userStatisticsDaoImpl" class="com.cloud.user.dao.UserStatisticsDaoImpl" />
|
||||
<bean id="userStatsLogDaoImpl" class="com.cloud.user.dao.UserStatsLogDaoImpl" />
|
||||
<bean id="userVmDiskStatsDaoImpl" class="com.cloud.user.dao.VmDiskStatisticsDaoImpl" />
|
||||
<bean id="userVmCloneSettingDaoImpl" class="com.cloud.vm.dao.UserVmCloneSettingDaoImpl" />
|
||||
<bean id="userVmDaoImpl" class="com.cloud.vm.dao.UserVmDaoImpl" />
|
||||
<bean id="userVmDetailsDaoImpl" class="com.cloud.vm.dao.UserVmDetailsDaoImpl" />
|
||||
<bean id="userVmJoinDaoImpl" class="com.cloud.api.query.dao.UserVmJoinDaoImpl" />
|
||||
<bean id="vMComputeTagDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMComputeTagDaoImpl" />
|
||||
<bean id="vMEntityDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMEntityDaoImpl" />
|
||||
<bean id="vMInstanceDaoImpl" class="com.cloud.vm.dao.VMInstanceDaoImpl" />
|
||||
<bean id="vMNetworkMapDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMNetworkMapDaoImpl" />
|
||||
<bean id="vMReservationDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMReservationDaoImpl" />
|
||||
<bean id="vMRootDiskTagDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMRootDiskTagDaoImpl" />
|
||||
<bean id="vMSnapshotDaoImpl" class="com.cloud.vm.snapshot.dao.VMSnapshotDaoImpl" />
|
||||
<bean id="vMTemplateDetailsDaoImpl" class="com.cloud.storage.dao.VMTemplateDetailsDaoImpl" />
|
||||
<bean id="vMTemplateHostDaoImpl" class="com.cloud.storage.dao.VMTemplateHostDaoImpl" />
|
||||
<bean id="vMTemplatePoolDaoImpl" class="com.cloud.storage.dao.VMTemplatePoolDaoImpl" />
|
||||
<bean id="vMTemplateZoneDaoImpl" class="com.cloud.storage.dao.VMTemplateZoneDaoImpl" />
|
||||
<bean id="versionDaoImpl" class="com.cloud.upgrade.dao.VersionDaoImpl" />
|
||||
<bean id="virtualRouterProviderDaoImpl" class="com.cloud.network.dao.VirtualRouterProviderDaoImpl" />
|
||||
<bean id="vmRulesetLogDaoImpl" class="com.cloud.network.security.dao.VmRulesetLogDaoImpl" />
|
||||
<bean id="volumeDaoImpl" class="com.cloud.storage.dao.VolumeDaoImpl" />
|
||||
<bean id="volumeDetailsDaoImpl" class="com.cloud.storage.dao.VolumeDetailsDaoImpl" />
|
||||
<bean id="volumeHostDaoImpl" class="com.cloud.storage.dao.VolumeHostDaoImpl" />
|
||||
<bean id="volumeJoinDaoImpl" class="com.cloud.api.query.dao.VolumeJoinDaoImpl" />
|
||||
<bean id="volumeReservationDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VolumeReservationDaoImpl" />
|
||||
<bean id="vpcDaoImpl" class="com.cloud.network.vpc.dao.VpcDaoImpl" />
|
||||
<bean id="vpcGatewayDaoImpl" class="com.cloud.network.vpc.dao.VpcGatewayDaoImpl" />
|
||||
<bean id="vpcOfferingDaoImpl" class="com.cloud.network.vpc.dao.VpcOfferingDaoImpl" />
|
||||
<bean id="vpcOfferingServiceMapDaoImpl" class="com.cloud.network.vpc.dao.VpcOfferingServiceMapDaoImpl" />
|
||||
<bean id="vpcServiceMapDaoImpl" class="com.cloud.network.vpc.dao.VpcServiceMapDaoImpl" />
|
||||
<bean id="vpnUserDaoImpl" class="com.cloud.network.dao.VpnUserDaoImpl" />
|
||||
<bean id="applicationLbRuleDaoImpl" class="org.apache.cloudstack.lb.dao.ApplicationLoadBalancerRuleDaoImpl" />
|
||||
<bean id="networkOfferingDetailsDaoImpl" class="com.cloud.offerings.dao.NetworkOfferingDetailsDaoImpl" />
|
||||
<bean id="serviceOfferingDetailsDaoImpl" class="com.cloud.service.dao.ServiceOfferingDetailsDaoImpl"/>
|
||||
|
||||
<!--
|
||||
Checkers
|
||||
-->
|
||||
<bean id="encryptionSecretKeyChecker" class="com.cloud.utils.crypt.EncryptionSecretKeyChecker" />
|
||||
<bean id="StaticRoleBasedAPIAccessChecker" class="org.apache.cloudstack.acl.StaticRoleBasedAPIAccessChecker"/>
|
||||
<bean id="databaseIntegrityChecker" class="com.cloud.upgrade.DatabaseIntegrityChecker" />
|
||||
<bean id="domainChecker" class="com.cloud.acl.DomainChecker" />
|
||||
<bean id="affinityGroupAccessChecker" class="com.cloud.acl.AffinityGroupAccessChecker" />
|
||||
|
||||
<!--
|
||||
Authenticators
|
||||
-->
|
||||
<bean id="basicAgentAuthManager" class="com.cloud.agent.manager.authn.impl.BasicAgentAuthManager">
|
||||
<property name="name" value="BASIC"/>
|
||||
</bean>
|
||||
<bean id="MD5UserAuthenticator" class="com.cloud.server.auth.MD5UserAuthenticator">
|
||||
<property name="name" value="MD5"/>
|
||||
</bean>
|
||||
<bean id="LdapAuthenticator" class="org.apache.cloudstack.ldap.LdapAuthenticator">
|
||||
<property name="name" value="LDAP"/>
|
||||
</bean>
|
||||
<bean id="SHA256SaltedUserAuthenticator" class="com.cloud.server.auth.SHA256SaltedUserAuthenticator">
|
||||
<property name="name" value="SHA256SALT"/>
|
||||
</bean>
|
||||
<bean id="PlainTextUserAuthenticator" class="com.cloud.server.auth.PlainTextUserAuthenticator">
|
||||
<property name="name" value="PLAINTEXT"/>
|
||||
</bean>
|
||||
<bean id="LdapManager" class="org.apache.cloudstack.ldap.LdapManagerImpl" />
|
||||
<bean id="LdapUserManager" class="org.apache.cloudstack.ldap.LdapUserManager" />
|
||||
<bean id="LdapContextFactory" class="org.apache.cloudstack.ldap.LdapContextFactory" />
|
||||
<bean id="LdapConfigurationDao" class="org.apache.cloudstack.ldap.dao.LdapConfigurationDaoImpl" />
|
||||
<bean id="LdapConfiguration" class="org.apache.cloudstack.ldap.LdapConfiguration" />
|
||||
|
||||
<!--
|
||||
Network Elements
|
||||
-->
|
||||
<bean id="Ovs" class="com.cloud.network.element.OvsElement">
|
||||
<property name="name" value="Ovs"/>
|
||||
</bean>
|
||||
<bean id="SecurityGroupProvider" class="com.cloud.network.element.SecurityGroupElement">
|
||||
<property name="name" value="SecurityGroupProvider"/>
|
||||
</bean>
|
||||
<bean id="VirtualRouter" class="com.cloud.network.element.VirtualRouterElement">
|
||||
<property name="name" value="VirtualRouter"/>
|
||||
</bean>
|
||||
<bean id="VpcVirtualRouter" class="com.cloud.network.element.VpcVirtualRouterElement">
|
||||
<property name="name" value="VpcVirtualRouter"/>
|
||||
</bean>
|
||||
<bean id="elasticLoadBalancerElement" class="com.cloud.network.element.ElasticLoadBalancerElement">
|
||||
<property name="name" value="ElasticLoadBalancerElement"/>
|
||||
</bean>
|
||||
<bean id="InternalLbVm" class="org.apache.cloudstack.network.element.InternalLoadBalancerElement">
|
||||
<property name="name" value="InternalLbVm"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
General allocators
|
||||
-->
|
||||
<bean id="firstFitAllocator" class="com.cloud.agent.manager.allocator.impl.FirstFitAllocator" />
|
||||
<bean id="randomAllocator" class="com.cloud.agent.manager.allocator.impl.RandomAllocator" />
|
||||
|
||||
<!--
|
||||
Host Allocators
|
||||
-->
|
||||
<bean id="FirstFitRouting" class="com.cloud.agent.manager.allocator.impl.FirstFitRoutingAllocator">
|
||||
<property name="name" value="FirstFitRouting"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Storage pool allocators
|
||||
-->
|
||||
<bean id="LocalStoragePoolAllocator" class="org.apache.cloudstack.storage.allocator.LocalStoragePoolAllocator">
|
||||
<property name="name" value="LocalStorage"/>
|
||||
</bean>
|
||||
<bean id="clusterScopeStoragePoolAllocator" class="org.apache.cloudstack.storage.allocator.ClusterScopeStoragePoolAllocator" />
|
||||
<bean id="zoneWideStoragePoolAllocator" class="org.apache.cloudstack.storage.allocator.ZoneWideStoragePoolAllocator" />
|
||||
<bean id="garbageCollectingStoragePoolAllocator" class="org.apache.cloudstack.storage.allocator.GarbageCollectingStoragePoolAllocator">
|
||||
<property name="name" value="GCStorage"/>
|
||||
</bean>
|
||||
|
||||
<bean id="UserConcentratedAllocator" class="com.cloud.agent.manager.allocator.impl.UserConcentratedAllocator">
|
||||
<property name="name" value="UserFirst"/>
|
||||
</bean>
|
||||
|
||||
|
||||
<bean id="recreatableFencer" class="com.cloud.ha.RecreatableFencer" />
|
||||
<bean id="recreateHostAllocator" class="com.cloud.agent.manager.allocator.impl.RecreateHostAllocator" />
|
||||
<bean id="secondaryStorageVmDefaultAllocator" class="com.cloud.storage.secondary.SecondaryStorageVmDefaultAllocator" />
|
||||
|
||||
|
||||
<!--
|
||||
Misc allocator & Adapters
|
||||
-->
|
||||
<bean id="ConsoleProxyAllocator" class="com.cloud.consoleproxy.ConsoleProxyBalanceAllocator">
|
||||
<property name="name" value="Balance"/>
|
||||
</bean>
|
||||
|
||||
<bean id="ExternalIpAddressAllocator" class="com.cloud.network.ExternalIpAddressAllocator">
|
||||
<property name="name" value="Basic"/>
|
||||
</bean>
|
||||
|
||||
<bean id="hypervisorTemplateAdapter" class="com.cloud.template.HypervisorTemplateAdapter" />
|
||||
<bean id="clusterAlertAdapter" class="com.cloud.alert.ClusterAlertAdapter" />
|
||||
<bean id="consoleProxyAlertAdapter" class="com.cloud.alert.ConsoleProxyAlertAdapter" />
|
||||
<bean id="secondaryStorageVmAlertAdapter" class="com.cloud.alert.SecondaryStorageVmAlertAdapter" />
|
||||
<bean id="clusterServiceServletAdapter" class="com.cloud.cluster.ClusterServiceServletAdapter" />
|
||||
|
||||
<!--
|
||||
Investigators
|
||||
-->
|
||||
<bean id="CheckOnAgentInvestigator" class="com.cloud.ha.CheckOnAgentInvestigator">
|
||||
<property name="name" value="SimpleInvestigator"/>
|
||||
</bean>
|
||||
|
||||
<bean id="XenServerInvestigator" class="com.cloud.ha.XenServerInvestigator">
|
||||
<property name="name" value="XenServerInvestigator"/>
|
||||
</bean>
|
||||
|
||||
<bean id="KVMInvestigator" class="com.cloud.ha.KVMInvestigator">
|
||||
<property name="name" value="KVMInvestigator"/>
|
||||
</bean>
|
||||
|
||||
<bean id="UserVmDomRInvestigator" class="com.cloud.ha.UserVmDomRInvestigator">
|
||||
<property name="name" value="PingInvestigator"/>
|
||||
</bean>
|
||||
|
||||
<bean id="ManagementIPSystemVMInvestigator" class="com.cloud.ha.ManagementIPSystemVMInvestigator">
|
||||
<property name="name" value="ManagementIPSysVMInvestigator"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Fencers
|
||||
-->
|
||||
<bean id="XenServerFencer" class="com.cloud.ha.XenServerFencer">
|
||||
<property name="name" value="XenServerFenceBuilder"/>
|
||||
</bean>
|
||||
<bean id="KVMFencer" class="com.cloud.ha.KVMFencer">
|
||||
<property name="name" value="KVMFenceBuilder"/>
|
||||
</bean>
|
||||
<bean id="OvmFencer" class="com.cloud.ovm.hypervisor.OvmFencer">
|
||||
<property name="name" value="OvmFenceBuilder"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Discovers
|
||||
-->
|
||||
<bean id="XcpServerDiscoverer" class="com.cloud.hypervisor.xen.discoverer.XcpServerDiscoverer">
|
||||
<property name="name" value="XCP Agent"/>
|
||||
</bean>
|
||||
|
||||
<bean id="SecondaryStorageDiscoverer" class="org.apache.cloudstack.storage.resource.SecondaryStorageDiscoverer">
|
||||
<property name="name" value="SecondaryStorage"/>
|
||||
</bean>
|
||||
|
||||
<bean id="KvmServerDiscoverer" class="com.cloud.hypervisor.kvm.discoverer.KvmServerDiscoverer">
|
||||
<property name="name" value="KVM Agent"/>
|
||||
</bean>
|
||||
|
||||
<bean id="LxcServerDiscoverer" class="com.cloud.hypervisor.kvm.discoverer.LxcServerDiscoverer">
|
||||
<property name="name" value="Lxc Discover"/>
|
||||
</bean>
|
||||
|
||||
<bean id="OvmDiscoverer" class="com.cloud.ovm.hypervisor.OvmDiscoverer">
|
||||
<property name="name" value="Ovm Discover"/>
|
||||
</bean>
|
||||
|
||||
<bean id="dummyHostDiscoverer" class="com.cloud.resource.DummyHostDiscoverer">
|
||||
<property name="name" value="dummyHostDiscoverer" />
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Deployment planners
|
||||
-->
|
||||
<bean id="UserDispersingPlanner" class="com.cloud.deploy.UserDispersingPlanner">
|
||||
<property name="name" value="UserDispersingPlanner"/>
|
||||
</bean>
|
||||
|
||||
<bean id="UserConcentratedPodPlanner" class="com.cloud.deploy.UserConcentratedPodPlanner">
|
||||
<property name="name" value="UserConcentratedPodPlanner"/>
|
||||
</bean>
|
||||
|
||||
<bean id="ImplicitDedicationPlanner" class="com.cloud.deploy.ImplicitDedicationPlanner">
|
||||
<property name="name" value="ImplicitDedicationPlanner"/>
|
||||
</bean>
|
||||
|
||||
<bean id="clusterBasedAgentLoadBalancerPlanner" class="com.cloud.cluster.agentlb.ClusterBasedAgentLoadBalancerPlanner">
|
||||
<property name="name" value="ClusterBasedAgentLoadBalancerPlanner"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Network Gurus
|
||||
-->
|
||||
<bean id="StorageNetworkGuru" class="com.cloud.network.guru.StorageNetworkGuru">
|
||||
<property name="name" value="StorageNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="ExternalGuestNetworkGuru" class="com.cloud.network.guru.ExternalGuestNetworkGuru">
|
||||
<property name="name" value="ExternalGuestNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="PublicNetworkGuru" class="com.cloud.network.guru.PublicNetworkGuru">
|
||||
<property name="name" value="PublicNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="PodBasedNetworkGuru" class="com.cloud.network.guru.PodBasedNetworkGuru">
|
||||
<property name="name" value="PodBasedNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="ControlNetworkGuru" class="com.cloud.network.guru.ControlNetworkGuru">
|
||||
<property name="name" value="ControlNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="DirectNetworkGuru" class="com.cloud.network.guru.DirectNetworkGuru">
|
||||
<property name="name" value="DirectNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="DirectPodBasedNetworkGuru" class="com.cloud.network.guru.DirectPodBasedNetworkGuru">
|
||||
<property name="name" value="DirectPodBasedNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="OvsGuestNetworkGuru" class="com.cloud.network.guru.OvsGuestNetworkGuru">
|
||||
<property name="name" value="OvsGuestNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="PrivateNetworkGuru" class="com.cloud.network.guru.PrivateNetworkGuru">
|
||||
<property name="name" value="PrivateNetworkGuru"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Hypervisor Gurus
|
||||
-->
|
||||
<bean id="XenServerGuru" class="com.cloud.hypervisor.XenServerGuru">
|
||||
<property name="name" value="XenServerGuru"/>
|
||||
</bean>
|
||||
|
||||
<bean id="KVMGuru" class="com.cloud.hypervisor.KVMGuru">
|
||||
<property name="name" value="KVMGuru"/>
|
||||
</bean>
|
||||
|
||||
<bean id="LXCGuru" class="com.cloud.hypervisor.LXCGuru">
|
||||
<property name="name" value="LXCGuru"/>
|
||||
</bean>
|
||||
|
||||
<bean id="OvmGuru" class="com.cloud.ovm.hypervisor.OvmGuru">
|
||||
<property name="name" value="OvmGuru"/>
|
||||
</bean>
|
||||
|
||||
<!--=====================================================================================================-->
|
||||
<!-- -->
|
||||
<!-- Storage Subsystem Components and Helpers -->
|
||||
<!-- -->
|
||||
<!--=====================================================================================================-->
|
||||
|
||||
<!--Filesystem types-->
|
||||
<bean id="iSCSI" class="org.apache.cloudstack.storage.datastore.type.ISCSI" />
|
||||
<bean id="networkFileSystem" class="org.apache.cloudstack.storage.datastore.type.NetworkFileSystem" />
|
||||
|
||||
<!--Image formats-->
|
||||
<bean id="ISO" class="org.apache.cloudstack.storage.image.format.ISO" />
|
||||
<bean id="OVA" class="org.apache.cloudstack.storage.image.format.OVA" />
|
||||
<bean id="QCOW2" class="org.apache.cloudstack.storage.image.format.QCOW2" />
|
||||
<bean id="VHD" class="org.apache.cloudstack.storage.image.format.VHD" />
|
||||
<bean id="VHDX" class="org.apache.cloudstack.storage.image.format.VHDX" />
|
||||
<bean id="unknown" class="org.apache.cloudstack.storage.image.format.Unknown" />
|
||||
|
||||
<!--Data Store Services -->
|
||||
<bean id="snapshotServiceImpl" class="org.apache.cloudstack.storage.snapshot.SnapshotServiceImpl"
|
||||
depends-on="snapshotStateMachineManagerImpl, snapshotDataFactoryImpl, dataStoreManagerImpl, dataMotionServiceImpl, objectInDataStoreManagerImpl"/>
|
||||
<bean id="templateServiceImpl" class="org.apache.cloudstack.storage.image.TemplateServiceImpl"
|
||||
depends-on="dataObjectManagerImpl, dataStoreManagerImpl, dataMotionServiceImpl, objectInDataStoreManagerImpl, defaultEndPointSelector, templateDataFactoryImpl"/>
|
||||
<bean id="volumeServiceImpl" class="org.apache.cloudstack.storage.volume.VolumeServiceImpl"
|
||||
depends-on="snapshotManagerImpl, dataMotionServiceImpl"/>
|
||||
|
||||
<bean id="xenserverSnapshotStrategy" class="org.apache.cloudstack.storage.snapshot.XenserverSnapshotStrategy" />
|
||||
|
||||
<!--Data Store Factory-->
|
||||
<bean id="templateDataFactoryImpl" class="org.apache.cloudstack.storage.image.TemplateDataFactoryImpl" />
|
||||
<bean id="snapshotDataFactoryImpl" class="org.apache.cloudstack.storage.snapshot.SnapshotDataFactoryImpl"
|
||||
depends-on="dataStoreManagerImpl, snapshotDataStoreDaoImpl, volumeDataFactoryImpl"/>
|
||||
<bean id="volumeDataFactoryImpl" class="org.apache.cloudstack.storage.volume.VolumeDataFactoryImpl" />
|
||||
|
||||
<bean id="objectInDataStoreManagerImpl" class="org.apache.cloudstack.storage.datastore.ObjectInDataStoreManagerImpl" />
|
||||
<bean id="dataObjectManagerImpl" class="org.apache.cloudstack.storage.datastore.DataObjectManagerImpl" />
|
||||
|
||||
<!--Data Store Helpers-->
|
||||
<bean id="primaryDataStoreHelper" class="org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper" />
|
||||
<bean id="imageStoreHelper" class="org.apache.cloudstack.storage.image.datastore.ImageStoreHelper" />
|
||||
<bean id="imageFormatHelper" class="org.apache.cloudstack.storage.image.format.ImageFormatHelper" />
|
||||
|
||||
<bean id="storageCacheRandomAllocator" class="org.apache.cloudstack.storage.cache.allocator.StorageCacheRandomAllocator" />
|
||||
<bean id="storageCacheManagerImpl" class="org.apache.cloudstack.storage.cache.manager.StorageCacheManagerImpl" />
|
||||
<bean id="StorageCacheReplacementAlgorithm" class="org.apache.cloudstack.storage.cache.manager.StorageCacheReplacementAlgorithmLRU" />
|
||||
|
||||
<bean id="snapshotStateMachineManagerImpl" class="org.apache.cloudstack.storage.snapshot.SnapshotStateMachineManagerImpl" />
|
||||
<bean id="defaultEndPointSelector" class="org.apache.cloudstack.storage.endpoint.DefaultEndPointSelector" />
|
||||
|
||||
|
||||
<bean id="ancientDataMotionStrategy" class="org.apache.cloudstack.storage.motion.AncientDataMotionStrategy" />
|
||||
<bean id="xenserverStorageMotionStrategy" class="org.apache.cloudstack.storage.motion.XenServerStorageMotionStrategy" />
|
||||
|
||||
<!--Data Motion Services-->
|
||||
<bean id="dataMotionServiceImpl" class="org.apache.cloudstack.storage.motion.DataMotionServiceImpl">
|
||||
<property name="strategies">
|
||||
<list>
|
||||
<ref local="ancientDataMotionStrategy"/>
|
||||
<ref local="xenserverStorageMotionStrategy"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Data Store Provider Manager
|
||||
-->
|
||||
<bean id="primaryDataStoreProviderMgr"
|
||||
class="org.apache.cloudstack.storage.datastore.manager.PrimaryDataStoreProviderManagerImpl"/>
|
||||
<bean id="imageStoreProviderMgr" class="org.apache.cloudstack.storage.image.manager.ImageStoreProviderManagerImpl"/>
|
||||
|
||||
<bean id="dataStoreManagerImpl" class="org.apache.cloudstack.storage.datastore.DataStoreManagerImpl"
|
||||
depends-on="dataStoreProviderManager">
|
||||
<property name="primaryStoreMgr" ref="primaryDataStoreProviderMgr"/>
|
||||
<property name="imageDataStoreMgr" ref="imageStoreProviderMgr"/>
|
||||
</bean>
|
||||
|
||||
<bean id="cloudStackPrimaryDataStoreProviderImpl"
|
||||
class="org.apache.cloudstack.storage.datastore.provider.CloudStackPrimaryDataStoreProviderImpl"/>
|
||||
|
||||
<bean id="dataStoreProviderManager"
|
||||
class="org.apache.cloudstack.storage.datastore.provider.DataStoreProviderManagerImpl">
|
||||
<property name="providers">
|
||||
<list>
|
||||
<!--Data Store Providers-->
|
||||
<ref bean="cloudStackPrimaryDataStoreProviderImpl"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Managers
|
||||
-->
|
||||
<bean id="accountManagerImpl" class="com.cloud.user.AccountManagerImpl" >
|
||||
<property name="UserAuthenticators" value="#{userAuthenticators.Adapters}" />
|
||||
<property name="UserPasswordEncoders" value="#{userPasswordEncoders.Adapters}" />
|
||||
<property name="SecurityCheckers" value="#{securityCheckers.Adapters}" />
|
||||
</bean>
|
||||
|
||||
<bean id="managementServerImpl" class ="com.cloud.server.ManagementServerImpl">
|
||||
<property name="UserAuthenticators" value="#{userAuthenticators.Adapters}" />
|
||||
<property name="UserPasswordEncoders" value="#{userPasswordEncoders.Adapters}" />
|
||||
<property name="HostAllocators" value="#{hostAllocators.Adapters}" />
|
||||
<property name="AffinityGroupProcessors" value="#{affinityProcessors.Adapters}" />
|
||||
<property name="Planners" value="#{deploymentPlanners.Adapters}" />
|
||||
</bean>
|
||||
|
||||
<bean id="storageManagerImpl" class="com.cloud.storage.StorageManagerImpl"/>
|
||||
|
||||
<bean id="volumeOrchestrator" class="org.apache.cloudstack.engine.orchestration.VolumeOrchestrator">
|
||||
<property name="PodAllocators" value="#{podAllocators.Adapters}" />
|
||||
<property name="StoragePoolAllocators" value="#{storagePoolAllocators.Adapters}" />
|
||||
</bean>
|
||||
|
||||
<bean id="FirstFitPlanner" class="com.cloud.deploy.FirstFitPlanner">
|
||||
<property name="name" value="FirstFitPlanner"/>
|
||||
</bean>
|
||||
|
||||
<bean id="resourceManagerImpl" class="com.cloud.resource.ResourceManagerImpl" >
|
||||
<property name="Discoverers" value="#{resourceDiscoverers.Adapters}" />
|
||||
</bean>
|
||||
|
||||
<bean id="highAvailabilityManagerExtImpl" class="com.cloud.ha.HighAvailabilityManagerExtImpl" >
|
||||
<property name="Investigators" value="#{haInvestigators.Adapters}" />
|
||||
<property name="FenceBuilders" value="#{haFenceBuilders.Adapters}" />
|
||||
</bean>
|
||||
|
||||
<bean id="clusteredVirtualMachineManagerImpl" class="com.cloud.vm.ClusteredVirtualMachineManagerImpl" >
|
||||
<property name="HostAllocators" value="#{hostAllocators.Adapters}" />
|
||||
</bean>
|
||||
|
||||
<bean id="networkOrchestrator" class="org.apache.cloudstack.engine.orchestration.NetworkOrchestrator" >
|
||||
<property name="NetworkGurus" value="#{networkGurus.Adapters}" />
|
||||
<property name="NetworkElements" value="#{networkElements.Adapters}" />
|
||||
<property name="IpDeployers" value="#{ipDeployers.Adapters}" />
|
||||
<property name="DhcpProviders" value="#{dhcpProviders.Adapters}" />
|
||||
</bean>
|
||||
|
||||
<bean id="ipAddressManagerImpl" class="com.cloud.network.IpAddressManagerImpl" >
|
||||
</bean>
|
||||
<bean id="networkModelImpl" class="com.cloud.network.NetworkModelImpl">
|
||||
<property name="NetworkElements" value="#{networkElements.Adapters}" />
|
||||
</bean>
|
||||
|
||||
<bean id="configurationServerImpl" class="com.cloud.server.ConfigurationServerImpl" />
|
||||
|
||||
<bean id="clusterManagerImpl" class="com.cloud.cluster.ClusterManagerImpl" />
|
||||
<bean id="clusteredAgentManagerImpl" class="com.cloud.agent.manager.ClusteredAgentManagerImpl" />
|
||||
|
||||
<bean id="userVmManagerImpl" class="com.cloud.vm.UserVmManagerImpl" />
|
||||
<bean id="consoleProxyManagerImpl" class="com.cloud.consoleproxy.ConsoleProxyManagerImpl" />
|
||||
<bean id="securityGroupManagerImpl2" class="com.cloud.network.security.SecurityGroupManagerImpl2" />
|
||||
<bean id="premiumSecondaryStorageManagerImpl" class="com.cloud.secstorage.PremiumSecondaryStorageManagerImpl" />
|
||||
|
||||
<bean id="ipv6AddressManagerImpl" class="com.cloud.network.Ipv6AddressManagerImpl" />
|
||||
|
||||
<bean id="apiRateLimitServiceImpl" class="org.apache.cloudstack.ratelimit.ApiRateLimitServiceImpl"/>
|
||||
<bean id="alertManagerImpl" class="com.cloud.alert.AlertManagerImpl" />
|
||||
<bean id="autoScaleManagerImpl" class="com.cloud.network.as.AutoScaleManagerImpl" />
|
||||
<bean id="capacityManagerImpl" class="com.cloud.capacity.CapacityManagerImpl" />
|
||||
<bean id="clusterFenceManagerImpl" class="com.cloud.cluster.ClusterFenceManagerImpl" />
|
||||
<bean id="configurationManagerImpl" class="com.cloud.configuration.ConfigurationManagerImpl" />
|
||||
|
||||
<bean id="elasticLoadBalancerManagerImpl" class="com.cloud.network.lb.ElasticLoadBalancerManagerImpl" />
|
||||
<bean id="entityManagerImpl" class="com.cloud.dao.EntityManagerImpl" />
|
||||
<bean id="externalDeviceUsageManagerImpl" class="com.cloud.network.ExternalDeviceUsageManagerImpl" />
|
||||
<bean id="externalNetworkDeviceManagerImpl" class="com.cloud.network.ExternalNetworkDeviceManagerImpl" />
|
||||
<bean id="firewallManagerImpl" class="com.cloud.network.firewall.FirewallManagerImpl" />
|
||||
<bean id="hypervisorGuruManagerImpl" class="com.cloud.hypervisor.HypervisorGuruManagerImpl" />
|
||||
<bean id="identityServiceImpl" class="com.cloud.uuididentity.IdentityServiceImpl" />
|
||||
<bean id="keystoreManagerImpl" class="com.cloud.keystore.KeystoreManagerImpl" />
|
||||
<bean id="loadBalancingRulesManagerImpl" class="com.cloud.network.lb.LoadBalancingRulesManagerImpl" />
|
||||
<bean id="networkACLManagerImpl" class="com.cloud.network.vpc.NetworkACLManagerImpl" />
|
||||
<bean id="networkACLServiceImpl" class="com.cloud.network.vpc.NetworkACLServiceImpl" />
|
||||
<bean id="networkServiceImpl" class="com.cloud.network.NetworkServiceImpl" />
|
||||
<bean id="networkUsageManagerImpl" class="com.cloud.network.NetworkUsageManagerImpl" />
|
||||
<bean id="oCFS2ManagerImpl" class="com.cloud.storage.OCFS2ManagerImpl" />
|
||||
<bean id="ovsTunnelManagerImpl" class="com.cloud.network.ovs.OvsTunnelManagerImpl" />
|
||||
<bean id="projectManagerImpl" class="com.cloud.projects.ProjectManagerImpl" />
|
||||
<bean id="queryManagerImpl" class="com.cloud.api.query.QueryManagerImpl" />
|
||||
<bean id="regionManagerImpl" class="org.apache.cloudstack.region.RegionManagerImpl" />
|
||||
<bean id="regionServiceImpl" class="org.apache.cloudstack.region.RegionServiceImpl" />
|
||||
<bean id="remoteAccessVpnManagerImpl" class="com.cloud.network.vpn.RemoteAccessVpnManagerImpl" />
|
||||
<bean id="resourceLimitManagerImpl" class="com.cloud.resourcelimit.ResourceLimitManagerImpl" />
|
||||
<bean id="rulesManagerImpl" class="com.cloud.network.rules.RulesManagerImpl" />
|
||||
<bean id="site2SiteVpnManagerImpl" class="com.cloud.network.vpn.Site2SiteVpnManagerImpl" />
|
||||
<bean id="snapshotManagerImpl" class="com.cloud.storage.snapshot.SnapshotManagerImpl" />
|
||||
<bean id="snapshotSchedulerImpl" class="com.cloud.storage.snapshot.SnapshotSchedulerImpl" />
|
||||
<bean id="storageNetworkManagerImpl" class="com.cloud.network.StorageNetworkManagerImpl" />
|
||||
<bean id="taggedResourceManagerImpl" class="com.cloud.tags.TaggedResourceManagerImpl" />
|
||||
<bean id="resourceMetaDataManagerImpl" class="com.cloud.metadata.ResourceMetaDataManagerImpl" />
|
||||
<bean id="templateManagerImpl" class="com.cloud.template.TemplateManagerImpl" />
|
||||
<bean id="uploadMonitorImpl" class="com.cloud.storage.upload.UploadMonitorImpl" />
|
||||
<bean id="usageServiceImpl" class="com.cloud.usage.UsageServiceImpl" />
|
||||
<bean id="virtualNetworkApplianceManagerImpl" class="com.cloud.network.router.VirtualNetworkApplianceManagerImpl" />
|
||||
<bean id="vpcManagerImpl" class="com.cloud.network.vpc.VpcManagerImpl" />
|
||||
<bean id="vpcVirtualNetworkApplianceManagerImpl" class="com.cloud.network.router.VpcVirtualNetworkApplianceManagerImpl" />
|
||||
|
||||
<!-- Async management -->
|
||||
<bean id="asyncJobDaoImpl" class="org.apache.cloudstack.framework.jobs.dao.AsyncJobDaoImpl" />
|
||||
<bean id="asyncJobJournalDaoImpl" class="org.apache.cloudstack.framework.jobs.dao.AsyncJobJournalDaoImpl" />
|
||||
<bean id="asyncJobJoinMapDaoImpl" class="org.apache.cloudstack.framework.jobs.dao.AsyncJobJoinMapDaoImpl" />
|
||||
<bean id="asyncJobManagerImpl" class="org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl"/>
|
||||
<bean id="asyncJobMonitor" class="org.apache.cloudstack.framework.jobs.impl.AsyncJobMonitor"/>
|
||||
<bean id="syncQueueDaoImpl" class="org.apache.cloudstack.framework.jobs.dao.SyncQueueDaoImpl" />
|
||||
<bean id="syncQueueItemDaoImpl" class="org.apache.cloudstack.framework.jobs.dao.SyncQueueItemDaoImpl" />
|
||||
<bean id="syncQueueManagerImpl" class="org.apache.cloudstack.framework.jobs.impl.SyncQueueManagerImpl" />
|
||||
|
||||
<bean id="ApiAsyncJobDispatcher" class="com.cloud.api.ApiAsyncJobDispatcher">
|
||||
<property name="name" value="ApiAsyncJobDispatcher" />
|
||||
</bean>
|
||||
|
||||
|
||||
<!--
|
||||
Misc components
|
||||
-->
|
||||
<bean id="actionEventUtils" class="com.cloud.event.ActionEventUtils" />
|
||||
<bean id="alertGenerator" class="com.cloud.event.AlertGenerator" />
|
||||
<bean id="apiDBUtils" class="com.cloud.api.ApiDBUtils" />
|
||||
<bean id="apiDiscoveryServiceImpl" class="org.apache.cloudstack.discovery.ApiDiscoveryServiceImpl" />
|
||||
<bean id="apiDispatcher" class="com.cloud.api.ApiDispatcher" />
|
||||
<bean id="apiResponseHelper" class="com.cloud.api.ApiResponseHelper" />
|
||||
<bean id="apiServer" class="com.cloud.api.ApiServer" />
|
||||
<bean id="apiServlet" class="com.cloud.api.ApiServlet" />
|
||||
<bean id="bAREMETAL" class="org.apache.cloudstack.storage.image.format.BAREMETAL" />
|
||||
<bean id="cloudOrchestrator" class="org.apache.cloudstack.engine.orchestration.CloudOrchestrator" />
|
||||
<bean id="clusterRestService" class="org.apache.cloudstack.engine.rest.service.api.ClusterRestService" />
|
||||
<bean id="consoleProxyServlet" class="com.cloud.servlet.ConsoleProxyServlet" />
|
||||
<bean id="dataCenterResourceManagerImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceManagerImpl" />
|
||||
<bean id="dataDisk" class="org.apache.cloudstack.engine.subsystem.api.storage.type.DataDisk" />
|
||||
|
||||
|
||||
<bean id="podRestService" class="org.apache.cloudstack.engine.rest.service.api.PodRestService" />
|
||||
<bean id="iso" class="org.apache.cloudstack.engine.subsystem.api.storage.type.Iso" />
|
||||
<bean id="networkRestService" class="org.apache.cloudstack.engine.rest.service.api.NetworkRestService" />
|
||||
<bean id="provisioningServiceImpl" class="org.apache.cloudstack.engine.service.api.ProvisioningServiceImpl" />
|
||||
<bean id="rootDisk" class="org.apache.cloudstack.engine.subsystem.api.storage.type.RootDisk" />
|
||||
<bean id="registerCompleteServlet" class="com.cloud.servlet.RegisterCompleteServlet" />
|
||||
<bean id="statsCollector" class="com.cloud.server.StatsCollector" />
|
||||
<bean id="storagePoolAutomationImpl" class="com.cloud.storage.StoragePoolAutomationImpl" />
|
||||
<bean id="usageEventUtils" class="com.cloud.event.UsageEventUtils" />
|
||||
<bean id="vMEntityManagerImpl" class="org.apache.cloudstack.engine.cloud.entity.api.VMEntityManagerImpl" />
|
||||
<bean id="virtualMachineEntityImpl" class="org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntityImpl" />
|
||||
<bean id="virtualMachineRestService" class="org.apache.cloudstack.engine.rest.service.api.VirtualMachineRestService" />
|
||||
<bean id="volumeRestService" class="org.apache.cloudstack.engine.rest.service.api.VolumeRestService" />
|
||||
<bean id="volumeTypeHelper" class="org.apache.cloudstack.engine.subsystem.api.storage.type.VolumeTypeHelper" />
|
||||
<bean id="zoneRestService" class="org.apache.cloudstack.engine.rest.service.api.ZoneRestService" />
|
||||
<bean id="cloudZonesStartupProcessor" class="com.cloud.hypervisor.CloudZonesStartupProcessor" />
|
||||
<bean id="managementServerNode" class="org.apache.cloudstack.utils.identity.ManagementServerNode" />
|
||||
<bean id="testingAllocator" class="com.cloud.agent.manager.allocator.impl.TestingAllocator" />
|
||||
<bean id="domainManagerImpl" class="com.cloud.user.DomainManagerImpl" />
|
||||
<bean id="downloadMonitorImpl" class="com.cloud.storage.download.DownloadMonitorImpl" />
|
||||
<bean id="lBHealthCheckManagerImpl" class="com.cloud.network.lb.LBHealthCheckManagerImpl" />
|
||||
<bean id="volumeApiServiceImpl" class="com.cloud.storage.VolumeApiServiceImpl"/>
|
||||
<bean id="ApplicationLoadBalancerService" class="org.apache.cloudstack.network.lb.ApplicationLoadBalancerManagerImpl" />
|
||||
<bean id="InternalLoadBalancerVMManager" class="org.apache.cloudstack.network.lb.InternalLoadBalancerVMManagerImpl" />
|
||||
|
||||
<bean id="vMSnapshotManagerImpl" class="com.cloud.vm.snapshot.VMSnapshotManagerImpl" />
|
||||
|
||||
|
||||
<!--=======================================================================================================-->
|
||||
<!-- -->
|
||||
<!-- Module-basis OSS/non-OSS Common components -->
|
||||
<!-- -->
|
||||
<!--=======================================================================================================-->
|
||||
|
||||
<!--
|
||||
Baremetal components
|
||||
-->
|
||||
|
||||
<bean id="BareMetalDhcp" class="com.cloud.baremetal.networkservice.BaremetalDhcpElement">
|
||||
<property name="name" value="BareMetalDhcp"/>
|
||||
</bean>
|
||||
<bean id="BareMetalPxe" class="com.cloud.baremetal.networkservice.BaremetalPxeElement">
|
||||
<property name="name" value="BareMetalPxe"/>
|
||||
</bean>
|
||||
<bean id="BareMetalUserdata" class="com.cloud.baremetal.networkservice.BaremetalUserdataElement">
|
||||
<property name="name" value="BareMetalUserdata"/>
|
||||
</bean>
|
||||
|
||||
<bean id="BareMetalTemplateAdapter" class="com.cloud.baremetal.manager.BareMetalTemplateAdapter" />
|
||||
|
||||
<bean id="BareMetalDiscoverer" class="com.cloud.baremetal.manager.BareMetalDiscoverer">
|
||||
<property name="name" value="Bare Metal Agent"/>
|
||||
</bean>
|
||||
|
||||
<bean id="BareMetalPlanner" class="com.cloud.baremetal.manager.BareMetalPlanner">
|
||||
<property name="name" value="BareMetalPlanner"/>
|
||||
</bean>
|
||||
|
||||
<bean id="BaremetalGuru" class="com.cloud.baremetal.manager.BareMetalGuru">
|
||||
<property name="name" value="BaremetalGuru"/>
|
||||
</bean>
|
||||
|
||||
<bean id="BaremetalManager" class="com.cloud.baremetal.manager.BaremetalManagerImpl"/>
|
||||
<bean id="BaremetalDhcpManager" class="com.cloud.baremetal.networkservice.BaremetalDhcpManagerImpl"/>
|
||||
<bean id="BaremetalKickStartPxeService" class="com.cloud.baremetal.networkservice.BaremetalKickStartServiceImpl"/>
|
||||
<bean id="BaremetalPingPxeService" class="com.cloud.baremetal.networkservice.BareMetalPingServiceImpl" />
|
||||
<bean id="BaremetalPxeManager" class="com.cloud.baremetal.networkservice.BaremetalPxeManagerImpl" />
|
||||
|
||||
<bean id="BAREMETAL" class="org.apache.cloudstack.storage.image.format.BAREMETAL" />
|
||||
<bean id="baremetalDhcpDaoImpl" class="com.cloud.baremetal.database.BaremetalDhcpDaoImpl" />
|
||||
<bean id="baremetalPxeDaoImpl" class="com.cloud.baremetal.database.BaremetalPxeDaoImpl" />
|
||||
|
||||
<bean id="UcsManager" class="com.cloud.ucs.manager.UcsManagerImpl" />
|
||||
|
||||
<bean id="AffinityGroupServiceImpl" class="org.apache.cloudstack.affinity.AffinityGroupServiceImpl">
|
||||
<property name="AffinityGroupProcessors" value="#{affinityProcessors.Adapters}" />
|
||||
</bean>
|
||||
<bean id="DeploymentPlanningManager" class="com.cloud.deploy.DeploymentPlanningManagerImpl">
|
||||
<property name="Planners" value="#{deploymentPlanners.Adapters}" />
|
||||
<property name="AffinityGroupProcessors" value="#{affinityProcessors.Adapters}" />
|
||||
<property name="StoragePoolAllocators" value="#{storagePoolAllocators.Adapters}" />
|
||||
<property name="HostAllocators" value="#{hostAllocators.Adapters}" />
|
||||
</bean>
|
||||
|
||||
<bean id="AffinityGroupJoinDaoImpl" class="com.cloud.api.query.dao.AffinityGroupJoinDaoImpl">
|
||||
</bean>
|
||||
<bean id="AffinityGroupDaoImpl" class="org.apache.cloudstack.affinity.dao.AffinityGroupDaoImpl">
|
||||
</bean>
|
||||
<bean id="AffinityGroupVMMapDaoImpl" class="org.apache.cloudstack.affinity.dao.AffinityGroupVMMapDaoImpl">
|
||||
</bean>
|
||||
<bean id="AffinityGroupDomainMapDaoImpl" class="org.apache.cloudstack.affinity.dao.AffinityGroupDomainMapDaoImpl">
|
||||
</bean>
|
||||
|
||||
<bean id="PlannerHostReservationDaoImpl" class="com.cloud.deploy.dao.PlannerHostReservationDaoImpl">
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
|
@ -1,324 +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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:tx="http://www.springframework.org/schema/tx"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/tx
|
||||
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
|
||||
http://www.springframework.org/schema/aop
|
||||
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
|
||||
|
||||
<context:annotation-config />
|
||||
|
||||
|
||||
<!--
|
||||
|
||||
OSS deployment configuration
|
||||
|
||||
OSS/non-OSS counter-exclusive components and related configurations should be put here
|
||||
for example, configurationDaoImpl component, it has exclusive configuration settings in OSS and non-OSS deployment,
|
||||
its component declaration should be put in both componentContext.xml.in and nonossComponentContext.xml.in, each with
|
||||
independent configuration
|
||||
|
||||
-->
|
||||
|
||||
<bean id="databaseUpgradeChecker" class="com.cloud.upgrade.DatabaseUpgradeChecker" />
|
||||
<bean id="configurationDaoImpl" class="org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl" />
|
||||
<bean id="GlobalLoadBalancingRulesServiceImpl" class ="org.apache.cloudstack.region.gslb.GlobalLoadBalancingRulesServiceImpl" />
|
||||
|
||||
<!--
|
||||
Nicira support components
|
||||
-->
|
||||
<bean id="niciraNvpDaoImpl" class="com.cloud.network.dao.NiciraNvpDaoImpl" />
|
||||
<bean id="niciraNvpNicMappingDaoImpl" class="com.cloud.network.dao.NiciraNvpNicMappingDaoImpl" />
|
||||
<bean id="niciraNvpRouterMappingDaoImpl" class="com.cloud.network.dao.NiciraNvpRouterMappingDaoImpl" />
|
||||
<bean id="NiciraNvpGuestNetworkGuru" class="com.cloud.network.guru.NiciraNvpGuestNetworkGuru">
|
||||
<property name="name" value="NiciraNvpGuestNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="NiciraNvp" class="com.cloud.network.element.NiciraNvpElement">
|
||||
<property name="name" value="NiciraNvp"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Midonet support components
|
||||
-->
|
||||
<bean id="MidoNetGuestNetworkGuru" class="com.cloud.network.guru.MidoNetGuestNetworkGuru">
|
||||
<property name="name" value="MidoNetGuestNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="MidoNetElement" class="com.cloud.network.element.MidoNetElement">
|
||||
<property name="name" value="MidoNetElement"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Stratosphere SSP support components
|
||||
-->
|
||||
<bean id="sspCredentialDaoImpl" class="org.apache.cloudstack.network.dao.SspCredentialDaoImpl"/>
|
||||
<bean id="sspTenantDaoImpl" class="org.apache.cloudstack.network.dao.SspTenantDaoImpl"/>
|
||||
<bean id="sspUuidDaoImpl" class="org.apache.cloudstack.network.dao.SspUuidDaoImpl"/>
|
||||
<bean id="SspGuestNetworkGuru" class="org.apache.cloudstack.network.guru.SspGuestNetworkGuru">
|
||||
<property name="name" value="SspGuestNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="StratosphereSsp" class="org.apache.cloudstack.network.element.SspElement">
|
||||
<property name="name" value="StratosphereSsp"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
UCS support components
|
||||
-->
|
||||
<bean id="ucsBladeDaoImpl" class="com.cloud.ucs.database.UcsBladeDaoImpl" />
|
||||
<bean id="ucsManagerDaoImpl" class="com.cloud.ucs.database.UcsManagerDaoImpl" />
|
||||
|
||||
<!--
|
||||
VXLAN support components
|
||||
-->
|
||||
<bean id="VxlanGuestNetworkGuru" class="com.cloud.network.guru.VxlanGuestNetworkGuru">
|
||||
<property name="name" value="VxlanGuestNetworkGuru"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
|
||||
Deployment configurations of various adapters
|
||||
|
||||
It determines whether or not a adapter is activated or how it is loaded in order in its managing provider,
|
||||
|
||||
-->
|
||||
<bean id="cloudStackImageStoreProviderImpl"
|
||||
class="org.apache.cloudstack.storage.datastore.provider.CloudStackImageStoreProviderImpl"/>
|
||||
<bean id="s3ImageStoreProviderImpl"
|
||||
class="org.apache.cloudstack.storage.datastore.provider.S3ImageStoreProviderImpl"/>
|
||||
<bean id="swiftImageStoreProviderImpl"
|
||||
class="org.apache.cloudstack.storage.datastore.provider.SwiftImageStoreProviderImpl"/>
|
||||
<bean id="solidFireDataStoreProvider"
|
||||
class="org.apache.cloudstack.storage.datastore.provider.SolidfirePrimaryDataStoreProvider"/>
|
||||
|
||||
<!--Storage Providers-->
|
||||
<bean id="dataStoreProviderManager"
|
||||
class="org.apache.cloudstack.storage.datastore.provider.DataStoreProviderManagerImpl">
|
||||
<property name="providers">
|
||||
<list merge="true">
|
||||
<ref bean="cloudStackPrimaryDataStoreProviderImpl"/>
|
||||
<ref local="cloudStackImageStoreProviderImpl"/>
|
||||
<ref local="s3ImageStoreProviderImpl"/>
|
||||
<ref local="swiftImageStoreProviderImpl"/>
|
||||
<ref local="solidFireDataStoreProvider"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Security adapters -->
|
||||
<bean id="userAuthenticators" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="SHA256SaltedUserAuthenticator"/>
|
||||
<ref bean="MD5UserAuthenticator"/>
|
||||
<ref bean="LdapAuthenticator"/>
|
||||
<ref bean="PlainTextUserAuthenticator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="userPasswordEncoders" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="SHA256SaltedUserAuthenticator"/>
|
||||
<ref bean="MD5UserAuthenticator"/>
|
||||
<ref bean="LdapAuthenticator"/>
|
||||
<ref bean="PlainTextUserAuthenticator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="securityCheckers" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="affinityGroupAccessChecker"/>
|
||||
<ref bean="domainChecker"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Resource discoverers -->
|
||||
<bean id="resourceDiscoverers" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="XcpServerDiscoverer"/>
|
||||
<ref bean="SecondaryStorageDiscoverer"/>
|
||||
<ref bean="KvmServerDiscoverer"/>
|
||||
<ref bean="LxcServerDiscoverer"/>
|
||||
<ref bean="BareMetalDiscoverer"/>
|
||||
<ref bean="OvmDiscoverer"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- HA adapters -->
|
||||
<bean id="haInvestigators" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="CheckOnAgentInvestigator"/>
|
||||
<ref bean="XenServerInvestigator"/>
|
||||
<ref bean="UserVmDomRInvestigator"/>
|
||||
<ref bean="ManagementIPSystemVMInvestigator"/>
|
||||
<ref bean="KVMInvestigator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="haFenceBuilders" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="XenServerFencer"/>
|
||||
<ref bean="KVMFencer"/>
|
||||
<ref bean="OvmFencer"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Deployment/allocation adapters -->
|
||||
<bean id="deploymentPlanners" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="FirstFitPlanner" />
|
||||
<ref bean="UserDispersingPlanner" />
|
||||
<ref bean="UserConcentratedPodPlanner" />
|
||||
<ref bean="ImplicitDedicationPlanner" />
|
||||
<ref bean="BareMetalPlanner" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="podAllocators" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="UserConcentratedAllocator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="hostAllocators" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="FirstFitRouting"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="storagePoolAllocators" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="LocalStoragePoolAllocator"/>
|
||||
<ref bean="clusterScopeStoragePoolAllocator"/>
|
||||
<ref bean="zoneWideStoragePoolAllocator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Networking adapters -->
|
||||
<bean id="ipDeployers" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="elasticLoadBalancerElement"/>
|
||||
<ref bean="VirtualRouter"/>
|
||||
<ref bean="VpcVirtualRouter"/>
|
||||
<ref bean="NiciraNvp"/>
|
||||
<ref bean="InternalLbVm"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="dhcpProviders" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="VirtualRouter"/>
|
||||
<ref bean="VpcVirtualRouter"/>
|
||||
<ref bean="BareMetalDhcp"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="networkGurus" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="StorageNetworkGuru"/>
|
||||
<ref bean="ExternalGuestNetworkGuru"/>
|
||||
<ref bean="PublicNetworkGuru"/>
|
||||
<ref bean="PodBasedNetworkGuru"/>
|
||||
<ref bean="DirectPodBasedNetworkGuru"/>
|
||||
<ref bean="ControlNetworkGuru"/>
|
||||
<ref bean="DirectNetworkGuru"/>
|
||||
<ref bean="OvsGuestNetworkGuru"/>
|
||||
<ref bean="PrivateNetworkGuru"/>
|
||||
<ref bean="NiciraNvpGuestNetworkGuru"/>
|
||||
<ref bean="MidoNetGuestNetworkGuru"/>
|
||||
<ref bean="SspGuestNetworkGuru"/>
|
||||
<ref bean="VxlanGuestNetworkGuru"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="networkElements" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="VirtualRouter"/>
|
||||
<ref bean="Ovs"/>
|
||||
<ref bean="SecurityGroupProvider"/>
|
||||
<ref bean="VpcVirtualRouter"/>
|
||||
<ref bean="NiciraNvp" />
|
||||
<ref bean="MidoNetElement"/>
|
||||
<ref bean="StratosphereSsp"/>
|
||||
<ref bean="InternalLbVm"/>
|
||||
<ref bean="BareMetalDhcp"/>
|
||||
<ref bean="BareMetalPxe"/>
|
||||
<ref bean="BareMetalUserdata"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
AffinityGroup Processors
|
||||
-->
|
||||
<bean id="HostAntiAffinityProcessor" class="org.apache.cloudstack.affinity.HostAntiAffinityProcessor">
|
||||
<property name="name" value="HostAntiAffinityProcessor"/>
|
||||
<property name="type" value="host anti-affinity"/>
|
||||
</bean>
|
||||
|
||||
<bean id="affinityProcessors" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="HostAntiAffinityProcessor" />
|
||||
<ref bean="ExplicitDedicationProcessor"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Dedicated Resources components
|
||||
-->
|
||||
<bean id="DedicatedResourceManagerImpl" class="org.apache.cloudstack.dedicated.DedicatedResourceManagerImpl"/>
|
||||
<bean id="ExplicitDedicationProcessor" class="org.apache.cloudstack.affinity.ExplicitDedicationProcessor">
|
||||
<property name="name" value="ExplicitDedicationProcessor"/>
|
||||
<property name="type" value="ExplicitDedication"/>
|
||||
</bean>
|
||||
</beans>
|
||||
|
|
@ -152,6 +152,14 @@ under the License.
|
|||
<priority value="INFO"/>
|
||||
</category>
|
||||
|
||||
<category name="org.springframework">
|
||||
<priority value="WARN"/>
|
||||
</category>
|
||||
|
||||
<category name="org.apache.cloudstack.spring.module.context.ResourceApplicationContext">
|
||||
<priority value="WARN"/>
|
||||
</category>
|
||||
|
||||
<category name="net">
|
||||
<priority value="INFO"/>
|
||||
</category>
|
||||
|
|
|
|||
|
|
@ -1,422 +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.
|
||||
-->
|
||||
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:tx="http://www.springframework.org/schema/tx"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/tx
|
||||
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
|
||||
http://www.springframework.org/schema/aop
|
||||
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
|
||||
|
||||
|
||||
<!--
|
||||
|
||||
non-OSS deployment configuration
|
||||
|
||||
OSS/non-OSS counter-exclusive components and related configurations should be put here
|
||||
for example, configurationDaoImpl component, it has exclusive configuration settings in OSS and non-OSS deployment,
|
||||
its component declaration should be put in both componentContext.xml.in and nonossComponentContext.xml.in, each with
|
||||
independent configuration
|
||||
|
||||
-->
|
||||
<bean id="DatabaseUpgradeChecker" class="com.cloud.upgrade.DatabaseUpgradeChecker"/>
|
||||
<bean id="GlobalLoadBalancingRulesServiceImpl" class ="org.apache.cloudstack.region.gslb.GlobalLoadBalancingRulesServiceImpl" >
|
||||
<property name="GslbServiceProvider">
|
||||
<ref bean="Netscaler"/>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
DAO with customized configuration under non-OSS deployment
|
||||
-->
|
||||
<bean id="configurationDaoImpl" class="org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl">
|
||||
<property name="configParams">
|
||||
<map>
|
||||
<entry key="premium" value="true" />
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
VMware support components
|
||||
-->
|
||||
<bean id="VmwareFencer" class="com.cloud.ha.VmwareFencer">
|
||||
<property name="name" value="VMwareFenceBuilder"/>
|
||||
</bean>
|
||||
<bean id="vmwareServerDiscoverer" class="com.cloud.hypervisor.vmware.VmwareServerDiscoverer">
|
||||
<property name="name" value="VMware Discover"/>
|
||||
</bean>
|
||||
<bean id="VMwareGuru" class="com.cloud.hypervisor.guru.VMwareGuru">
|
||||
<property name="name" value="VMwareGuru"/>
|
||||
</bean>
|
||||
<bean id="VmwareInvestigator" class="com.cloud.ha.VmwareInvestigator">
|
||||
<property name="name" value="VMwareInvestigator"/>
|
||||
</bean>
|
||||
<bean id="VmwareManager" class="com.cloud.hypervisor.vmware.manager.VmwareManagerImpl"/>
|
||||
<bean id="vmwareContextFactory" class="com.cloud.hypervisor.vmware.resource.VmwareContextFactory" />
|
||||
<bean id="VmwareDatacenterDaoImpl" class="com.cloud.hypervisor.vmware.dao.VmwareDatacenterDaoImpl" />
|
||||
<bean id="VmwareDatacenterZoneMapDaoImpl" class="com.cloud.hypervisor.vmware.dao.VmwareDatacenterZoneMapDaoImpl" />
|
||||
<bean id="LegacyZoneDaoImpl" class="com.cloud.hypervisor.vmware.dao.LegacyZoneDaoImpl" />
|
||||
|
||||
<!--
|
||||
Nicira support components
|
||||
-->
|
||||
<bean id="niciraNvpDaoImpl" class="com.cloud.network.dao.NiciraNvpDaoImpl" />
|
||||
<bean id="niciraNvpNicMappingDaoImpl" class="com.cloud.network.dao.NiciraNvpNicMappingDaoImpl" />
|
||||
<bean id="niciraNvpRouterMappingDaoImpl" class="com.cloud.network.dao.NiciraNvpRouterMappingDaoImpl" />
|
||||
<bean id="NiciraNvpGuestNetworkGuru" class="com.cloud.network.guru.NiciraNvpGuestNetworkGuru">
|
||||
<property name="name" value="NiciraNvpGuestNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="NiciraNvp" class="com.cloud.network.element.NiciraNvpElement">
|
||||
<property name="name" value="NiciraNvp"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
BigSwitch Components
|
||||
-->
|
||||
<bean id="BigSwitchVns" class="com.cloud.network.element.BigSwitchVnsElement">
|
||||
<property name="name" value="BigSwitchVns"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Netapp support components
|
||||
-->
|
||||
<bean id="lunDaoImpl" class="com.cloud.netapp.dao.LunDaoImpl" />
|
||||
<bean id="poolDaoImpl" class="com.cloud.netapp.dao.PoolDaoImpl" />
|
||||
<bean id="netappVolumeDaoImpl" class="com.cloud.netapp.dao.VolumeDaoImpl" />
|
||||
<bean id="NetappManager" class="com.cloud.netapp.NetappManagerImpl"/>
|
||||
|
||||
<!--
|
||||
JuniperSRX support components
|
||||
-->
|
||||
<bean id="JuniperSRX" class="com.cloud.network.element.JuniperSRXExternalFirewallElement">
|
||||
<property name="name" value="JuniperSRX"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
NetScalar support components
|
||||
-->
|
||||
<bean id="netScalerPodDaoImpl" class="com.cloud.network.dao.NetScalerPodDaoImpl" />
|
||||
<bean id="Netscaler" class="com.cloud.network.element.NetscalerElement">
|
||||
<property name="name" value="Netscaler"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
F5BigIP support components
|
||||
-->
|
||||
<bean id="F5BigIP" class="com.cloud.network.element.F5ExternalLoadBalancerElement">
|
||||
<property name="name" value="F5BigIP"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Cisco Nexus support components
|
||||
-->
|
||||
<bean id="ciscoNexusVSMDeviceDaoImpl" class="com.cloud.network.dao.CiscoNexusVSMDeviceDaoImpl" />
|
||||
<bean id="CiscoNexus1000vVSM" class="com.cloud.network.element.CiscoNexusVSMElement">
|
||||
<property name="name" value="CiscoNexus1000vVSM"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Cisco VNMC support components
|
||||
-->
|
||||
<bean id="ciscoVnmcDaoImpl" class="com.cloud.network.dao.CiscoVnmcDaoImpl" />
|
||||
<bean id="ciscoAsa1000vDaoImpl" class="com.cloud.network.dao.CiscoAsa1000vDaoImpl" />
|
||||
<bean id="networkAsa1000vMapDaoImpl" class="com.cloud.network.dao.NetworkAsa1000vMapDaoImpl" />
|
||||
<bean id="CiscoVNMC" class="com.cloud.network.element.CiscoVnmcElement">
|
||||
<property name="name" value="CiscoVNMC"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
BigSwitch support components
|
||||
-->
|
||||
<bean id="bigSwitchVnsDaoImpl" class="com.cloud.network.dao.BigSwitchVnsDaoImpl" />
|
||||
<bean id="bigSwitchVnsElement" class="com.cloud.network.element.BigSwitchVnsElement">
|
||||
<property name="name" value="BigSwitchVnsElement"/>
|
||||
</bean>
|
||||
|
||||
|
||||
<!--
|
||||
Midonet support components
|
||||
-->
|
||||
<bean id="MidoNetGuestNetworkGuru" class="com.cloud.network.guru.MidoNetGuestNetworkGuru">
|
||||
<property name="name" value="MidoNetGuestNetworkGuru"/>
|
||||
</bean>
|
||||
<bean id="MidoNetElement" class="com.cloud.network.element.MidoNetElement">
|
||||
<property name="name" value="MidoNetElement"/>
|
||||
</bean>
|
||||
|
||||
|
||||
<!--
|
||||
UCS support components
|
||||
-->
|
||||
<bean id="ucsBladeDaoImpl" class="com.cloud.ucs.database.UcsBladeDaoImpl" />
|
||||
<bean id="ucsManagerDaoImpl" class="com.cloud.ucs.database.UcsManagerDaoImpl" />
|
||||
|
||||
<!--
|
||||
|
||||
Deployment configurations of various adapters
|
||||
|
||||
It determines whether or not a adapter is activated or how it is loaded in order in its managing provider,
|
||||
|
||||
-->
|
||||
|
||||
<!--Motion Strategies-->
|
||||
<bean id="vmwareStorageMotionStrategy" class="org.apache.cloudstack.storage.motion.VmwareStorageMotionStrategy" />
|
||||
<bean id="dataMotionServiceImpl" class="org.apache.cloudstack.storage.motion.DataMotionServiceImpl">
|
||||
<property name="strategies">
|
||||
<list>
|
||||
<ref bean="ancientDataMotionStrategy"/>
|
||||
<ref bean="xenserverStorageMotionStrategy"/>
|
||||
<ref local="vmwareStorageMotionStrategy"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="cloudStackImageStoreProviderImpl"
|
||||
class="org.apache.cloudstack.storage.datastore.provider.CloudStackImageStoreProviderImpl"/>
|
||||
<bean id="s3ImageStoreProviderImpl"
|
||||
class="org.apache.cloudstack.storage.datastore.provider.S3ImageStoreProviderImpl"/>
|
||||
<bean id="swiftImageStoreProviderImpl"
|
||||
class="org.apache.cloudstack.storage.datastore.provider.SwiftImageStoreProviderImpl"/>
|
||||
<bean id="solidFireDataStoreProvider"
|
||||
class="org.apache.cloudstack.storage.datastore.provider.SolidfirePrimaryDataStoreProvider"/>
|
||||
|
||||
<!--Storage Providers-->
|
||||
<bean id="dataStoreProviderManager"
|
||||
class="org.apache.cloudstack.storage.datastore.provider.DataStoreProviderManagerImpl">
|
||||
<property name="providers">
|
||||
<list merge="true">
|
||||
<ref bean="cloudStackPrimaryDataStoreProviderImpl"/>
|
||||
<ref bean="cloudStackImageStoreProviderImpl"/>
|
||||
<ref bean="s3ImageStoreProviderImpl"/>
|
||||
<ref local="swiftImageStoreProviderImpl"/>
|
||||
<ref bean="solidFireDataStoreProvider"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Security adapters -->
|
||||
<bean id="userAuthenticators" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="SHA256SaltedUserAuthenticator"/>
|
||||
<ref bean="MD5UserAuthenticator"/>
|
||||
<ref bean="LdapAuthenticator"/>
|
||||
<ref bean="PlainTextUserAuthenticator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="userPasswordEncoders" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="SHA256SaltedUserAuthenticator"/>
|
||||
<ref bean="MD5UserAuthenticator"/>
|
||||
<ref bean="LdapAuthenticator"/>
|
||||
<ref bean="PlainTextUserAuthenticator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="securityCheckers" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="affinityGroupAccessChecker"/>
|
||||
<ref bean="domainChecker"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Resource discoverers -->
|
||||
<bean id="resourceDiscoverers" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="XcpServerDiscoverer"/>
|
||||
<ref bean="SecondaryStorageDiscoverer"/>
|
||||
<ref bean="KvmServerDiscoverer"/>
|
||||
<ref bean="LxcServerDiscoverer"/>
|
||||
<ref bean="BareMetalDiscoverer"/>
|
||||
<ref bean="OvmDiscoverer"/>
|
||||
<ref bean="vmwareServerDiscoverer"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- HA adapters -->
|
||||
<bean id="haInvestigators" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="CheckOnAgentInvestigator"/>
|
||||
<ref bean="XenServerInvestigator"/>
|
||||
<ref bean="VmwareInvestigator"/>
|
||||
<ref bean="UserVmDomRInvestigator"/>
|
||||
<ref bean="ManagementIPSystemVMInvestigator"/>
|
||||
<ref bean="KVMInvestigator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="haFenceBuilders" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="XenServerFencer"/>
|
||||
<ref bean="KVMFencer"/>
|
||||
<ref bean="OvmFencer"/>
|
||||
<ref bean="VmwareFencer"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Deployment/allocation adapters -->
|
||||
<bean id="deploymentPlanners" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="FirstFitPlanner" />
|
||||
<ref bean="UserDispersingPlanner" />
|
||||
<ref bean="UserConcentratedPodPlanner" />
|
||||
<ref bean="ImplicitDedicationPlanner" />
|
||||
<ref bean="BareMetalPlanner" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="podAllocators" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="UserConcentratedAllocator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="hostAllocators" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="FirstFitRouting"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="storagePoolAllocators" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="LocalStoragePoolAllocator"/>
|
||||
<ref bean="clusterScopeStoragePoolAllocator"/>
|
||||
<ref bean="zoneWideStoragePoolAllocator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Networking adapters -->
|
||||
<bean id="ipDeployers" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="elasticLoadBalancerElement"/>
|
||||
<ref bean="VirtualRouter"/>
|
||||
<ref bean="VpcVirtualRouter"/>
|
||||
<ref bean="NiciraNvp"/>
|
||||
<ref bean="InternalLbVm"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="dhcpProviders" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="VirtualRouter"/>
|
||||
<ref bean="VpcVirtualRouter"/>
|
||||
<ref bean="BareMetalDhcp"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="networkGurus" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="StorageNetworkGuru"/>
|
||||
<ref bean="ExternalGuestNetworkGuru"/>
|
||||
<ref bean="PublicNetworkGuru"/>
|
||||
<ref bean="PodBasedNetworkGuru"/>
|
||||
<ref bean="DirectPodBasedNetworkGuru"/>
|
||||
<ref bean="ControlNetworkGuru"/>
|
||||
<ref bean="DirectNetworkGuru"/>
|
||||
<ref bean="OvsGuestNetworkGuru"/>
|
||||
<ref bean="PrivateNetworkGuru"/>
|
||||
<ref bean="NiciraNvpGuestNetworkGuru"/>
|
||||
<ref bean="MidoNetGuestNetworkGuru"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="networkElements" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="JuniperSRX"/>
|
||||
<ref bean="Netscaler"/>
|
||||
<ref bean="F5BigIP"/>
|
||||
<ref bean="CiscoNexus1000vVSM"/>
|
||||
<ref bean="CiscoVNMC"/>
|
||||
<ref bean="NiciraNvp" />
|
||||
<ref bean="MidoNetElement" />
|
||||
<ref bean="bigSwitchVnsElement"/>
|
||||
<ref bean="VirtualRouter"/>
|
||||
<ref bean="Ovs"/>
|
||||
<ref bean="SecurityGroupProvider"/>
|
||||
<ref bean="VpcVirtualRouter"/>
|
||||
<ref bean="InternalLbVm"/>
|
||||
<ref bean="BareMetalDhcp"/>
|
||||
<ref bean="BareMetalPxe"/>
|
||||
<ref bean="BareMetalUserdata"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
AffinityGroup Processors
|
||||
-->
|
||||
<bean id="HostAntiAffinityProcessor" class="org.apache.cloudstack.affinity.HostAntiAffinityProcessor">
|
||||
<property name="name" value="HostAntiAffinityProcessor"/>
|
||||
<property name="type" value="host anti-affinity"/>
|
||||
</bean>
|
||||
|
||||
<bean id="affinityProcessors" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="HostAntiAffinityProcessor" />
|
||||
<ref bean="ExplicitDedicationProcessor"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Dedicated Resources components
|
||||
-->
|
||||
|
||||
<bean id="DedicatedResourceManagerImpl" class="org.apache.cloudstack.dedicated.DedicatedResourceManagerImpl"/>
|
||||
<bean id="ExplicitDedicationProcessor" class="org.apache.cloudstack.affinity.ExplicitDedicationProcessor">
|
||||
<property name="name" value="ExplicitDedicationProcessor"/>
|
||||
<property name="type" value="ExplicitDedication"/>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
|
@ -1,284 +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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
|
||||
|
||||
<!--
|
||||
OSS deployment component configuration
|
||||
-->
|
||||
<bean id="databaseUpgradeChecker" class="com.cloud.upgrade.DatabaseUpgradeChecker"/>
|
||||
<bean id="configurationDaoImpl" class="org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl"/>
|
||||
|
||||
<bean id="SimulatorDiscoverer" class="com.cloud.resource.SimulatorDiscoverer">
|
||||
<property name="name" value="Simulator Agent"/>
|
||||
</bean>
|
||||
<bean id="SimulatorSecondaryDiscoverer" class="com.cloud.resource.SimulatorSecondaryDiscoverer">
|
||||
</bean>
|
||||
<bean id="SimulatorGuru" class="com.cloud.simulator.SimulatorGuru">
|
||||
<property name="name" value="Simulator Guru"/>
|
||||
</bean>
|
||||
<bean id="mockConfigurationDaoImpl" class="com.cloud.simulator.dao.MockConfigurationDaoImpl" />
|
||||
<bean id="mockHostDaoImpl" class="com.cloud.simulator.dao.MockHostDaoImpl" />
|
||||
<bean id="mockSecStorageDaoImpl" class="com.cloud.simulator.dao.MockSecStorageDaoImpl" />
|
||||
<bean id="mockSecurityRulesDaoImpl" class="com.cloud.simulator.dao.MockSecurityRulesDaoImpl" />
|
||||
<bean id="mockStoragePoolDaoImpl" class="com.cloud.simulator.dao.MockStoragePoolDaoImpl" />
|
||||
<bean id="mockVMDaoImpl" class="com.cloud.simulator.dao.MockVMDaoImpl" />
|
||||
<bean id="mockVolumeDaoImpl" class="com.cloud.simulator.dao.MockVolumeDaoImpl" />
|
||||
<bean id="simulatorManagerImpl" class="com.cloud.agent.manager.SimulatorManagerImpl" />
|
||||
<bean id="mockStorageManagerImpl" class="com.cloud.agent.manager.MockStorageManagerImpl" />
|
||||
<bean id="mockVmManagerImpl" class="com.cloud.agent.manager.MockVmManagerImpl" />
|
||||
<bean id="mockNetworkManagerImpl" class="com.cloud.agent.manager.MockNetworkManagerImpl" />
|
||||
<bean id="mockAgentManagerImpl" class="com.cloud.agent.manager.MockAgentManagerImpl" />
|
||||
|
||||
<bean id="SimulatorImageStoreProviderImpl"
|
||||
class="org.apache.cloudstack.storage.datastore.provider.SimulatorImageStoreProviderImpl"/>
|
||||
|
||||
<!--Storage Providers-->
|
||||
<!--<bean id="dataStoreProviderManagerChild" parent="dataStoreProviderManager">-->
|
||||
<bean id="dataStoreProviderManager"
|
||||
class="org.apache.cloudstack.storage.datastore.provider.DataStoreProviderManagerImpl">
|
||||
<property name="providers">
|
||||
<!--Override the cloudstack default image store provider to use simulator defined provider-->
|
||||
<list>
|
||||
<!--Data Store Providers-->
|
||||
<ref bean="cloudStackPrimaryDataStoreProviderImpl"/>
|
||||
<ref bean="SimulatorImageStoreProviderImpl"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Managers & pluggable adapters configuration under OSS deployment
|
||||
-->
|
||||
<bean id="userAuthenticators" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="SHA256SaltedUserAuthenticator"/>
|
||||
<ref bean="MD5UserAuthenticator"/>
|
||||
<ref bean="LdapAuthenticator"/>
|
||||
<ref bean="PlainTextUserAuthenticator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="userPasswordEncoders" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="SHA256SaltedUserAuthenticator"/>
|
||||
<ref bean="MD5UserAuthenticator"/>
|
||||
<ref bean="LdapAuthenticator"/>
|
||||
<ref bean="PlainTextUserAuthenticator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
||||
<bean id="securityCheckers" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="affinityGroupAccessChecker"/>
|
||||
<ref bean="domainChecker"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Resource discoverers -->
|
||||
<bean id="resourceDiscoverers" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="SimulatorDiscoverer"/>
|
||||
<ref bean="SimulatorSecondaryDiscoverer"/>
|
||||
<ref bean="XcpServerDiscoverer"/>
|
||||
<ref bean="SecondaryStorageDiscoverer"/>
|
||||
<ref bean="KvmServerDiscoverer"/>
|
||||
<ref bean="LxcServerDiscoverer"/>
|
||||
<ref bean="OvmDiscoverer"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- HA adapters -->
|
||||
<bean id="haInvestigators" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="CheckOnAgentInvestigator"/>
|
||||
<ref bean="XenServerInvestigator"/>
|
||||
<ref bean="UserVmDomRInvestigator"/>
|
||||
<ref bean="ManagementIPSystemVMInvestigator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="haFenceBuilders" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="XenServerFencer"/>
|
||||
<ref bean="KVMFencer"/>
|
||||
<ref bean="OvmFencer"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Deployment/allocation adapters -->
|
||||
<bean id="deploymentPlanners" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="FirstFitPlanner"/>
|
||||
<ref bean="UserDispersingPlanner"/>
|
||||
<ref bean="UserConcentratedPodPlanner"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="podAllocators" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="UserConcentratedAllocator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="hostAllocators" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="FirstFitRouting"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="storagePoolAllocators" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="LocalStoragePoolAllocator"/>
|
||||
<ref bean="clusterScopeStoragePoolAllocator"/>
|
||||
<ref bean="zoneWideStoragePoolAllocator"/>
|
||||
<ref bean="garbageCollectingStoragePoolAllocator"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Networking adapters -->
|
||||
<bean id="ipDeployers" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="elasticLoadBalancerElement"/>
|
||||
<ref bean="VirtualRouter"/>
|
||||
<ref bean="VpcVirtualRouter"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="dhcpProviders" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="VirtualRouter"/>
|
||||
<ref bean="VpcVirtualRouter"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="networkGurus" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="StorageNetworkGuru"/>
|
||||
<ref bean="ExternalGuestNetworkGuru"/>
|
||||
<ref bean="PublicNetworkGuru"/>
|
||||
<ref bean="PodBasedNetworkGuru"/>
|
||||
<ref bean="DirectPodBasedNetworkGuru"/>
|
||||
<ref bean="ControlNetworkGuru"/>
|
||||
<ref bean="DirectNetworkGuru"/>
|
||||
<ref bean="OvsGuestNetworkGuru"/>
|
||||
<ref bean="PrivateNetworkGuru"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="networkElements" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="VirtualRouter"/>
|
||||
<ref bean="Ovs"/>
|
||||
<ref bean="SecurityGroupProvider"/>
|
||||
<ref bean="VpcVirtualRouter"/>
|
||||
<ref bean="InternalLbVm"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
UCS support components
|
||||
-->
|
||||
<bean id="ucsBladeDaoImpl" class="com.cloud.ucs.database.UcsBladeDaoImpl"/>
|
||||
<bean id="ucsManagerDaoImpl" class="com.cloud.ucs.database.UcsManagerDaoImpl"/>
|
||||
|
||||
<bean id="GlobalLoadBalancingRulesServiceImpl"
|
||||
class="org.apache.cloudstack.region.gslb.GlobalLoadBalancingRulesServiceImpl"/>
|
||||
|
||||
<!--
|
||||
AffinityGroup Processors
|
||||
-->
|
||||
<bean id="HostAntiAffinityProcessor" class="org.apache.cloudstack.affinity.HostAntiAffinityProcessor">
|
||||
<property name="name" value="HostAntiAffinityProcessor"/>
|
||||
<property name="type" value="host anti-affinity"/>
|
||||
</bean>
|
||||
|
||||
<bean id="affinityProcessors" class="com.cloud.utils.component.AdapterList">
|
||||
<property name="Adapters">
|
||||
<list>
|
||||
<ref bean="HostAntiAffinityProcessor" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="DedicatedResourceManagerImpl" class="org.apache.cloudstack.dedicated.DedicatedResourceManagerImpl"/>
|
||||
<bean id="ExplicitDedicationProcessor" class="org.apache.cloudstack.affinity.ExplicitDedicationProcessor">
|
||||
<property name="name" value="ExplicitDedicationProcessor"/>
|
||||
<property name="type" value="ExplicitDedication"/>
|
||||
</bean>
|
||||
<!--
|
||||
RPC/Async/EventBus
|
||||
-->
|
||||
|
||||
<bean id="onwireRegistry" class="org.apache.cloudstack.framework.serializer.OnwireClassRegistry"
|
||||
init-method="scan" >
|
||||
<property name="packages">
|
||||
<list>
|
||||
<value>org.apache.cloudstack.framework</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="messageSerializer" class="org.apache.cloudstack.framework.serializer.JsonMessageSerializer">
|
||||
<property name="onwireClassRegistry" ref="onwireRegistry" />
|
||||
</bean>
|
||||
|
||||
<bean id="transportProvider" class="org.apache.cloudstack.framework.server.ServerTransportProvider" init-method="initialize">
|
||||
<property name="workerPoolSize" value="5" />
|
||||
<property name="nodeId" value="Node1" />
|
||||
<property name="messageSerializer" ref="messageSerializer" />
|
||||
</bean>
|
||||
|
||||
<bean id="rpcProvider" class="org.apache.cloudstack.framework.rpc.RpcProviderImpl" init-method="initialize">
|
||||
<constructor-arg ref="transportProvider" />
|
||||
<property name="messageSerializer" ref="messageSerializer" />
|
||||
</bean>
|
||||
|
||||
<bean id="messageBus" class = "org.apache.cloudstack.framework.messagebus.MessageBusBase" />
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
name=allocator
|
||||
parent=core
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<bean id="usageEventUtils" class="com.cloud.event.UsageEventUtils" />
|
||||
|
||||
</beans>
|
||||
|
|
@ -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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
|
||||
<property name="registry" ref="hostAllocatorsRegistry" />
|
||||
<property name="typeClass"
|
||||
value="com.cloud.agent.manager.allocator.HostAllocator" />
|
||||
</bean>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
|
||||
<property name="registry" ref="consoleProxyAllocatorsRegistry" />
|
||||
<property name="typeClass"
|
||||
value="com.cloud.consoleproxy.ConsoleProxyAllocator" />
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
name=api
|
||||
parent=core
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
|
||||
<property name="registry" ref="userAuthenticatorsRegistry" />
|
||||
<property name="typeClass"
|
||||
value="com.cloud.server.auth.UserAuthenticator" />
|
||||
</bean>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
|
||||
<property name="registry" ref="securityCheckersRegistry" />
|
||||
<property name="typeClass"
|
||||
value="org.apache.cloudstack.acl.SecurityChecker" />
|
||||
</bean>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
|
||||
<property name="registry" ref="apiCheckersRegistry" />
|
||||
<property name="typeClass" value="org.apache.cloudstack.acl.APIChecker" />
|
||||
</bean>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
|
||||
<property name="registry" ref="userPasswordEncodersRegistry" />
|
||||
<property name="typeClass" value="com.cloud.server.auth.UserAuthenticator" />
|
||||
</bean>
|
||||
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
name=backend
|
||||
parent=core
|
||||
|
|
@ -0,0 +1 @@
|
|||
name=bootstrap
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<context:annotation-config />
|
||||
|
||||
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
||||
<property name="order" value="100" />
|
||||
<property name="ignoreResourceNotFound" value="true" />
|
||||
<property name="ignoreUnresolvablePlaceholders" value="true" />
|
||||
<property name="locations" ref="DefaultConfigResources" />
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.CloudStackLog4jSetup" />
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
name=compute
|
||||
parent=backend
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
|
||||
<property name="registry" ref="haInvestigatorsRegistry" />
|
||||
<property name="typeClass" value="com.cloud.ha.Investigator" />
|
||||
</bean>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
|
||||
<property name="registry" ref="haFenceBuildersRegistry" />
|
||||
<property name="typeClass" value="com.cloud.ha.FenceBuilder" />
|
||||
</bean>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
|
||||
<property name="registry" ref="hypervisorGurusRegistry" />
|
||||
<property name="typeClass" value="com.cloud.hypervisor.HypervisorGuru" />
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
name=core
|
||||
parent=system
|
||||
|
|
@ -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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<bean id="componentContext" class="com.cloud.utils.component.ComponentContext">
|
||||
<property name="initializeBeans" value="false" />
|
||||
</bean>
|
||||
|
||||
<bean id="encryptionSecretKeyChecker" class="com.cloud.utils.crypt.EncryptionSecretKeyChecker" />
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
|
||||
<property name="registry" ref="registryRegistry" />
|
||||
<property name="typeClass" value="com.cloud.utils.component.Registry" />
|
||||
</bean>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.PluggableServiceLifecycle">
|
||||
<property name="registry" ref="apiCommandsRegistry" />
|
||||
<property name="typeClass"
|
||||
value="com.cloud.utils.component.PluggableService" />
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<bean id="userAuthenticatorsRegistry"
|
||||
class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
|
||||
<property name="orderConfigKey" value="user.authenticators.order" />
|
||||
<property name="excludeKey" value="user.authenticators.exclude" />
|
||||
<property name="orderConfigDefault" value="SHA256SALT,MD5,LDAP,PLAINTEXT" />
|
||||
</bean>
|
||||
|
||||
<bean id="userPasswordEncodersRegistry"
|
||||
class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
|
||||
<property name="orderConfigKey" value="user.password.encoders.order" />
|
||||
<property name="excludeKey" value="user.password.encoders.exclude" />
|
||||
<property name="orderConfigDefault" value="SHA256SALT,MD5,LDAP,PLAINTEXT" />
|
||||
</bean>
|
||||
|
||||
<bean id="securityCheckersRegistry"
|
||||
class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
|
||||
<property name="orderConfigKey" value="security.checkers.order" />
|
||||
<property name="excludeKey" value="security.checkers.exclude" />
|
||||
<property name="orderConfigDefault"
|
||||
value="AffinityGroupAccessChecker,DomainChecker" />
|
||||
</bean>
|
||||
|
||||
<bean id="resourceDiscoverersRegistry"
|
||||
class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
|
||||
<property name="excludeKey" value="resource.discoverers.exclude" />
|
||||
<property name="excludeDefault" value="dummyHostDiscoverer" />
|
||||
</bean>
|
||||
|
||||
<bean id="haInvestigatorsRegistry"
|
||||
class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
|
||||
<property name="orderConfigKey" value="ha.investigators.order" />
|
||||
<property name="orderConfigDefault"
|
||||
value="SimpleInvestigator,XenServerInvestigator,PingInvestigator,ManagementIPSysVMInvestigator,KVMInvestigator" />
|
||||
<property name="excludeKey" value="ha.investigators.exclude" />
|
||||
</bean>
|
||||
|
||||
<bean id="haFenceBuildersRegistry"
|
||||
class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
|
||||
<property name="excludeKey" value="ha.fence.builders.exclude" />
|
||||
<property name="excludeDefault" value="RecreatableFencer" />
|
||||
</bean>
|
||||
|
||||
<bean id="deploymentPlannersRegistry"
|
||||
class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
|
||||
<property name="orderConfigKey" value="deployment.planners.order" />
|
||||
<property name="orderConfigDefault"
|
||||
value="FirstFitPlanner,UserDispersingPlanner,UserConcentratedPodPlanner,ImplicitDedicationPlanner,BareMetalPlanner" />
|
||||
<property name="excludeKey" value="deployment.planners.exclude" />
|
||||
</bean>
|
||||
|
||||
<bean id="podAllocatorsRegistry"
|
||||
class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
|
||||
<property name="excludeKey" value="pod.allocators.exclude" />
|
||||
</bean>
|
||||
|
||||
<bean id="hostAllocatorsRegistry"
|
||||
class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
|
||||
<property name="excludeKey" value="host.allocators.exclude" />
|
||||
<property name="excludeDefault"
|
||||
value="RandomAllocator,TestingAllocator,FirstFitAllocator,RecreateHostAllocator" />
|
||||
</bean>
|
||||
|
||||
<bean id="storagePoolAllocatorsRegistry"
|
||||
class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
|
||||
<property name="orderConfigKey" value="storage.pool.allocators.order" />
|
||||
<property name="orderConfigDefault"
|
||||
value="LocalStorage,ClusterScopeStoragePoolAllocator,ZoneWideStoragePoolAllocator" />
|
||||
<property name="excludeKey" value="storage.pool.allocators.exclude" />
|
||||
<property name="excludeDefault" value="GCStorage" />
|
||||
</bean>
|
||||
|
||||
<bean id="secondaryStorageVmAllocatorsRegistry"
|
||||
class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
|
||||
<property name="excludeKey"
|
||||
value="secondary.storage.vm.allocators.exclude" />
|
||||
</bean>
|
||||
|
||||
<bean id="consoleProxyAllocatorsRegistry"
|
||||
class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
|
||||
<property name="excludeKey" value="console.proxy.allocator.exclude" />
|
||||
</bean>
|
||||
|
||||
<bean id="templateAdapterRegistry"
|
||||
class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
|
||||
<property name="excludeKey" value="template.adapter.exclude" />
|
||||
</bean>
|
||||
|
||||
<bean id="ipDeployersRegistry"
|
||||
class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
|
||||
<property name="excludeKey" value="ip.deployers.exclude" />
|
||||
<property name="excludeDefault" value="MidoNetElement" />
|
||||
</bean>
|
||||
|
||||
<bean id="dhcpProvidersRegistry"
|
||||
class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
|
||||
<property name="excludeKey" value="dhcp.providers.exclude" />
|
||||
<property name="excludeDefault" value="MidoNetElement" />
|
||||
</bean>
|
||||
|
||||
<bean id="networkGurusRegistry"
|
||||
class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
|
||||
<property name="excludeKey" value="network.gurus.exclude" />
|
||||
</bean>
|
||||
|
||||
<bean id="networkElementsRegistry"
|
||||
class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
|
||||
<property name="excludeKey" value="network.elements.registry.exclude" />
|
||||
<property name="excludeDefault" value="ElasticLoadBalancerElement" />
|
||||
<property name="preRegistered">
|
||||
<list>
|
||||
<ref bean="VpcVirtualRouter" />
|
||||
<ref bean="InternalLbVm" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="affinityProcessorsRegistry"
|
||||
class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
|
||||
<property name="orderConfigKey" value="affinity.processors.order" />
|
||||
<property name="orderConfigDefault"
|
||||
value="HostAntiAffinityProcessor,ExplicitDedicationProcessor" />
|
||||
<property name="excludeKey" value="affinity.processors.exclude" />
|
||||
</bean>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.DumpRegistry" >
|
||||
<property name="registries" value="#{registryRegistry.registered}" />
|
||||
</bean>
|
||||
|
||||
<bean id="registryRegistry"
|
||||
class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
|
||||
</bean>
|
||||
|
||||
<bean id="apiCheckersRegistry"
|
||||
class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
|
||||
<property name="excludeKey" value="api.checkers.exclude" />
|
||||
</bean>
|
||||
|
||||
<bean id="apiCommandsRegistry"
|
||||
class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
|
||||
<property name="excludeKey" value="api.commands.exclude" />
|
||||
</bean>
|
||||
|
||||
<bean id="hypervisorGurusRegistry"
|
||||
class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
|
||||
<property name="excludeKey" value="hypervisor.gurus.exclude" />
|
||||
</bean>
|
||||
|
||||
<bean id="vpcProvidersRegistry"
|
||||
class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
|
||||
<property name="excludeKey" value="vpc.providers.exclude" />
|
||||
<property name="preRegistered">
|
||||
<list>
|
||||
<ref bean="VpcVirtualRouter" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="snapshotStrategiesRegistry"
|
||||
class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
|
||||
<property name="excludeKey" value="snapshot.strategies.exclude" />
|
||||
</bean>
|
||||
|
||||
<bean id="dataMotionStrategiesRegistry"
|
||||
class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry">
|
||||
<property name="excludeKey" value="data.motion.strategies.exclude" />
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
name=discoverer
|
||||
parent=core
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
|
||||
<property name="registry" ref="resourceDiscoverersRegistry" />
|
||||
<property name="typeClass" value="com.cloud.resource.Discoverer" />
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
name=network
|
||||
parent=backend
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
|
||||
<property name="registry" ref="ipDeployersRegistry" />
|
||||
<property name="typeClass" value="com.cloud.network.element.IpDeployer" />
|
||||
</bean>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
|
||||
<property name="registry" ref="dhcpProvidersRegistry" />
|
||||
<property name="typeClass"
|
||||
value="com.cloud.network.element.DhcpServiceProvider" />
|
||||
</bean>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
|
||||
<property name="registry" ref="networkGurusRegistry" />
|
||||
<property name="typeClass" value="com.cloud.network.guru.NetworkGuru" />
|
||||
</bean>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
|
||||
<property name="registry" ref="networkElementsRegistry" />
|
||||
<property name="typeClass"
|
||||
value="com.cloud.network.element.NetworkElement" />
|
||||
</bean>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
|
||||
<property name="registry" ref="vpcProvidersRegistry" />
|
||||
<property name="typeClass"
|
||||
value="com.cloud.network.element.VpcProvider" />
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
name=planner
|
||||
parent=allocator
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
|
||||
<property name="registry" ref="deploymentPlannersRegistry" />
|
||||
<property name="typeClass" value="com.cloud.deploy.DeploymentPlanner" />
|
||||
</bean>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
|
||||
<property name="registry" ref="affinityProcessorsRegistry" />
|
||||
<property name="typeClass"
|
||||
value="org.apache.cloudstack.affinity.AffinityGroupProcessor" />
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
name=storage
|
||||
parent=backend
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
|
||||
<property name="registryBeanName" value="dataStoreProviderManager" />
|
||||
<property name="typeClass"
|
||||
value="org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider" />
|
||||
</bean>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
|
||||
<property name="registry" ref="storagePoolAllocatorsRegistry" />
|
||||
<property name="typeClass"
|
||||
value="org.apache.cloudstack.engine.subsystem.api.storage.StoragePoolAllocator" />
|
||||
</bean>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
|
||||
<property name="registry" ref="secondaryStorageVmAllocatorsRegistry" />
|
||||
<property name="typeClass"
|
||||
value="com.cloud.storage.secondary.SecondaryStorageVmAllocator" />
|
||||
</bean>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
|
||||
<property name="registry" ref="templateAdapterRegistry" />
|
||||
<property name="typeClass" value="com.cloud.template.TemplateAdapter" />
|
||||
</bean>
|
||||
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
|
||||
<property name="registry" ref="podAllocatorsRegistry" />
|
||||
<property name="typeClass"
|
||||
value="com.cloud.agent.manager.allocator.PodAllocator" />
|
||||
</bean>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
|
||||
<property name="registry" ref="snapshotStrategiesRegistry" />
|
||||
<property name="typeClass"
|
||||
value="org.apache.cloudstack.engine.subsystem.api.storage.SnapshotStrategy" />
|
||||
</bean>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle">
|
||||
<property name="registry" ref="dataMotionStrategiesRegistry" />
|
||||
<property name="typeClass"
|
||||
value="org.apache.cloudstack.engine.subsystem.api.storage.DataMotionStrategy" />
|
||||
</bean>
|
||||
|
||||
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
name=system
|
||||
parent=bootstrap
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<!--
|
||||
LifeCycle
|
||||
-->
|
||||
<bean id="cloudStackLifeCycle" class="org.apache.cloudstack.spring.lifecycle.CloudStackExtendedLifeCycle" />
|
||||
<bean id="moduleStartup" class="org.apache.cloudstack.spring.lifecycle.CloudStackExtendedLifeCycleStart" >
|
||||
<property name="lifeCycle" ref="cloudStackLifeCycle" />
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
AOP
|
||||
-->
|
||||
<bean id="transactionContextInterceptor" class="com.cloud.utils.db.TransactionContextInterceptor" />
|
||||
<bean id="actionEventInterceptor" class="com.cloud.event.ActionEventInterceptor" />
|
||||
<aop:config>
|
||||
<aop:advisor advice-ref="transactionContextInterceptor"
|
||||
pointcut="target(com.cloud.utils.db.GenericDaoBase)" />
|
||||
<aop:advisor advice-ref="transactionContextInterceptor"
|
||||
pointcut="execution(* com.cloud.utils.db.EntityManager.*(..))" />
|
||||
<aop:advisor advice-ref="actionEventInterceptor"
|
||||
pointcut="execution(* *(..)) && @annotation(com.cloud.event.ActionEvent)" />
|
||||
<aop:advisor advice-ref="actionEventInterceptor"
|
||||
pointcut="execution(* *(..)) && @annotation(com.cloud.event.ActionEvents)" />
|
||||
</aop:config>
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<!--
|
||||
Managed Context
|
||||
-->
|
||||
<bean id="ManagedContext" class="org.apache.cloudstack.managed.context.impl.DefaultManagedContext" >
|
||||
<property name="listeners">
|
||||
<list>
|
||||
<!-- Put CallContext listener first because it will open and then close a DB connection.
|
||||
If you put it after the TransactionContextListener, the thread will hold open a DB
|
||||
connection for the life of the thread -->
|
||||
<bean class="org.apache.cloudstack.context.CallContextListener" />
|
||||
<bean class="com.cloud.utils.db.TransactionContextListener" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean class="org.apache.cloudstack.managed.context.ManagedContextRunnable" factory-method="initializeGlobalContext"
|
||||
autowire-candidate="false" >
|
||||
<constructor-arg><ref bean="ManagedContext"/></constructor-arg>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<bean id="clusterRestService"
|
||||
class="org.apache.cloudstack.engine.rest.service.api.ClusterRestService" />
|
||||
<bean id="dataDisk"
|
||||
class="org.apache.cloudstack.engine.subsystem.api.storage.type.DataDisk" />
|
||||
<bean id="podRestService" class="org.apache.cloudstack.engine.rest.service.api.PodRestService" />
|
||||
<bean id="iso" class="org.apache.cloudstack.engine.subsystem.api.storage.type.Iso" />
|
||||
<bean id="networkRestService" class="org.apache.cloudstack.engine.rest.service.api.NetworkRestService" />
|
||||
<bean id="provisioningServiceImpl" class="org.apache.cloudstack.engine.service.api.ProvisioningServiceImpl" />
|
||||
<bean id="rootDisk" class="org.apache.cloudstack.engine.subsystem.api.storage.type.RootDisk" />
|
||||
<bean id="virtualMachineRestService" class="org.apache.cloudstack.engine.rest.service.api.VirtualMachineRestService" />
|
||||
<bean id="volumeRestService" class="org.apache.cloudstack.engine.rest.service.api.VolumeRestService" />
|
||||
<bean id="volumeTypeHelper" class="org.apache.cloudstack.engine.subsystem.api.storage.type.VolumeTypeHelper" />
|
||||
<bean id="zoneRestService" class="org.apache.cloudstack.engine.rest.service.api.ZoneRestService" />
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<bean id="clusterBasedAgentLoadBalancerPlanner"
|
||||
class="com.cloud.cluster.agentlb.ClusterBasedAgentLoadBalancerPlanner">
|
||||
<property name="name" value="ClusterBasedAgentLoadBalancerPlanner" />
|
||||
</bean>
|
||||
|
||||
<bean id="volumeOrchestrator"
|
||||
class="org.apache.cloudstack.engine.orchestration.VolumeOrchestrator">
|
||||
<property name="podAllocators" value="#{podAllocatorsRegistry.registered}" />
|
||||
<property name="storagePoolAllocators"
|
||||
value="#{storagePoolAllocatorsRegistry.registered}" />
|
||||
</bean>
|
||||
|
||||
<bean id="clusteredVirtualMachineManagerImpl" class="com.cloud.vm.ClusteredVirtualMachineManagerImpl">
|
||||
<property name="hostAllocators" value="#{hostAllocatorsRegistry.registered}" />
|
||||
<property name="storagePoolAllocators"
|
||||
value="#{storagePoolAllocatorsRegistry.registered}" />
|
||||
</bean>
|
||||
|
||||
<bean id="networkOrchestrator"
|
||||
class="org.apache.cloudstack.engine.orchestration.NetworkOrchestrator">
|
||||
<property name="networkGurus" value="#{networkGurusRegistry.registered}" />
|
||||
<property name="networkElements" value="#{networkElementsRegistry.registered}" />
|
||||
<property name="ipDeployers" value="#{ipDeployersRegistry.registered}" />
|
||||
<property name="dhcpProviders" value="#{dhcpProvidersRegistry.registered}" />
|
||||
</bean>
|
||||
|
||||
<bean id="clusteredAgentManagerImpl" class="com.cloud.agent.manager.ClusteredAgentManagerImpl" />
|
||||
|
||||
|
||||
<bean id="cloudOrchestrator"
|
||||
class="org.apache.cloudstack.engine.orchestration.CloudOrchestrator" />
|
||||
<bean id="dataCenterResourceManagerImpl"
|
||||
class="org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceManagerImpl" />
|
||||
|
||||
<bean id="vMEntityManagerImpl" class="org.apache.cloudstack.engine.cloud.entity.api.VMEntityManagerImpl" >
|
||||
<property name="planners" value="#{deploymentPlannersRegistry.registered}" />
|
||||
</bean>
|
||||
|
||||
<bean id="virtualMachineEntityImpl" class="org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntityImpl" />
|
||||
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,321 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<!--
|
||||
DAO with customized configuration
|
||||
-->
|
||||
<bean id="serviceOfferingDaoImpl" class="com.cloud.service.dao.ServiceOfferingDaoImpl">
|
||||
<property name="configParams">
|
||||
<map>
|
||||
<entry key="cache.size" value="50" />
|
||||
<entry key="cache.time.to.live" value="600" />
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="diskOfferingDaoImpl" class="com.cloud.storage.dao.DiskOfferingDaoImpl">
|
||||
<property name="configParams">
|
||||
<map>
|
||||
<entry key="cache.size" value="50" />
|
||||
<entry key="cache.time.to.live" value="600" />
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="dataCenterDaoImpl" class="com.cloud.dc.dao.DataCenterDaoImpl">
|
||||
<property name="configParams">
|
||||
<map>
|
||||
<entry key="cache.size" value="50" />
|
||||
<entry key="cache.time.to.live" value="600" />
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="hostPodDaoImpl" class="com.cloud.dc.dao.HostPodDaoImpl">
|
||||
<property name="configParams">
|
||||
<map>
|
||||
<entry key="cache.size" value="50" />
|
||||
<entry key="cache.time.to.live" value="600" />
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="vlanDaoImpl" class="com.cloud.dc.dao.VlanDaoImpl">
|
||||
<property name="configParams">
|
||||
<map>
|
||||
<entry key="cache.size" value="30" />
|
||||
<entry key="cache.time.to.live" value="3600" />
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="userDaoImpl" class="com.cloud.user.dao.UserDaoImpl">
|
||||
<property name="configParams">
|
||||
<map>
|
||||
<entry key="cache.size" value="5000" />
|
||||
<entry key="cache.time.to.live" value="300" />
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="VMTemplateDaoImpl" class="com.cloud.storage.dao.VMTemplateDaoImpl">
|
||||
<property name="configParams">
|
||||
<map>
|
||||
<entry key="cache.size" value="100" />
|
||||
<entry key="cache.time.to.live" value="600" />
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="hypervisorCapabilitiesDaoImpl" class="com.cloud.hypervisor.dao.HypervisorCapabilitiesDaoImpl">
|
||||
<property name="configParams">
|
||||
<map>
|
||||
<entry key="cache.size" value="100" />
|
||||
<entry key="cache.time.to.live" value="600" />
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="dedicatedResourceDaoImpl" class="com.cloud.dc.dao.DedicatedResourceDaoImpl">
|
||||
<property name="configParams">
|
||||
<map>
|
||||
<entry key="cache.size" value="30" />
|
||||
<entry key="cache.time.to.live" value="3600" />
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
DAOs with default configuration
|
||||
-->
|
||||
<bean id="accountDaoImpl" class="com.cloud.user.dao.AccountDaoImpl" />
|
||||
<bean id="accountDetailsDaoImpl" class="com.cloud.user.AccountDetailsDaoImpl" />
|
||||
<bean id="accountJoinDaoImpl" class="com.cloud.api.query.dao.AccountJoinDaoImpl" />
|
||||
<bean id="accountGuestVlanMapDaoImpl" class="com.cloud.network.dao.AccountGuestVlanMapDaoImpl" />
|
||||
<bean id="accountVlanMapDaoImpl" class="com.cloud.dc.dao.AccountVlanMapDaoImpl" />
|
||||
<bean id="alertDaoImpl" class="com.cloud.alert.dao.AlertDaoImpl" />
|
||||
<bean id="asyncJobJoinDaoImpl" class="com.cloud.api.query.dao.AsyncJobJoinDaoImpl" />
|
||||
<bean id="autoScalePolicyConditionMapDaoImpl" class="com.cloud.network.as.dao.AutoScalePolicyConditionMapDaoImpl" />
|
||||
<bean id="autoScalePolicyDaoImpl" class="com.cloud.network.as.dao.AutoScalePolicyDaoImpl" />
|
||||
<bean id="autoScaleVmGroupDaoImpl" class="com.cloud.network.as.dao.AutoScaleVmGroupDaoImpl" />
|
||||
<bean id="autoScaleVmGroupPolicyMapDaoImpl" class="com.cloud.network.as.dao.AutoScaleVmGroupPolicyMapDaoImpl" />
|
||||
<bean id="autoScaleVmProfileDaoImpl" class="com.cloud.network.as.dao.AutoScaleVmProfileDaoImpl" />
|
||||
<bean id="capacityDaoImpl" class="com.cloud.capacity.dao.CapacityDaoImpl" />
|
||||
<bean id="certificateDaoImpl" class="com.cloud.certificate.dao.CertificateDaoImpl" />
|
||||
<bean id="clusterDaoImpl" class="com.cloud.dc.dao.ClusterDaoImpl" />
|
||||
<bean id="clusterDetailsDaoImpl" class="com.cloud.dc.ClusterDetailsDaoImpl" />
|
||||
<bean id="clusterVSMMapDaoImpl" class="com.cloud.dc.dao.ClusterVSMMapDaoImpl" />
|
||||
<bean id="commandExecLogDaoImpl" class="com.cloud.secstorage.CommandExecLogDaoImpl" />
|
||||
<bean id="conditionDaoImpl" class="com.cloud.network.as.dao.ConditionDaoImpl" />
|
||||
<bean id="consoleProxyDaoImpl" class="com.cloud.vm.dao.ConsoleProxyDaoImpl" />
|
||||
<bean id="counterDaoImpl" class="com.cloud.network.as.dao.CounterDaoImpl" />
|
||||
<bean id="dataCenterIpAddressDaoImpl" class="com.cloud.dc.dao.DataCenterIpAddressDaoImpl" />
|
||||
<bean id="dataCenterJoinDaoImpl" class="com.cloud.api.query.dao.DataCenterJoinDaoImpl" />
|
||||
<bean id="dataCenterLinkLocalIpAddressDaoImpl" class="com.cloud.dc.dao.DataCenterLinkLocalIpAddressDaoImpl" />
|
||||
<bean id="dataCenterVnetDaoImpl" class="com.cloud.dc.dao.DataCenterVnetDaoImpl" />
|
||||
<bean id="dcDetailsDaoImpl" class="com.cloud.dc.dao.DcDetailsDaoImpl" />
|
||||
<bean id="engineDcDetailsDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.DcDetailsDaoImpl" />
|
||||
<bean id="diskOfferingJoinDaoImpl" class="com.cloud.api.query.dao.DiskOfferingJoinDaoImpl" />
|
||||
<bean id="domainDaoImpl" class="com.cloud.domain.dao.DomainDaoImpl" />
|
||||
<bean id="domainRouterDaoImpl" class="com.cloud.vm.dao.DomainRouterDaoImpl" />
|
||||
<bean id="domainRouterJoinDaoImpl" class="com.cloud.api.query.dao.DomainRouterJoinDaoImpl" />
|
||||
<bean id="engineClusterDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineClusterDaoImpl" />
|
||||
<bean id="engineDataCenterDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineDataCenterDaoImpl" />
|
||||
<bean id="engineHostDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineHostDaoImpl" />
|
||||
<bean id="engineHostPodDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineHostPodDaoImpl" />
|
||||
<bean id="eventDaoImpl" class="com.cloud.event.dao.EventDaoImpl" />
|
||||
<bean id="eventJoinDaoImpl" class="com.cloud.event.dao.EventJoinDaoImpl" />
|
||||
<bean id="externalFirewallDeviceDaoImpl" class="com.cloud.network.dao.ExternalFirewallDeviceDaoImpl" />
|
||||
<bean id="externalLoadBalancerDeviceDaoImpl" class="com.cloud.network.dao.ExternalLoadBalancerDeviceDaoImpl" />
|
||||
<bean id="externalPublicIpStatisticsDaoImpl" class="com.cloud.usage.dao.ExternalPublicIpStatisticsDaoImpl" />
|
||||
<bean id="firewallRulesCidrsDaoImpl" class="com.cloud.network.dao.FirewallRulesCidrsDaoImpl" />
|
||||
<bean id="firewallRulesDaoImpl" class="com.cloud.network.dao.FirewallRulesDaoImpl" />
|
||||
<bean id="globalLoadBalancerDaoImpl" class="org.apache.cloudstack.region.gslb.GlobalLoadBalancerDaoImpl" />
|
||||
<bean id="globalLoadBalancerLbRuleMapDaoImpl" class="org.apache.cloudstack.region.gslb.GlobalLoadBalancerLbRuleMapDaoImpl" />
|
||||
<bean id="guestOSCategoryDaoImpl" class="com.cloud.storage.dao.GuestOSCategoryDaoImpl" />
|
||||
<bean id="guestOSDaoImpl" class="com.cloud.storage.dao.GuestOSDaoImpl" />
|
||||
<bean id="guestOSHypervisorDaoImpl" class="com.cloud.storage.dao.GuestOSHypervisorDaoImpl" />
|
||||
<bean id="highAvailabilityDaoImpl" class="com.cloud.ha.dao.HighAvailabilityDaoImpl" />
|
||||
<bean id="hostDaoImpl" class="com.cloud.host.dao.HostDaoImpl" />
|
||||
<bean id="engineHostDetailsDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.HostDetailsDaoImpl" />
|
||||
<bean id="hostDetailsDaoImpl" class="com.cloud.host.dao.HostDetailsDaoImpl" />
|
||||
<bean id="hostJoinDaoImpl" class="com.cloud.api.query.dao.HostJoinDaoImpl" />
|
||||
<bean id="engineHostTagsDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.HostTagsDaoImpl" />
|
||||
<bean id="hostTagsDaoImpl" class="com.cloud.host.dao.HostTagsDaoImpl" />
|
||||
<bean id="hostTransferMapDaoImpl" class="com.cloud.cluster.agentlb.dao.HostTransferMapDaoImpl" />
|
||||
<bean id="iPAddressDaoImpl" class="com.cloud.network.dao.IPAddressDaoImpl" />
|
||||
<bean id="identityDaoImpl" class="com.cloud.uuididentity.dao.IdentityDaoImpl" />
|
||||
<bean id="imageStoreDaoImpl" class="org.apache.cloudstack.storage.image.db.ImageStoreDaoImpl" />
|
||||
<bean id="imageStoreDetailsDaoImpl" class="org.apache.cloudstack.storage.image.db.ImageStoreDetailsDaoImpl" />
|
||||
<bean id="imageStoreJoinDaoImpl" class="com.cloud.api.query.dao.ImageStoreJoinDaoImpl" />
|
||||
<bean id="snapshotDataStoreDaoImpl" class="org.apache.cloudstack.storage.image.db.SnapshotDataStoreDaoImpl" />
|
||||
<bean id="templateDataStoreDaoImpl" class="org.apache.cloudstack.storage.image.db.TemplateDataStoreDaoImpl" />
|
||||
<bean id="templateJoinDaoImpl" class="com.cloud.api.query.dao.TemplateJoinDaoImpl" />
|
||||
<bean id="volumeDataStoreDaoImpl" class="org.apache.cloudstack.storage.image.db.VolumeDataStoreDaoImpl" />
|
||||
<bean id="inlineLoadBalancerNicMapDaoImpl" class="com.cloud.network.dao.InlineLoadBalancerNicMapDaoImpl" />
|
||||
<bean id="instanceGroupDaoImpl" class="com.cloud.vm.dao.InstanceGroupDaoImpl" />
|
||||
<bean id="instanceGroupJoinDaoImpl" class="com.cloud.api.query.dao.InstanceGroupJoinDaoImpl" />
|
||||
<bean id="instanceGroupVMMapDaoImpl" class="com.cloud.vm.dao.InstanceGroupVMMapDaoImpl" />
|
||||
<bean id="itWorkDaoImpl" class="com.cloud.vm.ItWorkDaoImpl" />
|
||||
<bean id="keystoreDaoImpl" class="com.cloud.keystore.KeystoreDaoImpl" />
|
||||
<bean id="lBHealthCheckPolicyDaoImpl" class="com.cloud.network.dao.LBHealthCheckPolicyDaoImpl" />
|
||||
<bean id="lBStickinessPolicyDaoImpl" class="com.cloud.network.dao.LBStickinessPolicyDaoImpl" />
|
||||
<bean id="launchPermissionDaoImpl" class="com.cloud.storage.dao.LaunchPermissionDaoImpl" />
|
||||
<bean id="loadBalancerDaoImpl" class="com.cloud.network.dao.LoadBalancerDaoImpl" />
|
||||
<bean id="loadBalancerVMMapDaoImpl" class="com.cloud.network.dao.LoadBalancerVMMapDaoImpl" />
|
||||
<bean id="managementServerHostDaoImpl" class="com.cloud.cluster.dao.ManagementServerHostDaoImpl" />
|
||||
<bean id="managementServerHostPeerDaoImpl" class="com.cloud.cluster.dao.ManagementServerHostPeerDaoImpl" />
|
||||
<bean id="networkAccountDaoImpl" class="com.cloud.network.dao.NetworkAccountDaoImpl" />
|
||||
<bean id="networkACLDaoImpl" class="com.cloud.network.vpc.dao.NetworkACLDaoImpl" />
|
||||
<bean id="networkACLItemDaoImpl" class="com.cloud.network.vpc.dao.NetworkACLItemDaoImpl" />
|
||||
<bean id="networkDaoImpl" class="com.cloud.network.dao.NetworkDaoImpl" />
|
||||
<bean id="networkDomainDaoImpl" class="com.cloud.network.dao.NetworkDomainDaoImpl" />
|
||||
<bean id="networkExternalFirewallDaoImpl" class="com.cloud.network.dao.NetworkExternalFirewallDaoImpl" />
|
||||
<bean id="networkExternalLoadBalancerDaoImpl" class="com.cloud.network.dao.NetworkExternalLoadBalancerDaoImpl" />
|
||||
<bean id="networkOfferingDaoImpl" class="com.cloud.offerings.dao.NetworkOfferingDaoImpl" />
|
||||
<bean id="networkOfferingServiceMapDaoImpl" class="com.cloud.offerings.dao.NetworkOfferingServiceMapDaoImpl" />
|
||||
<bean id="networkOpDaoImpl" class="com.cloud.network.dao.NetworkOpDaoImpl" />
|
||||
<bean id="networkRuleConfigDaoImpl" class="com.cloud.network.dao.NetworkRuleConfigDaoImpl" />
|
||||
<bean id="networkServiceMapDaoImpl" class="com.cloud.network.dao.NetworkServiceMapDaoImpl" />
|
||||
<bean id="nicDaoImpl" class="com.cloud.vm.dao.NicDaoImpl" />
|
||||
<bean id="nicDetailDaoImpl" class="com.cloud.vm.dao.NicDetailDaoImpl" />
|
||||
<bean id="nicSecondaryIpDaoImpl" class="com.cloud.vm.dao.NicSecondaryIpDaoImpl" />
|
||||
<bean id="nicIpAliasDaoImpl" class="com.cloud.vm.dao.NicIpAliasDaoImpl" />
|
||||
<bean id="objectInDataStoreDaoImpl" class="org.apache.cloudstack.storage.db.ObjectInDataStoreDaoImpl" />
|
||||
<bean id="ovsTunnelInterfaceDaoImpl" class="com.cloud.network.ovs.dao.OvsTunnelInterfaceDaoImpl" />
|
||||
<bean id="ovsTunnelNetworkDaoImpl" class="com.cloud.network.ovs.dao.OvsTunnelNetworkDaoImpl" />
|
||||
<bean id="physicalNetworkDaoImpl" class="com.cloud.network.dao.PhysicalNetworkDaoImpl" />
|
||||
<bean id="physicalNetworkIsolationMethodDaoImpl" class="com.cloud.network.dao.PhysicalNetworkIsolationMethodDaoImpl" />
|
||||
<bean id="physicalNetworkServiceProviderDaoImpl" class="com.cloud.network.dao.PhysicalNetworkServiceProviderDaoImpl" />
|
||||
<bean id="physicalNetworkTagDaoImpl" class="com.cloud.network.dao.PhysicalNetworkTagDaoImpl" />
|
||||
<bean id="physicalNetworkTrafficTypeDaoImpl" class="com.cloud.network.dao.PhysicalNetworkTrafficTypeDaoImpl" />
|
||||
<bean id="podVlanDaoImpl" class="com.cloud.dc.dao.PodVlanDaoImpl" />
|
||||
<bean id="podVlanMapDaoImpl" class="com.cloud.dc.dao.PodVlanMapDaoImpl" />
|
||||
<bean id="PortableIpDaoImpl" class="org.apache.cloudstack.region.PortableIpDaoImpl" />
|
||||
<bean id="PortableIpRangeDaoImpl" class="org.apache.cloudstack.region.PortableIpRangeDaoImpl" />
|
||||
<bean id="portForwardingRulesDaoImpl" class="com.cloud.network.rules.dao.PortForwardingRulesDaoImpl" />
|
||||
<bean id="portProfileDaoImpl" class="com.cloud.network.dao.PortProfileDaoImpl" />
|
||||
<bean id="primaryDataStoreDaoImpl" class="org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDaoImpl" />
|
||||
<bean id="primaryDataStoreDetailsDaoImpl" class="org.apache.cloudstack.storage.volume.db.PrimaryDataStoreDetailsDaoImpl" />
|
||||
<bean id="privateIpDaoImpl" class="com.cloud.network.vpc.dao.PrivateIpDaoImpl" />
|
||||
<bean id="projectAccountDaoImpl" class="com.cloud.projects.dao.ProjectAccountDaoImpl" />
|
||||
<bean id="projectAccountJoinDaoImpl" class="com.cloud.api.query.dao.ProjectAccountJoinDaoImpl" />
|
||||
<bean id="projectDaoImpl" class="com.cloud.projects.dao.ProjectDaoImpl" />
|
||||
<bean id="projectInvitationDaoImpl" class="com.cloud.projects.dao.ProjectInvitationDaoImpl" />
|
||||
<bean id="projectInvitationJoinDaoImpl" class="com.cloud.api.query.dao.ProjectInvitationJoinDaoImpl" />
|
||||
<bean id="projectJoinDaoImpl" class="com.cloud.api.query.dao.ProjectJoinDaoImpl" />
|
||||
<bean id="regionDaoImpl" class="org.apache.cloudstack.region.dao.RegionDaoImpl" />
|
||||
<bean id="remoteAccessVpnDaoImpl" class="com.cloud.network.dao.RemoteAccessVpnDaoImpl" />
|
||||
<bean id="resourceCountDaoImpl" class="com.cloud.configuration.dao.ResourceCountDaoImpl" />
|
||||
<bean id="resourceLimitDaoImpl" class="com.cloud.configuration.dao.ResourceLimitDaoImpl" />
|
||||
<bean id="resourceTagJoinDaoImpl" class="com.cloud.api.query.dao.ResourceTagJoinDaoImpl" />
|
||||
<bean id="resourceTagsDaoImpl" class="com.cloud.tags.dao.ResourceTagsDaoImpl" />
|
||||
<bean id="routerNetworkDaoImpl" class="com.cloud.network.dao.RouterNetworkDaoImpl" />
|
||||
<bean id="sSHKeyPairDaoImpl" class="com.cloud.user.dao.SSHKeyPairDaoImpl" />
|
||||
<bean id="secondaryStorageVmDaoImpl" class="com.cloud.vm.dao.SecondaryStorageVmDaoImpl" />
|
||||
<bean id="securityGroupDaoImpl" class="com.cloud.network.security.dao.SecurityGroupDaoImpl" />
|
||||
<bean id="securityGroupJoinDaoImpl" class="com.cloud.api.query.dao.SecurityGroupJoinDaoImpl" />
|
||||
<bean id="securityGroupRuleDaoImpl" class="com.cloud.network.security.dao.SecurityGroupRuleDaoImpl" />
|
||||
<bean id="securityGroupRulesDaoImpl" class="com.cloud.network.security.dao.SecurityGroupRulesDaoImpl" />
|
||||
<bean id="securityGroupVMMapDaoImpl" class="com.cloud.network.security.dao.SecurityGroupVMMapDaoImpl" />
|
||||
<bean id="securityGroupWorkDaoImpl" class="com.cloud.network.security.dao.SecurityGroupWorkDaoImpl" />
|
||||
<bean id="serviceOfferingJoinDaoImpl" class="com.cloud.api.query.dao.ServiceOfferingJoinDaoImpl" />
|
||||
<bean id="site2SiteCustomerGatewayDaoImpl" class="com.cloud.network.dao.Site2SiteCustomerGatewayDaoImpl" />
|
||||
<bean id="site2SiteVpnConnectionDaoImpl" class="com.cloud.network.dao.Site2SiteVpnConnectionDaoImpl" />
|
||||
<bean id="site2SiteVpnGatewayDaoImpl" class="com.cloud.network.dao.Site2SiteVpnGatewayDaoImpl" />
|
||||
<bean id="snapshotDaoImpl" class="com.cloud.storage.dao.SnapshotDaoImpl" />
|
||||
<bean id="snapshotPolicyDaoImpl" class="com.cloud.storage.dao.SnapshotPolicyDaoImpl" />
|
||||
<bean id="snapshotScheduleDaoImpl" class="com.cloud.storage.dao.SnapshotScheduleDaoImpl" />
|
||||
<bean id="staticRouteDaoImpl" class="com.cloud.network.vpc.dao.StaticRouteDaoImpl" />
|
||||
<bean id="storageNetworkIpAddressDaoImpl" class="com.cloud.dc.dao.StorageNetworkIpAddressDaoImpl" />
|
||||
<bean id="storageNetworkIpRangeDaoImpl" class="com.cloud.dc.dao.StorageNetworkIpRangeDaoImpl" />
|
||||
<bean id="storagePoolDetailsDaoImpl" class="com.cloud.storage.dao.StoragePoolDetailsDaoImpl" />
|
||||
<bean id="storagePoolHostDaoImpl" class="com.cloud.storage.dao.StoragePoolHostDaoImpl" />
|
||||
<bean id="storagePoolJoinDaoImpl" class="com.cloud.api.query.dao.StoragePoolJoinDaoImpl" />
|
||||
<bean id="storagePoolWorkDaoImpl" class="com.cloud.storage.dao.StoragePoolWorkDaoImpl" />
|
||||
<bean id="templatePrimaryDataStoreDaoImpl" class="org.apache.cloudstack.storage.volume.db.TemplatePrimaryDataStoreDaoImpl" />
|
||||
<bean id="uploadDaoImpl" class="com.cloud.storage.dao.UploadDaoImpl" />
|
||||
<bean id="usageDaoImpl" class="com.cloud.usage.dao.UsageDaoImpl" />
|
||||
<bean id="usageEventDaoImpl" class="com.cloud.event.dao.UsageEventDaoImpl" />
|
||||
<bean id="usageIPAddressDaoImpl" class="com.cloud.usage.dao.UsageIPAddressDaoImpl" />
|
||||
<bean id="usageJobDaoImpl" class="com.cloud.usage.dao.UsageJobDaoImpl" />
|
||||
<bean id="usageLoadBalancerPolicyDaoImpl" class="com.cloud.usage.dao.UsageLoadBalancerPolicyDaoImpl" />
|
||||
<bean id="usageNetworkDaoImpl" class="com.cloud.usage.dao.UsageNetworkDaoImpl" />
|
||||
<bean id="usageNetworkOfferingDaoImpl" class="com.cloud.usage.dao.UsageNetworkOfferingDaoImpl" />
|
||||
<bean id="usagePortForwardingRuleDaoImpl" class="com.cloud.usage.dao.UsagePortForwardingRuleDaoImpl" />
|
||||
<bean id="usageSecurityGroupDaoImpl" class="com.cloud.usage.dao.UsageSecurityGroupDaoImpl" />
|
||||
<bean id="usageStorageDaoImpl" class="com.cloud.usage.dao.UsageStorageDaoImpl" />
|
||||
<bean id="usageVMInstanceDaoImpl" class="com.cloud.usage.dao.UsageVMInstanceDaoImpl" />
|
||||
<bean id="usageVPNUserDaoImpl" class="com.cloud.usage.dao.UsageVPNUserDaoImpl" />
|
||||
<bean id="usageVolumeDaoImpl" class="com.cloud.usage.dao.UsageVolumeDaoImpl" />
|
||||
<bean id="usageVmDiskDaoImpl" class="com.cloud.usage.dao.UsageVmDiskDaoImpl" />
|
||||
<bean id="userAccountDaoImpl" class="com.cloud.user.dao.UserAccountDaoImpl" />
|
||||
<bean id="userAccountJoinDaoImpl" class="com.cloud.api.query.dao.UserAccountJoinDaoImpl" />
|
||||
<bean id="userIpv6AddressDaoImpl" class="com.cloud.network.dao.UserIpv6AddressDaoImpl" />
|
||||
<bean id="userStatisticsDaoImpl" class="com.cloud.user.dao.UserStatisticsDaoImpl" />
|
||||
<bean id="userStatsLogDaoImpl" class="com.cloud.user.dao.UserStatsLogDaoImpl" />
|
||||
<bean id="userVmDiskStatsDaoImpl" class="com.cloud.user.dao.VmDiskStatisticsDaoImpl" />
|
||||
<bean id="userVmCloneSettingDaoImpl" class="com.cloud.vm.dao.UserVmCloneSettingDaoImpl" />
|
||||
<bean id="userVmDaoImpl" class="com.cloud.vm.dao.UserVmDaoImpl" />
|
||||
<bean id="userVmDetailsDaoImpl" class="com.cloud.vm.dao.UserVmDetailsDaoImpl" />
|
||||
<bean id="userVmJoinDaoImpl" class="com.cloud.api.query.dao.UserVmJoinDaoImpl" />
|
||||
<bean id="vMComputeTagDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMComputeTagDaoImpl" />
|
||||
<bean id="vMEntityDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMEntityDaoImpl" />
|
||||
<bean id="vMInstanceDaoImpl" class="com.cloud.vm.dao.VMInstanceDaoImpl" />
|
||||
<bean id="vMNetworkMapDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMNetworkMapDaoImpl" />
|
||||
<bean id="vMReservationDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMReservationDaoImpl" />
|
||||
<bean id="vMRootDiskTagDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMRootDiskTagDaoImpl" />
|
||||
<bean id="vMSnapshotDaoImpl" class="com.cloud.vm.snapshot.dao.VMSnapshotDaoImpl" />
|
||||
<bean id="vMTemplateDetailsDaoImpl" class="com.cloud.storage.dao.VMTemplateDetailsDaoImpl" />
|
||||
<bean id="vMTemplateHostDaoImpl" class="com.cloud.storage.dao.VMTemplateHostDaoImpl" />
|
||||
<bean id="vMTemplatePoolDaoImpl" class="com.cloud.storage.dao.VMTemplatePoolDaoImpl" />
|
||||
<bean id="vMTemplateZoneDaoImpl" class="com.cloud.storage.dao.VMTemplateZoneDaoImpl" />
|
||||
<bean id="virtualRouterProviderDaoImpl" class="com.cloud.network.dao.VirtualRouterProviderDaoImpl" />
|
||||
<bean id="vmRulesetLogDaoImpl" class="com.cloud.network.security.dao.VmRulesetLogDaoImpl" />
|
||||
<bean id="volumeDaoImpl" class="com.cloud.storage.dao.VolumeDaoImpl" />
|
||||
<bean id="volumeDetailsDaoImpl" class="com.cloud.storage.dao.VolumeDetailsDaoImpl" />
|
||||
<bean id="volumeHostDaoImpl" class="com.cloud.storage.dao.VolumeHostDaoImpl" />
|
||||
<bean id="volumeJoinDaoImpl" class="com.cloud.api.query.dao.VolumeJoinDaoImpl" />
|
||||
<bean id="volumeReservationDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VolumeReservationDaoImpl" />
|
||||
<bean id="vpcDaoImpl" class="com.cloud.network.vpc.dao.VpcDaoImpl" />
|
||||
<bean id="vpcGatewayDaoImpl" class="com.cloud.network.vpc.dao.VpcGatewayDaoImpl" />
|
||||
<bean id="vpcOfferingDaoImpl" class="com.cloud.network.vpc.dao.VpcOfferingDaoImpl" />
|
||||
<bean id="vpcOfferingServiceMapDaoImpl" class="com.cloud.network.vpc.dao.VpcOfferingServiceMapDaoImpl" />
|
||||
<bean id="vpcServiceMapDaoImpl" class="com.cloud.network.vpc.dao.VpcServiceMapDaoImpl" />
|
||||
<bean id="vpnUserDaoImpl" class="com.cloud.network.dao.VpnUserDaoImpl" />
|
||||
<bean id="applicationLbRuleDaoImpl" class="org.apache.cloudstack.lb.dao.ApplicationLoadBalancerRuleDaoImpl" />
|
||||
<bean id="networkOfferingDetailsDaoImpl" class="com.cloud.offerings.dao.NetworkOfferingDetailsDaoImpl" />
|
||||
<bean id="serviceOfferingDetailsDaoImpl" class="com.cloud.service.dao.ServiceOfferingDetailsDaoImpl"/>
|
||||
|
||||
<bean id="AffinityGroupDaoImpl" class="org.apache.cloudstack.affinity.dao.AffinityGroupDaoImpl" />
|
||||
<bean id="AffinityGroupVMMapDaoImpl" class="org.apache.cloudstack.affinity.dao.AffinityGroupVMMapDaoImpl" />
|
||||
<bean id="AffinityGroupDomainMapDaoImpl" class="org.apache.cloudstack.affinity.dao.AffinityGroupDomainMapDaoImpl" />
|
||||
|
||||
<bean id="databaseIntegrityChecker" class="com.cloud.upgrade.DatabaseIntegrityChecker" />
|
||||
|
||||
</beans>
|
||||
|
|
@ -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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<bean id="databaseUpgradeChecker" class="com.cloud.upgrade.DatabaseUpgradeChecker" />
|
||||
|
||||
<bean id="versionDaoImpl" class="com.cloud.upgrade.dao.VersionDaoImpl" />
|
||||
|
||||
</beans>
|
||||
|
|
@ -31,6 +31,7 @@ import java.util.List;
|
|||
import java.util.TreeMap;
|
||||
|
||||
import javax.ejb.Local;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
|
@ -82,10 +83,12 @@ public class DatabaseUpgradeChecker implements SystemIntegrityChecker {
|
|||
|
||||
protected HashMap<String, DbUpgrade[]> _upgradeMap = new HashMap<String, DbUpgrade[]>();
|
||||
|
||||
@Inject
|
||||
VersionDao _dao;
|
||||
|
||||
public DatabaseUpgradeChecker() {
|
||||
_dao = new VersionDaoImpl();
|
||||
|
||||
_upgradeMap.put("2.1.7", new DbUpgrade[] {new Upgrade217to218(), new Upgrade218to22(), new Upgrade221to222(),
|
||||
new UpgradeSnapshot217to224(), new Upgrade222to224(), new Upgrade224to225(), new Upgrade225to226(),
|
||||
new Upgrade227to228(), new Upgrade228to229(), new Upgrade229to2210(), new Upgrade2210to2211(),
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<bean id="storageCacheRandomAllocator"
|
||||
class="org.apache.cloudstack.storage.cache.allocator.StorageCacheRandomAllocator" />
|
||||
<bean id="storageCacheManagerImpl"
|
||||
class="org.apache.cloudstack.storage.cache.manager.StorageCacheManagerImpl" />
|
||||
<bean id="StorageCacheReplacementAlgorithm"
|
||||
class="org.apache.cloudstack.storage.cache.manager.StorageCacheReplacementAlgorithmLRU" />
|
||||
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<bean id="dataMotionServiceImpl"
|
||||
class="org.apache.cloudstack.storage.motion.DataMotionServiceImpl">
|
||||
<property name="strategies" value="#{dataMotionStrategiesRegistry.registered}" />
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
|
@ -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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
<bean id="ancientDataMotionStrategy"
|
||||
class="org.apache.cloudstack.storage.motion.AncientDataMotionStrategy" />
|
||||
<bean id="xenserverStorageMotionStrategy"
|
||||
class="org.apache.cloudstack.storage.motion.XenServerStorageMotionStrategy" />
|
||||
|
||||
</beans>
|
||||
|
|
@ -40,7 +40,7 @@ import com.cloud.utils.exception.CloudRuntimeException;
|
|||
|
||||
@Component
|
||||
public class DataMotionServiceImpl implements DataMotionService {
|
||||
@Inject
|
||||
|
||||
List<DataMotionStrategy> strategies;
|
||||
|
||||
@Override
|
||||
|
|
@ -83,7 +83,12 @@ public class DataMotionServiceImpl implements DataMotionService {
|
|||
throw new CloudRuntimeException("can't find strategy to move data");
|
||||
}
|
||||
|
||||
@Inject
|
||||
public void setStrategies(List<DataMotionStrategy> strategies) {
|
||||
this.strategies = strategies;
|
||||
}
|
||||
|
||||
public List<DataMotionStrategy> getStrategies() {
|
||||
return strategies;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,45 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<bean id="templateServiceImpl"
|
||||
class="org.apache.cloudstack.storage.image.TemplateServiceImpl"
|
||||
depends-on="dataObjectManagerImpl, dataStoreManagerImpl, dataMotionServiceImpl, objectInDataStoreManagerImpl, defaultEndPointSelector, templateDataFactoryImpl" />
|
||||
|
||||
<bean id="templateDataFactoryImpl"
|
||||
class="org.apache.cloudstack.storage.image.TemplateDataFactoryImpl" />
|
||||
|
||||
<bean id="imageStoreHelper"
|
||||
class="org.apache.cloudstack.storage.image.datastore.ImageStoreHelper" />
|
||||
<bean id="imageFormatHelper"
|
||||
class="org.apache.cloudstack.storage.image.format.ImageFormatHelper" />
|
||||
|
||||
<bean id="imageStoreProviderMgr"
|
||||
class="org.apache.cloudstack.storage.image.manager.ImageStoreProviderManagerImpl" />
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<!--Image formats-->
|
||||
<bean id="ISO" class="org.apache.cloudstack.storage.image.format.ISO" />
|
||||
<bean id="OVA" class="org.apache.cloudstack.storage.image.format.OVA" />
|
||||
<bean id="QCOW2" class="org.apache.cloudstack.storage.image.format.QCOW2" />
|
||||
<bean id="VHD" class="org.apache.cloudstack.storage.image.format.VHD" />
|
||||
<bean id="VHDX" class="org.apache.cloudstack.storage.image.format.VHDX" />
|
||||
<bean id="unknown" class="org.apache.cloudstack.storage.image.format.Unknown" />
|
||||
<bean id="BAREMETAL" class="org.apache.cloudstack.storage.image.format.BAREMETAL" />
|
||||
|
||||
|
||||
<bean id="objectInDataStoreManagerImpl"
|
||||
class="org.apache.cloudstack.storage.datastore.ObjectInDataStoreManagerImpl" />
|
||||
|
||||
<bean id="dataObjectManagerImpl"
|
||||
class="org.apache.cloudstack.storage.datastore.DataObjectManagerImpl" />
|
||||
|
||||
<bean id="defaultEndPointSelector"
|
||||
class="org.apache.cloudstack.storage.endpoint.DefaultEndPointSelector" />
|
||||
|
||||
<bean id="dataStoreManagerImpl"
|
||||
class="org.apache.cloudstack.storage.datastore.DataStoreManagerImpl"
|
||||
depends-on="dataStoreProviderManager">
|
||||
<property name="primaryStoreMgr" ref="primaryDataStoreProviderMgr" />
|
||||
<property name="imageDataStoreMgr" ref="imageStoreProviderMgr" />
|
||||
</bean>
|
||||
|
||||
<bean id="dataStoreProviderManager"
|
||||
class="org.apache.cloudstack.storage.datastore.provider.DataStoreProviderManagerImpl">
|
||||
<property name="providers">
|
||||
<list />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
name=storage-allocator
|
||||
parent=storage
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<bean id="LocalStoragePoolAllocator"
|
||||
class="org.apache.cloudstack.storage.allocator.LocalStoragePoolAllocator">
|
||||
<property name="name" value="LocalStorage" />
|
||||
</bean>
|
||||
|
||||
<bean id="clusterScopeStoragePoolAllocator"
|
||||
class="org.apache.cloudstack.storage.allocator.ClusterScopeStoragePoolAllocator" />
|
||||
<bean id="zoneWideStoragePoolAllocator"
|
||||
class="org.apache.cloudstack.storage.allocator.ZoneWideStoragePoolAllocator" />
|
||||
<bean id="garbageCollectingStoragePoolAllocator"
|
||||
class="org.apache.cloudstack.storage.allocator.GarbageCollectingStoragePoolAllocator">
|
||||
<property name="name" value="GCStorage" />
|
||||
</bean>
|
||||
|
||||
<bean id="UserConcentratedAllocator"
|
||||
class="com.cloud.agent.manager.allocator.impl.UserConcentratedAllocator">
|
||||
<property name="name" value="UserFirst" />
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<bean id="snapshotServiceImpl"
|
||||
class="org.apache.cloudstack.storage.snapshot.SnapshotServiceImpl"
|
||||
depends-on="snapshotStateMachineManagerImpl, snapshotDataFactoryImpl, dataStoreManagerImpl, dataMotionServiceImpl, objectInDataStoreManagerImpl" />
|
||||
|
||||
<bean id="snapshotDataFactoryImpl"
|
||||
class="org.apache.cloudstack.storage.snapshot.SnapshotDataFactoryImpl"
|
||||
depends-on="dataStoreManagerImpl, snapshotDataStoreDaoImpl, volumeDataFactoryImpl" />
|
||||
|
||||
<bean id="snapshotStateMachineManagerImpl"
|
||||
class="org.apache.cloudstack.storage.snapshot.SnapshotStateMachineManagerImpl" />
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<bean id="xenserverSnapshotStrategy"
|
||||
class="org.apache.cloudstack.storage.snapshot.XenserverSnapshotStrategy" />
|
||||
|
||||
</beans>
|
||||
|
|
@ -20,6 +20,8 @@ package org.apache.cloudstack.storage.datastore.provider;
|
|||
|
||||
import com.cloud.exception.InvalidParameterValueException;
|
||||
import com.cloud.utils.component.ManagerBase;
|
||||
import com.cloud.utils.component.Registry;
|
||||
|
||||
import org.apache.cloudstack.api.response.StorageProviderResponse;
|
||||
import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider;
|
||||
import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider.DataStoreProviderType;
|
||||
|
|
@ -33,18 +35,22 @@ import org.springframework.stereotype.Component;
|
|||
|
||||
import javax.inject.Inject;
|
||||
import javax.naming.ConfigurationException;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
@Component
|
||||
public class DataStoreProviderManagerImpl extends ManagerBase implements DataStoreProviderManager {
|
||||
public class DataStoreProviderManagerImpl extends ManagerBase implements DataStoreProviderManager, Registry<DataStoreProvider> {
|
||||
private static final Logger s_logger = Logger.getLogger(DataStoreProviderManagerImpl.class);
|
||||
@Inject
|
||||
|
||||
List<DataStoreProvider> providers;
|
||||
protected Map<String, DataStoreProvider> providerMap = new HashMap<String, DataStoreProvider>();
|
||||
protected Map<String, DataStoreProvider> providerMap = new ConcurrentHashMap<String, DataStoreProvider>();
|
||||
@Inject
|
||||
PrimaryDataStoreProviderManager primaryDataStoreProviderMgr;
|
||||
@Inject
|
||||
|
|
@ -52,6 +58,9 @@ public class DataStoreProviderManagerImpl extends ManagerBase implements DataSto
|
|||
|
||||
@Override
|
||||
public DataStoreProvider getDataStoreProvider(String name) {
|
||||
if (name == null)
|
||||
return null;
|
||||
|
||||
return providerMap.get(name);
|
||||
}
|
||||
|
||||
|
|
@ -96,43 +105,54 @@ public class DataStoreProviderManagerImpl extends ManagerBase implements DataSto
|
|||
|
||||
@Override
|
||||
public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
|
||||
Map<String, Object> copyParams = new HashMap<String, Object>(params);
|
||||
|
||||
for (DataStoreProvider provider : providers) {
|
||||
String providerName = provider.getName();
|
||||
if (providerMap.get(providerName) != null) {
|
||||
s_logger.debug("Failed to register data store provider, provider name: " + providerName
|
||||
+ " is not unique");
|
||||
return false;
|
||||
}
|
||||
|
||||
s_logger.debug("registering data store provider:" + provider.getName());
|
||||
|
||||
providerMap.put(providerName, provider);
|
||||
try {
|
||||
boolean registrationResult = provider.configure(copyParams);
|
||||
if (!registrationResult) {
|
||||
providerMap.remove(providerName);
|
||||
s_logger.debug("Failed to register data store provider: " + providerName);
|
||||
return false;
|
||||
}
|
||||
|
||||
Set<DataStoreProviderType> types = provider.getTypes();
|
||||
if (types.contains(DataStoreProviderType.PRIMARY)) {
|
||||
primaryDataStoreProviderMgr.registerDriver(provider.getName(),
|
||||
(PrimaryDataStoreDriver) provider.getDataStoreDriver());
|
||||
primaryDataStoreProviderMgr.registerHostListener(provider.getName(), provider.getHostListener());
|
||||
} else if (types.contains(DataStoreProviderType.IMAGE)) {
|
||||
imageStoreProviderMgr.registerDriver(provider.getName(),
|
||||
(ImageStoreDriver) provider.getDataStoreDriver());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
s_logger.debug("configure provider failed", e);
|
||||
providerMap.remove(providerName);
|
||||
return false;
|
||||
if ( providers != null ) {
|
||||
for (DataStoreProvider provider : providers) {
|
||||
registerProvider(provider);
|
||||
}
|
||||
}
|
||||
|
||||
providers = new CopyOnWriteArrayList<DataStoreProvider>(providers);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected boolean registerProvider(DataStoreProvider provider) {
|
||||
Map<String, Object> copyParams = new HashMap<String, Object>();
|
||||
|
||||
String providerName = provider.getName();
|
||||
if (providerMap.get(providerName) != null) {
|
||||
s_logger.debug("Did not register data store provider, provider name: " + providerName
|
||||
+ " is not unique");
|
||||
return false;
|
||||
}
|
||||
|
||||
s_logger.debug("registering data store provider:" + provider.getName());
|
||||
|
||||
providerMap.put(providerName, provider);
|
||||
try {
|
||||
boolean registrationResult = provider.configure(copyParams);
|
||||
if (!registrationResult) {
|
||||
providerMap.remove(providerName);
|
||||
s_logger.debug("Failed to register data store provider: " + providerName);
|
||||
return false;
|
||||
}
|
||||
|
||||
Set<DataStoreProviderType> types = provider.getTypes();
|
||||
if (types.contains(DataStoreProviderType.PRIMARY)) {
|
||||
primaryDataStoreProviderMgr.registerDriver(provider.getName(),
|
||||
(PrimaryDataStoreDriver) provider.getDataStoreDriver());
|
||||
primaryDataStoreProviderMgr.registerHostListener(provider.getName(), provider.getHostListener());
|
||||
} else if (types.contains(DataStoreProviderType.IMAGE)) {
|
||||
imageStoreProviderMgr.registerDriver(provider.getName(),
|
||||
(ImageStoreDriver) provider.getDataStoreDriver());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
s_logger.debug("configure provider failed", e);
|
||||
providerMap.remove(providerName);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -167,6 +187,27 @@ public class DataStoreProviderManagerImpl extends ManagerBase implements DataSto
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean register(DataStoreProvider type) {
|
||||
if ( registerProvider(type) ) {
|
||||
providers.add(type);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unregister(DataStoreProvider type) {
|
||||
/* Sorry, no unregister supported... */
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DataStoreProvider> getRegistered() {
|
||||
return Collections.unmodifiableList(providers);
|
||||
}
|
||||
|
||||
@Inject
|
||||
public void setProviders(List<DataStoreProvider> providers) {
|
||||
this.providers = providers;
|
||||
}
|
||||
|
|
@ -178,4 +219,9 @@ public class DataStoreProviderManagerImpl extends ManagerBase implements DataSto
|
|||
public void setImageStoreProviderMgr(ImageStoreProviderManager imageDataStoreProviderMgr) {
|
||||
this.imageStoreProviderMgr = imageDataStoreProviderMgr;
|
||||
}
|
||||
|
||||
public List<DataStoreProvider> getProviders() {
|
||||
return providers;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,49 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<!--Filesystem types -->
|
||||
<bean id="iSCSI" class="org.apache.cloudstack.storage.datastore.type.ISCSI" />
|
||||
<bean id="networkFileSystem"
|
||||
class="org.apache.cloudstack.storage.datastore.type.NetworkFileSystem" />
|
||||
|
||||
<bean id="volumeServiceImpl"
|
||||
class="org.apache.cloudstack.storage.volume.VolumeServiceImpl"
|
||||
depends-on="snapshotManagerImpl, dataMotionServiceImpl" />
|
||||
|
||||
<bean id="volumeDataFactoryImpl"
|
||||
class="org.apache.cloudstack.storage.volume.VolumeDataFactoryImpl" />
|
||||
|
||||
|
||||
<bean id="primaryDataStoreHelper"
|
||||
class="org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper" />
|
||||
|
||||
<bean id="primaryDataStoreProviderMgr"
|
||||
class="org.apache.cloudstack.storage.datastore.manager.PrimaryDataStoreProviderManagerImpl" />
|
||||
|
||||
</beans>
|
||||
|
|
@ -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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<bean id="clusterServiceServletAdapter" class="com.cloud.cluster.ClusterServiceServletAdapter" />
|
||||
|
||||
<bean id="clusterManagerImpl" class="com.cloud.cluster.ClusterManagerImpl" />
|
||||
|
||||
<bean id="clusterFenceManagerImpl" class="com.cloud.cluster.ClusterFenceManagerImpl" />
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.registry.RegistryLifecycle" >
|
||||
<property name="registry" ref="scopedConfigStorageRegistry" />
|
||||
<property name="typeClass" value="org.apache.cloudstack.framework.config.ScopedConfigStorage" />
|
||||
</bean>
|
||||
|
||||
<bean class="org.apache.cloudstack.spring.lifecycle.ConfigDepotLifeCycle" />
|
||||
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<bean id="configurationDaoImpl"
|
||||
class="org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl">
|
||||
<property name="configParams">
|
||||
<map>
|
||||
<entry key="premium" value="${premium}" />
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="configDepot"
|
||||
class="org.apache.cloudstack.framework.config.impl.ConfigDepotImpl">
|
||||
<property name="scopedStorages"
|
||||
value="#{scopedConfigStorageRegistry.registered}" />
|
||||
<property name="configurables">
|
||||
<list />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="scopedConfigStorageRegistry"
|
||||
class="org.apache.cloudstack.spring.lifecycle.registry.ExtensionRegistry" />
|
||||
|
||||
</beans>
|
||||
|
|
@ -31,6 +31,8 @@ public interface ConfigDepotAdmin {
|
|||
* @see Configuration
|
||||
*/
|
||||
void populateConfigurations();
|
||||
|
||||
void populateConfiguration(Configurable configurable);
|
||||
|
||||
List<String> getComponentsInDepot();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.ejb.Local;
|
||||
import javax.naming.ConfigurationException;
|
||||
|
||||
|
|
@ -128,6 +129,14 @@ public class ConfigurationDaoImpl extends GenericDaoBase<ConfigurationVO, String
|
|||
return true;
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void init() throws ConfigurationException {
|
||||
/* This bean is loaded in bootstrap and beans
|
||||
* in bootstrap don't go through the CloudStackExtendedLifeCycle
|
||||
*/
|
||||
configure(getName(), getConfigParams());
|
||||
}
|
||||
|
||||
//Use update method with category instead
|
||||
@Override
|
||||
@Deprecated
|
||||
|
|
|
|||
|
|
@ -17,14 +17,16 @@
|
|||
package org.apache.cloudstack.framework.config.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.cloudstack.framework.config.ConfigDepot;
|
||||
import org.apache.cloudstack.framework.config.ConfigDepotAdmin;
|
||||
import org.apache.cloudstack.framework.config.ConfigKey;
|
||||
|
|
@ -32,9 +34,9 @@ import org.apache.cloudstack.framework.config.Configurable;
|
|||
import org.apache.cloudstack.framework.config.ScopedConfigStorage;
|
||||
import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
|
||||
import org.apache.commons.lang.ObjectUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.utils.Pair;
|
||||
import com.cloud.utils.component.SystemIntegrityChecker;
|
||||
import com.cloud.utils.exception.CloudRuntimeException;
|
||||
|
||||
/**
|
||||
|
|
@ -64,14 +66,13 @@ import com.cloud.utils.exception.CloudRuntimeException;
|
|||
* when constructing a ConfigKey then configuration server should use the
|
||||
* validation class to validate the value the admin input for the key.
|
||||
*/
|
||||
public class ConfigDepotImpl implements ConfigDepot, ConfigDepotAdmin, SystemIntegrityChecker {
|
||||
public class ConfigDepotImpl implements ConfigDepot, ConfigDepotAdmin {
|
||||
private final static Logger s_logger = Logger.getLogger(ConfigDepotImpl.class);
|
||||
@Inject
|
||||
ConfigurationDao _configDao;
|
||||
@Inject
|
||||
List<Configurable> _configurables;
|
||||
@Inject
|
||||
List<ScopedConfigStorage> _scopedStorages;
|
||||
Set<Configurable> _configured = Collections.synchronizedSet(new HashSet<Configurable>());
|
||||
|
||||
HashMap<String, Pair<String, ConfigKey<?>>> _allKeys = new HashMap<String, Pair<String, ConfigKey<?>>>(1007);
|
||||
|
||||
|
|
@ -85,52 +86,60 @@ public class ConfigDepotImpl implements ConfigDepot, ConfigDepotAdmin, SystemInt
|
|||
return value != null ? value.second() : null;
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
@Override
|
||||
public void populateConfigurations() {
|
||||
Date date = new Date();
|
||||
for (Configurable configurable : _configurables) {
|
||||
for (ConfigKey<?> key : configurable.getConfigKeys()) {
|
||||
ConfigurationVO vo = _configDao.findById(key.key());
|
||||
if (vo == null) {
|
||||
vo = new ConfigurationVO(configurable.getConfigComponentName(), key);
|
||||
vo.setUpdated(date);
|
||||
_configDao.persist(vo);
|
||||
} else {
|
||||
if (vo.isDynamic() != key.isDynamic() ||
|
||||
!ObjectUtils.equals(vo.getDescription(), key.description()) ||
|
||||
!ObjectUtils.equals(vo.getDefaultValue(), key.defaultValue())) {
|
||||
vo.setDynamic(key.isDynamic());
|
||||
vo.setDescription(key.description());
|
||||
vo.setDefaultValue(key.defaultValue());
|
||||
vo.setUpdated(date);
|
||||
_configDao.persist(vo);
|
||||
}
|
||||
}
|
||||
}
|
||||
populateConfiguration(date, configurable);
|
||||
}
|
||||
}
|
||||
|
||||
protected void populateConfiguration(Date date, Configurable configurable) {
|
||||
if ( _configured.contains(configurable) )
|
||||
return;
|
||||
|
||||
s_logger.debug("Retrieving keys from " + configurable.getClass().getSimpleName());
|
||||
|
||||
for (ConfigKey<?> key : configurable.getConfigKeys()) {
|
||||
Pair<String, ConfigKey<?>> previous = _allKeys.get(key.key());
|
||||
if (previous != null && !previous.first().equals(configurable.getConfigComponentName())) {
|
||||
throw new CloudRuntimeException("Configurable " + configurable.getConfigComponentName() + " is adding a key that has been added before by " + previous.first() +
|
||||
": " + key.toString());
|
||||
}
|
||||
_allKeys.put(key.key(), new Pair<String, ConfigKey<?>>(configurable.getConfigComponentName(), key));
|
||||
|
||||
ConfigurationVO vo = _configDao.findById(key.key());
|
||||
if (vo == null) {
|
||||
vo = new ConfigurationVO(configurable.getConfigComponentName(), key);
|
||||
vo.setUpdated(date);
|
||||
_configDao.persist(vo);
|
||||
} else {
|
||||
if (vo.isDynamic() != key.isDynamic() ||
|
||||
!ObjectUtils.equals(vo.getDescription(), key.description()) ||
|
||||
!ObjectUtils.equals(vo.getDefaultValue(), key.defaultValue())) {
|
||||
vo.setDynamic(key.isDynamic());
|
||||
vo.setDescription(key.description());
|
||||
vo.setDefaultValue(key.defaultValue());
|
||||
vo.setUpdated(date);
|
||||
_configDao.persist(vo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_configured.add(configurable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void populateConfiguration(Configurable configurable) {
|
||||
populateConfiguration(new Date(), configurable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getComponentsInDepot() {
|
||||
return new ArrayList<String>();
|
||||
}
|
||||
|
||||
@Override
|
||||
@PostConstruct
|
||||
public void check() {
|
||||
for (Configurable configurable : _configurables) {
|
||||
s_logger.debug("Retrieving keys from " + configurable.getClass().getSimpleName());
|
||||
for (ConfigKey<?> key : configurable.getConfigKeys()) {
|
||||
Pair<String, ConfigKey<?>> previous = _allKeys.get(key.key());
|
||||
if (previous != null && !previous.first().equals(configurable.getConfigComponentName())) {
|
||||
throw new CloudRuntimeException("Configurable " + configurable.getConfigComponentName() + " is adding a key that has been added before by " + previous.first() +
|
||||
": " + key.toString());
|
||||
}
|
||||
_allKeys.put(key.key(), new Pair<String, ConfigKey<?>>(configurable.getConfigComponentName(), key));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ConfigurationDao global() {
|
||||
return _configDao;
|
||||
}
|
||||
|
|
@ -144,4 +153,23 @@ public class ConfigDepotImpl implements ConfigDepot, ConfigDepotAdmin, SystemInt
|
|||
|
||||
throw new CloudRuntimeException("Unable to find config storage for this scope: " + config.scope() + " for " + config.key());
|
||||
}
|
||||
|
||||
public List<ScopedConfigStorage> getScopedStorages() {
|
||||
return _scopedStorages;
|
||||
}
|
||||
|
||||
@Inject
|
||||
public void setScopedStorages(List<ScopedConfigStorage> scopedStorages) {
|
||||
this._scopedStorages = scopedStorages;
|
||||
}
|
||||
|
||||
public List<Configurable> getConfigurables() {
|
||||
return _configurables;
|
||||
}
|
||||
|
||||
@Inject
|
||||
public void setConfigurables(List<Configurable> configurables) {
|
||||
this._configurables = configurables;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@ public class ConfigDepotAdminTest extends TestCase {
|
|||
verify(_configDao, times(1)).persist(any(ConfigurationVO.class));
|
||||
|
||||
when(_configDao.findById(DynamicIntCK.key())).thenReturn(dynamicIntCV);
|
||||
_depotAdmin._configured.clear();
|
||||
_depotAdmin.populateConfigurations();
|
||||
// This is two because DynamicIntCK also returns null.
|
||||
verify(_configDao, times(2)).persist(any(ConfigurationVO.class));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<bean id="entityManagerImpl" class="com.cloud.dao.EntityManagerImpl" />
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* 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.utils.db;
|
||||
|
||||
import org.aopalliance.intercept.MethodInterceptor;
|
||||
import org.aopalliance.intercept.MethodInvocation;
|
||||
|
||||
public class TransactionContextInterceptor implements MethodInterceptor {
|
||||
|
||||
public TransactionContextInterceptor() {
|
||||
|
||||
}
|
||||
@Override
|
||||
public Object invoke(MethodInvocation m) throws Throwable {
|
||||
Transaction txn = Transaction.open(m.getMethod().getName());
|
||||
try {
|
||||
return m.proceed();
|
||||
} finally {
|
||||
txn.close();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* 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.utils.db;
|
||||
|
||||
import org.apache.cloudstack.managed.context.ManagedContextListener;
|
||||
|
||||
public class TransactionContextListener implements ManagedContextListener<Transaction> {
|
||||
|
||||
@Override
|
||||
public Transaction onEnterContext(boolean reentry) {
|
||||
if ( ! reentry ) {
|
||||
return Transaction.open(Thread.currentThread().getName());
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLeaveContext(Transaction data, boolean reentry) {
|
||||
if ( ! reentry ) {
|
||||
data.close();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -144,7 +144,9 @@ public class TransactionLegacy {
|
|||
// the existing DAO features
|
||||
//
|
||||
public void transitToUserManagedConnection(Connection conn) {
|
||||
assert(_conn == null /*&& _stack.size() <= 1*/) : "Can't change to a user managed connection unless the stack is empty and the db connection is null, you may have forgotten to invoke transitToAutoManagedConnection to close out the DB connection: " + toString();
|
||||
if ( _conn != null )
|
||||
throw new IllegalStateException("Can't change to a user managed connection unless the db connection is null");
|
||||
|
||||
_conn = conn;
|
||||
_dbId = CONNECTED_DB;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,59 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<!--
|
||||
RPC/Async/EventBus
|
||||
-->
|
||||
<bean id="onwireRegistry" class="org.apache.cloudstack.framework.serializer.OnwireClassRegistry"
|
||||
init-method="scan" >
|
||||
<property name="packages">
|
||||
<list>
|
||||
<value>org.apache.cloudstack.framework</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="messageSerializer" class="org.apache.cloudstack.framework.serializer.JsonMessageSerializer">
|
||||
<property name="onwireClassRegistry" ref="onwireRegistry" />
|
||||
</bean>
|
||||
|
||||
<bean id="transportProvider" class="org.apache.cloudstack.framework.server.ServerTransportProvider" init-method="initialize">
|
||||
<property name="workerPoolSize" value="5" />
|
||||
<property name="nodeId" value="Node1" />
|
||||
<property name="messageSerializer" ref="messageSerializer" />
|
||||
</bean>
|
||||
|
||||
<bean id="rpcProvider" class="org.apache.cloudstack.framework.rpc.RpcProviderImpl" init-method="initialize">
|
||||
<constructor-arg ref="transportProvider" />
|
||||
<property name="messageSerializer" ref="messageSerializer" />
|
||||
</bean>
|
||||
|
||||
<bean id="messageBus" class = "org.apache.cloudstack.framework.messagebus.MessageBusBase" />
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
|
||||
>
|
||||
|
||||
<bean id="asyncJobDaoImpl"
|
||||
class="org.apache.cloudstack.framework.jobs.dao.AsyncJobDaoImpl" />
|
||||
<bean id="asyncJobJournalDaoImpl"
|
||||
class="org.apache.cloudstack.framework.jobs.dao.AsyncJobJournalDaoImpl" />
|
||||
<bean id="asyncJobJoinMapDaoImpl"
|
||||
class="org.apache.cloudstack.framework.jobs.dao.AsyncJobJoinMapDaoImpl" />
|
||||
<bean id="asyncJobManagerImpl"
|
||||
class="org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl" />
|
||||
<bean id="asyncJobMonitor"
|
||||
class="org.apache.cloudstack.framework.jobs.impl.AsyncJobMonitor" />
|
||||
<bean id="syncQueueDaoImpl"
|
||||
class="org.apache.cloudstack.framework.jobs.dao.SyncQueueDaoImpl" />
|
||||
<bean id="syncQueueItemDaoImpl"
|
||||
class="org.apache.cloudstack.framework.jobs.dao.SyncQueueItemDaoImpl" />
|
||||
<bean id="syncQueueManagerImpl"
|
||||
class="org.apache.cloudstack.framework.jobs.impl.SyncQueueManagerImpl" />
|
||||
|
||||
|
||||
</beans>
|
||||
|
|
@ -38,5 +38,7 @@
|
|||
<module>db</module>
|
||||
<module>config</module>
|
||||
<module>managed-context</module>
|
||||
<module>spring/lifecycle</module>
|
||||
<module>spring/module</module>
|
||||
</modules>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -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. -->
|
||||
<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-spring-lifecycle</artifactId>
|
||||
<name>Apache CloudStack Framework - Spring Life Cycle</name>
|
||||
<parent>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloud-maven-standard</artifactId>
|
||||
<version>4.3.0-SNAPSHOT</version>
|
||||
<relativePath>../../../maven-standard/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-config</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
/*
|
||||
* 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.spring.lifecycle;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.config.BeanPostProcessor;
|
||||
|
||||
/**
|
||||
* This class provides a method to do basically the same as @Inject of a type, but
|
||||
* it will only find the types in the current context and not the parent. This class
|
||||
* should only be used for very specific Spring bootstrap logic. In general @Inject
|
||||
* is infinitely better. Basically you need a very good reason to use this.
|
||||
*
|
||||
*/
|
||||
public abstract class AbstractBeanCollector extends AbstractSmartLifeCycle implements BeanPostProcessor {
|
||||
|
||||
Class<?>[] typeClasses = new Class<?>[] {};
|
||||
Map<Class<?>, Set<Object>> beans = new HashMap<Class<?>, Set<Object>>();
|
||||
|
||||
@Override
|
||||
public int getPhase() {
|
||||
return 2000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
|
||||
for ( Class<?> typeClass : typeClasses ) {
|
||||
if ( typeClass.isAssignableFrom(bean.getClass()) ) {
|
||||
doPostProcessBeforeInitialization(bean, beanName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return bean;
|
||||
}
|
||||
|
||||
protected void doPostProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
|
||||
}
|
||||
|
||||
protected void doPostProcessAfterInitialization(Object bean, Class<?> typeClass, String beanName) throws BeansException {
|
||||
Set<Object> beansOfType = beans.get(typeClass);
|
||||
|
||||
if ( beansOfType == null ) {
|
||||
beansOfType = new HashSet<Object>();
|
||||
beans.put(typeClass, beansOfType);
|
||||
}
|
||||
|
||||
beansOfType.add(bean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
|
||||
for ( Class<?> typeClass : typeClasses ) {
|
||||
if ( typeClass.isAssignableFrom(bean.getClass()) ) {
|
||||
doPostProcessAfterInitialization(bean, typeClass, beanName);
|
||||
}
|
||||
}
|
||||
|
||||
return bean;
|
||||
}
|
||||
|
||||
protected <T> Set<T> getBeans(Class<T> typeClass) {
|
||||
@SuppressWarnings("unchecked")
|
||||
Set<T> result = (Set<T>) beans.get(typeClass);
|
||||
|
||||
if ( result == null )
|
||||
return Collections.emptySet();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public Class<?> getTypeClass() {
|
||||
if ( typeClasses == null || typeClasses.length == 0 )
|
||||
return null;
|
||||
|
||||
return typeClasses[0];
|
||||
}
|
||||
|
||||
public void setTypeClass(Class<?> typeClass) {
|
||||
this.typeClasses = new Class<?>[] { typeClass };
|
||||
}
|
||||
|
||||
public Class<?>[] getTypeClasses() {
|
||||
return typeClasses;
|
||||
}
|
||||
|
||||
public void setTypeClasses(Class<?>[] typeClasses) {
|
||||
this.typeClasses = typeClasses;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* 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.spring.lifecycle;
|
||||
|
||||
import org.springframework.context.SmartLifecycle;
|
||||
|
||||
public abstract class AbstractSmartLifeCycle implements SmartLifecycle {
|
||||
|
||||
boolean running = false;
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
running = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
running = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRunning() {
|
||||
return running;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAutoStartup() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop(Runnable callback) {
|
||||
stop();
|
||||
callback.run();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,169 @@
|
|||
/*
|
||||
* 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.spring.lifecycle;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import javax.management.InstanceAlreadyExistsException;
|
||||
import javax.management.MBeanRegistrationException;
|
||||
import javax.management.MalformedObjectNameException;
|
||||
import javax.management.NotCompliantMBeanException;
|
||||
import javax.naming.ConfigurationException;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.cloud.utils.component.ComponentLifecycle;
|
||||
import com.cloud.utils.component.SystemIntegrityChecker;
|
||||
import com.cloud.utils.exception.CloudRuntimeException;
|
||||
import com.cloud.utils.mgmt.JmxUtil;
|
||||
import com.cloud.utils.mgmt.ManagementBean;
|
||||
|
||||
public class CloudStackExtendedLifeCycle extends AbstractBeanCollector {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(CloudStackExtendedLifeCycle.class);
|
||||
|
||||
Map<Integer, Set<ComponentLifecycle>> sorted = new TreeMap<Integer, Set<ComponentLifecycle>>();
|
||||
|
||||
public CloudStackExtendedLifeCycle() {
|
||||
super();
|
||||
setTypeClasses(new Class<?>[] {
|
||||
ComponentLifecycle.class,
|
||||
SystemIntegrityChecker.class
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
sortBeans();
|
||||
checkIntegrity();
|
||||
configure();
|
||||
|
||||
super.start();
|
||||
}
|
||||
|
||||
protected void checkIntegrity() {
|
||||
for ( SystemIntegrityChecker checker : getBeans(SystemIntegrityChecker.class) ) {
|
||||
log.info("Running system integrity checker {}", checker);
|
||||
|
||||
checker.check();
|
||||
}
|
||||
}
|
||||
|
||||
public void startBeans() {
|
||||
log.info("Starting CloudStack Components");
|
||||
|
||||
with(new WithComponentLifeCycle() {
|
||||
@Override
|
||||
public void with(ComponentLifecycle lifecycle) {
|
||||
lifecycle.start();
|
||||
|
||||
if ( lifecycle instanceof ManagementBean ) {
|
||||
ManagementBean mbean = (ManagementBean)lifecycle;
|
||||
try {
|
||||
JmxUtil.registerMBean(mbean);
|
||||
} catch (MalformedObjectNameException e) {
|
||||
log.warn("Unable to register MBean: " + mbean.getName(), e);
|
||||
} catch (InstanceAlreadyExistsException e) {
|
||||
log.warn("Unable to register MBean: " + mbean.getName(), e);
|
||||
} catch (MBeanRegistrationException e) {
|
||||
log.warn("Unable to register MBean: " + mbean.getName(), e);
|
||||
} catch (NotCompliantMBeanException e) {
|
||||
log.warn("Unable to register MBean: " + mbean.getName(), e);
|
||||
}
|
||||
log.info("Registered MBean: " + mbean.getName());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
log.info("Done Starting CloudStack Components");
|
||||
}
|
||||
|
||||
public void stopBeans() {
|
||||
with(new WithComponentLifeCycle() {
|
||||
@Override
|
||||
public void with(ComponentLifecycle lifecycle) {
|
||||
lifecycle.stop();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void configure() {
|
||||
log.info("Configuring CloudStack Components");
|
||||
|
||||
with(new WithComponentLifeCycle() {
|
||||
@Override
|
||||
public void with(ComponentLifecycle lifecycle) {
|
||||
try {
|
||||
lifecycle.configure(lifecycle.getName(), lifecycle.getConfigParams());
|
||||
} catch (ConfigurationException e) {
|
||||
log.error("Failed to configure {}", lifecycle.getName(), e);
|
||||
throw new CloudRuntimeException(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
log.info("Done Configuring CloudStack Components");
|
||||
}
|
||||
|
||||
private void sortBeans() {
|
||||
for ( ComponentLifecycle lifecycle : getBeans(ComponentLifecycle.class) ) {
|
||||
Set<ComponentLifecycle> set = sorted.get(lifecycle.getRunLevel());
|
||||
|
||||
if ( set == null ) {
|
||||
set = new HashSet<ComponentLifecycle>();
|
||||
sorted.put(lifecycle.getRunLevel(), set);
|
||||
}
|
||||
|
||||
set.add(lifecycle);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
with(new WithComponentLifeCycle() {
|
||||
@Override
|
||||
public void with(ComponentLifecycle lifecycle) {
|
||||
lifecycle.stop();
|
||||
}
|
||||
});
|
||||
|
||||
super.stop();
|
||||
}
|
||||
|
||||
protected void with(WithComponentLifeCycle with) {
|
||||
for ( Set<ComponentLifecycle> lifecycles : sorted.values() ) {
|
||||
for ( ComponentLifecycle lifecycle : lifecycles ) {
|
||||
with.with(lifecycle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPhase() {
|
||||
return 2000;
|
||||
}
|
||||
|
||||
private static interface WithComponentLifeCycle {
|
||||
public void with(ComponentLifecycle lifecycle);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* 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.spring.lifecycle;
|
||||
|
||||
public class CloudStackExtendedLifeCycleStart extends AbstractSmartLifeCycle implements Runnable {
|
||||
|
||||
CloudStackExtendedLifeCycle lifeCycle;
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
lifeCycle.stopBeans();
|
||||
super.stop();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPhase() {
|
||||
return 3000;
|
||||
}
|
||||
|
||||
public CloudStackExtendedLifeCycle getLifeCycle() {
|
||||
return lifeCycle;
|
||||
}
|
||||
|
||||
public void setLifeCycle(CloudStackExtendedLifeCycle lifeCycle) {
|
||||
this.lifeCycle = lifeCycle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
lifeCycle.startBeans();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* 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.spring.lifecycle;
|
||||
|
||||
import org.springframework.context.SmartLifecycle;
|
||||
|
||||
import com.cloud.utils.LogUtils;
|
||||
|
||||
public class CloudStackLog4jSetup implements SmartLifecycle {
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
LogUtils.initLog4j("log4j-cloud.xml");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRunning() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPhase() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAutoStartup() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop(Runnable callback) {
|
||||
callback.run();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* 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.spring.lifecycle;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.apache.cloudstack.framework.config.ConfigDepotAdmin;
|
||||
import org.apache.cloudstack.framework.config.Configurable;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.config.BeanPostProcessor;
|
||||
|
||||
public class ConfigDepotLifeCycle implements BeanPostProcessor {
|
||||
|
||||
@Inject
|
||||
ConfigDepotAdmin configDepotAdmin;
|
||||
|
||||
@Override
|
||||
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
|
||||
if ( bean instanceof Configurable ) {
|
||||
configDepotAdmin.populateConfiguration((Configurable)bean);
|
||||
}
|
||||
|
||||
return bean;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
|
||||
return bean;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* 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.spring.lifecycle.registry;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.cloud.utils.component.ComponentLifecycleBase;
|
||||
import com.cloud.utils.component.Named;
|
||||
import com.cloud.utils.component.Registry;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class DumpRegistry extends ComponentLifecycleBase {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(DumpRegistry.class);
|
||||
|
||||
List<Registry<?>> registries;
|
||||
|
||||
public List<Registry<?>> getRegistries() {
|
||||
return registries;
|
||||
}
|
||||
|
||||
@Inject
|
||||
public void setRegistries(List<Registry<?>> registries) {
|
||||
this.registries = registries;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean start() {
|
||||
for ( Registry<?> registry : registries ) {
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
|
||||
for ( Object o : registry.getRegistered() ) {
|
||||
if ( buffer.length() > 0 )
|
||||
buffer.append(", ");
|
||||
|
||||
buffer.append(getName(o));
|
||||
}
|
||||
|
||||
log.info("Registry [{}] contains [{}]", registry.getName(), buffer);
|
||||
}
|
||||
|
||||
return super.start();
|
||||
}
|
||||
|
||||
protected String getName(Object o) {
|
||||
String name = null;
|
||||
if (o instanceof Named) {
|
||||
name = ((Named) o).getName();
|
||||
}
|
||||
|
||||
if (name == null) {
|
||||
name = o.getClass().getSimpleName();
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,245 @@
|
|||
/*
|
||||
* 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.spring.lifecycle.registry;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
import org.apache.cloudstack.framework.config.ConfigKey;
|
||||
import org.apache.cloudstack.framework.config.Configurable;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
|
||||
import com.cloud.utils.component.Named;
|
||||
import com.cloud.utils.component.Registry;
|
||||
|
||||
public class ExtensionRegistry implements Registry<Object>, Configurable, BeanNameAware {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(ExtensionRegistry.class);
|
||||
|
||||
String name;
|
||||
String beanName;
|
||||
|
||||
String orderConfigKey;
|
||||
String orderConfigDefault;
|
||||
ConfigKey<String> orderConfigKeyObj;
|
||||
|
||||
String excludeKey;
|
||||
String excludeDefault;
|
||||
ConfigKey<String> excludeKeyObj;
|
||||
|
||||
String configComponentName;
|
||||
List<Object> preRegistered;
|
||||
List<Object> registered = new CopyOnWriteArrayList<Object>();
|
||||
List<Object> readOnly = Collections.unmodifiableList(registered);
|
||||
|
||||
@Override
|
||||
public boolean register(Object item) {
|
||||
if ( registered.contains(item) )
|
||||
return false;
|
||||
|
||||
String[] order = new String[] {};
|
||||
Set<String> exclude = new HashSet<String>();
|
||||
|
||||
if ( orderConfigKeyObj != null ) {
|
||||
Object value = orderConfigKeyObj.value();
|
||||
if ( value != null && value.toString().trim().length() > 0 ) {
|
||||
order = value.toString().trim().split("\\s*,\\s*");
|
||||
}
|
||||
}
|
||||
|
||||
if ( excludeKeyObj != null ) {
|
||||
Object value = excludeKeyObj.value();
|
||||
if ( value != null && value.toString().trim().length() > 0 ) {
|
||||
for ( String e : value.toString().trim().split("\\s*,\\s*") ) {
|
||||
exclude.add(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String name = getName(item);
|
||||
|
||||
if ( name != null && exclude.size() > 0 && exclude.contains(name) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( name == null && order.length > 0 ) {
|
||||
throw new RuntimeException("getName() is null for [" + item + "]");
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
for ( String orderTest : order ) {
|
||||
if ( orderTest.equals(name) ) {
|
||||
registered.add(i, item);
|
||||
i = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( registered.size() <= i ) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ( getName(registered.get(i)).equals(orderTest) ) {
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
if ( i != -1 ) {
|
||||
registered.add(item);
|
||||
}
|
||||
|
||||
log.debug("Registering extension [{}] in [{}]", name, this.name);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected String getName(Object object) {
|
||||
if ( object instanceof Named ) {
|
||||
String name = ((Named)object).getName();
|
||||
if ( name != null )
|
||||
return name;
|
||||
}
|
||||
|
||||
return object == null ? null : object.getClass().getSimpleName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unregister(Object type) {
|
||||
registered.remove(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Object> getRegistered() {
|
||||
return readOnly;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getConfigComponentName() {
|
||||
return configComponentName == null ? this.getClass().getSimpleName() : configComponentName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConfigKey<?>[] getConfigKeys() {
|
||||
List<ConfigKey<String>> result = new ArrayList<ConfigKey<String>>();
|
||||
|
||||
if ( orderConfigKey != null && orderConfigKeyObj == null ) {
|
||||
orderConfigKeyObj = new ConfigKey<String>("Advanced", String.class, orderConfigKey, orderConfigDefault,
|
||||
"The order of precedence for the extensions", false);
|
||||
}
|
||||
|
||||
if ( orderConfigKeyObj != null )
|
||||
result.add(orderConfigKeyObj);
|
||||
|
||||
if ( excludeKey != null && excludeKeyObj == null ) {
|
||||
excludeKeyObj = new ConfigKey<String>("Advanced", String.class, excludeKey, excludeDefault,
|
||||
"Extensions to exclude from being registered", false);
|
||||
}
|
||||
|
||||
if ( excludeKeyObj != null ) {
|
||||
result.add(excludeKeyObj);
|
||||
}
|
||||
|
||||
return result.toArray(new ConfigKey[result.size()]);
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
if ( name == null ) {
|
||||
for ( String part : beanName.replaceAll("([A-Z])", " $1").split("\\s+") ) {
|
||||
part = StringUtils.capitalize(part.toLowerCase());;
|
||||
|
||||
name = name == null ? part : name + " " + part;
|
||||
}
|
||||
}
|
||||
|
||||
if ( preRegistered != null ) {
|
||||
for ( Object o : preRegistered ) {
|
||||
register(o);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public String getOrderConfigKey() {
|
||||
return orderConfigKey;
|
||||
}
|
||||
|
||||
public void setOrderConfigKey(String orderConfigKey) {
|
||||
this.orderConfigKey = orderConfigKey;
|
||||
}
|
||||
|
||||
public void setConfigComponentName(String configComponentName) {
|
||||
this.configComponentName = configComponentName;
|
||||
}
|
||||
|
||||
public String getOrderConfigDefault() {
|
||||
return orderConfigDefault;
|
||||
}
|
||||
|
||||
public void setOrderConfigDefault(String orderConfigDefault) {
|
||||
this.orderConfigDefault = orderConfigDefault;
|
||||
}
|
||||
|
||||
public String getExcludeKey() {
|
||||
return excludeKey;
|
||||
}
|
||||
|
||||
public void setExcludeKey(String excludeKey) {
|
||||
this.excludeKey = excludeKey;
|
||||
}
|
||||
|
||||
public String getExcludeDefault() {
|
||||
return excludeDefault;
|
||||
}
|
||||
|
||||
public void setExcludeDefault(String excludeDefault) {
|
||||
this.excludeDefault = excludeDefault;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBeanName(String name) {
|
||||
this.beanName = name;
|
||||
}
|
||||
|
||||
public List<Object> getPreRegistered() {
|
||||
return preRegistered;
|
||||
}
|
||||
|
||||
public void setPreRegistered(List<Object> preRegistered) {
|
||||
this.preRegistered = preRegistered;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* 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.spring.lifecycle.registry;
|
||||
|
||||
import com.cloud.utils.component.ComponentContext;
|
||||
import com.cloud.utils.component.PluggableService;
|
||||
|
||||
public class PluggableServiceLifecycle extends RegistryLifecycle {
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
super.start();
|
||||
|
||||
for (Object obj : beans) {
|
||||
if (obj instanceof PluggableService) {
|
||||
for (Class<?> cmd : ((PluggableService) obj).getCommands()) {
|
||||
ComponentContext.addDelegateContext(cmd, applicationContext);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
for (Object obj : beans) {
|
||||
if (obj instanceof PluggableService) {
|
||||
for (Class<?> cmd : ((PluggableService) obj).getCommands()) {
|
||||
ComponentContext.removeDelegateContext(cmd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
super.stop();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,144 @@
|
|||
/*
|
||||
* 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.spring.lifecycle.registry;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.config.BeanPostProcessor;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.context.SmartLifecycle;
|
||||
|
||||
import com.cloud.utils.component.Registry;
|
||||
|
||||
public class RegistryLifecycle implements BeanPostProcessor, SmartLifecycle, ApplicationContextAware {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(RegistryLifecycle.class);
|
||||
|
||||
Registry<Object> registry;
|
||||
|
||||
/* The bean name works around circular dependency issues in Spring. This shouldn't be
|
||||
* needed if your beans are already nicely organized. If they look like spaghetti, then you
|
||||
* can use this.
|
||||
*/
|
||||
String registryBeanName;
|
||||
Set<Object> beans = new HashSet<Object>();
|
||||
Class<?> typeClass;
|
||||
ApplicationContext applicationContext;
|
||||
|
||||
@Override
|
||||
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
|
||||
if ( typeClass.isAssignableFrom(bean.getClass()) )
|
||||
beans.add(bean);
|
||||
|
||||
return bean;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
|
||||
return bean;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
Iterator<Object> iter = beans.iterator();
|
||||
Registry<Object> registry = lookupRegistry();
|
||||
|
||||
while ( iter.hasNext() ) {
|
||||
Object next = iter.next();
|
||||
if ( registry.register(next) ) {
|
||||
log.debug("Registered {}", next);
|
||||
} else {
|
||||
iter.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
Registry<Object> registry = lookupRegistry();
|
||||
|
||||
for ( Object bean : beans ) {
|
||||
registry.unregister(bean);
|
||||
}
|
||||
|
||||
beans.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRunning() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPhase() {
|
||||
return 2000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAutoStartup() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop(Runnable callback) {
|
||||
stop();
|
||||
callback.run();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
||||
this.applicationContext = applicationContext;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected Registry<Object> lookupRegistry() {
|
||||
return registry == null ? applicationContext.getBean(registryBeanName, Registry.class) : registry;
|
||||
}
|
||||
|
||||
public Registry<Object> getRegistry() {
|
||||
return registry;
|
||||
}
|
||||
|
||||
public void setRegistry(Registry<Object> registry) {
|
||||
this.registry = registry;
|
||||
}
|
||||
|
||||
public Class<?> getTypeClass() {
|
||||
return typeClass;
|
||||
}
|
||||
|
||||
public void setTypeClass(Class<?> typeClass) {
|
||||
this.typeClass = typeClass;
|
||||
}
|
||||
|
||||
public String getRegistryBeanName() {
|
||||
return registryBeanName;
|
||||
}
|
||||
|
||||
public void setRegistryBeanName(String registryBeanName) {
|
||||
this.registryBeanName = registryBeanName;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
<!--
|
||||
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-spring-module</artifactId>
|
||||
<parent>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloud-maven-standard</artifactId>
|
||||
<version>4.3.0-SNAPSHOT</version>
|
||||
<relativePath>../../../maven-standard/pom.xml</relativePath>
|
||||
</parent>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloud-utils</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* 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.spring.module.context;
|
||||
|
||||
import org.springframework.context.support.AbstractXmlApplicationContext;
|
||||
import org.springframework.core.io.Resource;
|
||||
|
||||
public class ResourceApplicationContext extends AbstractXmlApplicationContext {
|
||||
|
||||
Resource[] configResources;
|
||||
String applicationName = "";
|
||||
|
||||
public ResourceApplicationContext() {
|
||||
}
|
||||
|
||||
public ResourceApplicationContext(Resource... configResources) {
|
||||
super();
|
||||
this.configResources = configResources;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Resource[] getConfigResources() {
|
||||
return configResources;
|
||||
}
|
||||
|
||||
public void setConfigResources(Resource[] configResources) {
|
||||
this.configResources = configResources;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getApplicationName() {
|
||||
return applicationName;
|
||||
}
|
||||
|
||||
public void setApplicationName(String applicationName) {
|
||||
this.applicationName = applicationName;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
/*
|
||||
* 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.spring.module.factory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.cloudstack.spring.module.locator.ModuleDefinitionLocator;
|
||||
import org.apache.cloudstack.spring.module.locator.impl.ClasspathModuleDefinitionLocator;
|
||||
import org.apache.cloudstack.spring.module.model.ModuleDefinition;
|
||||
import org.apache.cloudstack.spring.module.model.ModuleDefinitionSet;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.core.io.Resource;
|
||||
|
||||
public class CloudStackSpringContext {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(CloudStackSpringContext.class);
|
||||
|
||||
public static final String CLOUDSTACK_CONTEXT = "META-INF/cloudstack";
|
||||
public static final String CLOUDSTACK_BASE = "bootstrap";
|
||||
|
||||
ModuleBasedContextFactory factory = new ModuleBasedContextFactory();
|
||||
ModuleDefinitionLocator loader = new ClasspathModuleDefinitionLocator();
|
||||
ModuleDefinitionSet moduleDefinitionSet;
|
||||
String baseName;
|
||||
String contextName;
|
||||
|
||||
public CloudStackSpringContext(String context, String base) throws IOException {
|
||||
this.baseName = base;
|
||||
this.contextName = context;
|
||||
|
||||
factory = new ModuleBasedContextFactory();
|
||||
loader = new ClasspathModuleDefinitionLocator();
|
||||
init();
|
||||
}
|
||||
|
||||
public CloudStackSpringContext() throws IOException {
|
||||
this(CLOUDSTACK_CONTEXT, CLOUDSTACK_BASE);
|
||||
}
|
||||
|
||||
public void init() throws IOException {
|
||||
Collection<ModuleDefinition> defs = loader.locateModules(contextName);
|
||||
|
||||
if ( defs.size() == 0 )
|
||||
throw new RuntimeException("No modules found to load for Spring");
|
||||
|
||||
moduleDefinitionSet = factory.loadModules(defs, baseName);
|
||||
}
|
||||
|
||||
public void registerShutdownHook() {
|
||||
ApplicationContext base = moduleDefinitionSet.getApplicationContext(baseName);
|
||||
|
||||
if ( base instanceof ConfigurableApplicationContext ) {
|
||||
((ConfigurableApplicationContext)base).registerShutdownHook();
|
||||
}
|
||||
}
|
||||
|
||||
public ModuleDefinition getModuleDefinitionForWeb(String name) {
|
||||
ModuleDefinition def = moduleDefinitionSet.getModuleDefinition(name);
|
||||
|
||||
if ( def != null ) {
|
||||
return def;
|
||||
}
|
||||
|
||||
/* Grab farthest descendant that is deterministic */
|
||||
def = moduleDefinitionSet.getModuleDefinition(baseName);
|
||||
|
||||
if ( def == null ) {
|
||||
throw new RuntimeException("Failed to find base spring module to extend for web");
|
||||
}
|
||||
|
||||
while ( def.getChildren().size() == 1 ) {
|
||||
def = def.getChildren().iterator().next();
|
||||
}
|
||||
|
||||
return def;
|
||||
}
|
||||
|
||||
public ApplicationContext getApplicationContextForWeb(String name) {
|
||||
ModuleDefinition def = getModuleDefinitionForWeb(name);
|
||||
|
||||
return moduleDefinitionSet.getApplicationContext(def.getName());
|
||||
}
|
||||
|
||||
public String[] getConfigLocationsForWeb(String name, String[] configured) {
|
||||
if ( configured == null )
|
||||
configured = new String[] {};
|
||||
|
||||
ModuleDefinition def = getModuleDefinitionForWeb(name);
|
||||
|
||||
List<Resource> inherited = new ArrayList<Resource>();
|
||||
|
||||
while ( def != null ) {
|
||||
inherited.addAll(def.getInheritableContextLocations());
|
||||
def = moduleDefinitionSet.getModuleDefinition(def.getParentName());
|
||||
}
|
||||
|
||||
List<String> urlList = new ArrayList<String>();
|
||||
|
||||
for ( Resource r : inherited ) {
|
||||
try {
|
||||
String urlString = r.getURL().toExternalForm();
|
||||
urlList.add(urlString);
|
||||
} catch (IOException e) {
|
||||
log.error("Failed to create URL for {}", r.getDescription(), e);
|
||||
}
|
||||
}
|
||||
|
||||
String[] result = new String[urlList.size() + configured.length];
|
||||
result = urlList.toArray(result);
|
||||
|
||||
System.arraycopy(configured, 0, result, urlList.size(), configured.length);
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
/*
|
||||
* 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.spring.module.factory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.cloudstack.spring.module.model.ModuleDefinition;
|
||||
import org.apache.cloudstack.spring.module.model.ModuleDefinitionSet;
|
||||
import org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet;
|
||||
|
||||
public class ModuleBasedContextFactory {
|
||||
|
||||
public ModuleDefinitionSet loadModules(Collection<ModuleDefinition> defs, String root) throws IOException {
|
||||
|
||||
Map<String, ModuleDefinition> modules = wireUpModules(root, defs);
|
||||
|
||||
DefaultModuleDefinitionSet moduleSet = new DefaultModuleDefinitionSet(modules, root);
|
||||
moduleSet.load();
|
||||
|
||||
return moduleSet;
|
||||
}
|
||||
|
||||
protected Map<String, ModuleDefinition> wireUpModules(String root, Collection<ModuleDefinition> defs) throws IOException {
|
||||
Map<String, ModuleDefinition> modules = new HashMap<String, ModuleDefinition>();
|
||||
|
||||
for ( ModuleDefinition def : defs ) {
|
||||
modules.put(def.getName(), def);
|
||||
}
|
||||
|
||||
ModuleDefinition rootDef = null;
|
||||
Map<String, ModuleDefinition> result = new HashMap<String, ModuleDefinition>();
|
||||
|
||||
for ( ModuleDefinition def : modules.values() ) {
|
||||
if ( def.getName().equals(root) ) {
|
||||
rootDef = def;
|
||||
}
|
||||
|
||||
if ( def.getParentName() != null ) {
|
||||
ModuleDefinition parentDef = modules.get(def.getParentName());
|
||||
|
||||
if ( parentDef != null )
|
||||
parentDef.addChild(def);
|
||||
}
|
||||
}
|
||||
|
||||
return traverse(rootDef, result);
|
||||
}
|
||||
|
||||
protected Map<String, ModuleDefinition> traverse(ModuleDefinition base, Map<String, ModuleDefinition> result) {
|
||||
if ( base == null )
|
||||
return result;
|
||||
|
||||
if ( result.containsKey(base.getName()) ) {
|
||||
throw new RuntimeException("Circular dependency to [" + base.getName() + "] from current set " +
|
||||
result.keySet());
|
||||
}
|
||||
|
||||
result.put(base.getName(), base);
|
||||
|
||||
for ( ModuleDefinition childDef : base.getChildren() )
|
||||
traverse(childDef, result);
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -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.spring.module.locator;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.apache.cloudstack.spring.module.model.ModuleDefinition;
|
||||
|
||||
/**
|
||||
* Responsible for locating the ModuleDefinition for a given context. The implementation
|
||||
* of this class should take extra care to set the ClassLoader of the ModuleDefinition
|
||||
* properly.
|
||||
*
|
||||
*/
|
||||
public interface ModuleDefinitionLocator {
|
||||
|
||||
Collection<ModuleDefinition> locateModules(String context) throws IOException;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
* 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.spring.module.locator.impl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.cloudstack.spring.module.locator.ModuleDefinitionLocator;
|
||||
import org.apache.cloudstack.spring.module.model.ModuleDefinition;
|
||||
import org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinition;
|
||||
import org.apache.cloudstack.spring.module.util.ModuleLocationUtils;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
||||
import org.springframework.core.io.support.ResourcePatternResolver;
|
||||
|
||||
public class ClasspathModuleDefinitionLocator implements ModuleDefinitionLocator {
|
||||
|
||||
protected ResourcePatternResolver getResolver() {
|
||||
return new PathMatchingResourcePatternResolver();
|
||||
}
|
||||
|
||||
public Collection<ModuleDefinition> locateModules(String context) throws IOException {
|
||||
ResourcePatternResolver resolver = getResolver();
|
||||
|
||||
Map<String, ModuleDefinition> allModules = discoverModules(context, resolver);
|
||||
|
||||
return allModules.values();
|
||||
}
|
||||
|
||||
protected Map<String, ModuleDefinition> discoverModules(String baseDir, ResourcePatternResolver resolver) throws IOException {
|
||||
Map<String, ModuleDefinition> result = new HashMap<String, ModuleDefinition>();
|
||||
|
||||
for ( Resource r : resolver.getResources(ModuleLocationUtils.getModulesLocation(baseDir)) ) {
|
||||
DefaultModuleDefinition def = new DefaultModuleDefinition(baseDir, r, resolver);
|
||||
def.init();
|
||||
|
||||
if ( def.isValid() )
|
||||
result.put(def.getName(), def);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* 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.spring.module.model;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.core.io.Resource;
|
||||
|
||||
public interface ModuleDefinition {
|
||||
|
||||
ClassLoader getClassLoader();
|
||||
|
||||
String getName();
|
||||
|
||||
String getParentName();
|
||||
|
||||
List<Resource> getConfigLocations();
|
||||
|
||||
List<Resource> getContextLocations();
|
||||
|
||||
List<Resource> getInheritableContextLocations();
|
||||
|
||||
List<Resource> getOverrideContextLocations();
|
||||
|
||||
boolean isValid();
|
||||
|
||||
Collection<ModuleDefinition> getChildren();
|
||||
|
||||
void addChild(ModuleDefinition childDef);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* 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.spring.module.model;
|
||||
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.core.io.Resource;
|
||||
|
||||
public interface ModuleDefinitionSet {
|
||||
|
||||
ModuleDefinition getModuleDefinition(String name);
|
||||
|
||||
ApplicationContext getApplicationContext(String name);
|
||||
|
||||
Resource[] getConfigResources(String name);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,167 @@
|
|||
/*
|
||||
* 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.spring.module.model.impl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import org.apache.cloudstack.spring.module.model.ModuleDefinition;
|
||||
import org.apache.cloudstack.spring.module.util.ModuleLocationUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.support.ResourcePatternResolver;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
public class DefaultModuleDefinition implements ModuleDefinition {
|
||||
|
||||
public static final String NAME = "name";
|
||||
public static final String PARENT = "parent";
|
||||
|
||||
String name;
|
||||
String baseDir;
|
||||
String parent;
|
||||
Resource moduleProperties;
|
||||
ResourcePatternResolver resolver;
|
||||
boolean valid;
|
||||
|
||||
List<Resource> configLocations;
|
||||
List<Resource> contextLocations;
|
||||
List<Resource> inheritableContextLocations;
|
||||
List<Resource> overrideContextLocations;
|
||||
Map<String, ModuleDefinition> children = new TreeMap<String, ModuleDefinition>();
|
||||
|
||||
public DefaultModuleDefinition(String baseDir, Resource moduleProperties, ResourcePatternResolver resolver) {
|
||||
this.baseDir = baseDir;
|
||||
this.resolver = resolver;
|
||||
this.moduleProperties = moduleProperties;
|
||||
}
|
||||
|
||||
public void init() throws IOException {
|
||||
|
||||
if ( ! moduleProperties.exists() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
resolveNameAndParent();
|
||||
|
||||
contextLocations = Arrays.asList(resolver.getResources(ModuleLocationUtils.getContextLocation(baseDir, name)));
|
||||
configLocations = Arrays.asList(resolver.getResources(ModuleLocationUtils.getDefaultsLocation(baseDir, name)));
|
||||
inheritableContextLocations = Arrays.asList(resolver.getResources(ModuleLocationUtils.getInheritableContextLocation(baseDir, name)));
|
||||
overrideContextLocations = Arrays.asList(resolver.getResources(ModuleLocationUtils.getOverrideContextLocation(baseDir, name)));
|
||||
|
||||
valid = true;
|
||||
}
|
||||
|
||||
protected void resolveNameAndParent() throws IOException {
|
||||
InputStream is = null;
|
||||
|
||||
try {
|
||||
is = moduleProperties.getInputStream();
|
||||
Properties props = new Properties();
|
||||
props.load(is);
|
||||
|
||||
name = props.getProperty(NAME);
|
||||
parent = props.getProperty(PARENT);
|
||||
|
||||
if ( ! StringUtils.hasText(name) ) {
|
||||
throw new IOException("Missing name property in [" + location() + "]");
|
||||
}
|
||||
|
||||
if ( ! StringUtils.hasText(parent) ) {
|
||||
parent = null;
|
||||
}
|
||||
|
||||
checkNameMatchesSelf();
|
||||
} finally {
|
||||
IOUtils.closeQuietly(is);
|
||||
}
|
||||
}
|
||||
|
||||
protected void checkNameMatchesSelf() throws IOException {
|
||||
String expectedLocation = ModuleLocationUtils.getModuleLocation(baseDir, name);
|
||||
Resource self = resolver.getResource(expectedLocation);
|
||||
|
||||
if ( ! self.exists() ) {
|
||||
throw new IOException("Resource [" + location() + "] is expected to exist at [" +
|
||||
expectedLocation + "] please ensure the name property is correct");
|
||||
}
|
||||
|
||||
String moduleUrl = moduleProperties.getURL().toExternalForm();
|
||||
String selfUrl = self.getURL().toExternalForm();
|
||||
|
||||
if ( ! moduleUrl.equals(selfUrl) ) {
|
||||
throw new IOException("Resource [" + location() + "] and [" +
|
||||
self.getURL() + "] do not appear to be the same resource, " +
|
||||
"please ensure the name property is correct");
|
||||
}
|
||||
}
|
||||
|
||||
private String location() throws IOException {
|
||||
return moduleProperties.getURL().toString();
|
||||
}
|
||||
|
||||
public void addChild(ModuleDefinition def) {
|
||||
children.put(def.getName(), def);
|
||||
}
|
||||
|
||||
public Collection<ModuleDefinition> getChildren() {
|
||||
return children.values();
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getParentName() {
|
||||
return parent;
|
||||
}
|
||||
|
||||
public List<Resource> getConfigLocations() {
|
||||
return configLocations;
|
||||
}
|
||||
|
||||
public List<Resource> getContextLocations() {
|
||||
return contextLocations;
|
||||
}
|
||||
|
||||
public List<Resource> getInheritableContextLocations() {
|
||||
return inheritableContextLocations;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Resource> getOverrideContextLocations() {
|
||||
return overrideContextLocations;
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return valid;
|
||||
}
|
||||
|
||||
public ClassLoader getClassLoader() {
|
||||
return resolver.getClassLoader();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,243 @@
|
|||
/*
|
||||
* 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.spring.module.model.impl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.EmptyStackException;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.Stack;
|
||||
|
||||
import org.apache.cloudstack.spring.module.context.ResourceApplicationContext;
|
||||
import org.apache.cloudstack.spring.module.model.ModuleDefinition;
|
||||
import org.apache.cloudstack.spring.module.model.ModuleDefinitionSet;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.UrlResource;
|
||||
|
||||
public class DefaultModuleDefinitionSet implements ModuleDefinitionSet {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(DefaultModuleDefinitionSet.class);
|
||||
|
||||
public static final String DEFAULT_CONFIG_RESOURCES = "DefaultConfigResources";
|
||||
public static final String DEFAULT_CONFIG_XML = "defaults-context.xml";
|
||||
|
||||
String root;
|
||||
Map<String, ModuleDefinition> modules;
|
||||
Map<String, ApplicationContext> contexts = new HashMap<String, ApplicationContext>();
|
||||
ApplicationContext rootContext = null;
|
||||
|
||||
public DefaultModuleDefinitionSet(Map<String, ModuleDefinition> modules, String root) {
|
||||
super();
|
||||
this.root = root;
|
||||
this.modules = modules;
|
||||
}
|
||||
|
||||
public void load() throws IOException {
|
||||
if ( ! loadRootContext() )
|
||||
return;
|
||||
|
||||
printHierarchy();
|
||||
loadContexts();
|
||||
startContexts();
|
||||
}
|
||||
|
||||
protected boolean loadRootContext() {
|
||||
ModuleDefinition def = modules.get(root);
|
||||
|
||||
if ( def == null )
|
||||
return false;
|
||||
|
||||
ApplicationContext defaultsContext = getDefaultsContext();
|
||||
|
||||
rootContext = loadContext(def, defaultsContext);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void startContexts() {
|
||||
withModule(new WithModule() {
|
||||
public void with(ModuleDefinition def, Stack<ModuleDefinition> parents) {
|
||||
try {
|
||||
ApplicationContext context = getApplicationContext(def.getName());
|
||||
try {
|
||||
Runnable runnable = context.getBean("moduleStartup", Runnable.class);
|
||||
log.info("Starting module [{}]", def.getName());
|
||||
runnable.run();
|
||||
} catch ( BeansException e ) {
|
||||
// Ignore
|
||||
}
|
||||
} catch ( EmptyStackException e ) {
|
||||
// The root context is already loaded, so ignore the exception
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
protected void loadContexts() {
|
||||
withModule(new WithModule() {
|
||||
public void with(ModuleDefinition def, Stack<ModuleDefinition> parents) {
|
||||
try {
|
||||
ApplicationContext parent = getApplicationContext(parents.peek().getName());
|
||||
loadContext(def, parent);
|
||||
} catch ( EmptyStackException e ) {
|
||||
// The root context is already loaded, so ignore the exception
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
protected ApplicationContext loadContext(ModuleDefinition def, ApplicationContext parent) {
|
||||
ResourceApplicationContext context = new ResourceApplicationContext();
|
||||
context.setApplicationName("/" + def.getName());
|
||||
|
||||
Resource[] resources = getConfigResources(def.getName());
|
||||
context.setConfigResources(resources);
|
||||
context.setParent(parent);
|
||||
context.setClassLoader(def.getClassLoader());
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
if ( log.isInfoEnabled() ) {
|
||||
for ( Resource resource : resources ) {
|
||||
log.info("Loading module context [{}] from {}", def.getName(), resource);
|
||||
}
|
||||
}
|
||||
context.refresh();
|
||||
log.info("Loaded module context [{}] in {} ms", def.getName(), (System.currentTimeMillis() - start));
|
||||
|
||||
contexts.put(def.getName(), context);
|
||||
|
||||
return context;
|
||||
}
|
||||
|
||||
protected boolean shouldLoad(ModuleDefinition def) {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected ApplicationContext getDefaultsContext() {
|
||||
URL config = DefaultModuleDefinitionSet.class.getResource(DEFAULT_CONFIG_XML);
|
||||
|
||||
ResourceApplicationContext context = new ResourceApplicationContext(new UrlResource(config));
|
||||
context.setApplicationName("/defaults");
|
||||
context.refresh();
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
final List<Resource> resources = (List<Resource>) context.getBean(DEFAULT_CONFIG_RESOURCES);
|
||||
|
||||
withModule(new WithModule() {
|
||||
public void with(ModuleDefinition def, Stack<ModuleDefinition> parents) {
|
||||
for ( Resource defaults : def.getConfigLocations() ) {
|
||||
resources.add(defaults);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return context;
|
||||
}
|
||||
|
||||
protected void printHierarchy() {
|
||||
withModule(new WithModule() {
|
||||
public void with(ModuleDefinition def, Stack<ModuleDefinition> parents) {
|
||||
log.info(String.format("Module Hierarchy:%" + ((parents.size() * 2) + 1) + "s%s", "", def.getName()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
protected void withModule(WithModule with) {
|
||||
ModuleDefinition rootDef = modules.get(root);
|
||||
withModule(rootDef, new Stack<ModuleDefinition>(), with);
|
||||
}
|
||||
|
||||
protected void withModule(ModuleDefinition def, Stack<ModuleDefinition> parents, WithModule with) {
|
||||
if ( def == null )
|
||||
return;
|
||||
|
||||
if ( ! shouldLoad(def) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
with.with(def, parents);
|
||||
|
||||
parents.push(def);
|
||||
|
||||
for ( ModuleDefinition child : def.getChildren() ) {
|
||||
withModule(child, parents, with);
|
||||
}
|
||||
|
||||
parents.pop();
|
||||
}
|
||||
|
||||
private static interface WithModule {
|
||||
public void with(ModuleDefinition def, Stack<ModuleDefinition> parents);
|
||||
}
|
||||
|
||||
@Configuration
|
||||
public static class ConfigContext {
|
||||
|
||||
List<Resource> resources;
|
||||
|
||||
public ConfigContext(List<Resource> resources) {
|
||||
super();
|
||||
this.resources = resources;
|
||||
}
|
||||
|
||||
@Bean(name = DEFAULT_CONFIG_RESOURCES)
|
||||
public List<Resource> defaultConfigResources() {
|
||||
return new ArrayList<Resource>();
|
||||
}
|
||||
}
|
||||
|
||||
public ApplicationContext getApplicationContext(String name) {
|
||||
return contexts.get(name);
|
||||
}
|
||||
|
||||
public Resource[] getConfigResources(String name) {
|
||||
Set<Resource> resources = new LinkedHashSet<Resource>();
|
||||
|
||||
ModuleDefinition original = null;
|
||||
ModuleDefinition def = original = modules.get(name);
|
||||
|
||||
if ( def == null )
|
||||
return new Resource[] {};
|
||||
|
||||
resources.addAll(def.getContextLocations());
|
||||
|
||||
while ( def != null ) {
|
||||
resources.addAll(def.getInheritableContextLocations());
|
||||
def = modules.get(def.getParentName());
|
||||
}
|
||||
|
||||
resources.addAll(original.getOverrideContextLocations());
|
||||
|
||||
return resources.toArray(new Resource[resources.size()]);
|
||||
}
|
||||
|
||||
public ModuleDefinition getModuleDefinition(String name) {
|
||||
return modules.get(name);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* 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.spring.module.util;
|
||||
|
||||
import org.apache.cloudstack.spring.module.factory.CloudStackSpringContext;
|
||||
|
||||
public class Main {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
|
||||
public Main() {
|
||||
|
||||
}
|
||||
|
||||
public void start() throws Exception {
|
||||
CloudStackSpringContext context = new CloudStackSpringContext();
|
||||
context.registerShutdownHook();
|
||||
|
||||
if ( Boolean.getBoolean("force.exit") ) {
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
public long getTime() {
|
||||
return System.currentTimeMillis() - start;
|
||||
}
|
||||
|
||||
|
||||
public static void main(String... args) {
|
||||
Main main = new Main();
|
||||
|
||||
try {
|
||||
main.start();
|
||||
System.out.println("STARTUP COMPLETE [" + main.getTime() + "] ms");
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
System.out.println("STARTUP FAILED [" + main.getTime() + "] ms");
|
||||
System.err.println("STARTUP FAILED [" + main.getTime() + "] ms");
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* 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.spring.module.util;
|
||||
|
||||
public class ModuleLocationUtils {
|
||||
|
||||
private static final String ALL_MODULE_PROPERTIES = "classpath*:%s/*/module.properties";
|
||||
private static final String MODULE_PROPERTIES = "classpath:%s/%s/module.properties";
|
||||
private static final String CONTEXT_LOCATION = "classpath*:%s/%s/*context.xml";
|
||||
private static final String INHERTIABLE_CONTEXT_LOCATION = "classpath*:%s/%s/*context-inheritable.xml";
|
||||
private static final String OVERRIDE_CONTEXT_LOCATION = "classpath*:%s/%s/*context-override.xml";
|
||||
private static final String DEFAULTS_LOCATION = "classpath*:%s/%s/*defaults.properties";
|
||||
|
||||
public static String getModulesLocation(String baseDir) {
|
||||
return String.format(ALL_MODULE_PROPERTIES, baseDir);
|
||||
}
|
||||
|
||||
public static String getModuleLocation(String baseDir, String name) {
|
||||
return String.format(MODULE_PROPERTIES, baseDir, name);
|
||||
}
|
||||
|
||||
public static String getContextLocation(String baseDir, String name) {
|
||||
return String.format(CONTEXT_LOCATION, baseDir, name);
|
||||
}
|
||||
|
||||
public static String getInheritableContextLocation(String baseDir, String name) {
|
||||
return String.format(INHERTIABLE_CONTEXT_LOCATION, baseDir, name);
|
||||
}
|
||||
|
||||
public static String getOverrideContextLocation(String baseDir, String name) {
|
||||
return String.format(OVERRIDE_CONTEXT_LOCATION, baseDir, name);
|
||||
}
|
||||
|
||||
public static String getDefaultsLocation(String baseDir, String name) {
|
||||
return String.format(DEFAULTS_LOCATION, baseDir, name);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
* 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.spring.module.web;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.servlet.ServletContextEvent;
|
||||
|
||||
import org.apache.cloudstack.spring.module.factory.CloudStackSpringContext;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.web.context.ConfigurableWebApplicationContext;
|
||||
import org.springframework.web.context.ContextLoaderListener;
|
||||
|
||||
public class CloudStackContextLoaderListener extends ContextLoaderListener {
|
||||
|
||||
public static final String WEB_PARENT_MODULE = "parentModule";
|
||||
public static final String WEB_PARENT_MODULE_DEFAULT = "web";
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(CloudStackContextLoaderListener.class);
|
||||
|
||||
CloudStackSpringContext cloudStackContext;
|
||||
String configuredParentName;
|
||||
|
||||
@Override
|
||||
protected ApplicationContext loadParentContext(ServletContext servletContext) {
|
||||
return cloudStackContext.getApplicationContextForWeb(configuredParentName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void contextInitialized(ServletContextEvent event) {
|
||||
try {
|
||||
cloudStackContext = new CloudStackSpringContext();
|
||||
} catch (IOException e) {
|
||||
log.error("Failed to start CloudStack", e);
|
||||
throw new RuntimeException("Failed to initialize CloudStack Spring modules", e);
|
||||
}
|
||||
|
||||
configuredParentName = event.getServletContext().getInitParameter(WEB_PARENT_MODULE);
|
||||
if ( configuredParentName == null ) {
|
||||
configuredParentName = WEB_PARENT_MODULE_DEFAULT;
|
||||
}
|
||||
|
||||
super.contextInitialized(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void customizeContext(ServletContext servletContext, ConfigurableWebApplicationContext applicationContext) {
|
||||
super.customizeContext(servletContext, applicationContext);
|
||||
|
||||
String[] newLocations = cloudStackContext.getConfigLocationsForWeb(configuredParentName,
|
||||
applicationContext.getConfigLocations());
|
||||
|
||||
applicationContext.setConfigLocations(newLocations);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
|
||||
|
||||
<bean id="DefaultConfigResources" class="java.util.ArrayList" />
|
||||
|
||||
</beans>
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* 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.spring.module.factory;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
public class InitTest {
|
||||
|
||||
public static boolean initted = false;
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
setInitted(true);
|
||||
}
|
||||
|
||||
public boolean isInitted() {
|
||||
return initted;
|
||||
}
|
||||
|
||||
public void setInitted(boolean initted) {
|
||||
InitTest.initted = initted;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
/*
|
||||
* 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.spring.module.factory;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.apache.cloudstack.spring.module.locator.impl.ClasspathModuleDefinitionLocator;
|
||||
import org.apache.cloudstack.spring.module.model.ModuleDefinition;
|
||||
import org.apache.cloudstack.spring.module.model.ModuleDefinitionSet;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
|
||||
public class ModuleBasedContextFactoryTest {
|
||||
|
||||
Collection<ModuleDefinition> defs;
|
||||
|
||||
@Before
|
||||
public void setUp() throws IOException {
|
||||
InstantiationCounter.count = 0;
|
||||
|
||||
ClasspathModuleDefinitionLocator locator = new ClasspathModuleDefinitionLocator();
|
||||
defs = locator.locateModules("testhierarchy");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLoad() throws IOException {
|
||||
|
||||
ModuleBasedContextFactory factory = new ModuleBasedContextFactory();
|
||||
|
||||
ModuleDefinitionSet set = factory.loadModules(defs, "base");
|
||||
|
||||
assertNotNull(set.getApplicationContext("base"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOverride() throws IOException {
|
||||
|
||||
InitTest.initted = false;
|
||||
|
||||
ModuleBasedContextFactory factory = new ModuleBasedContextFactory();
|
||||
|
||||
ModuleDefinitionSet set = factory.loadModules(defs, "base");
|
||||
|
||||
assertTrue(!InitTest.initted);
|
||||
assertEquals("a string", set.getApplicationContext("child1").getBean("override", String.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBeans() throws IOException {
|
||||
ModuleBasedContextFactory factory = new ModuleBasedContextFactory();
|
||||
ModuleDefinitionSet set = factory.loadModules(defs, "base");
|
||||
|
||||
testBeansInContext(set, "base", 1, new String[] { "base" }, new String[] { "child1", "child2", "child1-1" });
|
||||
testBeansInContext(set, "child1", 2, new String[] { "base", "child1" }, new String[] { "child2", "child1-1" });
|
||||
testBeansInContext(set, "child2", 4, new String[] { "base", "child2" }, new String[] { "child1", "child1-1" });
|
||||
testBeansInContext(set, "child1-1", 3, new String[] { "base", "child1", "child1-1" }, new String[] { "child2" });
|
||||
}
|
||||
|
||||
protected void testBeansInContext(ModuleDefinitionSet set, String name, int order, String[] parents, String[] notTheres) {
|
||||
ApplicationContext context = set.getApplicationContext(name);
|
||||
|
||||
String nameBean = context.getBean("name", String.class);
|
||||
assertEquals(name, nameBean);
|
||||
|
||||
for ( String parent : parents ) {
|
||||
String parentBean = context.getBean(parent, String.class);
|
||||
assertEquals(parent, parentBean);
|
||||
}
|
||||
|
||||
for ( String notThere : notTheres ) {
|
||||
try {
|
||||
context.getBean(notThere, String.class);
|
||||
fail();
|
||||
} catch ( NoSuchBeanDefinitionException e ) {
|
||||
}
|
||||
}
|
||||
|
||||
int count = context.getBean("count", InstantiationCounter.class).getCount();
|
||||
|
||||
assertEquals(order, count);
|
||||
}
|
||||
|
||||
public static class InstantiationCounter {
|
||||
public static Integer count = 0;
|
||||
|
||||
int myCount;
|
||||
|
||||
public InstantiationCounter() {
|
||||
synchronized (count) {
|
||||
myCount = count + 1;
|
||||
count = myCount;
|
||||
}
|
||||
}
|
||||
|
||||
public int getCount() {
|
||||
return myCount;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* 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.spring.module.locator.impl;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.apache.cloudstack.spring.module.model.ModuleDefinition;
|
||||
import org.junit.Test;
|
||||
|
||||
public class ClasspathModuleDefinitionSetLocatorTest {
|
||||
|
||||
@Test
|
||||
public void testDiscover() throws IOException {
|
||||
ClasspathModuleDefinitionLocator factory = new ClasspathModuleDefinitionLocator();
|
||||
|
||||
Collection<ModuleDefinition> modules = factory.locateModules("testhierarchy");
|
||||
|
||||
assertEquals(5, modules.size());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,131 @@
|
|||
/*
|
||||
* 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.spring.module.model.impl;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.cloudstack.spring.module.util.ModuleLocationUtils;
|
||||
import org.junit.Test;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
||||
import org.springframework.core.io.support.ResourcePatternResolver;
|
||||
|
||||
public class DefaultModuleDefinitionTest {
|
||||
|
||||
ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
|
||||
|
||||
protected DefaultModuleDefinition createDef(String name) {
|
||||
Resource resource =
|
||||
resolver.getResource(ModuleLocationUtils.getModuleLocation("testfiles", name));
|
||||
|
||||
return new DefaultModuleDefinition("testfiles", resource, resolver);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBlankName() {
|
||||
DefaultModuleDefinition def = createDef("blankname");
|
||||
|
||||
try {
|
||||
def.init();
|
||||
fail();
|
||||
} catch ( IOException e ) {
|
||||
assertTrue(e.getMessage().contains("Missing name property"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMissingName() {
|
||||
DefaultModuleDefinition def = createDef("missingname");
|
||||
|
||||
try {
|
||||
def.init();
|
||||
fail();
|
||||
} catch ( IOException e ) {
|
||||
assertTrue(e.getMessage().contains("Missing name property"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBadName() {
|
||||
DefaultModuleDefinition def = createDef("badname");
|
||||
|
||||
try {
|
||||
def.init();
|
||||
fail();
|
||||
} catch ( IOException e ) {
|
||||
assertTrue(e.getMessage().contains("is expected to exist at"));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGood() throws IOException {
|
||||
DefaultModuleDefinition def = createDef("good");
|
||||
def.init();
|
||||
assertTrue(def.isValid());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWrongName() {
|
||||
DefaultModuleDefinition def = createDef("wrongname");
|
||||
|
||||
try {
|
||||
def.init();
|
||||
fail();
|
||||
} catch ( IOException e ) {
|
||||
assertTrue(e.getMessage().contains("do not appear to be the same resource"));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFiles() throws IOException {
|
||||
DefaultModuleDefinition def = createDef("all");
|
||||
|
||||
def.init();
|
||||
|
||||
assertEquals(2, def.getContextLocations().size());
|
||||
has(def.getContextLocations(), "empty-context.xml", "empty2-context.xml");
|
||||
|
||||
assertEquals(2, def.getConfigLocations().size());
|
||||
has(def.getConfigLocations(), "test2-defaults.properties", "defaults.properties");
|
||||
|
||||
assertEquals(2, def.getInheritableContextLocations().size());
|
||||
has(def.getInheritableContextLocations(), "empty-context-inheritable.xml", "empty2-context-inheritable.xml");
|
||||
}
|
||||
|
||||
protected void has(List<Resource> resources, String... files) throws IOException {
|
||||
int count = 0;
|
||||
|
||||
for ( Resource r : resources ) {
|
||||
for ( String file : files ) {
|
||||
if ( r.getURL().toExternalForm().contains(file) ) {
|
||||
count++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
assertEquals(resources + " does not contain " + Arrays.toString(files), files.length, count);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
# 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.
|
||||
|
||||
blah=1
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
|
||||
|
||||
</beans>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue