Given the name of a registered service, return its service definition.
4072
def get_service(self, service_name):
        
        service = self.services.get(service_name)
        if not service:
            raise KeyError('Service not registered: %s' % service_name)
        return service
44029
protected RegisteredService getRegisteredServiceForConsent(final RequestContext requestContext, final Service service) {
        val serviceToUse = this.authenticationRequestServiceSelectionStrategies.resolveService(service);
        val registeredService = this.servicesManager.findServiceBy(serviceToUse);
        RegisteredServiceAccessStrategyUtils.ensureServiceAccessIsAllowed(service, registeredService);
        return registeredService;
    }
1176477
function getServiceNames(serviceUuid, uuid) {
    if (servicesLookup[serviceUuid]) {
      var serviceName = servicesLookup[serviceUuid].name;
      var characteristicName = servicesLookup[serviceUuid].characteristics[uuid].name;      
    }

    var info = serviceUuid;
    if (serviceName) { info += ' (' + serviceName + ')' };
    info +=' -> ' + uuid;
    if (characteristicName) { info += ' (' + characteristicName +' )' }

    return info;
}
1297731
def register_service(self, name: str, service: Any):
        
        if not isinstance(service, type):
            if hasattr(service, '__class__'):
                _ensure_service_name(service.__class__, name)
            self.services[name] = service
            return

        if self._services_initialized:
            from warnings import warn
            warn('Services have already been initialized. Please register '
                 f'{name} sooner.')
            return

        self._services_registry[_ensure_service_name(service, name)] = service
281336
def service(self):
        """"""
        if not self._service:
            self._service = self._client.service(id=self.service_id)
        return self._service
1110996
def getService(self, name, auto_execute=True):
        
        if not isinstance(name, basestring):
            raise TypeError('string type required')

        return ServiceProxy(self, name, auto_execute)
1173379
def services(self):
        ""
        return [self._get_subfolder("%s/%s/" % 
                (s['name'].rstrip('/').split('/')[-1], s['type']), 
                self._service_type_mapping.get(s['type'], Service)) for s
                in self._json_struct.get('services', [])]
1259547
def service_record(self, service_name):
    
    if not self.services().has_key(service_name):
      return None
    return self.services()[service_name]
376033
public <T> T getService(String serviceName) {
    T service = findService(serviceName, true);
    if (service == null) {
      throw new IllegalArgumentException(format("No service found named \"%s\"", serviceName));
    }

    return service;
  }
1080621
def get_api_service(self, name=None):
        """"""
        try:
            svc = self.services_by_name.get(name, None)
            if svc is None:
                raise ValueError(f"Couldn't find the API service configuration")
            return svc
        except:  # NOQA
            raise Exception(f"Failed to retrieve the API service configuration")
615948
def getServiceModuleName(self):
        '''
        '''
        name = GetModuleBaseNameFromWSDL(self.wsdl)
        if not name:
            raise WsdlGeneratorError, 'could not determine a service name'
        
        if self.server_module_suffix is None:
            return name
        return '%s%s' %(name, self.server_module_suffix)
1331946
def service_name(doc):
    """"""
    for service_id, service in doc.get('services', {}).items():
        service['id'] = service_id
        service['organisation_id'] = doc['_id']

        name = service.get('name', None)
        if name:
            yield name, service
213333
def _get_service_state(service_id: str):
        """"""
        LOG.debug('Getting state of service %s', service_id)
        services = get_service_id_list()
        service_ids = [s for s in services if service_id in s]
        if len(service_ids) != 1:
            return 'Service not found! services = {}'.format(str(services))
        subsystem, name, version = service_ids[0].split(':')
        return ServiceState(subsystem, name, version)
840607
def get_name(self, r):
        """"""
        namer = ResourceNameAdapters[self.manager.resource_type.service]
        return namer(r)
498959
def resolve_service_id(self, service_name=None, service_type=None):
        """"""
        services = [s._info for s in self.api.services.list()]

        service_name = service_name.lower()
        for s in services:
            name = s['name'].lower()
            if service_type and service_name:
                if (service_name == name and service_type == s['type']):
                    return s['id']
            elif service_name and service_name == name:
                return s['id']
            elif service_type and service_type == s['type']:
                return s['id']
        return None
364291
def service_start(name):
    '''
    
    '''
    r = salt.utils.http.query(DETAILS['url']+'service/start/'+name, decode_type='json', decode=True)
    return r['dict']
800367
def get_service_by_name(self, service_name):
		""""""
		content = self._fetch("/service/search?name=%s" % service_name)
		return FastlyService(self, content)