DaanHoogland commented on a change in pull request #3600: Allow deploy
Admin/System VMs in disabled zones/pods/clusters
URL: https://github.com/apache/cloudstack/pull/3600#discussion_r362781069
##########
File path: engine/schema/src/main/java/com/cloud/host/dao/HostDaoImpl.java
##########
@@ -431,13 +431,24 @@ public long countBy(long clusterId, ResourceState...
states) {
@Override
public List<HostVO> listByDataCenterId(long id) {
+ SearchCriteria<HostVO> sc = scHostsFromZoneUpRouting(id);
+ sc.setParameters("resourceState", ResourceState.Enabled);
+ return listBy(sc);
+ }
+
+ @Override
+ public List<HostVO> listDisabledByDataCenterId(long id) {
+ SearchCriteria<HostVO> sc = scHostsFromZoneUpRouting(id);
+ sc.setParameters("resourceState", ResourceState.Disabled);
+ return listBy(sc);
+ }
Review comment:
It makes sense to unify this to listByDataCentyerIdAndState() internally, no?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services