2626
2727import javax .inject .Inject ;
2828
29- import org .apache .cloudstack .framework .config .ConfigKey ;
30- import org .apache .cloudstack .framework .config .Configurable ;
3129import org .apache .cloudstack .storage .datastore .db .PrimaryDataStoreDao ;
3230import org .apache .cloudstack .storage .datastore .db .StoragePoolVO ;
3331import org .apache .commons .collections .CollectionUtils ;
5149import com .cloud .utils .exception .CloudRuntimeException ;
5250
5351@ Component
54- public class CapacityDaoImpl extends GenericDaoBase <CapacityVO , Long > implements CapacityDao , Configurable {
52+ public class CapacityDaoImpl extends GenericDaoBase <CapacityVO , Long > implements CapacityDao {
5553
5654 private static final String ADD_ALLOCATED_SQL = "UPDATE `cloud`.`op_host_capacity` SET used_capacity = used_capacity + ? WHERE host_id = ? AND capacity_type = ?" ;
5755 private static final String SUBTRACT_ALLOCATED_SQL =
@@ -984,7 +982,7 @@ public boolean removeBy(Short capacityType, Long zoneId, Long podId, Long cluste
984982 }
985983
986984 @ Override
987- public Pair <List <Long >, Map <Long , Double >> orderClustersByAggregateCapacity (long id , long vmId , short capacityTypeForOrdering , boolean isVr , boolean isZone ) {
985+ public Pair <List <Long >, Map <Long , Double >> orderClustersByAggregateCapacity (long id , long vmId , short capacityTypeForOrdering , boolean isVr , boolean allowRoutersOnDedicatedResources , boolean isZone ) {
988986 TransactionLegacy txn = TransactionLegacy .currentTxn ();
989987 PreparedStatement pstmt = null ;
990988 List <Long > result = new ArrayList <Long >();
@@ -996,7 +994,7 @@ public Pair<List<Long>, Map<Long, Double>> orderClustersByAggregateCapacity(long
996994 sql .append (ORDER_CLUSTERS_BY_AGGREGATE_OVERCOMMIT_CAPACITY_PART1 );
997995 }
998996
999- if (isVr && allowRoutersOnDedicatedResources . value () ) {
997+ if (isVr && allowRoutersOnDedicatedResources ) {
1000998 sql .append (ORDER_CLUSTERS_BY_AGGREGATE_CAPACITY_INCLUDE_DEDICATED_TO_DOMAIN_JOIN_1 );
1001999 } else {
10021000 sql .append (ORDER_CLUSTERS_BY_AGGREGATE_CAPACITY_JOIN_1 );
@@ -1232,14 +1230,4 @@ public float findClusterConsumption(Long clusterId, short capacityType, long com
12321230 }
12331231 return 0 ;
12341232 }
1235-
1236- @ Override
1237- public ConfigKey <?>[] getConfigKeys () {
1238- return new ConfigKey <?>[] {allowRoutersOnDedicatedResources };
1239- }
1240-
1241- @ Override
1242- public String getConfigComponentName () {
1243- return CapacityDaoImpl .class .getSimpleName ();
1244- }
12451233}
0 commit comments