Beispiel #1
0
 def _find_all_resources(self, context, resource_class,
                         filters=None, transaction=None):
     """Factory implementation to query all resources matching the filter"""
     hmcs = powervc_db_api.hmc_find_all(context, filters)
     return self._construct_resources(
         resource_class, context, hmcs, transaction)
Beispiel #2
0
 def find_all_hmcs_by_host(self, context, host_name, transaction=None):
     """Queries all HMC's that are managing the Host specified"""
     hmcs = powervc_db_api.hmc_find_all(context, dict(host=host_name))
     return self._construct_resources(
         ManagementConsole, context, hmcs, transaction)