Return the service checks received under the given name
499296
def service_checks(self, name):
        
        return [
            ServiceCheckStub(
                ensure_unicode(stub.check_id),
                ensure_unicode(stub.name),
                stub.status,
                normalize_tags(stub.tags),
                ensure_unicode(stub.hostname),
                ensure_unicode(stub.message),
            )
            for stub in self._service_checks.get(to_string(name), [])
        ]
37958
def service(service_name, options={})
      options = {
          'print_command' => false,
          'failure_message' => "required service '#{service_name}' is not running."
      }.merge(string_keys(options))
      system_exit_on_error("ps ax | grep '#{service_name.gsub(/^(.)/, "[\\1]")}'", options)
    end
877303
def get_service(self, name, search_filter):
        """"""
        if self.version == 1:
            service_filter = "service.{name}".format(name=name)
            return jmespath.search(service_filter, self.get(search_filter))
        else:
            service_filter = "services[?name=='{}']".format(name)
            return one(jmespath.search(service_filter, self.get(search_filter)))
1039526
def get(self, name):
        
        schema = TagSchema()
        resp = self.service.get_id(self.base, name)
        return self.service.decode(schema, resp)
456353
def _service_by_name(name):
    '''
    
    '''
    services = _available_services()
    name = name.lower()

    if name in services:
        # Match on label
        return services[name]

    for service in six.itervalues(services):
        if service['file_path'].lower() == name:
            # Match on full path
            return service
        basename, ext = os.path.splitext(service['filename'])
        if basename.lower() == name:
            # Match on basename
            return service

    return False
262823
def _query_service(self, name):
        """"""
        if self.query_cmd:
            try:
                return sos_get_command_output("%s %s" % (self.query_cmd, name))
            except Exception:
                return None
        return None
224090
def has_service?(service_name)

      service_name = service_name.to_s
      service_name = "s_#{service_name}" if ! SERVICE_PREFIX.match(service_name)

      @services.has_key?(service_name)
    end
732608
def checks_list():
    '''
    
    '''
    application_url = _get_application_url()
    log.debug('[uptime] get checks')
    jcontent = requests.get('{0}/api/checks'.format(application_url)).json()
    return [x['url'] for x in jcontent]
112736
@Nullable
  public static String getHealthCheckedServiceName(@Nullable Map<String, ?> serviceConfig) {
    String healthCheckKey = "healthCheckConfig";
    String serviceNameKey = "serviceName";
    if (serviceConfig == null || !serviceConfig.containsKey(healthCheckKey)) {
      return null;
    }

    /* schema as follows
    {
      "healthCheckConfig": {
        // Service name to use in the health-checking request.
        "serviceName": string
      }
    }
    */
    Map<String, ?> healthCheck = getObject(serviceConfig, healthCheckKey);
    if (!healthCheck.containsKey(serviceNameKey)) {
      return null;
    }
    return getString(healthCheck, "serviceName");
  }
1139663
def filter_service_by_name(name):
    

    def inner_filter(items):
        """Inner filter for service. Accept if service_description == name"""
        service = items["service"]
        if service is None:
            return False
        return service.service_description == name

    return inner_filter
776858
function (name, separator) {

                var fullName, sep = separator || "/";

                if (name.indexOf(sep) >= 0) {
                    fullName = name; //already got fully-qualified (theoretically)
                } else if (name.indexOf("Service") >= 0) {
                    fullName = "Schema" + sep + "services" + sep + name; //just got the service class name
                } else {
                    fullName = "Schema" + sep + "services" + sep + name + "Service"; //just got the service "object" name
                }

                logger.debug("Service util created full name [" + fullName + "] from [" + name + "]");

                return fullName;

            }
52870
def check(name, **kwargs):
    
    ctx = Context(**kwargs)
    ctx.execute_action('app:check', **{
        'node': ctx.repo.create_secure_service('node'),
        'name': name,
    })
392470
def get_checks(options):
    """"""
    sys.path.append(proselint_path)
    checks = []
    check_names = [key for (key, val)
                   in list(options["checks"].items()) if val]

    for check_name in check_names:
        module = importlib.import_module("checks." + check_name)
        for d in dir(module):
            if re.match("check", d):
                checks.append(getattr(module, d))

    return checks
1203492
def servicenames(self):
        ""
        return set([service['name'].rstrip('/').split('/')[-1] 
                        for service in self._json_struct.get('services', [])])
1106139
def check_domain(self, service_id, version_number, name):
		""""""
		content = self._fetch("/service/%s/version/%d/domain/%s/check" % (service_id, version_number, name))
		return FastlyDomainCheck(self, content)
612200
def get_service(self, name):
        
        self._convert_connected_app()
        if not self.project_config.services or name not in self.project_config.services:
            self._raise_service_not_valid(name)
        if name not in self.services:
            self._raise_service_not_configured(name)

        return self._get_service(name)
578565
@SuppressWarnings("unchecked")
  public <S> S getService(ObjectName name) {
    return (S) servicesByName.get(name);
  }