Пример #1
0
 def osd_state_get_all(self,
                       context,
                       limit=None,
                       marker=None,
                       sort_keys=None,
                       sort_dir=None):
     all_osd = db.osd_state_get_all(context, limit, marker, sort_keys,
                                    sort_dir)
     return all_osd
Пример #2
0
 def zones_hosts_get_by_storage_group(self, context, storage_group):
     osds = db.osd_state_get_all(context)
     host_list = []
     zone_list = []
     for osd in osds:
         if storage_group == osd['storage_group']['name']:
             if osd['zone']['name'] not in zone_list:
                 zone_list.append(osd['zone']['name'])
             if osd['service']['host'] not in host_list:
                 host_list.append(osd['service']['host'])
     return zone_list, host_list
 def zones_hosts_get_by_storage_group(self, context, storage_group):
     osds = db.osd_state_get_all(context)
     host_list = []
     zone_list = []
     for osd in osds:
         if storage_group == osd['storage_group']['name']:
             if osd['zone']['name'] not in zone_list:
                 zone_list.append(osd['zone']['name'])
             if osd['service']['host'] not in host_list:
                 host_list.append(osd['service']['host']) 
     return zone_list, host_list
Пример #4
0
 def osd_state_get_all(self,
                       context,
                       limit=None,
                       marker=None,
                       sort_keys=None,
                       sort_dir=None):
     all_osd = db.osd_state_get_all(context,
                                    limit,
                                    marker,
                                    sort_keys,
                                    sort_dir)
     return all_osd
Пример #5
0
 def osd_get_all(self, context):
     LOG.debug("DEBUG test osd_get_all func")
     osd_list = db.osd_state_get_all(context)
     len = osd_list.__len__()
     LOG.debug(len)
     for x in osd_list:
         LOG.debug('x.id = %s' % x.id)
         LOG.debug('x.osd_name = %s' % x.osd_name)
         LOG.debug('x.state = %s' % x.state)
         LOG.debug('x.service_id = %s' % x.service_id)
         LOG.debug('x.device_id = %s' % x.device_id)
         LOG.debug('x.device.total_capacity = %s' % x.device.total_capacity_kb)
     return osd_list
Пример #6
0
 def osd_get_all(self, context):
     LOG.debug("DEBUG test osd_get_all func")
     osd_list = db.osd_state_get_all(context)
     len = osd_list.__len__()
     LOG.debug(len)
     for x in osd_list:
         LOG.debug('x.id = %s' % x.id)
         LOG.debug('x.osd_name = %s' % x.osd_name)
         LOG.debug('x.state = %s' % x.state)
         LOG.debug('x.service_id = %s' % x.service_id)
         LOG.debug('x.device_id = %s' % x.device_id)
         LOG.debug('x.device.total_capacity = %s' %
                   x.device.total_capacity_kb)
     return osd_list