Fetches a list of all lbaas_healthmonitors for a project.
960747
def list_lbaas_healthmonitors(self, retrieve_all=True, **_params):
        """"""
        return self.list('healthmonitors', self.lbaas_healthmonitors_path,
                         retrieve_all, **_params)
400869
def monitor_health
    find_features
    @results = @features.inject({}) do |results, feature_name|
      results[ feature_name ] = monitor_health_of( feature_name )
      results
    end
    healthy? ? on_healthy : on_unhealthy
    render_health
  end
659781
def get_health(self):
        
        summary = {'badreadings': [], 'health': const.Health.Ok}
        fallbackreadings = []
        try:
            self.oem_init()
            fallbackreadings = self._oem.get_health(summary)
            for reading in self.get_sensor_data():
                if reading.health != const.Health.Ok:
                    summary['health'] |= reading.health
                    summary['badreadings'].append(reading)
        except exc.BypassGenericBehavior:
            pass
        if not summary['badreadings']:
            summary['badreadings'] = fallbackreadings
        return summary
327532
def get_all_project_owners(project_ids=None, **kwargs):
    


    projowner_qry = db.DBSession.query(ProjectOwner)

    if project_ids is not None:
       projowner_qry = projowner_qry.filter(ProjectOwner.project_id.in_(project_ids))

    project_owners_i = projowner_qry.all()

    return [JSONObject(project_owner_i) for project_owner_i in project_owners_i]
701233
@Get("/projects")
    public CompletableFuture<List<ProjectDto>> listProjects(@Param("status") Optional<String> status) {
        if (status.isPresent()) {
            checkStatusArgument(status.get());
            return CompletableFuture.supplyAsync(() -> projectManager().listRemoved().stream()
                                                                       .map(ProjectDto::new)
                                                                       .collect(toImmutableList()));
        }

        return CompletableFuture.supplyAsync(() -> projectManager().list().values().stream()
                                                                   .map(DtoConverter::convert)
                                                                   .collect(toImmutableList()));
    }
105998
def loadMonitors(self, callback=None, errback=None, **kwargs):
        
        import ns1.monitoring
        monitors_list = self.monitors().list(callback, errback)

        return [ns1.monitoring.Monitor(self.config, m) for m in monitors_list]
582328
@Override
    public Set<Scope> getProjects() {

        try {
            String url = featureSettings.getJiraBaseUrl() + (featureSettings.getJiraBaseUrl().endsWith("/") ? "" : "/")
                    + PROJECT_REST_SUFFIX;
            ResponseEntity<String> responseEntity = makeRestCall(url);
            String responseBody = responseEntity.getBody();

            JSONArray projects = (JSONArray) parser.parse(responseBody);

            return parseAsScopes(projects);

        } catch (ParseException pe) {
            LOGGER.error("Parser exception when parsing teams", pe);
        } catch (HygieiaException e) {
            LOGGER.error("Error in calling JIRA API", e);
        }
        return Collections.EMPTY_SET;
    }
1036713
def run_healthchecks(self):
        
        if not self._registry_loaded:
            self.load_healthchecks()

        def get_healthcheck_name(hc):
            if hasattr(hc, 'name'):
                return hc.name
            return hc.__name__

        responses = []
        for healthcheck in self._registry:
            try:
                if inspect.isclass(healthcheck):
                    healthcheck = healthcheck()
                response = healthcheck()
                if isinstance(response, bool):
                    response = HealthcheckResponse(
                        name=get_healthcheck_name(healthcheck),
                        status=response,
                    )
            except Exception as e:
                response = HealthcheckResponse(
                    name=get_healthcheck_name(healthcheck),
                    status=False,
                    exception=str(e),
                    exception_class=e.__class__.__name__,
                )
            responses.append(response)
        return responses
333443
def get_project_filenames(self):
        """"""
        recent_files = []
        if self.current_active_project:
            recent_files = self.current_active_project.get_recent_files()
        elif self.latest_project:
            recent_files = self.latest_project.get_recent_files()
        return recent_files
570574
public List<ProcessMonitor> getProcessMonitors(RuntimeContext context) {
        return getProcessMonitors().stream().filter(monitor ->
            monitor.isEnabled(context)
        ).collect(Collectors.toList());
    }
1034260
def _check_projects(self):
        ''''''
        for project in self.projectdb.check_update(self.last_check_projects,
                                                   ['name', 'updatetime']):
            if project['name'] not in self.projects:
                continue
            if project['updatetime'] > self.projects[project['name']]['info'].get('updatetime', 0):
                self._update_project(project['name'])
        self.last_check_projects = time.time()
368434
def _monitoring_groups_list(args, _):
  """"""
  project_id = args['project']
  pattern = args['name'] or '*'
  groups = gcm.Groups(context=_make_context(project_id))
  dataframe = groups.as_dataframe(pattern=pattern)
  return _render_dataframe(dataframe)
1373069
private List<ProducerAO> getFilteredProducers(String intervalName, TimeUnit timeUnit, String category, String subsystem) throws APIException {
        if (!StringUtils.isEmpty(category)) {
            return getProducerAPI().getAllProducersByCategory(category, intervalName, timeUnit, true);
        }

        if (!StringUtils.isEmpty(subsystem)) {
            return getProducerAPI().getAllProducersBySubsystem(subsystem, intervalName, timeUnit, true);
        }

        return getProducerAPI().getAllProducers(intervalName, timeUnit, true);
    }
1007247
def get_dependencies(self):
        """"""
        # pylint: disable=no-member
        return super().get_dependencies() + [
            Data.collection_set,
            Data.entity_set,
            Data.parents,
        ]
786119
@Override
  public Collection<Monitor<?>> getRegisteredMonitors() {
    if (updatePending.getAndSet(false)) {
      monitorList.set(UnmodifiableList.copyOf(monitors.values()));
    }
    return monitorList.get();
  }
803869
def get_tasks(self, status=None, offset=None, limit=None):
        
        params = {'project': self.id, 'offset': offset, 'limit': limit}
        if status:
            params['status'] = status
        return self._api.tasks.query(api=self._api, **params)
979312
public List<Process> findCalledProcesses(Process mainproc, ProgressMonitor... monitors) throws IOException {
        List<Process> processes = new ArrayList<>();
        for (String pkg : getPackageProcesses().keySet()) {
            for (File procFile : getPackageProcesses().get(pkg)) {
                processes.add(loadProcess(pkg, procFile, true));
            }
        }
        return ProcessHierarchy.findInvoked(mainproc, processes);
    }