mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Merge commit 'df728fcf41ba0dfddabfaadea8cbcb77d18bfa96'
Conflicts: engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
This commit is contained in:
commit
81d01369d7
@ -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>
|
||||||
@ -17,8 +17,9 @@
|
|||||||
package com.cloud.exception;
|
package com.cloud.exception;
|
||||||
|
|
||||||
import com.cloud.utils.SerialVersionUID;
|
import com.cloud.utils.SerialVersionUID;
|
||||||
|
import com.cloud.utils.exception.CloudRuntimeException;
|
||||||
|
|
||||||
public class ConcurrentOperationException extends CloudException {
|
public class ConcurrentOperationException extends CloudRuntimeException {
|
||||||
|
|
||||||
private static final long serialVersionUID = SerialVersionUID.ConcurrentOperationException;
|
private static final long serialVersionUID = SerialVersionUID.ConcurrentOperationException;
|
||||||
|
|
||||||
|
|||||||
@ -57,7 +57,7 @@ public class CallContext {
|
|||||||
private User user;
|
private User user;
|
||||||
private final Map<Object, Object> context = new HashMap<Object, Object>();
|
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) {
|
public static void init(EntityManager entityMgr) {
|
||||||
s_entityMgr = entityMgr;
|
s_entityMgr = entityMgr;
|
||||||
|
|||||||
@ -26,7 +26,7 @@ import com.cloud.bridge.model.BucketPolicyVO;
|
|||||||
import com.cloud.utils.db.GenericDaoBase;
|
import com.cloud.utils.db.GenericDaoBase;
|
||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Local(value={BucketPolicyDao.class})
|
@Local(value={BucketPolicyDao.class})
|
||||||
@ -42,7 +42,7 @@ public class BucketPolicyDaoImpl extends GenericDaoBase<BucketPolicyVO, Long> im
|
|||||||
public BucketPolicyVO getByName( String bucketName ) {
|
public BucketPolicyVO getByName( String bucketName ) {
|
||||||
SearchBuilder <BucketPolicyVO> searchByBucket = createSearchBuilder();
|
SearchBuilder <BucketPolicyVO> searchByBucket = createSearchBuilder();
|
||||||
searchByBucket.and("BucketName", searchByBucket.entity().getBucketName(), SearchCriteria.Op.EQ);
|
searchByBucket.and("BucketName", searchByBucket.entity().getBucketName(), SearchCriteria.Op.EQ);
|
||||||
Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<BucketPolicyVO> sc = searchByBucket.create();
|
SearchCriteria<BucketPolicyVO> sc = searchByBucket.create();
|
||||||
@ -59,7 +59,7 @@ public class BucketPolicyDaoImpl extends GenericDaoBase<BucketPolicyVO, Long> im
|
|||||||
public void deletePolicy( String bucketName ) {
|
public void deletePolicy( String bucketName ) {
|
||||||
SearchBuilder <BucketPolicyVO> deleteByBucket = createSearchBuilder();
|
SearchBuilder <BucketPolicyVO> deleteByBucket = createSearchBuilder();
|
||||||
deleteByBucket.and("BucketName", deleteByBucket.entity().getBucketName(), SearchCriteria.Op.EQ);
|
deleteByBucket.and("BucketName", deleteByBucket.entity().getBucketName(), SearchCriteria.Op.EQ);
|
||||||
Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<BucketPolicyVO> sc = deleteByBucket.create();
|
SearchCriteria<BucketPolicyVO> sc = deleteByBucket.create();
|
||||||
|
|||||||
@ -25,6 +25,7 @@ import com.cloud.utils.db.GenericDaoBase;
|
|||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.Transaction;
|
||||||
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Local(value={CloudStackAccountDao.class})
|
@Local(value={CloudStackAccountDao.class})
|
||||||
@ -34,7 +35,7 @@ public class CloudStackAccountDaoImpl extends GenericDaoBase<CloudStackAccountVO
|
|||||||
public String getDefaultZoneId(String accountId) {
|
public String getDefaultZoneId(String accountId) {
|
||||||
|
|
||||||
SearchBuilder<CloudStackAccountVO> SearchByUUID = createSearchBuilder();
|
SearchBuilder<CloudStackAccountVO> SearchByUUID = createSearchBuilder();
|
||||||
Transaction txn = Transaction.open(Transaction.CLOUD_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchByUUID.and("uuid", SearchByUUID.entity().getUuid(),
|
SearchByUUID.and("uuid", SearchByUUID.entity().getUuid(),
|
||||||
|
|||||||
@ -27,6 +27,7 @@ import com.cloud.utils.db.GenericDaoBase;
|
|||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.Transaction;
|
||||||
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Local(value={CloudStackConfigurationDao.class})
|
@Local(value={CloudStackConfigurationDao.class})
|
||||||
@ -42,7 +43,7 @@ public class CloudStackConfigurationDaoImpl extends GenericDaoBase<CloudStackCon
|
|||||||
@DB
|
@DB
|
||||||
public String getConfigValue(String name) {
|
public String getConfigValue(String name) {
|
||||||
NameSearch.and("name", NameSearch.entity().getName(), SearchCriteria.Op.EQ);
|
NameSearch.and("name", NameSearch.entity().getName(), SearchCriteria.Op.EQ);
|
||||||
Transaction txn = Transaction.open("cloud", Transaction.CLOUD_DB, true);
|
TransactionLegacy txn = TransactionLegacy.open("cloud", TransactionLegacy.CLOUD_DB, true);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<CloudStackConfigurationVO> sc = NameSearch.create();
|
SearchCriteria<CloudStackConfigurationVO> sc = NameSearch.create();
|
||||||
|
|||||||
@ -29,6 +29,7 @@ import com.cloud.utils.db.GenericDaoBase;
|
|||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.Transaction;
|
||||||
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Local(value={CloudStackSvcOfferingDao.class})
|
@Local(value={CloudStackSvcOfferingDao.class})
|
||||||
@ -42,7 +43,7 @@ public class CloudStackSvcOfferingDaoImpl extends GenericDaoBase<CloudStackServi
|
|||||||
SearchBuilder <CloudStackServiceOfferingVO> searchByName = createSearchBuilder();
|
SearchBuilder <CloudStackServiceOfferingVO> searchByName = createSearchBuilder();
|
||||||
searchByName.and("name", searchByName.entity().getName(), SearchCriteria.Op.EQ);
|
searchByName.and("name", searchByName.entity().getName(), SearchCriteria.Op.EQ);
|
||||||
searchByName.done();
|
searchByName.done();
|
||||||
Transaction txn = Transaction.open(Transaction.CLOUD_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<CloudStackServiceOfferingVO> sc = searchByName.create();
|
SearchCriteria<CloudStackServiceOfferingVO> sc = searchByName.create();
|
||||||
@ -61,7 +62,7 @@ public class CloudStackSvcOfferingDaoImpl extends GenericDaoBase<CloudStackServi
|
|||||||
SearchBuilder <CloudStackServiceOfferingVO> searchByID = createSearchBuilder();
|
SearchBuilder <CloudStackServiceOfferingVO> searchByID = createSearchBuilder();
|
||||||
searchByID.and("uuid", searchByID.entity().getUuid(), SearchCriteria.Op.EQ);
|
searchByID.and("uuid", searchByID.entity().getUuid(), SearchCriteria.Op.EQ);
|
||||||
searchByID.done();
|
searchByID.done();
|
||||||
Transaction txn = Transaction.open(Transaction.CLOUD_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<CloudStackServiceOfferingVO> sc = searchByID.create();
|
SearchCriteria<CloudStackServiceOfferingVO> sc = searchByID.create();
|
||||||
|
|||||||
@ -26,6 +26,7 @@ import com.cloud.utils.db.GenericDaoBase;
|
|||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.Transaction;
|
||||||
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
import com.cloud.utils.crypt.DBEncryptionUtil;
|
import com.cloud.utils.crypt.DBEncryptionUtil;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@ -43,7 +44,7 @@ public class CloudStackUserDaoImpl extends GenericDaoBase<CloudStackUserVO, Stri
|
|||||||
SearchBuilder <CloudStackUserVO> searchByAccessKey = createSearchBuilder();
|
SearchBuilder <CloudStackUserVO> searchByAccessKey = createSearchBuilder();
|
||||||
searchByAccessKey.and("apiKey", searchByAccessKey.entity().getApiKey(), SearchCriteria.Op.EQ);
|
searchByAccessKey.and("apiKey", searchByAccessKey.entity().getApiKey(), SearchCriteria.Op.EQ);
|
||||||
searchByAccessKey.done();
|
searchByAccessKey.done();
|
||||||
Transaction txn = Transaction.open(Transaction.CLOUD_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<CloudStackUserVO> sc = searchByAccessKey.create();
|
SearchCriteria<CloudStackUserVO> sc = searchByAccessKey.create();
|
||||||
|
|||||||
@ -25,6 +25,7 @@ import com.cloud.utils.db.GenericDaoBase;
|
|||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.Transaction;
|
||||||
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Local(value={MHostDao.class})
|
@Local(value={MHostDao.class})
|
||||||
@ -38,7 +39,7 @@ public class MHostDaoImpl extends GenericDaoBase<MHostVO, Long> implements MHost
|
|||||||
@Override
|
@Override
|
||||||
public MHostVO getByHostKey(String hostKey) {
|
public MHostVO getByHostKey(String hostKey) {
|
||||||
NameSearch.and("MHostKey", NameSearch.entity().getHostKey(), SearchCriteria.Op.EQ);
|
NameSearch.and("MHostKey", NameSearch.entity().getHostKey(), SearchCriteria.Op.EQ);
|
||||||
Transaction txn = Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
|
TransactionLegacy txn = TransactionLegacy.open("cloudbridge", TransactionLegacy.AWSAPI_DB, true);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<MHostVO> sc = NameSearch.create();
|
SearchCriteria<MHostVO> sc = NameSearch.create();
|
||||||
@ -52,7 +53,7 @@ public class MHostDaoImpl extends GenericDaoBase<MHostVO, Long> implements MHost
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateHeartBeat(MHostVO mhost) {
|
public void updateHeartBeat(MHostVO mhost) {
|
||||||
Transaction txn = Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
|
TransactionLegacy txn = TransactionLegacy.open("cloudbridge", TransactionLegacy.AWSAPI_DB, true);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
update(mhost.getId(), mhost);
|
update(mhost.getId(), mhost);
|
||||||
|
|||||||
@ -25,6 +25,7 @@ import com.cloud.utils.db.GenericDaoBase;
|
|||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.Transaction;
|
||||||
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Local(value={MHostMountDao.class})
|
@Local(value={MHostMountDao.class})
|
||||||
@ -37,7 +38,7 @@ public class MHostMountDaoImpl extends GenericDaoBase<MHostMountVO, Long> implem
|
|||||||
public MHostMountVO getHostMount(long mHostId, long sHostId) {
|
public MHostMountVO getHostMount(long mHostId, long sHostId) {
|
||||||
SearchByMHostID.and("MHostID", SearchByMHostID.entity().getmHostID(), SearchCriteria.Op.EQ);
|
SearchByMHostID.and("MHostID", SearchByMHostID.entity().getmHostID(), SearchCriteria.Op.EQ);
|
||||||
SearchByMHostID.and("SHostID", SearchByMHostID.entity().getsHostID(), SearchCriteria.Op.EQ);
|
SearchByMHostID.and("SHostID", SearchByMHostID.entity().getsHostID(), SearchCriteria.Op.EQ);
|
||||||
Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<MHostMountVO> sc = SearchByMHostID.create();
|
SearchCriteria<MHostMountVO> sc = SearchByMHostID.create();
|
||||||
|
|||||||
@ -28,6 +28,7 @@ import com.cloud.utils.db.GenericDaoBase;
|
|||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.Transaction;
|
||||||
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Local(value={MultiPartPartsDao.class})
|
@Local(value={MultiPartPartsDao.class})
|
||||||
@ -42,7 +43,7 @@ public class MultiPartPartsDaoImpl extends GenericDaoBase<MultiPartPartsVO, Long
|
|||||||
ByUploadID.and("partNumber", ByUploadID.entity().getPartNumber(), SearchCriteria.Op.LT);
|
ByUploadID.and("partNumber", ByUploadID.entity().getPartNumber(), SearchCriteria.Op.LT);
|
||||||
Filter filter = new Filter(MultiPartPartsVO.class, "partNumber", Boolean.TRUE, null, null);
|
Filter filter = new Filter(MultiPartPartsVO.class, "partNumber", Boolean.TRUE, null, null);
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn(); // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
|
TransactionLegacy txn = TransactionLegacy.currentTxn(); // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<MultiPartPartsVO> sc = ByUploadID.create();
|
SearchCriteria<MultiPartPartsVO> sc = ByUploadID.create();
|
||||||
@ -61,7 +62,7 @@ public class MultiPartPartsDaoImpl extends GenericDaoBase<MultiPartPartsVO, Long
|
|||||||
SearchBuilder<MultiPartPartsVO> byUploadID = createSearchBuilder();
|
SearchBuilder<MultiPartPartsVO> byUploadID = createSearchBuilder();
|
||||||
byUploadID.and("UploadID", byUploadID.entity().getUploadid(), SearchCriteria.Op.EQ);
|
byUploadID.and("UploadID", byUploadID.entity().getUploadid(), SearchCriteria.Op.EQ);
|
||||||
byUploadID.and("partNumber", byUploadID.entity().getPartNumber(), SearchCriteria.Op.GT);
|
byUploadID.and("partNumber", byUploadID.entity().getPartNumber(), SearchCriteria.Op.GT);
|
||||||
Transaction txn = Transaction.currentTxn(); // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
|
TransactionLegacy txn = TransactionLegacy.currentTxn(); // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<MultiPartPartsVO> sc = byUploadID.create();
|
SearchCriteria<MultiPartPartsVO> sc = byUploadID.create();
|
||||||
@ -82,7 +83,7 @@ public class MultiPartPartsDaoImpl extends GenericDaoBase<MultiPartPartsVO, Long
|
|||||||
SearchBuilder<MultiPartPartsVO> byUploadID = createSearchBuilder();
|
SearchBuilder<MultiPartPartsVO> byUploadID = createSearchBuilder();
|
||||||
byUploadID.and("UploadID", byUploadID.entity().getUploadid(), SearchCriteria.Op.EQ);
|
byUploadID.and("UploadID", byUploadID.entity().getUploadid(), SearchCriteria.Op.EQ);
|
||||||
byUploadID.and("partNumber", byUploadID.entity().getPartNumber(), SearchCriteria.Op.EQ);
|
byUploadID.and("partNumber", byUploadID.entity().getPartNumber(), SearchCriteria.Op.EQ);
|
||||||
Transaction txn = Transaction.currentTxn(); // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
|
TransactionLegacy txn = TransactionLegacy.currentTxn(); // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<MultiPartPartsVO> sc = byUploadID.create();
|
SearchCriteria<MultiPartPartsVO> sc = byUploadID.create();
|
||||||
@ -102,7 +103,7 @@ public class MultiPartPartsDaoImpl extends GenericDaoBase<MultiPartPartsVO, Long
|
|||||||
SearchBuilder<MultiPartPartsVO> byUploadID = createSearchBuilder();
|
SearchBuilder<MultiPartPartsVO> byUploadID = createSearchBuilder();
|
||||||
byUploadID.and("UploadID", byUploadID.entity().getUploadid(), SearchCriteria.Op.EQ);
|
byUploadID.and("UploadID", byUploadID.entity().getUploadid(), SearchCriteria.Op.EQ);
|
||||||
byUploadID.and("partNumber", byUploadID.entity().getPartNumber(), SearchCriteria.Op.EQ);
|
byUploadID.and("partNumber", byUploadID.entity().getPartNumber(), SearchCriteria.Op.EQ);
|
||||||
Transaction txn = Transaction.currentTxn(); // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
|
TransactionLegacy txn = TransactionLegacy.currentTxn(); // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<MultiPartPartsVO> sc = byUploadID.create();
|
SearchCriteria<MultiPartPartsVO> sc = byUploadID.create();
|
||||||
|
|||||||
@ -33,6 +33,7 @@ import com.cloud.utils.db.GenericDaoBase;
|
|||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.Transaction;
|
||||||
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Local(value={MultiPartUploadsDao.class})
|
@Local(value={MultiPartUploadsDao.class})
|
||||||
@ -42,9 +43,9 @@ public class MultiPartUploadsDaoImpl extends GenericDaoBase<MultiPartUploadsVO,
|
|||||||
public OrderedPair<String,String> multipartExits( int uploadId ) {
|
public OrderedPair<String,String> multipartExits( int uploadId ) {
|
||||||
MultiPartUploadsVO uploadvo = null;
|
MultiPartUploadsVO uploadvo = null;
|
||||||
|
|
||||||
Transaction txn = null;
|
TransactionLegacy txn = null;
|
||||||
try {
|
try {
|
||||||
txn = Transaction.open(Transaction.AWSAPI_DB);
|
txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
uploadvo = findById(new Long(uploadId));
|
uploadvo = findById(new Long(uploadId));
|
||||||
if (null != uploadvo)
|
if (null != uploadvo)
|
||||||
return new OrderedPair<String,String>(uploadvo.getAccessKey(), uploadvo.getNameKey());
|
return new OrderedPair<String,String>(uploadvo.getAccessKey(), uploadvo.getNameKey());
|
||||||
@ -58,9 +59,9 @@ public class MultiPartUploadsDaoImpl extends GenericDaoBase<MultiPartUploadsVO,
|
|||||||
@Override
|
@Override
|
||||||
public void deleteUpload(int uploadId) {
|
public void deleteUpload(int uploadId) {
|
||||||
|
|
||||||
Transaction txn = null;
|
TransactionLegacy txn = null;
|
||||||
try {
|
try {
|
||||||
txn = Transaction.open(Transaction.AWSAPI_DB);
|
txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
remove(new Long(uploadId));
|
remove(new Long(uploadId));
|
||||||
txn.commit();
|
txn.commit();
|
||||||
}finally {
|
}finally {
|
||||||
@ -70,10 +71,10 @@ public class MultiPartUploadsDaoImpl extends GenericDaoBase<MultiPartUploadsVO,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getAtrributeValue(String attribute, int uploadid) {
|
public String getAtrributeValue(String attribute, int uploadid) {
|
||||||
Transaction txn = null;
|
TransactionLegacy txn = null;
|
||||||
MultiPartUploadsVO uploadvo = null;
|
MultiPartUploadsVO uploadvo = null;
|
||||||
try {
|
try {
|
||||||
txn = Transaction.open(Transaction.AWSAPI_DB);
|
txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
uploadvo = findById(new Long(uploadid));
|
uploadvo = findById(new Long(uploadid));
|
||||||
if (null != uploadvo) {
|
if (null != uploadvo) {
|
||||||
if ( attribute.equalsIgnoreCase("AccessKey") )
|
if ( attribute.equalsIgnoreCase("AccessKey") )
|
||||||
@ -105,7 +106,7 @@ public class MultiPartUploadsDaoImpl extends GenericDaoBase<MultiPartUploadsVO,
|
|||||||
Filter filter = new Filter(MultiPartUploadsVO.class, "nameKey", Boolean.TRUE, null, null);
|
Filter filter = new Filter(MultiPartUploadsVO.class, "nameKey", Boolean.TRUE, null, null);
|
||||||
filter.addOrderBy(MultiPartUploadsVO.class, "createTime", Boolean.TRUE);
|
filter.addOrderBy(MultiPartUploadsVO.class, "createTime", Boolean.TRUE);
|
||||||
|
|
||||||
Transaction txn = Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
|
TransactionLegacy txn = TransactionLegacy.open("cloudbridge", TransactionLegacy.AWSAPI_DB, true);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<MultiPartUploadsVO> sc = byBucket.create();
|
SearchCriteria<MultiPartUploadsVO> sc = byBucket.create();
|
||||||
|
|||||||
@ -34,6 +34,7 @@ import com.cloud.bridge.service.core.s3.S3MultipartPart;
|
|||||||
import com.cloud.bridge.service.core.s3.S3MultipartUpload;
|
import com.cloud.bridge.service.core.s3.S3MultipartUpload;
|
||||||
import com.cloud.bridge.util.OrderedPair;
|
import com.cloud.bridge.util.OrderedPair;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.Transaction;
|
||||||
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
public class MultipartLoadDao {
|
public class MultipartLoadDao {
|
||||||
public static final Logger logger = Logger.getLogger(MultipartLoadDao.class);
|
public static final Logger logger = Logger.getLogger(MultipartLoadDao.class);
|
||||||
@ -94,9 +95,9 @@ public class MultipartLoadDao {
|
|||||||
*/
|
*/
|
||||||
public int initiateUpload( String accessKey, String bucketName, String key, String cannedAccess, S3MetaDataEntry[] meta ) {
|
public int initiateUpload( String accessKey, String bucketName, String key, String cannedAccess, S3MetaDataEntry[] meta ) {
|
||||||
int uploadId = -1;
|
int uploadId = -1;
|
||||||
Transaction txn = null;
|
TransactionLegacy txn = null;
|
||||||
try {
|
try {
|
||||||
txn = Transaction.open(Transaction.AWSAPI_DB);
|
txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
Date tod = new Date();
|
Date tod = new Date();
|
||||||
MultiPartUploadsVO uploadVO = new MultiPartUploadsVO(accessKey,
|
MultiPartUploadsVO uploadVO = new MultiPartUploadsVO(accessKey,
|
||||||
bucketName, key, cannedAccess, tod);
|
bucketName, key, cannedAccess, tod);
|
||||||
@ -315,9 +316,9 @@ public class MultipartLoadDao {
|
|||||||
private void saveMultipartMeta( int uploadId, S3MetaDataEntry[] meta ) {
|
private void saveMultipartMeta( int uploadId, S3MetaDataEntry[] meta ) {
|
||||||
if (null == meta) return;
|
if (null == meta) return;
|
||||||
|
|
||||||
Transaction txn = null;
|
TransactionLegacy txn = null;
|
||||||
try {
|
try {
|
||||||
txn = Transaction.open(Transaction.AWSAPI_DB);
|
txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
for( int i=0; i < meta.length; i++ )
|
for( int i=0; i < meta.length; i++ )
|
||||||
{
|
{
|
||||||
S3MetaDataEntry entry = meta[i];
|
S3MetaDataEntry entry = meta[i];
|
||||||
|
|||||||
@ -27,6 +27,7 @@ import com.cloud.utils.db.GenericDaoBase;
|
|||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.Transaction;
|
||||||
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Local(value={MultipartMetaDao.class})
|
@Local(value={MultipartMetaDao.class})
|
||||||
@ -37,7 +38,7 @@ public class MultipartMetaDaoImpl extends GenericDaoBase<MultipartMetaVO, Long>
|
|||||||
SearchBuilder <MultipartMetaVO> searchByUID = createSearchBuilder();
|
SearchBuilder <MultipartMetaVO> searchByUID = createSearchBuilder();
|
||||||
searchByUID.and("UploadID", searchByUID.entity().getUploadID(), SearchCriteria.Op.EQ);
|
searchByUID.and("UploadID", searchByUID.entity().getUploadID(), SearchCriteria.Op.EQ);
|
||||||
searchByUID.done();
|
searchByUID.done();
|
||||||
Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<MultipartMetaVO> sc = searchByUID.create();
|
SearchCriteria<MultipartMetaVO> sc = searchByUID.create();
|
||||||
|
|||||||
@ -29,6 +29,7 @@ import com.cloud.utils.db.GenericDaoBase;
|
|||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.Transaction;
|
||||||
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Local(value={OfferingDao.class})
|
@Local(value={OfferingDao.class})
|
||||||
@ -39,7 +40,7 @@ public class OfferingDaoImpl extends GenericDaoBase<OfferingBundleVO, Long> impl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getOfferingCount() {
|
public int getOfferingCount() {
|
||||||
Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
return listAll().size();
|
return listAll().size();
|
||||||
@ -56,7 +57,7 @@ public class OfferingDaoImpl extends GenericDaoBase<OfferingBundleVO, Long> impl
|
|||||||
SearchBuilder <OfferingBundleVO> searchByAmazon = createSearchBuilder();
|
SearchBuilder <OfferingBundleVO> searchByAmazon = createSearchBuilder();
|
||||||
searchByAmazon.and("AmazonEC2Offering", searchByAmazon.entity().getAmazonOffering() , SearchCriteria.Op.EQ);
|
searchByAmazon.and("AmazonEC2Offering", searchByAmazon.entity().getAmazonOffering() , SearchCriteria.Op.EQ);
|
||||||
searchByAmazon.done();
|
searchByAmazon.done();
|
||||||
Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<OfferingBundleVO> sc = searchByAmazon.create();
|
SearchCriteria<OfferingBundleVO> sc = searchByAmazon.create();
|
||||||
@ -74,7 +75,7 @@ public class OfferingDaoImpl extends GenericDaoBase<OfferingBundleVO, Long> impl
|
|||||||
SearchBuilder <OfferingBundleVO> searchByAmazon = createSearchBuilder();
|
SearchBuilder <OfferingBundleVO> searchByAmazon = createSearchBuilder();
|
||||||
searchByAmazon.and("CloudStackOffering", searchByAmazon.entity().getAmazonOffering() , SearchCriteria.Op.EQ);
|
searchByAmazon.and("CloudStackOffering", searchByAmazon.entity().getAmazonOffering() , SearchCriteria.Op.EQ);
|
||||||
searchByAmazon.done();
|
searchByAmazon.done();
|
||||||
Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<OfferingBundleVO> sc = searchByAmazon.create();
|
SearchCriteria<OfferingBundleVO> sc = searchByAmazon.create();
|
||||||
@ -93,7 +94,7 @@ public class OfferingDaoImpl extends GenericDaoBase<OfferingBundleVO, Long> impl
|
|||||||
searchByAmazon.and("CloudStackOffering", searchByAmazon.entity().getAmazonOffering() , SearchCriteria.Op.EQ);
|
searchByAmazon.and("CloudStackOffering", searchByAmazon.entity().getAmazonOffering() , SearchCriteria.Op.EQ);
|
||||||
searchByAmazon.and("AmazonEC2Offering", searchByAmazon.entity().getCloudstackOffering() , SearchCriteria.Op.EQ);
|
searchByAmazon.and("AmazonEC2Offering", searchByAmazon.entity().getCloudstackOffering() , SearchCriteria.Op.EQ);
|
||||||
searchByAmazon.done();
|
searchByAmazon.done();
|
||||||
Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
OfferingBundleVO offering = null;
|
OfferingBundleVO offering = null;
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
@ -122,7 +123,7 @@ public class OfferingDaoImpl extends GenericDaoBase<OfferingBundleVO, Long> impl
|
|||||||
SearchBuilder <OfferingBundleVO> searchByAmazon = createSearchBuilder();
|
SearchBuilder <OfferingBundleVO> searchByAmazon = createSearchBuilder();
|
||||||
searchByAmazon.and("AmazonEC2Offering", searchByAmazon.entity().getAmazonOffering() , SearchCriteria.Op.EQ);
|
searchByAmazon.and("AmazonEC2Offering", searchByAmazon.entity().getAmazonOffering() , SearchCriteria.Op.EQ);
|
||||||
searchByAmazon.done();
|
searchByAmazon.done();
|
||||||
Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<OfferingBundleVO> sc = searchByAmazon.create();
|
SearchCriteria<OfferingBundleVO> sc = searchByAmazon.create();
|
||||||
|
|||||||
@ -32,6 +32,7 @@ import com.cloud.utils.db.GenericDaoBase;
|
|||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.Transaction;
|
||||||
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Local(value={SAclDao.class})
|
@Local(value={SAclDao.class})
|
||||||
@ -46,7 +47,7 @@ public class SAclDaoImpl extends GenericDaoBase<SAclVO, Long> implements SAclDao
|
|||||||
SearchByTarget.and("TargetID", SearchByTarget.entity().getTargetId(), SearchCriteria.Op.EQ);
|
SearchByTarget.and("TargetID", SearchByTarget.entity().getTargetId(), SearchCriteria.Op.EQ);
|
||||||
SearchByTarget.done();
|
SearchByTarget.done();
|
||||||
Filter filter = new Filter(SAclVO.class, "grantOrder", Boolean.TRUE, null, null);
|
Filter filter = new Filter(SAclVO.class, "grantOrder", Boolean.TRUE, null, null);
|
||||||
Transaction txn = Transaction.open( Transaction.AWSAPI_DB);
|
TransactionLegacy txn = TransactionLegacy.open( TransactionLegacy.AWSAPI_DB);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<SAclVO> sc = SearchByTarget.create();
|
SearchCriteria<SAclVO> sc = SearchByTarget.create();
|
||||||
@ -66,7 +67,7 @@ public class SAclDaoImpl extends GenericDaoBase<SAclVO, Long> implements SAclDao
|
|||||||
SearchByAcl.and("TargetID", SearchByAcl.entity().getTargetId(), SearchCriteria.Op.EQ);
|
SearchByAcl.and("TargetID", SearchByAcl.entity().getTargetId(), SearchCriteria.Op.EQ);
|
||||||
SearchByAcl.and("GranteeCanonicalID", SearchByAcl.entity().getGranteeCanonicalId(), SearchCriteria.Op.EQ);
|
SearchByAcl.and("GranteeCanonicalID", SearchByAcl.entity().getGranteeCanonicalId(), SearchCriteria.Op.EQ);
|
||||||
Filter filter = new Filter(SAclVO.class, "grantOrder", Boolean.TRUE, null, null);
|
Filter filter = new Filter(SAclVO.class, "grantOrder", Boolean.TRUE, null, null);
|
||||||
Transaction txn = Transaction.open( Transaction.AWSAPI_DB);
|
TransactionLegacy txn = TransactionLegacy.open( TransactionLegacy.AWSAPI_DB);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<SAclVO> sc = SearchByAcl.create();
|
SearchCriteria<SAclVO> sc = SearchByAcl.create();
|
||||||
@ -85,7 +86,7 @@ public class SAclDaoImpl extends GenericDaoBase<SAclVO, Long> implements SAclDao
|
|||||||
SearchByTarget.and("Target", SearchByTarget.entity().getTarget(), SearchCriteria.Op.EQ);
|
SearchByTarget.and("Target", SearchByTarget.entity().getTarget(), SearchCriteria.Op.EQ);
|
||||||
SearchByTarget.and("TargetID", SearchByTarget.entity().getTargetId(), SearchCriteria.Op.EQ);
|
SearchByTarget.and("TargetID", SearchByTarget.entity().getTargetId(), SearchCriteria.Op.EQ);
|
||||||
|
|
||||||
Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<SAclVO> sc = SearchByTarget.create();
|
SearchCriteria<SAclVO> sc = SearchByTarget.create();
|
||||||
|
|||||||
@ -29,6 +29,7 @@ import com.cloud.utils.db.GenericDaoBase;
|
|||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.Transaction;
|
||||||
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Local(value={SBucketDao.class})
|
@Local(value={SBucketDao.class})
|
||||||
@ -42,7 +43,7 @@ public class SBucketDaoImpl extends GenericDaoBase<SBucketVO, Long> implements S
|
|||||||
SearchBuilder<SBucketVO> SearchByName = createSearchBuilder();
|
SearchBuilder<SBucketVO> SearchByName = createSearchBuilder();
|
||||||
SearchByName.and("Name", SearchByName.entity().getName(), SearchCriteria.Op.EQ);
|
SearchByName.and("Name", SearchByName.entity().getName(), SearchCriteria.Op.EQ);
|
||||||
//Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
|
//Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
|
||||||
Transaction txn = Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
|
TransactionLegacy txn = TransactionLegacy.open("cloudbridge", TransactionLegacy.AWSAPI_DB, true);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<SBucketVO> sc = SearchByName.create();
|
SearchCriteria<SBucketVO> sc = SearchByName.create();
|
||||||
@ -59,7 +60,7 @@ public class SBucketDaoImpl extends GenericDaoBase<SBucketVO, Long> implements S
|
|||||||
SearchBuilder<SBucketVO> ByCanonicalID = createSearchBuilder();
|
SearchBuilder<SBucketVO> ByCanonicalID = createSearchBuilder();
|
||||||
ByCanonicalID.and("OwnerCanonicalID", ByCanonicalID.entity().getOwnerCanonicalId(), SearchCriteria.Op.EQ);
|
ByCanonicalID.and("OwnerCanonicalID", ByCanonicalID.entity().getOwnerCanonicalId(), SearchCriteria.Op.EQ);
|
||||||
Filter filter = new Filter(SBucketVO.class, "createTime", Boolean.TRUE, null, null);
|
Filter filter = new Filter(SBucketVO.class, "createTime", Boolean.TRUE, null, null);
|
||||||
Transaction txn = Transaction.currentTxn(); // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
|
TransactionLegacy txn = TransactionLegacy.currentTxn(); // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<SBucketVO> sc = ByCanonicalID.create();
|
SearchCriteria<SBucketVO> sc = ByCanonicalID.create();
|
||||||
|
|||||||
@ -25,6 +25,7 @@ import com.cloud.utils.db.GenericDaoBase;
|
|||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.Transaction;
|
||||||
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Local(value={SHostDao.class})
|
@Local(value={SHostDao.class})
|
||||||
@ -36,7 +37,7 @@ public class SHostDaoImpl extends GenericDaoBase<SHostVO, Long> implements SHost
|
|||||||
SearchBuilder <SHostVO> HostSearch = createSearchBuilder();
|
SearchBuilder <SHostVO> HostSearch = createSearchBuilder();
|
||||||
HostSearch.and("Host", HostSearch.entity().getHost(), SearchCriteria.Op.EQ);
|
HostSearch.and("Host", HostSearch.entity().getHost(), SearchCriteria.Op.EQ);
|
||||||
HostSearch.done();
|
HostSearch.done();
|
||||||
Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<SHostVO> sc = HostSearch.create();
|
SearchCriteria<SHostVO> sc = HostSearch.create();
|
||||||
@ -55,7 +56,7 @@ public class SHostDaoImpl extends GenericDaoBase<SHostVO, Long> implements SHost
|
|||||||
LocalStorageHostSearch.and("MHostID", LocalStorageHostSearch.entity().getMhostid(), SearchCriteria.Op.EQ);
|
LocalStorageHostSearch.and("MHostID", LocalStorageHostSearch.entity().getMhostid(), SearchCriteria.Op.EQ);
|
||||||
LocalStorageHostSearch.and("ExportRoot", LocalStorageHostSearch.entity().getExportRoot(), SearchCriteria.Op.EQ);
|
LocalStorageHostSearch.and("ExportRoot", LocalStorageHostSearch.entity().getExportRoot(), SearchCriteria.Op.EQ);
|
||||||
LocalStorageHostSearch.done();
|
LocalStorageHostSearch.done();
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<SHostVO> sc = LocalStorageHostSearch.create();
|
SearchCriteria<SHostVO> sc = LocalStorageHostSearch.create();
|
||||||
|
|||||||
@ -28,6 +28,7 @@ import com.cloud.utils.db.GenericDaoBase;
|
|||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.Transaction;
|
||||||
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Local(value={SMetaDao.class})
|
@Local(value={SMetaDao.class})
|
||||||
@ -41,7 +42,7 @@ public class SMetaDaoImpl extends GenericDaoBase<SMetaVO, Long> implements SMeta
|
|||||||
SearchByTarget.and("Target", SearchByTarget.entity().getTarget(), SearchCriteria.Op.EQ);
|
SearchByTarget.and("Target", SearchByTarget.entity().getTarget(), SearchCriteria.Op.EQ);
|
||||||
SearchByTarget.and("TargetID", SearchByTarget.entity().getTargetId(), SearchCriteria.Op.EQ);
|
SearchByTarget.and("TargetID", SearchByTarget.entity().getTargetId(), SearchCriteria.Op.EQ);
|
||||||
SearchByTarget.done();
|
SearchByTarget.done();
|
||||||
Transaction txn = Transaction.open( Transaction.AWSAPI_DB);
|
TransactionLegacy txn = TransactionLegacy.open( TransactionLegacy.AWSAPI_DB);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<SMetaVO> sc = SearchByTarget.create();
|
SearchCriteria<SMetaVO> sc = SearchByTarget.create();
|
||||||
@ -71,7 +72,7 @@ public class SMetaDaoImpl extends GenericDaoBase<SMetaVO, Long> implements SMeta
|
|||||||
SearchBuilder <SMetaVO> SearchByTarget = createSearchBuilder();
|
SearchBuilder <SMetaVO> SearchByTarget = createSearchBuilder();
|
||||||
SearchByTarget.and("Target", SearchByTarget.entity().getTarget(), SearchCriteria.Op.EQ);
|
SearchByTarget.and("Target", SearchByTarget.entity().getTarget(), SearchCriteria.Op.EQ);
|
||||||
SearchByTarget.and("TargetID", SearchByTarget.entity().getTargetId(), SearchCriteria.Op.EQ);
|
SearchByTarget.and("TargetID", SearchByTarget.entity().getTargetId(), SearchCriteria.Op.EQ);
|
||||||
Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<SMetaVO> sc = SearchByTarget.create();
|
SearchCriteria<SMetaVO> sc = SearchByTarget.create();
|
||||||
|
|||||||
@ -33,6 +33,7 @@ import com.cloud.utils.db.GenericDaoBase;
|
|||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.Transaction;
|
||||||
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Local(value={SObjectDao.class})
|
@Local(value={SObjectDao.class})
|
||||||
@ -47,7 +48,7 @@ public class SObjectDaoImpl extends GenericDaoBase<SObjectVO, Long> implements S
|
|||||||
SearchBuilder<SObjectVO> SearchByName = createSearchBuilder();
|
SearchBuilder<SObjectVO> SearchByName = createSearchBuilder();
|
||||||
SearchByName.and("SBucketID", SearchByName.entity().getBucketID() , SearchCriteria.Op.EQ);
|
SearchByName.and("SBucketID", SearchByName.entity().getBucketID() , SearchCriteria.Op.EQ);
|
||||||
SearchByName.and("NameKey", SearchByName.entity().getNameKey() , SearchCriteria.Op.EQ);
|
SearchByName.and("NameKey", SearchByName.entity().getNameKey() , SearchCriteria.Op.EQ);
|
||||||
Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<SObjectVO> sc = SearchByName.create();
|
SearchCriteria<SObjectVO> sc = SearchByName.create();
|
||||||
@ -76,7 +77,7 @@ public class SObjectDaoImpl extends GenericDaoBase<SObjectVO, Long> implements S
|
|||||||
|
|
||||||
SearchByBucket.and("SBucketID", SearchByBucket.entity().getBucketID(), SearchCriteria.Op.EQ);
|
SearchByBucket.and("SBucketID", SearchByBucket.entity().getBucketID(), SearchCriteria.Op.EQ);
|
||||||
SearchByBucket.and("DeletionMark", SearchByBucket.entity().getDeletionMark(), SearchCriteria.Op.NULL);
|
SearchByBucket.and("DeletionMark", SearchByBucket.entity().getDeletionMark(), SearchCriteria.Op.NULL);
|
||||||
Transaction txn = Transaction.currentTxn(); // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
|
TransactionLegacy txn = TransactionLegacy.currentTxn(); // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<SObjectVO> sc = SearchByBucket.create();
|
SearchCriteria<SObjectVO> sc = SearchByBucket.create();
|
||||||
@ -100,7 +101,7 @@ public class SObjectDaoImpl extends GenericDaoBase<SObjectVO, Long> implements S
|
|||||||
List<SObjectVO> objects = new ArrayList<SObjectVO>();
|
List<SObjectVO> objects = new ArrayList<SObjectVO>();
|
||||||
getAllBuckets.and("SBucketID", getAllBuckets.entity().getBucketID(), SearchCriteria.Op.EQ);
|
getAllBuckets.and("SBucketID", getAllBuckets.entity().getBucketID(), SearchCriteria.Op.EQ);
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn(); // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
|
TransactionLegacy txn = TransactionLegacy.currentTxn(); // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<SObjectVO> sc = getAllBuckets.create();
|
SearchCriteria<SObjectVO> sc = getAllBuckets.create();
|
||||||
|
|||||||
@ -27,6 +27,7 @@ import com.cloud.utils.db.GenericDaoBase;
|
|||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.Transaction;
|
||||||
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Local(value={SObjectItemDao.class})
|
@Local(value={SObjectItemDao.class})
|
||||||
@ -39,7 +40,7 @@ public class SObjectItemDaoImpl extends GenericDaoBase<SObjectItemVO, Long> impl
|
|||||||
@Override
|
@Override
|
||||||
public SObjectItemVO getByObjectIdNullVersion(long id) {
|
public SObjectItemVO getByObjectIdNullVersion(long id) {
|
||||||
|
|
||||||
Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
SearchBuilder <SObjectItemVO> SearchByID = createSearchBuilder();
|
SearchBuilder <SObjectItemVO> SearchByID = createSearchBuilder();
|
||||||
SearchByID.and("ID", SearchByID.entity().getId(), SearchCriteria.Op.EQ);
|
SearchByID.and("ID", SearchByID.entity().getId(), SearchCriteria.Op.EQ);
|
||||||
|
|
||||||
@ -56,7 +57,7 @@ public class SObjectItemDaoImpl extends GenericDaoBase<SObjectItemVO, Long> impl
|
|||||||
@Override
|
@Override
|
||||||
public List<SObjectItemVO> getItems(long sobjectID) {
|
public List<SObjectItemVO> getItems(long sobjectID) {
|
||||||
|
|
||||||
Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
SearchBuilder<SObjectItemVO> SearchBySobjectID = createSearchBuilder();
|
SearchBuilder<SObjectItemVO> SearchBySobjectID = createSearchBuilder();
|
||||||
SearchBySobjectID.and("SObjectID", SearchBySobjectID.entity().getId(), SearchCriteria.Op.EQ);
|
SearchBySobjectID.and("SObjectID", SearchBySobjectID.entity().getId(), SearchCriteria.Op.EQ);
|
||||||
|
|
||||||
|
|||||||
@ -29,6 +29,7 @@ import com.cloud.utils.db.GenericDaoBase;
|
|||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.Transaction;
|
||||||
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Local(value={UserCredentialsDao.class})
|
@Local(value={UserCredentialsDao.class})
|
||||||
@ -41,7 +42,7 @@ public class UserCredentialsDaoImpl extends GenericDaoBase<UserCredentialsVO, Lo
|
|||||||
@Override
|
@Override
|
||||||
public UserCredentialsVO getByAccessKey( String cloudAccessKey ) {
|
public UserCredentialsVO getByAccessKey( String cloudAccessKey ) {
|
||||||
SearchBuilder<UserCredentialsVO> SearchByAccessKey = createSearchBuilder();
|
SearchBuilder<UserCredentialsVO> SearchByAccessKey = createSearchBuilder();
|
||||||
Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchByAccessKey.and("AccessKey", SearchByAccessKey.entity()
|
SearchByAccessKey.and("AccessKey", SearchByAccessKey.entity()
|
||||||
@ -60,7 +61,7 @@ public class UserCredentialsDaoImpl extends GenericDaoBase<UserCredentialsVO, Lo
|
|||||||
public UserCredentialsVO getByCertUniqueId( String certId ) {
|
public UserCredentialsVO getByCertUniqueId( String certId ) {
|
||||||
SearchBuilder<UserCredentialsVO> SearchByCertID = createSearchBuilder();
|
SearchBuilder<UserCredentialsVO> SearchByCertID = createSearchBuilder();
|
||||||
SearchByCertID.and("CertUniqueId", SearchByCertID.entity().getCertUniqueId(), SearchCriteria.Op.EQ);
|
SearchByCertID.and("CertUniqueId", SearchByCertID.entity().getCertUniqueId(), SearchCriteria.Op.EQ);
|
||||||
Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<UserCredentialsVO> sc = SearchByCertID.create();
|
SearchCriteria<UserCredentialsVO> sc = SearchByCertID.create();
|
||||||
|
|||||||
@ -161,6 +161,7 @@ import com.cloud.bridge.util.ConfigurationHelper;
|
|||||||
import com.cloud.bridge.util.EC2RestAuth;
|
import com.cloud.bridge.util.EC2RestAuth;
|
||||||
import com.cloud.stack.models.CloudStackAccount;
|
import com.cloud.stack.models.CloudStackAccount;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.Transaction;
|
||||||
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component("EC2RestServlet")
|
@Component("EC2RestServlet")
|
||||||
public class EC2RestServlet extends HttpServlet {
|
public class EC2RestServlet extends HttpServlet {
|
||||||
@ -377,7 +378,7 @@ public class EC2RestServlet extends HttpServlet {
|
|||||||
private void setUserKeys( HttpServletRequest request, HttpServletResponse response ) {
|
private void setUserKeys( HttpServletRequest request, HttpServletResponse response ) {
|
||||||
String[] accessKey = null;
|
String[] accessKey = null;
|
||||||
String[] secretKey = null;
|
String[] secretKey = null;
|
||||||
Transaction txn = null;
|
TransactionLegacy txn = null;
|
||||||
try {
|
try {
|
||||||
// -> all these parameters are required
|
// -> all these parameters are required
|
||||||
accessKey = request.getParameterValues( "accesskey" );
|
accessKey = request.getParameterValues( "accesskey" );
|
||||||
@ -398,7 +399,7 @@ public class EC2RestServlet extends HttpServlet {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
txn = Transaction.open(Transaction.AWSAPI_DB);
|
txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
txn.start();
|
txn.start();
|
||||||
// -> use the keys to see if the account actually exists
|
// -> use the keys to see if the account actually exists
|
||||||
ServiceProvider.getInstance().getEC2Engine().validateAccount( accessKey[0], secretKey[0] );
|
ServiceProvider.getInstance().getEC2Engine().validateAccount( accessKey[0], secretKey[0] );
|
||||||
@ -434,7 +435,7 @@ public class EC2RestServlet extends HttpServlet {
|
|||||||
*/
|
*/
|
||||||
private void setCertificate( HttpServletRequest request, HttpServletResponse response )
|
private void setCertificate( HttpServletRequest request, HttpServletResponse response )
|
||||||
throws Exception {
|
throws Exception {
|
||||||
Transaction txn = null;
|
TransactionLegacy txn = null;
|
||||||
try {
|
try {
|
||||||
// [A] Pull the cert and cloud AccessKey from the request
|
// [A] Pull the cert and cloud AccessKey from the request
|
||||||
String[] certificate = request.getParameterValues( "cert" );
|
String[] certificate = request.getParameterValues( "cert" );
|
||||||
@ -470,7 +471,7 @@ public class EC2RestServlet extends HttpServlet {
|
|||||||
// [C] Associate the cert's uniqueId with the Cloud API keys
|
// [C] Associate the cert's uniqueId with the Cloud API keys
|
||||||
String uniqueId = AuthenticationUtils.X509CertUniqueId( userCert );
|
String uniqueId = AuthenticationUtils.X509CertUniqueId( userCert );
|
||||||
logger.debug( "SetCertificate, uniqueId: " + uniqueId );
|
logger.debug( "SetCertificate, uniqueId: " + uniqueId );
|
||||||
txn = Transaction.open(Transaction.AWSAPI_DB);
|
txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
txn.start();
|
txn.start();
|
||||||
UserCredentialsVO user = ucDao.getByAccessKey(accessKey[0]);
|
UserCredentialsVO user = ucDao.getByAccessKey(accessKey[0]);
|
||||||
user.setCertUniqueId(uniqueId);
|
user.setCertUniqueId(uniqueId);
|
||||||
@ -505,7 +506,7 @@ public class EC2RestServlet extends HttpServlet {
|
|||||||
*/
|
*/
|
||||||
private void deleteCertificate( HttpServletRequest request, HttpServletResponse response )
|
private void deleteCertificate( HttpServletRequest request, HttpServletResponse response )
|
||||||
throws Exception {
|
throws Exception {
|
||||||
Transaction txn = null;
|
TransactionLegacy txn = null;
|
||||||
try {
|
try {
|
||||||
String [] accessKey = request.getParameterValues( "AWSAccessKeyId" );
|
String [] accessKey = request.getParameterValues( "AWSAccessKeyId" );
|
||||||
if ( null == accessKey || 0 == accessKey.length ) {
|
if ( null == accessKey || 0 == accessKey.length ) {
|
||||||
@ -527,7 +528,7 @@ public class EC2RestServlet extends HttpServlet {
|
|||||||
/* UserCredentialsDao credentialDao = new UserCredentialsDao();
|
/* UserCredentialsDao credentialDao = new UserCredentialsDao();
|
||||||
credentialDao.setCertificateId( accessKey[0], null );
|
credentialDao.setCertificateId( accessKey[0], null );
|
||||||
|
|
||||||
*/ txn = Transaction.open(Transaction.AWSAPI_DB);
|
*/ txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
UserCredentialsVO user = ucDao.getByAccessKey(accessKey[0]);
|
UserCredentialsVO user = ucDao.getByAccessKey(accessKey[0]);
|
||||||
user.setCertUniqueId(null);
|
user.setCertUniqueId(null);
|
||||||
ucDao.update(user.getId(), user);
|
ucDao.update(user.getId(), user);
|
||||||
|
|||||||
@ -67,6 +67,7 @@ import com.cloud.bridge.util.RestAuth;
|
|||||||
import com.cloud.bridge.util.S3SoapAuth;
|
import com.cloud.bridge.util.S3SoapAuth;
|
||||||
import com.cloud.utils.db.DB;
|
import com.cloud.utils.db.DB;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.Transaction;
|
||||||
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
public class S3RestServlet extends HttpServlet {
|
public class S3RestServlet extends HttpServlet {
|
||||||
private static final long serialVersionUID = -6168996266762804877L;
|
private static final long serialVersionUID = -6168996266762804877L;
|
||||||
public static final String ENABLE_S3_API="enable.s3.api";
|
public static final String ENABLE_S3_API="enable.s3.api";
|
||||||
@ -139,7 +140,7 @@ public class S3RestServlet extends HttpServlet {
|
|||||||
*/
|
*/
|
||||||
private void processRequest( HttpServletRequest request, HttpServletResponse response, String method )
|
private void processRequest( HttpServletRequest request, HttpServletResponse response, String method )
|
||||||
{
|
{
|
||||||
Transaction txn = Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
|
TransactionLegacy txn = TransactionLegacy.open("cloudbridge", TransactionLegacy.AWSAPI_DB, true);
|
||||||
try {
|
try {
|
||||||
logRequest(request);
|
logRequest(request);
|
||||||
|
|
||||||
@ -274,7 +275,7 @@ public class S3RestServlet extends HttpServlet {
|
|||||||
// -> use the keys to see if the account actually exists
|
// -> use the keys to see if the account actually exists
|
||||||
//ServiceProvider.getInstance().getEC2Engine().validateAccount( accessKey[0], secretKey[0] );
|
//ServiceProvider.getInstance().getEC2Engine().validateAccount( accessKey[0], secretKey[0] );
|
||||||
//UserCredentialsDaoImpl credentialDao = new UserCredentialsDao();
|
//UserCredentialsDaoImpl credentialDao = new UserCredentialsDao();
|
||||||
Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
txn.start();
|
txn.start();
|
||||||
UserCredentialsVO user = new UserCredentialsVO(accessKey[0], secretKey[0]);
|
UserCredentialsVO user = new UserCredentialsVO(accessKey[0], secretKey[0]);
|
||||||
user = ucDao.persist(user);
|
user = ucDao.persist(user);
|
||||||
|
|||||||
@ -94,6 +94,7 @@ import com.cloud.bridge.util.XSerializer;
|
|||||||
import com.cloud.bridge.util.XSerializerXmlAdapter;
|
import com.cloud.bridge.util.XSerializerXmlAdapter;
|
||||||
import com.cloud.bridge.util.XmlHelper;
|
import com.cloud.bridge.util.XmlHelper;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.Transaction;
|
||||||
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
|
|
||||||
public class S3BucketAction implements ServletAction {
|
public class S3BucketAction implements ServletAction {
|
||||||
@ -371,7 +372,7 @@ public class S3BucketAction implements ServletAction {
|
|||||||
response.setStatus(403);
|
response.setStatus(403);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
// [B] Place the policy into the database over writting an existing policy
|
// [B] Place the policy into the database over writting an existing policy
|
||||||
try {
|
try {
|
||||||
// -> first make sure that the policy is valid by parsing it
|
// -> first make sure that the policy is valid by parsing it
|
||||||
|
|||||||
@ -62,6 +62,7 @@ import com.cloud.bridge.util.OrderedPair;
|
|||||||
import com.cloud.utils.component.ManagerBase;
|
import com.cloud.utils.component.ManagerBase;
|
||||||
import com.cloud.utils.db.DB;
|
import com.cloud.utils.db.DB;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.Transaction;
|
||||||
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class ServiceProvider extends ManagerBase {
|
public class ServiceProvider extends ManagerBase {
|
||||||
@ -90,7 +91,7 @@ public class ServiceProvider extends ManagerBase {
|
|||||||
|
|
||||||
protected ServiceProvider() throws IOException {
|
protected ServiceProvider() throws IOException {
|
||||||
// register service implementation object
|
// register service implementation object
|
||||||
Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
txn.close();
|
txn.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,7 +184,7 @@ public class ServiceProvider extends ManagerBase {
|
|||||||
|
|
||||||
public UserInfo getUserInfo(String accessKey) {
|
public UserInfo getUserInfo(String accessKey) {
|
||||||
UserInfo info = new UserInfo();
|
UserInfo info = new UserInfo();
|
||||||
Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
UserCredentialsVO cloudKeys = ucDao.getByAccessKey( accessKey );
|
UserCredentialsVO cloudKeys = ucDao.getByAccessKey( accessKey );
|
||||||
@ -253,7 +254,7 @@ public class ServiceProvider extends ManagerBase {
|
|||||||
|
|
||||||
multipartDir = properties.getProperty("storage.multipartDir");
|
multipartDir = properties.getProperty("storage.multipartDir");
|
||||||
|
|
||||||
Transaction txn1 = Transaction.open(Transaction.AWSAPI_DB);
|
TransactionLegacy txn1 = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
timer.schedule(getHeartbeatTask(), HEARTBEAT_INTERVAL, HEARTBEAT_INTERVAL);
|
timer.schedule(getHeartbeatTask(), HEARTBEAT_INTERVAL, HEARTBEAT_INTERVAL);
|
||||||
txn1.close();
|
txn1.close();
|
||||||
|
|
||||||
|
|||||||
@ -86,6 +86,7 @@ import com.cloud.bridge.util.StringHelper;
|
|||||||
import com.cloud.bridge.util.Triple;
|
import com.cloud.bridge.util.Triple;
|
||||||
import com.cloud.utils.db.DB;
|
import com.cloud.utils.db.DB;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.Transaction;
|
||||||
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The CRUD control actions to be invoked from S3BucketAction or S3ObjectAction.
|
* The CRUD control actions to be invoked from S3BucketAction or S3ObjectAction.
|
||||||
@ -195,7 +196,7 @@ public class S3Engine {
|
|||||||
String cannedAccessPolicy = request.getCannedAccess();
|
String cannedAccessPolicy = request.getCannedAccess();
|
||||||
String bucketName = request.getBucketName();
|
String bucketName = request.getBucketName();
|
||||||
response.setBucketName( bucketName );
|
response.setBucketName( bucketName );
|
||||||
Transaction txn= null;
|
TransactionLegacy txn= null;
|
||||||
verifyBucketName( bucketName, false );
|
verifyBucketName( bucketName, false );
|
||||||
|
|
||||||
S3PolicyContext context = new S3PolicyContext( PolicyActions.CreateBucket, bucketName );
|
S3PolicyContext context = new S3PolicyContext( PolicyActions.CreateBucket, bucketName );
|
||||||
@ -205,7 +206,7 @@ public class S3Engine {
|
|||||||
OrderedPair<SHostVO, String> shost_storagelocation_pair = null;
|
OrderedPair<SHostVO, String> shost_storagelocation_pair = null;
|
||||||
boolean success = false;
|
boolean success = false;
|
||||||
try {
|
try {
|
||||||
txn = Transaction.open(Transaction.AWSAPI_DB);
|
txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
|
|
||||||
if (bucketDao.getByName(request.getBucketName()) != null)
|
if (bucketDao.getByName(request.getBucketName()) != null)
|
||||||
throw new ObjectAlreadyExistsException("Bucket already exists");
|
throw new ObjectAlreadyExistsException("Bucket already exists");
|
||||||
@ -257,10 +258,10 @@ public class S3Engine {
|
|||||||
String bucketName = request.getBucketName();
|
String bucketName = request.getBucketName();
|
||||||
SBucketVO sbucket = bucketDao.getByName(bucketName);
|
SBucketVO sbucket = bucketDao.getByName(bucketName);
|
||||||
|
|
||||||
Transaction txn = null;
|
TransactionLegacy txn = null;
|
||||||
if ( sbucket != null )
|
if ( sbucket != null )
|
||||||
{
|
{
|
||||||
txn = Transaction.open(Transaction.AWSAPI_DB);
|
txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
txn.start();
|
txn.start();
|
||||||
S3PolicyContext context = new S3PolicyContext( PolicyActions.DeleteBucket, bucketName );
|
S3PolicyContext context = new S3PolicyContext( PolicyActions.DeleteBucket, bucketName );
|
||||||
switch( verifyPolicy( context ))
|
switch( verifyPolicy( context ))
|
||||||
@ -699,7 +700,7 @@ public class S3Engine {
|
|||||||
if (null != version)
|
if (null != version)
|
||||||
httpResp.addHeader("x-amz-version-id", version);
|
httpResp.addHeader("x-amz-version-id", version);
|
||||||
httpResp.flushBuffer();
|
httpResp.flushBuffer();
|
||||||
Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
// [C] Re-assemble the object from its uploaded file parts
|
// [C] Re-assemble the object from its uploaded file parts
|
||||||
try {
|
try {
|
||||||
// explicit transaction control to avoid holding transaction during
|
// explicit transaction control to avoid holding transaction during
|
||||||
@ -752,11 +753,11 @@ public class S3Engine {
|
|||||||
S3BucketAdapter bucketAdapter = getStorageHostBucketAdapter(host_storagelocation_pair.getFirst());
|
S3BucketAdapter bucketAdapter = getStorageHostBucketAdapter(host_storagelocation_pair.getFirst());
|
||||||
String itemFileName = object_objectitem_pair.getSecond().getStoredPath();
|
String itemFileName = object_objectitem_pair.getSecond().getStoredPath();
|
||||||
InputStream is = null;
|
InputStream is = null;
|
||||||
Transaction txn = null;
|
TransactionLegacy txn = null;
|
||||||
try {
|
try {
|
||||||
// explicit transaction control to avoid holding transaction during file-copy process
|
// explicit transaction control to avoid holding transaction during file-copy process
|
||||||
|
|
||||||
txn = Transaction.open(Transaction.AWSAPI_DB);
|
txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
txn.start();
|
txn.start();
|
||||||
is = request.getDataInputStream();
|
is = request.getDataInputStream();
|
||||||
String md5Checksum = bucketAdapter.saveObject(is, host_storagelocation_pair.getSecond(), bucket.getName(), itemFileName);
|
String md5Checksum = bucketAdapter.saveObject(is, host_storagelocation_pair.getSecond(), bucket.getName(), itemFileName);
|
||||||
@ -813,11 +814,11 @@ public class S3Engine {
|
|||||||
S3BucketAdapter bucketAdapter = getStorageHostBucketAdapter(host_storagelocation_pair.getFirst());
|
S3BucketAdapter bucketAdapter = getStorageHostBucketAdapter(host_storagelocation_pair.getFirst());
|
||||||
String itemFileName = object_objectitem_pair.getSecond().getStoredPath();
|
String itemFileName = object_objectitem_pair.getSecond().getStoredPath();
|
||||||
InputStream is = null;
|
InputStream is = null;
|
||||||
Transaction txn = null;
|
TransactionLegacy txn = null;
|
||||||
try {
|
try {
|
||||||
// explicit transaction control to avoid holding transaction during file-copy process
|
// explicit transaction control to avoid holding transaction during file-copy process
|
||||||
|
|
||||||
txn = Transaction.open(Transaction.AWSAPI_DB);
|
txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
txn.start();
|
txn.start();
|
||||||
|
|
||||||
is = request.getInputStream();
|
is = request.getInputStream();
|
||||||
@ -1505,7 +1506,7 @@ public class S3Engine {
|
|||||||
context.setEvalParam( ConditionKeys.Acl, cannedAccessPolicy);
|
context.setEvalParam( ConditionKeys.Acl, cannedAccessPolicy);
|
||||||
|
|
||||||
verifyAccess( context, "SBucket", bucket.getId(), SAcl.PERMISSION_WRITE ); // TODO - check this validates plain POSTs
|
verifyAccess( context, "SBucket", bucket.getId(), SAcl.PERMISSION_WRITE ); // TODO - check this validates plain POSTs
|
||||||
Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
txn.start();
|
txn.start();
|
||||||
|
|
||||||
// [B] If versioning is off them we over write a null object item
|
// [B] If versioning is off them we over write a null object item
|
||||||
@ -1554,7 +1555,7 @@ public class S3Engine {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Transaction txn1 = Transaction.open(Transaction.AWSAPI_DB);
|
TransactionLegacy txn1 = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
|
||||||
txn1.start();
|
txn1.start();
|
||||||
// -> there is no object nor an object item
|
// -> there is no object nor an object item
|
||||||
object = new SObjectVO();
|
object = new SObjectVO();
|
||||||
|
|||||||
@ -29,11 +29,11 @@
|
|||||||
</listener>
|
</listener>
|
||||||
|
|
||||||
<listener>
|
<listener>
|
||||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
<listener-class>org.apache.cloudstack.spring.module.web.CloudStackContextLoaderListener</listener-class>
|
||||||
</listener>
|
</listener>
|
||||||
<context-param>
|
<context-param>
|
||||||
<param-name>contextConfigLocation</param-name>
|
<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>
|
</context-param>
|
||||||
|
|
||||||
<servlet>
|
<servlet>
|
||||||
|
|||||||
@ -20,6 +20,16 @@
|
|||||||
<version>4.3.0-SNAPSHOT</version>
|
<version>4.3.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<dependencies>
|
<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>
|
<dependency>
|
||||||
<groupId>org.apache.cloudstack</groupId>
|
<groupId>org.apache.cloudstack</groupId>
|
||||||
<artifactId>cloud-plugin-storage-volume-solidfire</artifactId>
|
<artifactId>cloud-plugin-storage-volume-solidfire</artifactId>
|
||||||
@ -467,21 +477,6 @@
|
|||||||
</target>
|
</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</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>
|
<execution>
|
||||||
<id>process-noredist-spring-context</id>
|
<id>process-noredist-spring-context</id>
|
||||||
<phase>process-resources</phase>
|
<phase>process-resources</phase>
|
||||||
@ -502,22 +497,6 @@
|
|||||||
</target>
|
</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</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>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<!-- there are the jasypt libs requires by some of the python scripts -->
|
<!-- there are the jasypt libs requires by some of the python scripts -->
|
||||||
@ -730,5 +709,20 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</profile>
|
</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>
|
</profiles>
|
||||||
</project>
|
</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"/>
|
<priority value="INFO"/>
|
||||||
</category>
|
</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">
|
<category name="net">
|
||||||
<priority value="INFO"/>
|
<priority value="INFO"/>
|
||||||
</category>
|
</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>
|
||||||
2
core/resources/META-INF/cloudstack/api/module.properties
Normal file
2
core/resources/META-INF/cloudstack/api/module.properties
Normal file
@ -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>
|
||||||
@ -97,6 +97,7 @@ import com.cloud.utils.concurrency.NamedThreadFactory;
|
|||||||
import com.cloud.utils.db.DB;
|
import com.cloud.utils.db.DB;
|
||||||
import com.cloud.utils.db.EntityManager;
|
import com.cloud.utils.db.EntityManager;
|
||||||
import com.cloud.utils.db.QueryBuilder;
|
import com.cloud.utils.db.QueryBuilder;
|
||||||
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
import com.cloud.utils.db.SearchCriteria.Op;
|
import com.cloud.utils.db.SearchCriteria.Op;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.Transaction;
|
||||||
import com.cloud.utils.exception.CloudRuntimeException;
|
import com.cloud.utils.exception.CloudRuntimeException;
|
||||||
@ -355,7 +356,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
|
|||||||
|
|
||||||
@DB
|
@DB
|
||||||
protected boolean noDbTxn() {
|
protected boolean noDbTxn() {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
return !txn.dbTxnStarted();
|
return !txn.dbTxnStarted();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1252,7 +1253,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doTask(final Task task) throws Exception {
|
protected void doTask(final Task task) throws Exception {
|
||||||
Transaction txn = Transaction.open(Transaction.CLOUD_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB);
|
||||||
try {
|
try {
|
||||||
final Type type = task.getType();
|
final Type type = task.getType();
|
||||||
if (type == Task.Type.DATA) {
|
if (type == Task.Type.DATA) {
|
||||||
|
|||||||
@ -85,8 +85,8 @@ import com.cloud.serializer.GsonHelper;
|
|||||||
import com.cloud.utils.DateUtil;
|
import com.cloud.utils.DateUtil;
|
||||||
import com.cloud.utils.concurrency.NamedThreadFactory;
|
import com.cloud.utils.concurrency.NamedThreadFactory;
|
||||||
import com.cloud.utils.db.QueryBuilder;
|
import com.cloud.utils.db.QueryBuilder;
|
||||||
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
import com.cloud.utils.db.SearchCriteria.Op;
|
import com.cloud.utils.db.SearchCriteria.Op;
|
||||||
import com.cloud.utils.db.Transaction;
|
|
||||||
import com.cloud.utils.exception.CloudRuntimeException;
|
import com.cloud.utils.exception.CloudRuntimeException;
|
||||||
import com.cloud.utils.nio.Link;
|
import com.cloud.utils.nio.Link;
|
||||||
import com.cloud.utils.nio.Task;
|
import com.cloud.utils.nio.Task;
|
||||||
@ -591,7 +591,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doTask(final Task task) throws Exception {
|
protected void doTask(final Task task) throws Exception {
|
||||||
Transaction txn = Transaction.open(Transaction.CLOUD_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB);
|
||||||
try {
|
try {
|
||||||
if (task.getType() != Task.Type.DATA) {
|
if (task.getType() != Task.Type.DATA) {
|
||||||
super.doTask(task);
|
super.doTask(task);
|
||||||
|
|||||||
@ -35,6 +35,7 @@ import javax.ejb.Local;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.naming.ConfigurationException;
|
import javax.naming.ConfigurationException;
|
||||||
|
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
import org.apache.cloudstack.affinity.dao.AffinityGroupVMMapDao;
|
import org.apache.cloudstack.affinity.dao.AffinityGroupVMMapDao;
|
||||||
import org.apache.cloudstack.context.CallContext;
|
import org.apache.cloudstack.context.CallContext;
|
||||||
import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService;
|
import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService;
|
||||||
@ -162,6 +163,11 @@ import com.cloud.utils.db.DB;
|
|||||||
import com.cloud.utils.db.EntityManager;
|
import com.cloud.utils.db.EntityManager;
|
||||||
import com.cloud.utils.db.GlobalLock;
|
import com.cloud.utils.db.GlobalLock;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.Transaction;
|
||||||
|
import com.cloud.utils.db.TransactionCallback;
|
||||||
|
import com.cloud.utils.db.TransactionCallbackNoReturn;
|
||||||
|
import com.cloud.utils.db.TransactionCallbackWithException;
|
||||||
|
import com.cloud.utils.db.TransactionCallbackWithExceptionNoReturn;
|
||||||
|
import com.cloud.utils.db.TransactionStatus;
|
||||||
import com.cloud.utils.exception.CloudRuntimeException;
|
import com.cloud.utils.exception.CloudRuntimeException;
|
||||||
import com.cloud.utils.exception.ExecutionException;
|
import com.cloud.utils.exception.ExecutionException;
|
||||||
import com.cloud.utils.fsm.NoTransitionException;
|
import com.cloud.utils.fsm.NoTransitionException;
|
||||||
@ -308,12 +314,12 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@DB
|
@DB
|
||||||
public void allocate(String vmInstanceName, VirtualMachineTemplate template, ServiceOffering serviceOffering, Pair<? extends DiskOffering, Long> rootDiskOffering,
|
public void allocate(String vmInstanceName, final VirtualMachineTemplate template, ServiceOffering serviceOffering, final Pair<? extends DiskOffering, Long> rootDiskOffering,
|
||||||
LinkedHashMap<? extends DiskOffering, Long> dataDiskOfferings, LinkedHashMap<? extends Network, ? extends NicProfile> auxiliaryNetworks, DeploymentPlan plan,
|
LinkedHashMap<? extends DiskOffering, Long> dataDiskOfferings, final LinkedHashMap<? extends Network, ? extends NicProfile> auxiliaryNetworks, DeploymentPlan plan,
|
||||||
HypervisorType hyperType) throws InsufficientCapacityException {
|
HypervisorType hyperType) throws InsufficientCapacityException {
|
||||||
|
|
||||||
VMInstanceVO vm = _vmDao.findVMByInstanceName(vmInstanceName);
|
VMInstanceVO vm = _vmDao.findVMByInstanceName(vmInstanceName);
|
||||||
Account owner = _entityMgr.findById(Account.class, vm.getAccountId());
|
final Account owner = _entityMgr.findById(Account.class, vm.getAccountId());
|
||||||
|
|
||||||
if (s_logger.isDebugEnabled()) {
|
if (s_logger.isDebugEnabled()) {
|
||||||
s_logger.debug("Allocating entries for VM: " + vm);
|
s_logger.debug("Allocating entries for VM: " + vm);
|
||||||
@ -324,15 +330,18 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
|
|||||||
vm.setPodId(plan.getPodId());
|
vm.setPodId(plan.getPodId());
|
||||||
}
|
}
|
||||||
assert (plan.getClusterId() == null && plan.getPoolId() == null) : "We currently don't support cluster and pool preset yet";
|
assert (plan.getClusterId() == null && plan.getPoolId() == null) : "We currently don't support cluster and pool preset yet";
|
||||||
vm = _vmDao.persist(vm);
|
final VMInstanceVO vmFinal = _vmDao.persist(vm);
|
||||||
|
final LinkedHashMap<? extends DiskOffering, Long> dataDiskOfferingsFinal = dataDiskOfferings == null ?
|
||||||
|
new LinkedHashMap<DiskOffering, Long>() : dataDiskOfferings;
|
||||||
|
|
||||||
VirtualMachineProfileImpl vmProfile = new VirtualMachineProfileImpl(vm, template, serviceOffering, null, null);
|
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn();
|
final VirtualMachineProfileImpl vmProfile = new VirtualMachineProfileImpl(vmFinal, template, serviceOffering, null, null);
|
||||||
txn.start();
|
|
||||||
|
|
||||||
|
Transaction.execute(new TransactionCallbackWithExceptionNoReturn<InsufficientCapacityException>() {
|
||||||
|
@Override
|
||||||
|
public void doInTransactionWithoutResult(TransactionStatus status) throws InsufficientCapacityException {
|
||||||
if (s_logger.isDebugEnabled()) {
|
if (s_logger.isDebugEnabled()) {
|
||||||
s_logger.debug("Allocating nics for " + vm);
|
s_logger.debug("Allocating nics for " + vmFinal);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -341,29 +350,26 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
|
|||||||
throw new CloudRuntimeException("Concurrent operation while trying to allocate resources for the VM", e);
|
throw new CloudRuntimeException("Concurrent operation while trying to allocate resources for the VM", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dataDiskOfferings == null) {
|
|
||||||
dataDiskOfferings = new LinkedHashMap<DiskOffering, Long>(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (s_logger.isDebugEnabled()) {
|
if (s_logger.isDebugEnabled()) {
|
||||||
s_logger.debug("Allocating disks for " + vm);
|
s_logger.debug("Allocating disks for " + vmFinal);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (template.getFormat() == ImageFormat.ISO) {
|
if (template.getFormat() == ImageFormat.ISO) {
|
||||||
volumeMgr.allocateRawVolume(Type.ROOT, "ROOT-" + vm.getId(), rootDiskOffering.first(), rootDiskOffering.second(), vm, template, owner);
|
volumeMgr.allocateRawVolume(Type.ROOT, "ROOT-" + vmFinal.getId(), rootDiskOffering.first(), rootDiskOffering.second(), vmFinal, template, owner);
|
||||||
} else if (template.getFormat() == ImageFormat.BAREMETAL) {
|
} else if (template.getFormat() == ImageFormat.BAREMETAL) {
|
||||||
// Do nothing
|
// Do nothing
|
||||||
} else {
|
} else {
|
||||||
volumeMgr.allocateTemplatedVolume(Type.ROOT, "ROOT-" + vm.getId(), rootDiskOffering.first(), template, vm, owner);
|
volumeMgr.allocateTemplatedVolume(Type.ROOT, "ROOT-" + vmFinal.getId(), rootDiskOffering.first(), template, vmFinal, owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Map.Entry<? extends DiskOffering, Long> offering : dataDiskOfferings.entrySet()) {
|
for (Map.Entry<? extends DiskOffering, Long> offering : dataDiskOfferingsFinal.entrySet()) {
|
||||||
volumeMgr.allocateRawVolume(Type.DATADISK, "DATA-" + vm.getId(), offering.getKey(), offering.getValue(), vm, template, owner);
|
volumeMgr.allocateRawVolume(Type.DATADISK, "DATA-" + vmFinal.getId(), offering.getKey(), offering.getValue(), vmFinal, template, owner);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
txn.commit();
|
|
||||||
if (s_logger.isDebugEnabled()) {
|
if (s_logger.isDebugEnabled()) {
|
||||||
s_logger.debug("Allocation completed for VM: " + vm);
|
s_logger.debug("Allocation completed for VM: " + vmFinal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -548,37 +554,41 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
|
|||||||
}
|
}
|
||||||
|
|
||||||
@DB
|
@DB
|
||||||
protected Ternary<VMInstanceVO, ReservationContext, ItWorkVO> changeToStartState(VirtualMachineGuru vmGuru, VMInstanceVO vm, User caller, Account account)
|
protected Ternary<VMInstanceVO, ReservationContext, ItWorkVO> changeToStartState(VirtualMachineGuru vmGuru, final VMInstanceVO vm, final User caller, final Account account)
|
||||||
throws ConcurrentOperationException {
|
throws ConcurrentOperationException {
|
||||||
long vmId = vm.getId();
|
long vmId = vm.getId();
|
||||||
|
|
||||||
ItWorkVO work = new ItWorkVO(UUID.randomUUID().toString(), _nodeId, State.Starting, vm.getType(), vm.getId());
|
ItWorkVO work = new ItWorkVO(UUID.randomUUID().toString(), _nodeId, State.Starting, vm.getType(), vm.getId());
|
||||||
int retry = VmOpLockStateRetry.value();
|
int retry = VmOpLockStateRetry.value();
|
||||||
while (retry-- != 0) {
|
while (retry-- != 0) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
|
||||||
Ternary<VMInstanceVO, ReservationContext, ItWorkVO> result = null;
|
|
||||||
txn.start();
|
|
||||||
try {
|
try {
|
||||||
|
final ItWorkVO workFinal = work;
|
||||||
|
Ternary<VMInstanceVO, ReservationContext, ItWorkVO> result =
|
||||||
|
Transaction.execute(new TransactionCallbackWithException<Ternary<VMInstanceVO, ReservationContext, ItWorkVO>, NoTransitionException>() {
|
||||||
|
@Override
|
||||||
|
public Ternary<VMInstanceVO, ReservationContext, ItWorkVO> doInTransaction(TransactionStatus status) throws NoTransitionException {
|
||||||
Journal journal = new Journal.LogJournal("Creating " + vm, s_logger);
|
Journal journal = new Journal.LogJournal("Creating " + vm, s_logger);
|
||||||
work = _workDao.persist(work);
|
ItWorkVO work = _workDao.persist(workFinal);
|
||||||
ReservationContextImpl context = new ReservationContextImpl(work.getId(), journal, caller, account);
|
ReservationContextImpl context = new ReservationContextImpl(work.getId(), journal, caller, account);
|
||||||
|
|
||||||
if (stateTransitTo(vm, Event.StartRequested, null, work.getId())) {
|
if (stateTransitTo(vm, Event.StartRequested, null, work.getId())) {
|
||||||
if (s_logger.isDebugEnabled()) {
|
if (s_logger.isDebugEnabled()) {
|
||||||
s_logger.debug("Successfully transitioned to start state for " + vm + " reservation id = " + work.getId());
|
s_logger.debug("Successfully transitioned to start state for " + vm + " reservation id = " + work.getId());
|
||||||
}
|
}
|
||||||
result = new Ternary<VMInstanceVO, ReservationContext, ItWorkVO>(vm, context, work);
|
return new Ternary<VMInstanceVO, ReservationContext, ItWorkVO>(vm, context, work);
|
||||||
txn.commit();
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return new Ternary<VMInstanceVO, ReservationContext, ItWorkVO>(null, null, work);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
work = result.third();
|
||||||
|
if (result.first() != null)
|
||||||
|
return result;
|
||||||
} catch (NoTransitionException e) {
|
} catch (NoTransitionException e) {
|
||||||
if (s_logger.isDebugEnabled()) {
|
if (s_logger.isDebugEnabled()) {
|
||||||
s_logger.debug("Unable to transition into Starting state due to " + e.getMessage());
|
s_logger.debug("Unable to transition into Starting state due to " + e.getMessage());
|
||||||
}
|
}
|
||||||
} finally {
|
|
||||||
if (result == null) {
|
|
||||||
txn.rollback();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VMInstanceVO instance = _vmDao.findById(vmId);
|
VMInstanceVO instance = _vmDao.findById(vmId);
|
||||||
|
|||||||
@ -29,7 +29,7 @@ import org.springframework.stereotype.Component;
|
|||||||
import com.cloud.utils.db.GenericDaoBase;
|
import com.cloud.utils.db.GenericDaoBase;
|
||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component(value="EngineDcDetailsDao")
|
@Component(value="EngineDcDetailsDao")
|
||||||
@Local(value=DcDetailsDao.class)
|
@Local(value=DcDetailsDao.class)
|
||||||
@ -83,7 +83,7 @@ public class DcDetailsDaoImpl extends GenericDaoBase<DcDetailVO, Long> implement
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void persist(long dcId, Map<String, String> details) {
|
public void persist(long dcId, Map<String, String> details) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<DcDetailVO> sc = DcSearch.create();
|
SearchCriteria<DcDetailVO> sc = DcSearch.create();
|
||||||
sc.setParameters("dcId", dcId);
|
sc.setParameters("dcId", dcId);
|
||||||
|
|||||||
@ -45,7 +45,7 @@ import com.cloud.utils.db.SearchBuilder;
|
|||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.SearchCriteria.Func;
|
import com.cloud.utils.db.SearchCriteria.Func;
|
||||||
import com.cloud.utils.db.SearchCriteria.Op;
|
import com.cloud.utils.db.SearchCriteria.Op;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
import com.cloud.utils.db.UpdateBuilder;
|
import com.cloud.utils.db.UpdateBuilder;
|
||||||
import com.cloud.utils.exception.CloudRuntimeException;
|
import com.cloud.utils.exception.CloudRuntimeException;
|
||||||
|
|
||||||
@ -162,7 +162,7 @@ public class EngineClusterDaoImpl extends GenericDaoBase<EngineClusterVO, Long>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<Long, List<Long>> getPodClusterIdMap(List<Long> clusterIds){
|
public Map<Long, List<Long>> getPodClusterIdMap(List<Long> clusterIds){
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
Map<Long, List<Long>> result = new HashMap<Long, List<Long>>();
|
Map<Long, List<Long>> result = new HashMap<Long, List<Long>>();
|
||||||
|
|
||||||
@ -243,7 +243,7 @@ public class EngineClusterDaoImpl extends GenericDaoBase<EngineClusterVO, Long>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean remove(Long id) {
|
public boolean remove(Long id) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
EngineClusterVO cluster = createForUpdate();
|
EngineClusterVO cluster = createForUpdate();
|
||||||
cluster.setName(null);
|
cluster.setName(null);
|
||||||
|
|||||||
@ -40,7 +40,7 @@ import com.cloud.utils.db.GenericDaoBase;
|
|||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.SequenceFetcher;
|
import com.cloud.utils.db.SequenceFetcher;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
import com.cloud.utils.db.UpdateBuilder;
|
import com.cloud.utils.db.UpdateBuilder;
|
||||||
import com.cloud.utils.net.NetUtils;
|
import com.cloud.utils.net.NetUtils;
|
||||||
|
|
||||||
@ -216,7 +216,7 @@ public class EngineDataCenterDaoImpl extends GenericDaoBase<EngineDataCenterVO,
|
|||||||
|
|
||||||
@Override @DB
|
@Override @DB
|
||||||
public boolean update(Long zoneId, EngineDataCenterVO zone) {
|
public boolean update(Long zoneId, EngineDataCenterVO zone) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
boolean persisted = super.update(zoneId, zone);
|
boolean persisted = super.update(zoneId, zone);
|
||||||
if (!persisted) {
|
if (!persisted) {
|
||||||
@ -281,7 +281,7 @@ public class EngineDataCenterDaoImpl extends GenericDaoBase<EngineDataCenterVO,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean remove(Long id) {
|
public boolean remove(Long id) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
EngineDataCenterVO zone = createForUpdate();
|
EngineDataCenterVO zone = createForUpdate();
|
||||||
zone.setName(null);
|
zone.setName(null);
|
||||||
|
|||||||
@ -54,7 +54,7 @@ import com.cloud.utils.db.SearchBuilder;
|
|||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.SearchCriteria.Func;
|
import com.cloud.utils.db.SearchCriteria.Func;
|
||||||
import com.cloud.utils.db.SearchCriteria.Op;
|
import com.cloud.utils.db.SearchCriteria.Op;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
import com.cloud.utils.db.UpdateBuilder;
|
import com.cloud.utils.db.UpdateBuilder;
|
||||||
import com.cloud.utils.exception.CloudRuntimeException;
|
import com.cloud.utils.exception.CloudRuntimeException;
|
||||||
|
|
||||||
@ -336,7 +336,7 @@ public class EngineHostDaoImpl extends GenericDaoBase<EngineHostVO, Long> implem
|
|||||||
|
|
||||||
@Override @DB
|
@Override @DB
|
||||||
public List<EngineHostVO> findAndUpdateDirectAgentToLoad(long lastPingSecondsAfter, Long limit, long managementServerId) {
|
public List<EngineHostVO> findAndUpdateDirectAgentToLoad(long lastPingSecondsAfter, Long limit, long managementServerId) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<EngineHostVO> sc = UnmanagedDirectConnectSearch.create();
|
SearchCriteria<EngineHostVO> sc = UnmanagedDirectConnectSearch.create();
|
||||||
sc.setParameters("lastPinged", lastPingSecondsAfter);
|
sc.setParameters("lastPinged", lastPingSecondsAfter);
|
||||||
@ -356,7 +356,7 @@ public class EngineHostDaoImpl extends GenericDaoBase<EngineHostVO, Long> implem
|
|||||||
|
|
||||||
@Override @DB
|
@Override @DB
|
||||||
public List<EngineHostVO> findAndUpdateApplianceToLoad(long lastPingSecondsAfter, long managementServerId) {
|
public List<EngineHostVO> findAndUpdateApplianceToLoad(long lastPingSecondsAfter, long managementServerId) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
|
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<EngineHostVO> sc = UnmanagedApplianceSearch.create();
|
SearchCriteria<EngineHostVO> sc = UnmanagedApplianceSearch.create();
|
||||||
@ -495,7 +495,7 @@ public class EngineHostDaoImpl extends GenericDaoBase<EngineHostVO, Long> implem
|
|||||||
@DB
|
@DB
|
||||||
@Override
|
@Override
|
||||||
public List<EngineHostVO> findLostHosts(long timeout) {
|
public List<EngineHostVO> findLostHosts(long timeout) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
List<EngineHostVO> result = new ArrayList<EngineHostVO>();
|
List<EngineHostVO> result = new ArrayList<EngineHostVO>();
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
@ -546,7 +546,7 @@ public class EngineHostDaoImpl extends GenericDaoBase<EngineHostVO, Long> implem
|
|||||||
public EngineHostVO persist(EngineHostVO host) {
|
public EngineHostVO persist(EngineHostVO host) {
|
||||||
final String InsertSequenceSql = "INSERT INTO op_host(id) VALUES(?)";
|
final String InsertSequenceSql = "INSERT INTO op_host(id) VALUES(?)";
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
|
|
||||||
EngineHostVO dbHost = super.persist(host);
|
EngineHostVO dbHost = super.persist(host);
|
||||||
@ -572,7 +572,7 @@ public class EngineHostDaoImpl extends GenericDaoBase<EngineHostVO, Long> implem
|
|||||||
@Override
|
@Override
|
||||||
@DB
|
@DB
|
||||||
public boolean update(Long hostId, EngineHostVO host) {
|
public boolean update(Long hostId, EngineHostVO host) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
|
|
||||||
boolean persisted = super.update(hostId, host);
|
boolean persisted = super.update(hostId, host);
|
||||||
@ -598,7 +598,7 @@ public class EngineHostDaoImpl extends GenericDaoBase<EngineHostVO, Long> implem
|
|||||||
|
|
||||||
ArrayList<RunningHostCountInfo> l = new ArrayList<RunningHostCountInfo>();
|
ArrayList<RunningHostCountInfo> l = new ArrayList<RunningHostCountInfo>();
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
;
|
;
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -41,7 +41,7 @@ import com.cloud.utils.db.SearchBuilder;
|
|||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.UpdateBuilder;
|
import com.cloud.utils.db.UpdateBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria.Op;
|
import com.cloud.utils.db.SearchCriteria.Op;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component(value="EngineHostPodDao")
|
@Component(value="EngineHostPodDao")
|
||||||
@Local(value={EngineHostPodDao.class})
|
@Local(value={EngineHostPodDao.class})
|
||||||
@ -97,7 +97,7 @@ public class EngineHostPodDaoImpl extends GenericDaoBase<EngineHostPodVO, Long>
|
|||||||
HashMap<Long, List<Object>> currentPodCidrSubnets = new HashMap<Long, List<Object>>();
|
HashMap<Long, List<Object>> currentPodCidrSubnets = new HashMap<Long, List<Object>>();
|
||||||
|
|
||||||
String selectSql = "SELECT id, cidr_address, cidr_size FROM host_pod_ref WHERE data_center_id=" + zoneId +" and removed IS NULL";
|
String selectSql = "SELECT id, cidr_address, cidr_size FROM host_pod_ref WHERE data_center_id=" + zoneId +" and removed IS NULL";
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
try {
|
try {
|
||||||
PreparedStatement stmt = txn.prepareAutoCloseStatement(selectSql);
|
PreparedStatement stmt = txn.prepareAutoCloseStatement(selectSql);
|
||||||
ResultSet rs = stmt.executeQuery();
|
ResultSet rs = stmt.executeQuery();
|
||||||
@ -123,7 +123,7 @@ public class EngineHostPodDaoImpl extends GenericDaoBase<EngineHostPodVO, Long>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean remove(Long id) {
|
public boolean remove(Long id) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
EngineHostPodVO pod = createForUpdate();
|
EngineHostPodVO pod = createForUpdate();
|
||||||
pod.setName(null);
|
pod.setName(null);
|
||||||
|
|||||||
@ -31,7 +31,7 @@ import com.cloud.utils.crypt.DBEncryptionUtil;
|
|||||||
import com.cloud.utils.db.GenericDaoBase;
|
import com.cloud.utils.db.GenericDaoBase;
|
||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
import com.cloud.utils.exception.CloudRuntimeException;
|
import com.cloud.utils.exception.CloudRuntimeException;
|
||||||
|
|
||||||
@Component(value="EngineHostDetailsDao")
|
@Component(value="EngineHostDetailsDao")
|
||||||
@ -96,7 +96,7 @@ public class HostDetailsDaoImpl extends GenericDaoBase<DetailVO, Long> implement
|
|||||||
public void persist(long hostId, Map<String, String> details) {
|
public void persist(long hostId, Map<String, String> details) {
|
||||||
final String InsertOrUpdateSql = "INSERT INTO `cloud`.`host_details` (host_id, name, value) VALUES (?,?,?) ON DUPLICATE KEY UPDATE value=?";
|
final String InsertOrUpdateSql = "INSERT INTO `cloud`.`host_details` (host_id, name, value) VALUES (?,?,?) ON DUPLICATE KEY UPDATE value=?";
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
|
|
||||||
for (Map.Entry<String, String> detail : details.entrySet()) {
|
for (Map.Entry<String, String> detail : details.entrySet()) {
|
||||||
|
|||||||
@ -27,7 +27,7 @@ import com.cloud.host.HostTagVO;
|
|||||||
import com.cloud.utils.db.GenericDaoBase;
|
import com.cloud.utils.db.GenericDaoBase;
|
||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component(value="EngineHostTagsDao")
|
@Component(value="EngineHostTagsDao")
|
||||||
@Local(value=HostTagsDao.class)
|
@Local(value=HostTagsDao.class)
|
||||||
@ -56,7 +56,7 @@ public class HostTagsDaoImpl extends GenericDaoBase<HostTagVO, Long> implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void persist(long hostId, List<String> hostTags) {
|
public void persist(long hostId, List<String> hostTags) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
|
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<HostTagVO> sc = HostSearch.create();
|
SearchCriteria<HostTagVO> sc = HostSearch.create();
|
||||||
|
|||||||
@ -167,6 +167,10 @@ import com.cloud.utils.concurrency.NamedThreadFactory;
|
|||||||
import com.cloud.utils.db.DB;
|
import com.cloud.utils.db.DB;
|
||||||
import com.cloud.utils.db.EntityManager;
|
import com.cloud.utils.db.EntityManager;
|
||||||
import com.cloud.utils.db.GlobalLock;
|
import com.cloud.utils.db.GlobalLock;
|
||||||
|
import com.cloud.utils.db.TransactionCallback;
|
||||||
|
import com.cloud.utils.db.TransactionCallbackNoReturn;
|
||||||
|
import com.cloud.utils.db.TransactionCallbackWithExceptionNoReturn;
|
||||||
|
import com.cloud.utils.db.TransactionStatus;
|
||||||
import com.cloud.utils.db.JoinBuilder.JoinType;
|
import com.cloud.utils.db.JoinBuilder.JoinType;
|
||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria.Op;
|
import com.cloud.utils.db.SearchCriteria.Op;
|
||||||
@ -346,7 +350,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
@DB
|
@DB
|
||||||
public boolean configure(final String name, final Map<String, Object> params) throws ConfigurationException {
|
public boolean configure(final String name, final Map<String, Object> params) throws ConfigurationException {
|
||||||
// populate providers
|
// populate providers
|
||||||
Map<Network.Service, Set<Network.Provider>> defaultSharedNetworkOfferingProviders = new HashMap<Network.Service, Set<Network.Provider>>();
|
final Map<Network.Service, Set<Network.Provider>> defaultSharedNetworkOfferingProviders = new HashMap<Network.Service, Set<Network.Provider>>();
|
||||||
Set<Network.Provider> defaultProviders = new HashSet<Network.Provider>();
|
Set<Network.Provider> defaultProviders = new HashSet<Network.Provider>();
|
||||||
|
|
||||||
defaultProviders.add(Network.Provider.VirtualRouter);
|
defaultProviders.add(Network.Provider.VirtualRouter);
|
||||||
@ -354,7 +358,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
defaultSharedNetworkOfferingProviders.put(Service.Dns, defaultProviders);
|
defaultSharedNetworkOfferingProviders.put(Service.Dns, defaultProviders);
|
||||||
defaultSharedNetworkOfferingProviders.put(Service.UserData, defaultProviders);
|
defaultSharedNetworkOfferingProviders.put(Service.UserData, defaultProviders);
|
||||||
|
|
||||||
Map<Network.Service, Set<Network.Provider>> defaultIsolatedNetworkOfferingProviders = defaultSharedNetworkOfferingProviders;
|
final Map<Network.Service, Set<Network.Provider>> defaultIsolatedNetworkOfferingProviders = defaultSharedNetworkOfferingProviders;
|
||||||
defaultIsolatedNetworkOfferingProviders.put(Service.Dhcp, defaultProviders);
|
defaultIsolatedNetworkOfferingProviders.put(Service.Dhcp, defaultProviders);
|
||||||
defaultIsolatedNetworkOfferingProviders.put(Service.Dns, defaultProviders);
|
defaultIsolatedNetworkOfferingProviders.put(Service.Dns, defaultProviders);
|
||||||
defaultIsolatedNetworkOfferingProviders.put(Service.UserData, defaultProviders);
|
defaultIsolatedNetworkOfferingProviders.put(Service.UserData, defaultProviders);
|
||||||
@ -365,7 +369,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
defaultIsolatedNetworkOfferingProviders.put(Service.PortForwarding, defaultProviders);
|
defaultIsolatedNetworkOfferingProviders.put(Service.PortForwarding, defaultProviders);
|
||||||
defaultIsolatedNetworkOfferingProviders.put(Service.Vpn, defaultProviders);
|
defaultIsolatedNetworkOfferingProviders.put(Service.Vpn, defaultProviders);
|
||||||
|
|
||||||
Map<Network.Service, Set<Network.Provider>> defaultSharedSGEnabledNetworkOfferingProviders = new HashMap<Network.Service, Set<Network.Provider>>();
|
final Map<Network.Service, Set<Network.Provider>> defaultSharedSGEnabledNetworkOfferingProviders = new HashMap<Network.Service, Set<Network.Provider>>();
|
||||||
defaultSharedSGEnabledNetworkOfferingProviders.put(Service.Dhcp, defaultProviders);
|
defaultSharedSGEnabledNetworkOfferingProviders.put(Service.Dhcp, defaultProviders);
|
||||||
defaultSharedSGEnabledNetworkOfferingProviders.put(Service.Dns, defaultProviders);
|
defaultSharedSGEnabledNetworkOfferingProviders.put(Service.Dns, defaultProviders);
|
||||||
defaultSharedSGEnabledNetworkOfferingProviders.put(Service.UserData, defaultProviders);
|
defaultSharedSGEnabledNetworkOfferingProviders.put(Service.UserData, defaultProviders);
|
||||||
@ -373,7 +377,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
sgProviders.add(Provider.SecurityGroupProvider);
|
sgProviders.add(Provider.SecurityGroupProvider);
|
||||||
defaultSharedSGEnabledNetworkOfferingProviders.put(Service.SecurityGroup, sgProviders);
|
defaultSharedSGEnabledNetworkOfferingProviders.put(Service.SecurityGroup, sgProviders);
|
||||||
|
|
||||||
Map<Network.Service, Set<Network.Provider>> defaultIsolatedSourceNatEnabledNetworkOfferingProviders = new HashMap<Network.Service, Set<Network.Provider>>();
|
final Map<Network.Service, Set<Network.Provider>> defaultIsolatedSourceNatEnabledNetworkOfferingProviders = new HashMap<Network.Service, Set<Network.Provider>>();
|
||||||
defaultProviders.clear();
|
defaultProviders.clear();
|
||||||
defaultProviders.add(Network.Provider.VirtualRouter);
|
defaultProviders.add(Network.Provider.VirtualRouter);
|
||||||
defaultIsolatedSourceNatEnabledNetworkOfferingProviders.put(Service.Dhcp, defaultProviders);
|
defaultIsolatedSourceNatEnabledNetworkOfferingProviders.put(Service.Dhcp, defaultProviders);
|
||||||
@ -387,7 +391,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
defaultIsolatedSourceNatEnabledNetworkOfferingProviders.put(Service.PortForwarding, defaultProviders);
|
defaultIsolatedSourceNatEnabledNetworkOfferingProviders.put(Service.PortForwarding, defaultProviders);
|
||||||
defaultIsolatedSourceNatEnabledNetworkOfferingProviders.put(Service.Vpn, defaultProviders);
|
defaultIsolatedSourceNatEnabledNetworkOfferingProviders.put(Service.Vpn, defaultProviders);
|
||||||
|
|
||||||
Map<Network.Service, Set<Network.Provider>> defaultVPCOffProviders = new HashMap<Network.Service, Set<Network.Provider>>();
|
final Map<Network.Service, Set<Network.Provider>> defaultVPCOffProviders = new HashMap<Network.Service, Set<Network.Provider>>();
|
||||||
defaultProviders.clear();
|
defaultProviders.clear();
|
||||||
defaultProviders.add(Network.Provider.VPCVirtualRouter);
|
defaultProviders.add(Network.Provider.VPCVirtualRouter);
|
||||||
defaultVPCOffProviders.put(Service.Dhcp, defaultProviders);
|
defaultVPCOffProviders.put(Service.Dhcp, defaultProviders);
|
||||||
@ -401,9 +405,9 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
defaultVPCOffProviders.put(Service.PortForwarding, defaultProviders);
|
defaultVPCOffProviders.put(Service.PortForwarding, defaultProviders);
|
||||||
defaultVPCOffProviders.put(Service.Vpn, defaultProviders);
|
defaultVPCOffProviders.put(Service.Vpn, defaultProviders);
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn();
|
Transaction.execute(new TransactionCallbackNoReturn() {
|
||||||
txn.start();
|
@Override
|
||||||
|
public void doInTransactionWithoutResult(TransactionStatus status) {
|
||||||
NetworkOfferingVO offering = null;
|
NetworkOfferingVO offering = null;
|
||||||
//#1 - quick cloud network offering
|
//#1 - quick cloud network offering
|
||||||
if (_networkOfferingDao.findByUniqueName(NetworkOffering.QuickCloudNoServices) == null) {
|
if (_networkOfferingDao.findByUniqueName(NetworkOffering.QuickCloudNoServices) == null) {
|
||||||
@ -526,8 +530,9 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
offering.setDedicatedLB(false);
|
offering.setDedicatedLB(false);
|
||||||
_networkOfferingDao.update(offering.getId(), offering);
|
_networkOfferingDao.update(offering.getId(), offering);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
txn.commit();
|
|
||||||
|
|
||||||
AssignIpAddressSearch = _ipAddressDao.createSearchBuilder();
|
AssignIpAddressSearch = _ipAddressDao.createSearchBuilder();
|
||||||
AssignIpAddressSearch.and("dc", AssignIpAddressSearch.entity().getDataCenterId(), Op.EQ);
|
AssignIpAddressSearch.and("dc", AssignIpAddressSearch.entity().getDataCenterId(), Op.EQ);
|
||||||
@ -590,8 +595,8 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@DB
|
@DB
|
||||||
public List<? extends Network> setupNetwork(Account owner, NetworkOffering offering, Network predefined, DeploymentPlan plan, String name, String displayText,
|
public List<? extends Network> setupNetwork(final Account owner, final NetworkOffering offering, final Network predefined, final DeploymentPlan plan, final String name, final String displayText,
|
||||||
boolean errorIfAlreadySetup, Long domainId, ACLType aclType, Boolean subdomainAccess, Long vpcId, Boolean isDisplayNetworkEnabled) throws ConcurrentOperationException {
|
boolean errorIfAlreadySetup, final Long domainId, final ACLType aclType, final Boolean subdomainAccess, final Long vpcId, final Boolean isDisplayNetworkEnabled) throws ConcurrentOperationException {
|
||||||
|
|
||||||
Account locked = _accountDao.acquireInLockTable(owner.getId());
|
Account locked = _accountDao.acquireInLockTable(owner.getId());
|
||||||
if (locked == null) {
|
if (locked == null) {
|
||||||
@ -622,12 +627,12 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
List<NetworkVO> networks = new ArrayList<NetworkVO>();
|
final List<NetworkVO> networks = new ArrayList<NetworkVO>();
|
||||||
|
|
||||||
long related = -1;
|
long related = -1;
|
||||||
|
|
||||||
for (NetworkGuru guru : _networkGurus) {
|
for (final NetworkGuru guru : _networkGurus) {
|
||||||
Network network = guru.design(offering, plan, predefined, owner);
|
final Network network = guru.design(offering, plan, predefined, owner);
|
||||||
if (network == null) {
|
if (network == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -641,28 +646,26 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
long id = _networksDao.getNextInSequence(Long.class, "id");
|
final long id = _networksDao.getNextInSequence(Long.class, "id");
|
||||||
if (related == -1) {
|
if (related == -1) {
|
||||||
related = id;
|
related = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn();
|
final long relatedFile = related;
|
||||||
txn.start();
|
Transaction.execute(new TransactionCallbackNoReturn() {
|
||||||
|
@Override
|
||||||
NetworkVO vo = new NetworkVO(id, network, offering.getId(), guru.getName(), owner.getDomainId(), owner.getId(), related, name, displayText,
|
public void doInTransactionWithoutResult(TransactionStatus status) {
|
||||||
|
NetworkVO vo = new NetworkVO(id, network, offering.getId(), guru.getName(), owner.getDomainId(), owner.getId(), relatedFile, name, displayText,
|
||||||
predefined.getNetworkDomain(), offering.getGuestType(), plan.getDataCenterId(), plan.getPhysicalNetworkId(), aclType, offering.getSpecifyIpRanges(), vpcId);
|
predefined.getNetworkDomain(), offering.getGuestType(), plan.getDataCenterId(), plan.getPhysicalNetworkId(), aclType, offering.getSpecifyIpRanges(), vpcId);
|
||||||
vo.setDisplayNetwork(isDisplayNetworkEnabled == null ? true : isDisplayNetworkEnabled);
|
vo.setDisplayNetwork(isDisplayNetworkEnabled == null ? true : isDisplayNetworkEnabled);
|
||||||
networks.add(_networksDao.persist(vo, vo.getGuestType() == Network.GuestType.Isolated,
|
networks.add(_networksDao.persist(vo, vo.getGuestType() == Network.GuestType.Isolated,
|
||||||
finalizeServicesAndProvidersForNetwork(offering, plan.getPhysicalNetworkId())));
|
finalizeServicesAndProvidersForNetwork(offering, plan.getPhysicalNetworkId())));
|
||||||
|
|
||||||
if (domainId != null && aclType == ACLType.Domain) {
|
if (domainId != null && aclType == ACLType.Domain) {
|
||||||
if (subdomainAccess == null) {
|
_networksDao.addDomainToNetwork(id, domainId, subdomainAccess == null ? true : subdomainAccess);
|
||||||
subdomainAccess = true;
|
|
||||||
}
|
}
|
||||||
_networksDao.addDomainToNetwork(id, domainId, subdomainAccess);
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
txn.commit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (networks.size() < 1) {
|
if (networks.size() < 1) {
|
||||||
@ -681,11 +684,12 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@DB
|
@DB
|
||||||
public void allocate(VirtualMachineProfile vm, LinkedHashMap<? extends Network, ? extends NicProfile> networks) throws InsufficientCapacityException,
|
public void allocate(final VirtualMachineProfile vm, final LinkedHashMap<? extends Network, ? extends NicProfile> networks) throws InsufficientCapacityException,
|
||||||
ConcurrentOperationException {
|
ConcurrentOperationException {
|
||||||
Transaction txn = Transaction.currentTxn();
|
|
||||||
txn.start();
|
|
||||||
|
|
||||||
|
Transaction.execute(new TransactionCallbackWithExceptionNoReturn<InsufficientCapacityException>() {
|
||||||
|
@Override
|
||||||
|
public void doInTransactionWithoutResult(TransactionStatus status) throws InsufficientCapacityException {
|
||||||
int deviceId = 0;
|
int deviceId = 0;
|
||||||
|
|
||||||
boolean[] deviceIds = new boolean[networks.size()];
|
boolean[] deviceIds = new boolean[networks.size()];
|
||||||
@ -746,8 +750,8 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
if (nics.size() == 1) {
|
if (nics.size() == 1) {
|
||||||
nics.get(0).setDefaultNic(true);
|
nics.get(0).setDefaultNic(true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
txn.commit();
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@DB
|
@DB
|
||||||
@ -900,7 +904,6 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
@DB
|
@DB
|
||||||
public Pair<NetworkGuru, NetworkVO> implementNetwork(long networkId, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException,
|
public Pair<NetworkGuru, NetworkVO> implementNetwork(long networkId, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException,
|
||||||
ResourceUnavailableException, InsufficientCapacityException {
|
ResourceUnavailableException, InsufficientCapacityException {
|
||||||
Transaction.currentTxn();
|
|
||||||
Pair<NetworkGuru, NetworkVO> implemented = new Pair<NetworkGuru, NetworkVO>(null, null);
|
Pair<NetworkGuru, NetworkVO> implemented = new Pair<NetworkGuru, NetworkVO>(null, null);
|
||||||
|
|
||||||
NetworkVO network = _networksDao.findById(networkId);
|
NetworkVO network = _networksDao.findById(networkId);
|
||||||
@ -1176,9 +1179,10 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
}
|
}
|
||||||
|
|
||||||
@DB
|
@DB
|
||||||
protected void updateNic(NicVO nic, long networkId, int count) {
|
protected void updateNic(final NicVO nic, final long networkId, final int count) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
Transaction.execute(new TransactionCallbackNoReturn() {
|
||||||
txn.start();
|
@Override
|
||||||
|
public void doInTransactionWithoutResult(TransactionStatus status) {
|
||||||
_nicDao.update(nic.getId(), nic);
|
_nicDao.update(nic.getId(), nic);
|
||||||
|
|
||||||
if (nic.getVmType() == VirtualMachine.Type.User) {
|
if (nic.getVmType() == VirtualMachine.Type.User) {
|
||||||
@ -1190,8 +1194,8 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
(nic.getVmType() == VirtualMachine.Type.DomainRouter && _networksDao.findById(networkId).getTrafficType() == TrafficType.Guest)) {
|
(nic.getVmType() == VirtualMachine.Type.DomainRouter && _networksDao.findById(networkId).getTrafficType() == TrafficType.Guest)) {
|
||||||
_networksDao.setCheckForGc(networkId);
|
_networksDao.setCheckForGc(networkId);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
txn.commit();
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -1414,11 +1418,10 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
}
|
}
|
||||||
|
|
||||||
@DB
|
@DB
|
||||||
protected void releaseNic(VirtualMachineProfile vmProfile, long nicId) throws ConcurrentOperationException, ResourceUnavailableException {
|
protected void releaseNic(final VirtualMachineProfile vmProfile, final long nicId) throws ConcurrentOperationException, ResourceUnavailableException {
|
||||||
//lock the nic
|
Pair<Network,NicProfile> networkToRelease = Transaction.execute(new TransactionCallback<Pair<Network,NicProfile>>() {
|
||||||
Transaction txn = Transaction.currentTxn();
|
@Override
|
||||||
txn.start();
|
public Pair<Network,NicProfile> doInTransaction(TransactionStatus status) {
|
||||||
|
|
||||||
NicVO nic = _nicDao.lockRow(nicId, true);
|
NicVO nic = _nicDao.lockRow(nicId, true);
|
||||||
if (nic == null) {
|
if (nic == null) {
|
||||||
throw new ConcurrentOperationException("Unable to acquire lock on nic " + nic);
|
throw new ConcurrentOperationException("Unable to acquire lock on nic " + nic);
|
||||||
@ -1443,10 +1446,21 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
_nicDao.update(nic.getId(), nic);
|
_nicDao.update(nic.getId(), nic);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//commit the transaction before proceeding releasing nic profile on the network elements
|
|
||||||
txn.commit();
|
|
||||||
|
|
||||||
// Perform release on network elements
|
// Perform release on network elements
|
||||||
|
return new Pair<Network,NicProfile>(network, profile);
|
||||||
|
} else {
|
||||||
|
nic.setState(Nic.State.Allocated);
|
||||||
|
updateNic(nic, network.getId(), -1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (networkToRelease != null) {
|
||||||
|
Network network = networkToRelease.first();
|
||||||
|
NicProfile profile = networkToRelease.second();
|
||||||
List<Provider> providersToImplement = getNetworkProviders(network.getId());
|
List<Provider> providersToImplement = getNetworkProviders(network.getId());
|
||||||
for (NetworkElement element : _networkElements) {
|
for (NetworkElement element : _networkElements) {
|
||||||
if (providersToImplement.contains(element.getProvider())) {
|
if (providersToImplement.contains(element.getProvider())) {
|
||||||
@ -1455,19 +1469,13 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
" either doesn't exist or is not enabled in physical network id: " + network.getPhysicalNetworkId());
|
" either doesn't exist or is not enabled in physical network id: " + network.getPhysicalNetworkId());
|
||||||
}
|
}
|
||||||
if (s_logger.isDebugEnabled()) {
|
if (s_logger.isDebugEnabled()) {
|
||||||
s_logger.debug("Asking " + element.getName() + " to release " + nic);
|
s_logger.debug("Asking " + element.getName() + " to release " + profile);
|
||||||
}
|
}
|
||||||
//NOTE: Context appear to never be used in release method
|
//NOTE: Context appear to never be used in release method
|
||||||
//implementations. Consider removing it from interface Element
|
//implementations. Consider removing it from interface Element
|
||||||
element.release(network, profile, vmProfile, null);
|
element.release(network, profile, vmProfile, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
|
||||||
nic.setState(Nic.State.Allocated);
|
|
||||||
updateNic(nic, network.getId(), -1);
|
|
||||||
txn.commit();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1563,15 +1571,17 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
Network network = _networksDao.findById(nic.getNetworkId());
|
Network network = _networksDao.findById(nic.getNetworkId());
|
||||||
DhcpServiceProvider dhcpServiceProvider = getDhcpServiceProvider(network);
|
DhcpServiceProvider dhcpServiceProvider = getDhcpServiceProvider(network);
|
||||||
try {
|
try {
|
||||||
NicIpAliasVO ipAlias = _nicIpAliasDao.findByGatewayAndNetworkIdAndState(nic.getGateway(), network.getId(), NicIpAlias.state.active);
|
final NicIpAliasVO ipAlias = _nicIpAliasDao.findByGatewayAndNetworkIdAndState(nic.getGateway(), network.getId(), NicIpAlias.state.active);
|
||||||
if (ipAlias != null) {
|
if (ipAlias != null) {
|
||||||
ipAlias.setState(NicIpAlias.state.revoked);
|
ipAlias.setState(NicIpAlias.state.revoked);
|
||||||
Transaction txn = Transaction.currentTxn();
|
Transaction.execute(new TransactionCallbackNoReturn() {
|
||||||
txn.start();
|
@Override
|
||||||
|
public void doInTransactionWithoutResult(TransactionStatus status) {
|
||||||
_nicIpAliasDao.update(ipAlias.getId(), ipAlias);
|
_nicIpAliasDao.update(ipAlias.getId(), ipAlias);
|
||||||
IPAddressVO aliasIpaddressVo = _publicIpAddressDao.findByIpAndSourceNetworkId(ipAlias.getNetworkId(), ipAlias.getIp4Address());
|
IPAddressVO aliasIpaddressVo = _publicIpAddressDao.findByIpAndSourceNetworkId(ipAlias.getNetworkId(), ipAlias.getIp4Address());
|
||||||
_publicIpAddressDao.unassignIpAddress(aliasIpaddressVo.getId());
|
_publicIpAddressDao.unassignIpAddress(aliasIpaddressVo.getId());
|
||||||
txn.commit();
|
}
|
||||||
|
});
|
||||||
if (!dhcpServiceProvider.removeDhcpSupportForSubnet(network)) {
|
if (!dhcpServiceProvider.removeDhcpSupportForSubnet(network)) {
|
||||||
s_logger.warn("Failed to remove the ip alias on the router, marking it as removed in db and freed the allocated ip " + ipAlias.getIp4Address());
|
s_logger.warn("Failed to remove the ip alias on the router, marking it as removed in db and freed the allocated ip " + ipAlias.getIp4Address());
|
||||||
}
|
}
|
||||||
@ -1593,18 +1603,18 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@DB
|
@DB
|
||||||
public Network createGuestNetwork(long networkOfferingId, String name, String displayText, String gateway, String cidr, String vlanId, String networkDomain, Account owner,
|
public Network createGuestNetwork(long networkOfferingId, final String name, final String displayText, final String gateway, final String cidr, String vlanId, String networkDomain, final Account owner,
|
||||||
Long domainId, PhysicalNetwork pNtwk, long zoneId, ACLType aclType, Boolean subdomainAccess, Long vpcId, String ip6Gateway, String ip6Cidr,
|
final Long domainId, final PhysicalNetwork pNtwk, final long zoneId, final ACLType aclType, Boolean subdomainAccess, final Long vpcId, final String ip6Gateway, final String ip6Cidr,
|
||||||
Boolean isDisplayNetworkEnabled, String isolatedPvlan) throws ConcurrentOperationException, InsufficientCapacityException, ResourceAllocationException {
|
final Boolean isDisplayNetworkEnabled, final String isolatedPvlan) throws ConcurrentOperationException, InsufficientCapacityException, ResourceAllocationException {
|
||||||
|
|
||||||
NetworkOfferingVO ntwkOff = _networkOfferingDao.findById(networkOfferingId);
|
final NetworkOfferingVO ntwkOff = _networkOfferingDao.findById(networkOfferingId);
|
||||||
// this method supports only guest network creation
|
// this method supports only guest network creation
|
||||||
if (ntwkOff.getTrafficType() != TrafficType.Guest) {
|
if (ntwkOff.getTrafficType() != TrafficType.Guest) {
|
||||||
s_logger.warn("Only guest networks can be created using this method");
|
s_logger.warn("Only guest networks can be created using this method");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean updateResourceCount = resourceCountNeedsUpdate(ntwkOff, aclType);
|
final boolean updateResourceCount = resourceCountNeedsUpdate(ntwkOff, aclType);
|
||||||
//check resource limits
|
//check resource limits
|
||||||
if (updateResourceCount) {
|
if (updateResourceCount) {
|
||||||
_resourceLimitMgr.checkResourceLimit(owner, ResourceType.network);
|
_resourceLimitMgr.checkResourceLimit(owner, ResourceType.network);
|
||||||
@ -1632,7 +1642,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
ipv6 = true;
|
ipv6 = true;
|
||||||
}
|
}
|
||||||
// Validate zone
|
// Validate zone
|
||||||
DataCenterVO zone = _dcDao.findById(zoneId);
|
final DataCenterVO zone = _dcDao.findById(zoneId);
|
||||||
if (zone.getNetworkType() == NetworkType.Basic) {
|
if (zone.getNetworkType() == NetworkType.Basic) {
|
||||||
if (ipv6) {
|
if (ipv6) {
|
||||||
throw new InvalidParameterValueException("IPv6 is not supported in Basic zone");
|
throw new InvalidParameterValueException("IPv6 is not supported in Basic zone");
|
||||||
@ -1819,16 +1829,19 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn();
|
final String networkDomainFinal = networkDomain;
|
||||||
txn.start();
|
final String vlanIdFinal = vlanId;
|
||||||
|
final Boolean subdomainAccessFinal = subdomainAccess;
|
||||||
|
Network network = Transaction.execute(new TransactionCallback<Network>() {
|
||||||
|
@Override
|
||||||
|
public Network doInTransaction(TransactionStatus status) {
|
||||||
Long physicalNetworkId = null;
|
Long physicalNetworkId = null;
|
||||||
if (pNtwk != null) {
|
if (pNtwk != null) {
|
||||||
physicalNetworkId = pNtwk.getId();
|
physicalNetworkId = pNtwk.getId();
|
||||||
}
|
}
|
||||||
DataCenterDeployment plan = new DataCenterDeployment(zoneId, null, null, null, null, physicalNetworkId);
|
DataCenterDeployment plan = new DataCenterDeployment(zoneId, null, null, null, null, physicalNetworkId);
|
||||||
NetworkVO userNetwork = new NetworkVO();
|
NetworkVO userNetwork = new NetworkVO();
|
||||||
userNetwork.setNetworkDomain(networkDomain);
|
userNetwork.setNetworkDomain(networkDomainFinal);
|
||||||
|
|
||||||
if (cidr != null && gateway != null) {
|
if (cidr != null && gateway != null) {
|
||||||
userNetwork.setCidr(cidr);
|
userNetwork.setCidr(cidr);
|
||||||
@ -1840,25 +1853,25 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
userNetwork.setIp6Gateway(ip6Gateway);
|
userNetwork.setIp6Gateway(ip6Gateway);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vlanId != null) {
|
if (vlanIdFinal != null) {
|
||||||
if (isolatedPvlan == null) {
|
if (isolatedPvlan == null) {
|
||||||
URI uri = BroadcastDomainType.fromString(vlanId);
|
URI uri = BroadcastDomainType.fromString(vlanIdFinal);
|
||||||
userNetwork.setBroadcastUri(uri);
|
userNetwork.setBroadcastUri(uri);
|
||||||
if (!vlanId.equalsIgnoreCase(Vlan.UNTAGGED)) {
|
if (!vlanIdFinal.equalsIgnoreCase(Vlan.UNTAGGED)) {
|
||||||
userNetwork.setBroadcastDomainType(BroadcastDomainType.Vlan);
|
userNetwork.setBroadcastDomainType(BroadcastDomainType.Vlan);
|
||||||
} else {
|
} else {
|
||||||
userNetwork.setBroadcastDomainType(BroadcastDomainType.Native);
|
userNetwork.setBroadcastDomainType(BroadcastDomainType.Native);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (vlanId.equalsIgnoreCase(Vlan.UNTAGGED)) {
|
if (vlanIdFinal.equalsIgnoreCase(Vlan.UNTAGGED)) {
|
||||||
throw new InvalidParameterValueException("Cannot support pvlan with untagged primary vlan!");
|
throw new InvalidParameterValueException("Cannot support pvlan with untagged primary vlan!");
|
||||||
}
|
}
|
||||||
userNetwork.setBroadcastUri(NetUtils.generateUriForPvlan(vlanId, isolatedPvlan));
|
userNetwork.setBroadcastUri(NetUtils.generateUriForPvlan(vlanIdFinal, isolatedPvlan));
|
||||||
userNetwork.setBroadcastDomainType(BroadcastDomainType.Pvlan);
|
userNetwork.setBroadcastDomainType(BroadcastDomainType.Pvlan);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
List<? extends Network> networks = setupNetwork(owner, ntwkOff, userNetwork, plan, name, displayText, true, domainId, aclType, subdomainAccess, vpcId,
|
List<? extends Network> networks = setupNetwork(owner, ntwkOff, userNetwork, plan, name, displayText, true, domainId, aclType, subdomainAccessFinal, vpcId,
|
||||||
isDisplayNetworkEnabled);
|
isDisplayNetworkEnabled);
|
||||||
|
|
||||||
Network network = null;
|
Network network = null;
|
||||||
@ -1883,15 +1896,17 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
_resourceLimitMgr.incrementResourceCount(owner.getId(), ResourceType.network);
|
_resourceLimitMgr.incrementResourceCount(owner.getId(), ResourceType.network);
|
||||||
}
|
}
|
||||||
|
|
||||||
txn.commit();
|
return network;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
CallContext.current().setEventDetails("Network Id: " + network.getId());
|
CallContext.current().setEventDetails("Network Id: " + network.getId());
|
||||||
return network;
|
return network;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@DB
|
@DB
|
||||||
public boolean shutdownNetwork(long networkId, ReservationContext context, boolean cleanupElements) {
|
public boolean shutdownNetwork(final long networkId, ReservationContext context, boolean cleanupElements) {
|
||||||
boolean result = false;
|
|
||||||
NetworkVO network = _networksDao.findById(networkId);
|
NetworkVO network = _networksDao.findById(networkId);
|
||||||
if (network.getState() == Network.State.Allocated) {
|
if (network.getState() == Network.State.Allocated) {
|
||||||
s_logger.debug("Network is already shutdown: " + network);
|
s_logger.debug("Network is already shutdown: " + network);
|
||||||
@ -1936,43 +1951,51 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean success = shutdownNetworkElementsAndResources(context, cleanupElements, network);
|
final boolean success = shutdownNetworkElementsAndResources(context, cleanupElements, network);
|
||||||
|
|
||||||
|
final NetworkVO networkFinal = network;
|
||||||
|
boolean result = Transaction.execute(new TransactionCallback<Boolean>() {
|
||||||
|
@Override
|
||||||
|
public Boolean doInTransaction(TransactionStatus status) {
|
||||||
|
boolean result = false;
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn();
|
|
||||||
txn.start();
|
|
||||||
if (success) {
|
if (success) {
|
||||||
if (s_logger.isDebugEnabled()) {
|
if (s_logger.isDebugEnabled()) {
|
||||||
s_logger.debug("Network id=" + networkId + " is shutdown successfully, cleaning up corresponding resources now.");
|
s_logger.debug("Network id=" + networkId + " is shutdown successfully, cleaning up corresponding resources now.");
|
||||||
}
|
}
|
||||||
NetworkGuru guru = AdapterBase.getAdapterByName(_networkGurus, network.getGuruName());
|
NetworkGuru guru = AdapterBase.getAdapterByName(_networkGurus, networkFinal.getGuruName());
|
||||||
NetworkProfile profile = convertNetworkToNetworkProfile(network.getId());
|
NetworkProfile profile = convertNetworkToNetworkProfile(networkFinal.getId());
|
||||||
guru.shutdown(profile, _networkOfferingDao.findById(network.getNetworkOfferingId()));
|
guru.shutdown(profile, _networkOfferingDao.findById(networkFinal.getNetworkOfferingId()));
|
||||||
|
|
||||||
applyProfileToNetwork(network, profile);
|
applyProfileToNetwork(networkFinal, profile);
|
||||||
DataCenterVO zone = _dcDao.findById(network.getDataCenterId());
|
DataCenterVO zone = _dcDao.findById(networkFinal.getDataCenterId());
|
||||||
if (isSharedNetworkOfferingWithServices(network.getNetworkOfferingId()) && (zone.getNetworkType() == NetworkType.Advanced)) {
|
if (isSharedNetworkOfferingWithServices(networkFinal.getNetworkOfferingId()) && (zone.getNetworkType() == NetworkType.Advanced)) {
|
||||||
network.setState(Network.State.Setup);
|
networkFinal.setState(Network.State.Setup);
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
stateTransitTo(network, Event.OperationSucceeded);
|
stateTransitTo(networkFinal, Event.OperationSucceeded);
|
||||||
} catch (NoTransitionException e) {
|
} catch (NoTransitionException e) {
|
||||||
network.setState(Network.State.Allocated);
|
networkFinal.setState(Network.State.Allocated);
|
||||||
network.setRestartRequired(false);
|
networkFinal.setRestartRequired(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_networksDao.update(network.getId(), network);
|
_networksDao.update(networkFinal.getId(), networkFinal);
|
||||||
_networksDao.clearCheckForGc(networkId);
|
_networksDao.clearCheckForGc(networkId);
|
||||||
result = true;
|
result = true;
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
stateTransitTo(network, Event.OperationFailed);
|
stateTransitTo(networkFinal, Event.OperationFailed);
|
||||||
} catch (NoTransitionException e) {
|
} catch (NoTransitionException e) {
|
||||||
network.setState(Network.State.Implemented);
|
networkFinal.setState(Network.State.Implemented);
|
||||||
_networksDao.update(network.getId(), network);
|
_networksDao.update(networkFinal.getId(), networkFinal);
|
||||||
}
|
}
|
||||||
result = false;
|
result = false;
|
||||||
}
|
}
|
||||||
txn.commit();
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
} finally {
|
} finally {
|
||||||
if (network != null) {
|
if (network != null) {
|
||||||
@ -2036,8 +2059,8 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@DB
|
@DB
|
||||||
public boolean destroyNetwork(long networkId, ReservationContext context) {
|
public boolean destroyNetwork(long networkId, final ReservationContext context) {
|
||||||
Account callerAccount = context.getAccount();
|
final Account callerAccount = context.getAccount();
|
||||||
|
|
||||||
NetworkVO network = _networksDao.findById(networkId);
|
NetworkVO network = _networksDao.findById(networkId);
|
||||||
if (network == null) {
|
if (network == null) {
|
||||||
@ -2126,38 +2149,48 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
if (s_logger.isDebugEnabled()) {
|
if (s_logger.isDebugEnabled()) {
|
||||||
s_logger.debug("Network id=" + networkId + " is destroyed successfully, cleaning up corresponding resources now.");
|
s_logger.debug("Network id=" + networkId + " is destroyed successfully, cleaning up corresponding resources now.");
|
||||||
}
|
}
|
||||||
NetworkGuru guru = AdapterBase.getAdapterByName(_networkGurus, network.getGuruName());
|
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn();
|
final NetworkVO networkFinal = network;
|
||||||
txn.start();
|
try {
|
||||||
guru.trash(network, _networkOfferingDao.findById(network.getNetworkOfferingId()));
|
Transaction.execute(new TransactionCallbackNoReturn() {
|
||||||
|
@Override
|
||||||
|
public void doInTransactionWithoutResult(TransactionStatus status) {
|
||||||
|
NetworkGuru guru = AdapterBase.getAdapterByName(_networkGurus, networkFinal.getGuruName());
|
||||||
|
|
||||||
if (!deleteVlansInNetwork(network.getId(), context.getCaller().getId(), callerAccount)) {
|
guru.trash(networkFinal, _networkOfferingDao.findById(networkFinal.getNetworkOfferingId()));
|
||||||
success = false;
|
|
||||||
s_logger.warn("Failed to delete network " + network + "; was unable to cleanup corresponding ip ranges");
|
if (!deleteVlansInNetwork(networkFinal.getId(), context.getCaller().getId(), callerAccount)) {
|
||||||
|
s_logger.warn("Failed to delete network " + networkFinal + "; was unable to cleanup corresponding ip ranges");
|
||||||
|
throw new CloudRuntimeException("Failed to delete network " + networkFinal + "; was unable to cleanup corresponding ip ranges");
|
||||||
} else {
|
} else {
|
||||||
// commit transaction only when ips and vlans for the network are released successfully
|
// commit transaction only when ips and vlans for the network are released successfully
|
||||||
try {
|
try {
|
||||||
stateTransitTo(network, Event.DestroyNetwork);
|
stateTransitTo(networkFinal, Event.DestroyNetwork);
|
||||||
} catch (NoTransitionException e) {
|
} catch (NoTransitionException e) {
|
||||||
s_logger.debug(e.getMessage());
|
s_logger.debug(e.getMessage());
|
||||||
}
|
}
|
||||||
if (_networksDao.remove(network.getId())) {
|
if (_networksDao.remove(networkFinal.getId())) {
|
||||||
NetworkDomainVO networkDomain = _networkDomainDao.getDomainNetworkMapByNetworkId(network.getId());
|
NetworkDomainVO networkDomain = _networkDomainDao.getDomainNetworkMapByNetworkId(networkFinal.getId());
|
||||||
if (networkDomain != null)
|
if (networkDomain != null)
|
||||||
_networkDomainDao.remove(networkDomain.getId());
|
_networkDomainDao.remove(networkDomain.getId());
|
||||||
|
|
||||||
NetworkAccountVO networkAccount = _networkAccountDao.getAccountNetworkMapByNetworkId(network.getId());
|
NetworkAccountVO networkAccount = _networkAccountDao.getAccountNetworkMapByNetworkId(networkFinal.getId());
|
||||||
if (networkAccount != null)
|
if (networkAccount != null)
|
||||||
_networkAccountDao.remove(networkAccount.getId());
|
_networkAccountDao.remove(networkAccount.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
NetworkOffering ntwkOff = _entityMgr.findById(NetworkOffering.class, network.getNetworkOfferingId());
|
NetworkOffering ntwkOff = _entityMgr.findById(NetworkOffering.class, networkFinal.getNetworkOfferingId());
|
||||||
boolean updateResourceCount = resourceCountNeedsUpdate(ntwkOff, network.getAclType());
|
boolean updateResourceCount = resourceCountNeedsUpdate(ntwkOff, networkFinal.getAclType());
|
||||||
if (updateResourceCount) {
|
if (updateResourceCount) {
|
||||||
_resourceLimitMgr.decrementResourceCount(network.getAccountId(), ResourceType.network);
|
_resourceLimitMgr.decrementResourceCount(networkFinal.getAccountId(), ResourceType.network);
|
||||||
}
|
}
|
||||||
txn.commit();
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
} catch ( CloudRuntimeException e ) {
|
||||||
|
s_logger.error("Failed to delete network", e);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2426,24 +2459,22 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
|
|
||||||
@DB
|
@DB
|
||||||
@Override
|
@Override
|
||||||
public boolean reallocate(VirtualMachineProfile vm, DataCenterDeployment dest) throws InsufficientCapacityException, ConcurrentOperationException {
|
public boolean reallocate(final VirtualMachineProfile vm, DataCenterDeployment dest) throws InsufficientCapacityException, ConcurrentOperationException {
|
||||||
VMInstanceVO vmInstance = _vmDao.findById(vm.getId());
|
VMInstanceVO vmInstance = _vmDao.findById(vm.getId());
|
||||||
DataCenterVO dc = _dcDao.findById(vmInstance.getDataCenterId());
|
DataCenterVO dc = _dcDao.findById(vmInstance.getDataCenterId());
|
||||||
if (dc.getNetworkType() == NetworkType.Basic) {
|
if (dc.getNetworkType() == NetworkType.Basic) {
|
||||||
List<NicVO> nics = _nicDao.listByVmId(vmInstance.getId());
|
List<NicVO> nics = _nicDao.listByVmId(vmInstance.getId());
|
||||||
NetworkVO network = _networksDao.findById(nics.get(0).getNetworkId());
|
NetworkVO network = _networksDao.findById(nics.get(0).getNetworkId());
|
||||||
LinkedHashMap<Network, NicProfile> profiles = new LinkedHashMap<Network, NicProfile>();
|
final LinkedHashMap<Network, NicProfile> profiles = new LinkedHashMap<Network, NicProfile>();
|
||||||
profiles.put(network, null);
|
profiles.put(network, null);
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn();
|
Transaction.execute(new TransactionCallbackWithExceptionNoReturn<InsufficientCapacityException>() {
|
||||||
txn.start();
|
@Override
|
||||||
|
public void doInTransactionWithoutResult(TransactionStatus status) throws InsufficientCapacityException {
|
||||||
try {
|
|
||||||
cleanupNics(vm);
|
cleanupNics(vm);
|
||||||
allocate(vm, profiles);
|
allocate(vm, profiles);
|
||||||
} finally {
|
|
||||||
txn.commit();
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -3050,9 +3081,10 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
return nic.getSecondaryIp();
|
return nic.getSecondaryIp();
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean removeVmSecondaryIpsOfNic(long nicId) {
|
private boolean removeVmSecondaryIpsOfNic(final long nicId) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
Transaction.execute(new TransactionCallbackNoReturn() {
|
||||||
txn.start();
|
@Override
|
||||||
|
public void doInTransactionWithoutResult(TransactionStatus status) {
|
||||||
List<NicSecondaryIpVO> ipList = _nicSecondaryIpDao.listByNicId(nicId);
|
List<NicSecondaryIpVO> ipList = _nicSecondaryIpDao.listByNicId(nicId);
|
||||||
if (ipList != null) {
|
if (ipList != null) {
|
||||||
for (NicSecondaryIpVO ip : ipList) {
|
for (NicSecondaryIpVO ip : ipList) {
|
||||||
@ -3060,7 +3092,9 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||||||
}
|
}
|
||||||
s_logger.debug("Revoving nic secondary ip entry ...");
|
s_logger.debug("Revoving nic secondary ip entry ...");
|
||||||
}
|
}
|
||||||
txn.commit();
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,6 @@ import javax.inject.Inject;
|
|||||||
import javax.naming.ConfigurationException;
|
import javax.naming.ConfigurationException;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
import org.apache.cloudstack.engine.orchestration.service.VolumeOrchestrationService;
|
import org.apache.cloudstack.engine.orchestration.service.VolumeOrchestrationService;
|
||||||
import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
|
import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
|
||||||
import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
|
import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
|
||||||
@ -97,6 +96,9 @@ import com.cloud.utils.component.ManagerBase;
|
|||||||
import com.cloud.utils.db.DB;
|
import com.cloud.utils.db.DB;
|
||||||
import com.cloud.utils.db.EntityManager;
|
import com.cloud.utils.db.EntityManager;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.Transaction;
|
||||||
|
import com.cloud.utils.db.TransactionCallback;
|
||||||
|
import com.cloud.utils.db.TransactionCallbackNoReturn;
|
||||||
|
import com.cloud.utils.db.TransactionStatus;
|
||||||
import com.cloud.utils.exception.CloudRuntimeException;
|
import com.cloud.utils.exception.CloudRuntimeException;
|
||||||
import com.cloud.utils.fsm.NoTransitionException;
|
import com.cloud.utils.fsm.NoTransitionException;
|
||||||
import com.cloud.utils.fsm.StateMachine2;
|
import com.cloud.utils.fsm.StateMachine2;
|
||||||
@ -681,9 +683,7 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati
|
|||||||
}
|
}
|
||||||
|
|
||||||
@DB
|
@DB
|
||||||
protected VolumeVO switchVolume(VolumeVO existingVolume, VirtualMachineProfile vm) throws StorageUnavailableException {
|
protected VolumeVO switchVolume(final VolumeVO existingVolume, final VirtualMachineProfile vm) throws StorageUnavailableException {
|
||||||
Transaction txn = Transaction.currentTxn();
|
|
||||||
|
|
||||||
Long templateIdToUse = null;
|
Long templateIdToUse = null;
|
||||||
Long volTemplateId = existingVolume.getTemplateId();
|
Long volTemplateId = existingVolume.getTemplateId();
|
||||||
long vmTemplateId = vm.getTemplateId();
|
long vmTemplateId = vm.getTemplateId();
|
||||||
@ -695,8 +695,11 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati
|
|||||||
templateIdToUse = vmTemplateId;
|
templateIdToUse = vmTemplateId;
|
||||||
}
|
}
|
||||||
|
|
||||||
txn.start();
|
final Long templateIdToUseFinal = templateIdToUse;
|
||||||
VolumeVO newVolume = allocateDuplicateVolumeVO(existingVolume, templateIdToUse);
|
return Transaction.execute(new TransactionCallback<VolumeVO>() {
|
||||||
|
@Override
|
||||||
|
public VolumeVO doInTransaction(TransactionStatus status) {
|
||||||
|
VolumeVO newVolume = allocateDuplicateVolumeVO(existingVolume, templateIdToUseFinal);
|
||||||
// In case of Vmware if vm reference is not removed then during root
|
// In case of Vmware if vm reference is not removed then during root
|
||||||
// disk cleanup
|
// disk cleanup
|
||||||
// the vm also gets deleted, so remove the reference
|
// the vm also gets deleted, so remove the reference
|
||||||
@ -708,9 +711,10 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati
|
|||||||
} catch (NoTransitionException e) {
|
} catch (NoTransitionException e) {
|
||||||
s_logger.debug("Unable to destroy existing volume: " + e.toString());
|
s_logger.debug("Unable to destroy existing volume: " + e.toString());
|
||||||
}
|
}
|
||||||
txn.commit();
|
|
||||||
return newVolume;
|
|
||||||
|
|
||||||
|
return newVolume;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -724,10 +728,12 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati
|
|||||||
if (s_logger.isDebugEnabled()) {
|
if (s_logger.isDebugEnabled()) {
|
||||||
s_logger.debug("Cleaning storage for vm: " + vmId);
|
s_logger.debug("Cleaning storage for vm: " + vmId);
|
||||||
}
|
}
|
||||||
List<VolumeVO> volumesForVm = _volsDao.findByInstance(vmId);
|
final List<VolumeVO> volumesForVm = _volsDao.findByInstance(vmId);
|
||||||
List<VolumeVO> toBeExpunged = new ArrayList<VolumeVO>();
|
final List<VolumeVO> toBeExpunged = new ArrayList<VolumeVO>();
|
||||||
Transaction txn = Transaction.currentTxn();
|
|
||||||
txn.start();
|
Transaction.execute(new TransactionCallbackNoReturn() {
|
||||||
|
@Override
|
||||||
|
public void doInTransactionWithoutResult(TransactionStatus status) {
|
||||||
for (VolumeVO vol : volumesForVm) {
|
for (VolumeVO vol : volumesForVm) {
|
||||||
if (vol.getVolumeType().equals(Type.ROOT)) {
|
if (vol.getVolumeType().equals(Type.ROOT)) {
|
||||||
// Destroy volume if not already destroyed
|
// Destroy volume if not already destroyed
|
||||||
@ -745,7 +751,9 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati
|
|||||||
_volsDao.detachVolume(vol.getId());
|
_volsDao.detachVolume(vol.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
txn.commit();
|
}
|
||||||
|
});
|
||||||
|
|
||||||
AsyncCallFuture<VolumeApiResult> future = null;
|
AsyncCallFuture<VolumeApiResult> future = null;
|
||||||
for (VolumeVO expunge : toBeExpunged) {
|
for (VolumeVO expunge : toBeExpunged) {
|
||||||
future = volService.expungeVolumeAsync(volFactory.getVolume(expunge.getId()));
|
future = volService.expungeVolumeAsync(volFactory.getVolume(expunge.getId()));
|
||||||
|
|||||||
@ -0,0 +1,322 @@
|
|||||||
|
<!--
|
||||||
|
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="networkDetailsDaoImpl" class="com.cloud.network.dao.NetworkDetailsDaoImpl" />
|
||||||
|
|
||||||
|
<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>
|
||||||
@ -29,7 +29,7 @@ import com.cloud.utils.db.GenericDaoBase;
|
|||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.SearchCriteria.Op;
|
import com.cloud.utils.db.SearchCriteria.Op;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Local(value = { AlertDao.class })
|
@Local(value = { AlertDao.class })
|
||||||
@ -116,7 +116,7 @@ public class AlertDaoImpl extends GenericDaoBase<AlertVO, Long> implements Alert
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
if (alerts != null && !alerts.isEmpty()) {
|
if (alerts != null && !alerts.isEmpty()) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
for (AlertVO alert : alerts) {
|
for (AlertVO alert : alerts) {
|
||||||
alert = lockRow(alert.getId(), true);
|
alert = lockRow(alert.getId(), true);
|
||||||
|
|||||||
@ -46,7 +46,7 @@ import com.cloud.utils.db.SearchBuilder;
|
|||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.SearchCriteria.Func;
|
import com.cloud.utils.db.SearchCriteria.Func;
|
||||||
import com.cloud.utils.db.SearchCriteria.Op;
|
import com.cloud.utils.db.SearchCriteria.Op;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
import com.cloud.utils.exception.CloudRuntimeException;
|
import com.cloud.utils.exception.CloudRuntimeException;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@ -186,7 +186,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
|
|||||||
@Override
|
@Override
|
||||||
public List<Long> listClustersCrossingThreshold(short capacityType, Long zoneId, String configName, long compute_requested){
|
public List<Long> listClustersCrossingThreshold(short capacityType, Long zoneId, String configName, long compute_requested){
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
List<Long> result = new ArrayList<Long>();
|
List<Long> result = new ArrayList<Long>();
|
||||||
StringBuilder sql = new StringBuilder(LIST_CLUSTERS_CROSSING_THRESHOLD);
|
StringBuilder sql = new StringBuilder(LIST_CLUSTERS_CROSSING_THRESHOLD);
|
||||||
@ -241,7 +241,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
|
|||||||
@Override
|
@Override
|
||||||
public List<SummedCapacity> findCapacityBy(Integer capacityType, Long zoneId, Long podId, Long clusterId, String resource_state){
|
public List<SummedCapacity> findCapacityBy(Integer capacityType, Long zoneId, Long podId, Long clusterId, String resource_state){
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
List<SummedCapacity> result = new ArrayList<SummedCapacity>();
|
List<SummedCapacity> result = new ArrayList<SummedCapacity>();
|
||||||
|
|
||||||
@ -291,7 +291,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
|
|||||||
public List<SummedCapacity> listCapacitiesGroupedByLevelAndType(Integer capacityType, Long zoneId, Long podId, Long clusterId, int level, Long limit){
|
public List<SummedCapacity> listCapacitiesGroupedByLevelAndType(Integer capacityType, Long zoneId, Long podId, Long clusterId, int level, Long limit){
|
||||||
|
|
||||||
StringBuilder finalQuery = new StringBuilder();
|
StringBuilder finalQuery = new StringBuilder();
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
List<SummedCapacity> result = new ArrayList<SummedCapacity>();
|
List<SummedCapacity> result = new ArrayList<SummedCapacity>();
|
||||||
|
|
||||||
@ -378,7 +378,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
|
|||||||
@Override
|
@Override
|
||||||
public List<SummedCapacity> findCapacityBy(Integer capacityType, Long zoneId, Long podId, Long clusterId){
|
public List<SummedCapacity> findCapacityBy(Integer capacityType, Long zoneId, Long podId, Long clusterId){
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
List<SummedCapacity> result = new ArrayList<SummedCapacity>();
|
List<SummedCapacity> result = new ArrayList<SummedCapacity>();
|
||||||
|
|
||||||
@ -425,7 +425,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void updateAllocated(Long hostId, long allocatedAmount, short capacityType, boolean add) {
|
public void updateAllocated(Long hostId, long allocatedAmount, short capacityType, boolean add) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
@ -458,7 +458,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Long> listClustersInZoneOrPodByHostCapacities(long id, int requiredCpu, long requiredRam, short capacityTypeForOrdering, boolean isZone){
|
public List<Long> listClustersInZoneOrPodByHostCapacities(long id, int requiredCpu, long requiredRam, short capacityTypeForOrdering, boolean isZone){
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
List<Long> result = new ArrayList<Long>();
|
List<Long> result = new ArrayList<Long>();
|
||||||
|
|
||||||
@ -503,7 +503,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Long> listHostsWithEnoughCapacity(int requiredCpu, long requiredRam, Long clusterId, String hostType){
|
public List<Long> listHostsWithEnoughCapacity(int requiredCpu, long requiredRam, Long clusterId, String hostType){
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
List<Long> result = new ArrayList<Long>();
|
List<Long> result = new ArrayList<Long>();
|
||||||
|
|
||||||
@ -599,7 +599,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
|
|||||||
@Override
|
@Override
|
||||||
public List<SummedCapacity> findByClusterPodZone(Long zoneId, Long podId, Long clusterId){
|
public List<SummedCapacity> findByClusterPodZone(Long zoneId, Long podId, Long clusterId){
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
List<SummedCapacity> result = new ArrayList<SummedCapacity>();
|
List<SummedCapacity> result = new ArrayList<SummedCapacity>();
|
||||||
|
|
||||||
@ -711,7 +711,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Pair<List<Long>, Map<Long, Double>> orderClustersByAggregateCapacity(long id, short capacityTypeForOrdering, boolean isZone){
|
public Pair<List<Long>, Map<Long, Double>> orderClustersByAggregateCapacity(long id, short capacityTypeForOrdering, boolean isZone){
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
List<Long> result = new ArrayList<Long>();
|
List<Long> result = new ArrayList<Long>();
|
||||||
Map<Long, Double> clusterCapacityMap = new HashMap<Long, Double>();
|
Map<Long, Double> clusterCapacityMap = new HashMap<Long, Double>();
|
||||||
@ -764,7 +764,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Long> listPodsByHostCapacities(long zoneId, int requiredCpu, long requiredRam, short capacityType) {
|
public List<Long> listPodsByHostCapacities(long zoneId, int requiredCpu, long requiredRam, short capacityType) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
List<Long> result = new ArrayList<Long>();
|
List<Long> result = new ArrayList<Long>();
|
||||||
|
|
||||||
@ -798,7 +798,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Pair<List<Long>, Map<Long, Double>> orderPodsByAggregateCapacity(long zoneId, short capacityTypeForOrdering) {
|
public Pair<List<Long>, Map<Long, Double>> orderPodsByAggregateCapacity(long zoneId, short capacityTypeForOrdering) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
List<Long> result = new ArrayList<Long>();
|
List<Long> result = new ArrayList<Long>();
|
||||||
Map<Long, Double> podCapacityMap = new HashMap<Long, Double>();
|
Map<Long, Double> podCapacityMap = new HashMap<Long, Double>();
|
||||||
@ -840,7 +840,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateCapacityState(Long dcId, Long podId, Long clusterId, Long hostId, String capacityState) {
|
public void updateCapacityState(Long dcId, Long podId, Long clusterId, Long hostId, String capacityState) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
StringBuilder sql = new StringBuilder(UPDATE_CAPACITY_STATE);
|
StringBuilder sql = new StringBuilder(UPDATE_CAPACITY_STATE);
|
||||||
List<Long> resourceIdList = new ArrayList<Long>();
|
List<Long> resourceIdList = new ArrayList<Long>();
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,7 @@ import com.cloud.utils.db.DB;
|
|||||||
import com.cloud.utils.db.GenericDaoBase;
|
import com.cloud.utils.db.GenericDaoBase;
|
||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Local(value={ResourceCountDao.class})
|
@Local(value={ResourceCountDao.class})
|
||||||
@ -158,7 +158,7 @@ public class ResourceCountDaoImpl extends GenericDaoBase<ResourceCountVO, Long>
|
|||||||
@Override @DB
|
@Override @DB
|
||||||
public void createResourceCounts(long ownerId, ResourceLimit.ResourceOwnerType ownerType){
|
public void createResourceCounts(long ownerId, ResourceLimit.ResourceOwnerType ownerType){
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
|
|
||||||
ResourceType[] resourceTypes = Resource.ResourceType.values();
|
ResourceType[] resourceTypes = Resource.ResourceType.values();
|
||||||
|
|||||||
@ -30,7 +30,7 @@ import com.cloud.utils.crypt.DBEncryptionUtil;
|
|||||||
import com.cloud.utils.db.GenericDaoBase;
|
import com.cloud.utils.db.GenericDaoBase;
|
||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Local(value=ClusterDetailsDao.class)
|
@Local(value=ClusterDetailsDao.class)
|
||||||
public class ClusterDetailsDaoImpl extends GenericDaoBase<ClusterDetailsVO, Long> implements ClusterDetailsDao, ScopedConfigStorage {
|
public class ClusterDetailsDaoImpl extends GenericDaoBase<ClusterDetailsVO, Long> implements ClusterDetailsDao, ScopedConfigStorage {
|
||||||
@ -100,7 +100,7 @@ public class ClusterDetailsDaoImpl extends GenericDaoBase<ClusterDetailsVO, Long
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void persist(long clusterId, Map<String, String> details) {
|
public void persist(long clusterId, Map<String, String> details) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<ClusterDetailsVO> sc = ClusterSearch.create();
|
SearchCriteria<ClusterDetailsVO> sc = ClusterSearch.create();
|
||||||
sc.setParameters("clusterId", clusterId);
|
sc.setParameters("clusterId", clusterId);
|
||||||
@ -119,7 +119,7 @@ public class ClusterDetailsDaoImpl extends GenericDaoBase<ClusterDetailsVO, Long
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void persist(long clusterId, String name, String value) {
|
public void persist(long clusterId, String name, String value) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<ClusterDetailsVO> sc = DetailSearch.create();
|
SearchCriteria<ClusterDetailsVO> sc = DetailSearch.create();
|
||||||
sc.setParameters("clusterId", clusterId);
|
sc.setParameters("clusterId", clusterId);
|
||||||
|
|||||||
@ -40,7 +40,7 @@ import com.cloud.utils.db.SearchBuilder;
|
|||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.SearchCriteria.Func;
|
import com.cloud.utils.db.SearchCriteria.Func;
|
||||||
import com.cloud.utils.db.SearchCriteria.Op;
|
import com.cloud.utils.db.SearchCriteria.Op;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
import com.cloud.utils.exception.CloudRuntimeException;
|
import com.cloud.utils.exception.CloudRuntimeException;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@ -156,7 +156,7 @@ public class ClusterDaoImpl extends GenericDaoBase<ClusterVO, Long> implements C
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<Long, List<Long>> getPodClusterIdMap(List<Long> clusterIds){
|
public Map<Long, List<Long>> getPodClusterIdMap(List<Long> clusterIds){
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
Map<Long, List<Long>> result = new HashMap<Long, List<Long>>();
|
Map<Long, List<Long>> result = new HashMap<Long, List<Long>>();
|
||||||
|
|
||||||
@ -243,7 +243,7 @@ public class ClusterDaoImpl extends GenericDaoBase<ClusterVO, Long> implements C
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean remove(Long id) {
|
public boolean remove(Long id) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
ClusterVO cluster = createForUpdate();
|
ClusterVO cluster = createForUpdate();
|
||||||
cluster.setName(null);
|
cluster.setName(null);
|
||||||
|
|||||||
@ -26,7 +26,7 @@ import com.cloud.utils.db.DB;
|
|||||||
import com.cloud.utils.db.GenericDaoBase;
|
import com.cloud.utils.db.GenericDaoBase;
|
||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Local(value=ClusterVSMMapDao.class)
|
@Local(value=ClusterVSMMapDao.class)
|
||||||
@ -79,7 +79,7 @@ public class ClusterVSMMapDaoImpl extends GenericDaoBase<ClusterVSMMapVO, Long>
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean remove(Long id) {
|
public boolean remove(Long id) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
ClusterVSMMapVO cluster = createForUpdate();
|
ClusterVSMMapVO cluster = createForUpdate();
|
||||||
//cluster.setClusterId(null);
|
//cluster.setClusterId(null);
|
||||||
|
|||||||
@ -44,7 +44,7 @@ import com.cloud.utils.db.GenericDaoBase;
|
|||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.SequenceFetcher;
|
import com.cloud.utils.db.SequenceFetcher;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
import com.cloud.utils.net.NetUtils;
|
import com.cloud.utils.net.NetUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -343,7 +343,7 @@ public class DataCenterDaoImpl extends GenericDaoBase<DataCenterVO, Long> implem
|
|||||||
|
|
||||||
@Override @DB
|
@Override @DB
|
||||||
public boolean update(Long zoneId, DataCenterVO zone) {
|
public boolean update(Long zoneId, DataCenterVO zone) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
boolean persisted = super.update(zoneId, zone);
|
boolean persisted = super.update(zoneId, zone);
|
||||||
if (!persisted) {
|
if (!persisted) {
|
||||||
@ -408,7 +408,7 @@ public class DataCenterDaoImpl extends GenericDaoBase<DataCenterVO, Long> implem
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean remove(Long id) {
|
public boolean remove(Long id) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
DataCenterVO zone = createForUpdate();
|
DataCenterVO zone = createForUpdate();
|
||||||
zone.setName(null);
|
zone.setName(null);
|
||||||
|
|||||||
@ -33,7 +33,7 @@ import com.cloud.utils.db.GenericSearchBuilder;
|
|||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.SearchCriteria.Func;
|
import com.cloud.utils.db.SearchCriteria.Func;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
import com.cloud.utils.exception.CloudRuntimeException;
|
import com.cloud.utils.exception.CloudRuntimeException;
|
||||||
import com.cloud.utils.net.NetUtils;
|
import com.cloud.utils.net.NetUtils;
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ public class DataCenterIpAddressDaoImpl extends GenericDaoBase<DataCenterIpAddre
|
|||||||
sc.setParameters("pod", podId);
|
sc.setParameters("pod", podId);
|
||||||
sc.setParameters("taken", (Date)null);
|
sc.setParameters("taken", (Date)null);
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
DataCenterIpAddressVO vo = lockOneRandomRow(sc, true);
|
DataCenterIpAddressVO vo = lockOneRandomRow(sc, true);
|
||||||
if (vo == null) {
|
if (vo == null) {
|
||||||
@ -73,7 +73,7 @@ public class DataCenterIpAddressDaoImpl extends GenericDaoBase<DataCenterIpAddre
|
|||||||
sc.setParameters("dc", dcId);
|
sc.setParameters("dc", dcId);
|
||||||
sc.setParameters("taken", (Date)null);
|
sc.setParameters("taken", (Date)null);
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
DataCenterIpAddressVO vo = lockOneRandomRow(sc, true);
|
DataCenterIpAddressVO vo = lockOneRandomRow(sc, true);
|
||||||
if (vo == null) {
|
if (vo == null) {
|
||||||
@ -108,7 +108,7 @@ public class DataCenterIpAddressDaoImpl extends GenericDaoBase<DataCenterIpAddre
|
|||||||
|
|
||||||
@DB
|
@DB
|
||||||
public void addIpRange(long dcId, long podId, String start, String end) {
|
public void addIpRange(long dcId, long podId, String start, String end) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
String insertSql = "INSERT INTO `cloud`.`op_dc_ip_address_alloc` (ip_address, data_center_id, pod_id, mac_address) VALUES (?, ?, ?, (select mac_address from `cloud`.`data_center` where id=?))";
|
String insertSql = "INSERT INTO `cloud`.`op_dc_ip_address_alloc` (ip_address, data_center_id, pod_id, mac_address) VALUES (?, ?, ?, (select mac_address from `cloud`.`data_center` where id=?))";
|
||||||
String updateSql = "UPDATE `cloud`.`data_center` set mac_address = mac_address+1 where id=?";
|
String updateSql = "UPDATE `cloud`.`data_center` set mac_address = mac_address+1 where id=?";
|
||||||
PreparedStatement stmt = null;
|
PreparedStatement stmt = null;
|
||||||
|
|||||||
@ -35,7 +35,7 @@ import com.cloud.utils.db.GenericSearchBuilder;
|
|||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.SearchCriteria.Func;
|
import com.cloud.utils.db.SearchCriteria.Func;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
import com.cloud.utils.exception.CloudRuntimeException;
|
import com.cloud.utils.exception.CloudRuntimeException;
|
||||||
import com.cloud.utils.net.NetUtils;
|
import com.cloud.utils.net.NetUtils;
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ public class DataCenterLinkLocalIpAddressDaoImpl extends GenericDaoBase<DataCent
|
|||||||
sc.setParameters("pod", podId);
|
sc.setParameters("pod", podId);
|
||||||
sc.setParameters("taken", (Date)null);
|
sc.setParameters("taken", (Date)null);
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
|
|
||||||
DataCenterLinkLocalIpAddressVO vo = lockOneRandomRow(sc, true);
|
DataCenterLinkLocalIpAddressVO vo = lockOneRandomRow(sc, true);
|
||||||
@ -84,7 +84,7 @@ public class DataCenterLinkLocalIpAddressDaoImpl extends GenericDaoBase<DataCent
|
|||||||
long startIP = NetUtils.ip2Long(start);
|
long startIP = NetUtils.ip2Long(start);
|
||||||
long endIP = NetUtils.ip2Long(end);
|
long endIP = NetUtils.ip2Long(end);
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
stmt = txn.prepareAutoCloseStatement(insertSql);
|
stmt = txn.prepareAutoCloseStatement(insertSql);
|
||||||
|
|||||||
@ -21,6 +21,7 @@ import java.util.List;
|
|||||||
import com.cloud.dc.DataCenterVnetVO;
|
import com.cloud.dc.DataCenterVnetVO;
|
||||||
import com.cloud.utils.db.GenericDao;
|
import com.cloud.utils.db.GenericDao;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.Transaction;
|
||||||
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
public interface DataCenterVnetDao extends GenericDao<DataCenterVnetVO, Long> {
|
public interface DataCenterVnetDao extends GenericDao<DataCenterVnetVO, Long> {
|
||||||
public List<DataCenterVnetVO> listAllocatedVnets(long physicalNetworkId);
|
public List<DataCenterVnetVO> listAllocatedVnets(long physicalNetworkId);
|
||||||
@ -33,7 +34,7 @@ public interface DataCenterVnetDao extends GenericDao<DataCenterVnetVO, Long> {
|
|||||||
|
|
||||||
public void delete(long physicalNetworkId);
|
public void delete(long physicalNetworkId);
|
||||||
|
|
||||||
public void deleteVnets(Transaction txn, long dcId, long physicalNetworkId, List<String> vnets);
|
public void deleteVnets(TransactionLegacy txn, long dcId, long physicalNetworkId, List<String> vnets);
|
||||||
|
|
||||||
public void lockRange(long dcId, long physicalNetworkId, Integer start, Integer end);
|
public void lockRange(long dcId, long physicalNetworkId, Integer start, Integer end);
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@ import com.cloud.utils.db.SearchBuilder;
|
|||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.SearchCriteria.Func;
|
import com.cloud.utils.db.SearchCriteria.Func;
|
||||||
import com.cloud.utils.db.SearchCriteria.Op;
|
import com.cloud.utils.db.SearchCriteria.Op;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
import com.cloud.utils.exception.CloudRuntimeException;
|
import com.cloud.utils.exception.CloudRuntimeException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -121,7 +121,7 @@ public class DataCenterVnetDaoImpl extends GenericDaoBase<DataCenterVnetVO, Long
|
|||||||
public void add(long dcId, long physicalNetworkId, List<String> vnets) {
|
public void add(long dcId, long physicalNetworkId, List<String> vnets) {
|
||||||
String insertVnet = "INSERT INTO `cloud`.`op_dc_vnet_alloc` (vnet, data_center_id, physical_network_id) VALUES ( ?, ?, ?)";
|
String insertVnet = "INSERT INTO `cloud`.`op_dc_vnet_alloc` (vnet, data_center_id, physical_network_id) VALUES ( ?, ?, ?)";
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
PreparedStatement stmt = txn.prepareAutoCloseStatement(insertVnet);
|
PreparedStatement stmt = txn.prepareAutoCloseStatement(insertVnet);
|
||||||
@ -139,7 +139,7 @@ public class DataCenterVnetDaoImpl extends GenericDaoBase<DataCenterVnetVO, Long
|
|||||||
}
|
}
|
||||||
|
|
||||||
//In the List<string> argument each string is a vlan. not a vlanRange.
|
//In the List<string> argument each string is a vlan. not a vlanRange.
|
||||||
public void deleteVnets(Transaction txn, long dcId, long physicalNetworkId, List<String> vnets) {
|
public void deleteVnets(TransactionLegacy txn, long dcId, long physicalNetworkId, List<String> vnets) {
|
||||||
String deleteVnet = "DELETE FROM `cloud`.`op_dc_vnet_alloc` WHERE data_center_id=? AND physical_network_id=? AND taken IS NULL AND vnet=?";
|
String deleteVnet = "DELETE FROM `cloud`.`op_dc_vnet_alloc` WHERE data_center_id=? AND physical_network_id=? AND taken IS NULL AND vnet=?";
|
||||||
try {
|
try {
|
||||||
PreparedStatement stmt = txn.prepareAutoCloseStatement(deleteVnet);
|
PreparedStatement stmt = txn.prepareAutoCloseStatement(deleteVnet);
|
||||||
@ -171,7 +171,7 @@ public class DataCenterVnetDaoImpl extends GenericDaoBase<DataCenterVnetVO, Long
|
|||||||
}
|
}
|
||||||
sc.setParameters("physicalNetworkId", physicalNetworkId);
|
sc.setParameters("physicalNetworkId", physicalNetworkId);
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
DataCenterVnetVO vo = lockOneRandomRow(sc, true);
|
DataCenterVnetVO vo = lockOneRandomRow(sc, true);
|
||||||
if (vo == null) {
|
if (vo == null) {
|
||||||
|
|||||||
@ -31,7 +31,7 @@ import com.cloud.dc.DcDetailVO;
|
|||||||
import com.cloud.utils.db.GenericDaoBase;
|
import com.cloud.utils.db.GenericDaoBase;
|
||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Local(value=DcDetailsDao.class)
|
@Local(value=DcDetailsDao.class)
|
||||||
public class DcDetailsDaoImpl extends GenericDaoBase<DcDetailVO, Long> implements DcDetailsDao, ScopedConfigStorage {
|
public class DcDetailsDaoImpl extends GenericDaoBase<DcDetailVO, Long> implements DcDetailsDao, ScopedConfigStorage {
|
||||||
@ -106,7 +106,7 @@ public class DcDetailsDaoImpl extends GenericDaoBase<DcDetailVO, Long> implement
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void persist(long dcId, Map<String, String> details) {
|
public void persist(long dcId, Map<String, String> details) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<DcDetailVO> sc = DcSearch.create();
|
SearchCriteria<DcDetailVO> sc = DcSearch.create();
|
||||||
sc.setParameters("dcId", dcId);
|
sc.setParameters("dcId", dcId);
|
||||||
|
|||||||
@ -35,7 +35,7 @@ import com.cloud.utils.db.GenericSearchBuilder;
|
|||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.SearchCriteria.Op;
|
import com.cloud.utils.db.SearchCriteria.Op;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Local(value={HostPodDao.class})
|
@Local(value={HostPodDao.class})
|
||||||
@ -85,7 +85,7 @@ public class HostPodDaoImpl extends GenericDaoBase<HostPodVO, Long> implements H
|
|||||||
HashMap<Long, List<Object>> currentPodCidrSubnets = new HashMap<Long, List<Object>>();
|
HashMap<Long, List<Object>> currentPodCidrSubnets = new HashMap<Long, List<Object>>();
|
||||||
|
|
||||||
String selectSql = "SELECT id, cidr_address, cidr_size FROM host_pod_ref WHERE data_center_id=" + zoneId +" and removed IS NULL";
|
String selectSql = "SELECT id, cidr_address, cidr_size FROM host_pod_ref WHERE data_center_id=" + zoneId +" and removed IS NULL";
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
try {
|
try {
|
||||||
PreparedStatement stmt = txn.prepareAutoCloseStatement(selectSql);
|
PreparedStatement stmt = txn.prepareAutoCloseStatement(selectSql);
|
||||||
ResultSet rs = stmt.executeQuery();
|
ResultSet rs = stmt.executeQuery();
|
||||||
@ -111,7 +111,7 @@ public class HostPodDaoImpl extends GenericDaoBase<HostPodVO, Long> implements H
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean remove(Long id) {
|
public boolean remove(Long id) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
HostPodVO pod = createForUpdate();
|
HostPodVO pod = createForUpdate();
|
||||||
pod.setName(null);
|
pod.setName(null);
|
||||||
|
|||||||
@ -28,7 +28,7 @@ import com.cloud.utils.db.GenericDao;
|
|||||||
import com.cloud.utils.db.GenericDaoBase;
|
import com.cloud.utils.db.GenericDaoBase;
|
||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
import com.cloud.utils.exception.CloudRuntimeException;
|
import com.cloud.utils.exception.CloudRuntimeException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -49,7 +49,7 @@ public class PodVlanDaoImpl extends GenericDaoBase<PodVlanVO, Long> implements P
|
|||||||
public void add(long podId, int start, int end) {
|
public void add(long podId, int start, int end) {
|
||||||
String insertVnet = "INSERT INTO `cloud`.`op_pod_vlan_alloc` (vlan, pod_id) VALUES ( ?, ?)";
|
String insertVnet = "INSERT INTO `cloud`.`op_pod_vlan_alloc` (vlan, pod_id) VALUES ( ?, ?)";
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
PreparedStatement stmt = txn.prepareAutoCloseStatement(insertVnet);
|
PreparedStatement stmt = txn.prepareAutoCloseStatement(insertVnet);
|
||||||
@ -68,7 +68,7 @@ public class PodVlanDaoImpl extends GenericDaoBase<PodVlanVO, Long> implements P
|
|||||||
public void delete(long podId) {
|
public void delete(long podId) {
|
||||||
String deleteVnet = "DELETE FROM `cloud`.`op_pod_vlan_alloc` WHERE pod_id = ?";
|
String deleteVnet = "DELETE FROM `cloud`.`op_pod_vlan_alloc` WHERE pod_id = ?";
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
try {
|
try {
|
||||||
PreparedStatement stmt = txn.prepareAutoCloseStatement(deleteVnet);
|
PreparedStatement stmt = txn.prepareAutoCloseStatement(deleteVnet);
|
||||||
stmt.setLong(1, podId);
|
stmt.setLong(1, podId);
|
||||||
@ -82,7 +82,7 @@ public class PodVlanDaoImpl extends GenericDaoBase<PodVlanVO, Long> implements P
|
|||||||
SearchCriteria<PodVlanVO> sc = FreeVlanSearch.create();
|
SearchCriteria<PodVlanVO> sc = FreeVlanSearch.create();
|
||||||
sc.setParameters("podId", podId);
|
sc.setParameters("podId", podId);
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
PodVlanVO vo = lockOneRandomRow(sc, true);
|
PodVlanVO vo = lockOneRandomRow(sc, true);
|
||||||
|
|||||||
@ -30,10 +30,10 @@ import com.cloud.utils.db.GenericSearchBuilder;
|
|||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.GenericQueryBuilder;
|
import com.cloud.utils.db.GenericQueryBuilder;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
import com.cloud.utils.db.SearchCriteria.Func;
|
import com.cloud.utils.db.SearchCriteria.Func;
|
||||||
import com.cloud.utils.db.SearchCriteria.Op;
|
import com.cloud.utils.db.SearchCriteria.Op;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Local(value={StorageNetworkIpAddressDao.class})
|
@Local(value={StorageNetworkIpAddressDao.class})
|
||||||
@ -87,7 +87,7 @@ public class StorageNetworkIpAddressDaoImpl extends GenericDaoBase<StorageNetwor
|
|||||||
public StorageNetworkIpAddressVO takeIpAddress(long rangeId) {
|
public StorageNetworkIpAddressVO takeIpAddress(long rangeId) {
|
||||||
SearchCriteria<StorageNetworkIpAddressVO> sc = untakenIp.create();
|
SearchCriteria<StorageNetworkIpAddressVO> sc = untakenIp.create();
|
||||||
sc.setParameters("rangeId", rangeId);
|
sc.setParameters("rangeId", rangeId);
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
StorageNetworkIpAddressVO ip = lockOneRandomRow(sc, true);
|
StorageNetworkIpAddressVO ip = lockOneRandomRow(sc, true);
|
||||||
if (ip == null) {
|
if (ip == null) {
|
||||||
|
|||||||
@ -28,7 +28,7 @@ import com.cloud.utils.db.GenericDaoBase;
|
|||||||
import com.cloud.utils.db.JoinBuilder;
|
import com.cloud.utils.db.JoinBuilder;
|
||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
import com.cloud.utils.exception.CloudRuntimeException;
|
import com.cloud.utils.exception.CloudRuntimeException;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
@ -301,7 +301,7 @@ public class VlanDaoImpl extends GenericDaoBase<VlanVO, Long> implements VlanDao
|
|||||||
|
|
||||||
StringBuilder sql = new StringBuilder(FindZoneWideVlans);
|
StringBuilder sql = new StringBuilder(FindZoneWideVlans);
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
try {
|
try {
|
||||||
pstmt = txn.prepareAutoCloseStatement(sql.toString());
|
pstmt = txn.prepareAutoCloseStatement(sql.toString());
|
||||||
|
|||||||
@ -35,7 +35,7 @@ import com.cloud.utils.db.GenericDaoBase;
|
|||||||
import com.cloud.utils.db.GenericSearchBuilder;
|
import com.cloud.utils.db.GenericSearchBuilder;
|
||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Local(value={DomainDao.class})
|
@Local(value={DomainDao.class})
|
||||||
@ -117,7 +117,7 @@ public class DomainDaoImpl extends GenericDaoBase<DomainVO, Long> implements Dom
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
|
|
||||||
@ -168,7 +168,7 @@ public class DomainDaoImpl extends GenericDaoBase<DomainVO, Long> implements Dom
|
|||||||
String sql1 = "SELECT * from domain where parent = " + id + " and removed is null";
|
String sql1 = "SELECT * from domain where parent = " + id + " and removed is null";
|
||||||
|
|
||||||
boolean success = false;
|
boolean success = false;
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
try {
|
try {
|
||||||
txn.start();
|
txn.start();
|
||||||
DomainVO parentDomain = super.lockRow(domain.getParent(), true);
|
DomainVO parentDomain = super.lockRow(domain.getParent(), true);
|
||||||
|
|||||||
@ -30,7 +30,7 @@ import com.cloud.utils.db.Filter;
|
|||||||
import com.cloud.utils.db.GenericDaoBase;
|
import com.cloud.utils.db.GenericDaoBase;
|
||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
import com.cloud.utils.db.SearchCriteria.Op;
|
import com.cloud.utils.db.SearchCriteria.Op;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@ -104,7 +104,7 @@ public class EventDaoImpl extends GenericDaoBase<EventVO, Long> implements Event
|
|||||||
@Override
|
@Override
|
||||||
public void archiveEvents(List<EventVO> events) {
|
public void archiveEvents(List<EventVO> events) {
|
||||||
if (events != null && !events.isEmpty()) {
|
if (events != null && !events.isEmpty()) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
for (EventVO event : events) {
|
for (EventVO event : events) {
|
||||||
event = lockRow(event.getId(), true);
|
event = lockRow(event.getId(), true);
|
||||||
|
|||||||
@ -36,7 +36,7 @@ import com.cloud.utils.db.Filter;
|
|||||||
import com.cloud.utils.db.GenericDaoBase;
|
import com.cloud.utils.db.GenericDaoBase;
|
||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
import com.cloud.utils.exception.CloudRuntimeException;
|
import com.cloud.utils.exception.CloudRuntimeException;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@ -90,7 +90,7 @@ public class UsageEventDaoImpl extends GenericDaoBase<UsageEventVO, Long> implem
|
|||||||
public synchronized List<UsageEventVO> getRecentEvents(Date endDate) {
|
public synchronized List<UsageEventVO> getRecentEvents(Date endDate) {
|
||||||
long recentEventId = getMostRecentEventId();
|
long recentEventId = getMostRecentEventId();
|
||||||
long maxEventId = getMaxEventId(endDate);
|
long maxEventId = getMaxEventId(endDate);
|
||||||
Transaction txn = Transaction.open(Transaction.USAGE_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
|
||||||
String sql = COPY_EVENTS;
|
String sql = COPY_EVENTS;
|
||||||
if (recentEventId == 0) {
|
if (recentEventId == 0) {
|
||||||
if (s_logger.isDebugEnabled()) {
|
if (s_logger.isDebugEnabled()) {
|
||||||
@ -120,7 +120,7 @@ public class UsageEventDaoImpl extends GenericDaoBase<UsageEventVO, Long> implem
|
|||||||
|
|
||||||
@DB
|
@DB
|
||||||
private long getMostRecentEventId() {
|
private long getMostRecentEventId() {
|
||||||
Transaction txn = Transaction.open(Transaction.USAGE_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
|
||||||
try {
|
try {
|
||||||
List<UsageEventVO> latestEvents = getLatestEvent();
|
List<UsageEventVO> latestEvents = getLatestEvent();
|
||||||
|
|
||||||
@ -140,7 +140,7 @@ public class UsageEventDaoImpl extends GenericDaoBase<UsageEventVO, Long> implem
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<UsageEventVO> findRecentEvents(Date endDate) {
|
private List<UsageEventVO> findRecentEvents(Date endDate) {
|
||||||
Transaction txn = Transaction.open(Transaction.USAGE_DB);
|
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB);
|
||||||
try {
|
try {
|
||||||
return listLatestEvents(endDate);
|
return listLatestEvents(endDate);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
@ -152,7 +152,7 @@ public class UsageEventDaoImpl extends GenericDaoBase<UsageEventVO, Long> implem
|
|||||||
}
|
}
|
||||||
|
|
||||||
private long getMaxEventId(Date endDate) {
|
private long getMaxEventId(Date endDate) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
try {
|
try {
|
||||||
String sql = MAX_EVENT;
|
String sql = MAX_EVENT;
|
||||||
|
|||||||
@ -59,7 +59,7 @@ import com.cloud.utils.db.SearchBuilder;
|
|||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.SearchCriteria.Func;
|
import com.cloud.utils.db.SearchCriteria.Func;
|
||||||
import com.cloud.utils.db.SearchCriteria.Op;
|
import com.cloud.utils.db.SearchCriteria.Op;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
import com.cloud.utils.db.UpdateBuilder;
|
import com.cloud.utils.db.UpdateBuilder;
|
||||||
import com.cloud.utils.exception.CloudRuntimeException;
|
import com.cloud.utils.exception.CloudRuntimeException;
|
||||||
|
|
||||||
@ -490,7 +490,7 @@ public class HostDaoImpl extends GenericDaoBase<HostVO, Long> implements HostDao
|
|||||||
@Override
|
@Override
|
||||||
@DB
|
@DB
|
||||||
public List<HostVO> findAndUpdateDirectAgentToLoad(long lastPingSecondsAfter, Long limit, long managementServerId) {
|
public List<HostVO> findAndUpdateDirectAgentToLoad(long lastPingSecondsAfter, Long limit, long managementServerId) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
|
|
||||||
txn.start();
|
txn.start();
|
||||||
if (s_logger.isDebugEnabled()) {
|
if (s_logger.isDebugEnabled()) {
|
||||||
@ -589,7 +589,7 @@ public class HostDaoImpl extends GenericDaoBase<HostVO, Long> implements HostDao
|
|||||||
@Override
|
@Override
|
||||||
@DB
|
@DB
|
||||||
public List<HostVO> findAndUpdateApplianceToLoad(long lastPingSecondsAfter, long managementServerId) {
|
public List<HostVO> findAndUpdateApplianceToLoad(long lastPingSecondsAfter, long managementServerId) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
|
|
||||||
txn.start();
|
txn.start();
|
||||||
SearchCriteria<HostVO> sc = UnmanagedApplianceSearch.create();
|
SearchCriteria<HostVO> sc = UnmanagedApplianceSearch.create();
|
||||||
@ -728,7 +728,7 @@ public class HostDaoImpl extends GenericDaoBase<HostVO, Long> implements HostDao
|
|||||||
@DB
|
@DB
|
||||||
@Override
|
@Override
|
||||||
public List<HostVO> findLostHosts(long timeout) {
|
public List<HostVO> findLostHosts(long timeout) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
List<HostVO> result = new ArrayList<HostVO>();
|
List<HostVO> result = new ArrayList<HostVO>();
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
@ -779,7 +779,7 @@ public class HostDaoImpl extends GenericDaoBase<HostVO, Long> implements HostDao
|
|||||||
public HostVO persist(HostVO host) {
|
public HostVO persist(HostVO host) {
|
||||||
final String InsertSequenceSql = "INSERT INTO op_host(id) VALUES(?)";
|
final String InsertSequenceSql = "INSERT INTO op_host(id) VALUES(?)";
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
|
|
||||||
HostVO dbHost = super.persist(host);
|
HostVO dbHost = super.persist(host);
|
||||||
@ -805,7 +805,7 @@ public class HostDaoImpl extends GenericDaoBase<HostVO, Long> implements HostDao
|
|||||||
@Override
|
@Override
|
||||||
@DB
|
@DB
|
||||||
public boolean update(Long hostId, HostVO host) {
|
public boolean update(Long hostId, HostVO host) {
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
|
|
||||||
boolean persisted = super.update(hostId, host);
|
boolean persisted = super.update(hostId, host);
|
||||||
@ -831,7 +831,7 @@ public class HostDaoImpl extends GenericDaoBase<HostVO, Long> implements HostDao
|
|||||||
|
|
||||||
ArrayList<RunningHostCountInfo> l = new ArrayList<RunningHostCountInfo>();
|
ArrayList<RunningHostCountInfo> l = new ArrayList<RunningHostCountInfo>();
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
;
|
;
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -31,7 +31,7 @@ import com.cloud.utils.crypt.DBEncryptionUtil;
|
|||||||
import com.cloud.utils.db.GenericDaoBase;
|
import com.cloud.utils.db.GenericDaoBase;
|
||||||
import com.cloud.utils.db.SearchBuilder;
|
import com.cloud.utils.db.SearchBuilder;
|
||||||
import com.cloud.utils.db.SearchCriteria;
|
import com.cloud.utils.db.SearchCriteria;
|
||||||
import com.cloud.utils.db.Transaction;
|
import com.cloud.utils.db.TransactionLegacy;
|
||||||
import com.cloud.utils.exception.CloudRuntimeException;
|
import com.cloud.utils.exception.CloudRuntimeException;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@ -96,7 +96,7 @@ public class HostDetailsDaoImpl extends GenericDaoBase<DetailVO, Long> implement
|
|||||||
public void persist(long hostId, Map<String, String> details) {
|
public void persist(long hostId, Map<String, String> details) {
|
||||||
final String InsertOrUpdateSql = "INSERT INTO `cloud`.`host_details` (host_id, name, value) VALUES (?,?,?) ON DUPLICATE KEY UPDATE value=?";
|
final String InsertOrUpdateSql = "INSERT INTO `cloud`.`host_details` (host_id, name, value) VALUES (?,?,?) ON DUPLICATE KEY UPDATE value=?";
|
||||||
|
|
||||||
Transaction txn = Transaction.currentTxn();
|
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||||
txn.start();
|
txn.start();
|
||||||
|
|
||||||
for (Map.Entry<String, String> detail : details.entrySet()) {
|
for (Map.Entry<String, String> detail : details.entrySet()) {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user