parameters: (self)
return_statement: return [] if stoppable_osds is None else stoppable_osds[:num_to_start_draining]
docstring: Returns OSDs that are ok to stop and not yet draining. Only returns as many OSDs as can
          be accomodated by the 'max_osd_draining_count' config value, considering the number of OSDs
          that are already draining.
docstring_summary: Returns OSDs that are ok to stop and not yet draining. Only returns as many OSDs as can
          be accomodated by the 'max_osd_draining_count' config value, considering the number of OSDs
          that are already draining.
docstring_tokens: Returns OSDs that are ok to stop and not yet draining . Only returns as many OSDs as can be accomodated by the max_osd_draining_count config value considering the number of OSDs that are already draining .
function: def _ready_to_drain_osds(self) -> List["OSD"]:
          """
          Returns OSDs that are ok to stop and not yet draining. Only returns as many OSDs as can
          be accomodated by the 'max_osd_draining_count' config value, considering the number of OSDs
          that are already draining.
          """
          draining_limit = max(1, self.mgr.max_osd_draining_count)
          num_already_draining = len(self.draining_osds())
          num_to_start_draining = max(0, draining_limit - num_already_draining)
          stoppable_osds = self.rm_util.find_osd_stop_threshold(self.idling_osds())
          return [] if stoppable_osds is None else stoppable_osds[:num_to_start_draining]
function_tokens: def _ready_to_drain_osds ( self ) -> List [ "OSD" ] : draining_limit = max ( 1 , self . mgr . max_osd_draining_count ) num_already_draining = len ( self . draining_osds ( ) ) num_to_start_draining = max ( 0 , draining_limit - num_already_draining ) stoppable_osds = self . rm_util . find_osd_stop_threshold ( self . idling_osds ( ) ) return [ ] if stoppable_osds is None else stoppable_osds [ : num_to_start_draining ]