def check_poolname(self, context, poolname): pool_list = db.pool_get_all(context) if pool_list: for pool in pool_list: if pool['name'] == poolname: return 1 return 0
def storage_pool_get_all(self, context): pool_list = db.pool_get_all(context) LOG.info('Pools: %s' % pool_list) for x in pool_list: LOG.debug('x.id = %s' % x.id) LOG.debug('x.name = %s' % x.name) LOG.debug('x.ruleset = %s' % x.ruleset) return pool_list
def list_storage_pool(self, context): LOG.info('list_storage_pool in conductor manager') pool_list = db.pool_get_all(context) pool_list_dict = {} if pool_list: for pool in pool_list: pool_list_dict[pool['id']] = pool return pool_list_dict