Lists the services in the framework. Possibility to filter on an exact
        specification.
489631
def services_list(self, io_handler, specification=None):
        
        # Head of the table
        headers = ("ID", "Specifications", "Bundle", "Ranking")

        # Lines
        references = (
            self._context.get_all_service_references(specification, None) or []
        )

        # Construct the list of services
        lines = [
            [
                str(entry)
                for entry in (
                    ref.get_property(constants.SERVICE_ID),
                    ref.get_property(constants.OBJECTCLASS),
                    ref.get_bundle(),
                    ref.get_property(constants.SERVICE_RANKING),
                )
            ]
            for ref in references
        ]

        if not lines and specification:
            # No matching service found
            io_handler.write_line("No service provides '{0}'", specification)
            return False

        # Print'em all
        io_handler.write(self._utils.make_table(headers, lines))
        io_handler.write_line("{0} services registered", len(lines))
        return None
1344021
def get_all_services(resource_root, cluster_name="default", view=None):
  
  return call(resource_root.get,
      SERVICES_PATH % (cluster_name,),
      ApiService, True, params=view and dict(view=view) or None)
733422
def services(self):
        
        self._services = []
        params = {"f": "json"}
        if not self._url.endswith('/services'):
            uURL = self._url + "/services"
        else:
            uURL = self._url
        res = self._get(url=uURL, param_dict=params,
                           securityHandler=self._securityHandler,
                           proxy_port=self._proxy_port,
                           proxy_url=self._proxy_url)
        for k, v in res.items():
            if k == "foldersDetail":
                for item in v:
                    if 'isDefault' in item and item['isDefault'] == False:
                        fURL = self._url + "/services/" + item['folderName']
                        resFolder = self._get(url=fURL, param_dict=params,
                                                 securityHandler=self._securityHandler,
                                                 proxy_port=self._proxy_port,
                                                 proxy_url=self._proxy_url)
                        for k1, v1 in resFolder.items():
                            if k1 == "services":
                                self._checkservice(k1,v1,fURL)
            elif k == "services":
                self._checkservice(k,v,uURL)
        return self._services
579416
def get_all_services(self, view = None):
    
    return services.get_all_services(self._get_resource_root(), self.name, view)
932452
public function getServices()
    {
        return [
            self::INFLECTOR           => function () { return Inflector::get('en');},
            self::APPLICATION_RUNTIME => function () { return new ApplicationRuntime();},
            self::CONFIG_FACTORY      => function () { return new ConfigFactory();}
        ];
    }
401981
public java.util.List<com.google.appengine.v1.Service> getServicesList() {
    return services_;
  }
858668
function listServiceNamesOptions() {
    $service_data = $this->loadServiceData();

    $return = array();
    foreach ($service_data['primary'] as $service_id => $service_info) {
      $return[$service_id] = $service_info['label'];
    }

    return $return;
  }
660716
def list_subscriptions(self, service):
        """"""
        data = {
            'service': service,
        }
        return self._perform_post_request(self.list_subscriptions_endpoint, data, self.token_header)
433514
private void getAllServices() {
        try {
            List<ModelServiceInstance> instances = new DirectoryServiceRestfulClient().getAllInstances();
            for (ModelServiceInstance instance :instances){
                printServiceInstance(ServiceInstanceUtils.toServiceInstance(instance));
            }
        } catch (ServiceException e) {
            e.printStackTrace();
            fail(e.getServiceDirectoryError().getErrorMessage());
        }
    }
140881
def services(self, *args, **kwargs):
        
        return self._client.services(*args, scope=self.id, **kwargs)
352772
def services(services_file='/etc/services'):
    '''
    
    '''
    res = {}
    with salt.utils.files.fopen(services_file, 'r') as svc_defs:
        for svc_def in svc_defs.readlines():
            svc_def = salt.utils.stringutils.to_unicode(svc_def.strip())
            if not svc_def or svc_def.startswith('#'):
                continue
            elif '#' in svc_def:
                svc_def, comment = svc_def.split('#', 1)
                comment = comment.strip()
            else:
                comment = None
            svc_def = svc_def.split()

            port, proto = svc_def.pop(1).split('/')
            port = int(port)

            for name in svc_def:
                svc_res = res.get(name, {})
                pp_res = svc_res.get(port, False)
                if not pp_res:
                    svc = {
                        'port':  port,
                        'proto': proto,
                    }
                    if comment:
                        svc['desc'] = comment
                    svc_res[port] = svc
                else:
                    curr_proto = pp_res['proto']
                    if isinstance(curr_proto, (list, tuple)):
                        curr_proto.append(proto)
                    else:
                        pp_res['proto'] = [curr_proto, proto]

                    curr_desc = pp_res.get('desc', False)
                    if comment:
                        if not curr_desc:
                            pp_res['desc'] = comment
                        elif comment != curr_desc:
                            pp_res['desc'] = '{0}, {1}'.format(curr_desc, comment)
                res[name] = svc_res

    for svc, data in res.items():
        if len(data) == 1:
            res[svc] = data.values().pop()
            continue
        else:
            res[svc] = list(data.values())

    return res
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
321146
def registered_filters_list(self):
        
        return [filter_name for filter_name in self.__jinja2_environment.filters.keys() if filter_name not in self.__jinja2_predefined_filters ]
867311
@ApiModelProperty(value = "Categories of services registered. Not used at the moment")
	public List<String> getCategories() {
		Set<String> keySet = this.services.keySet();
		Iterator<String> it = keySet.iterator();

		List<String> categories = new ArrayList<String>();

		DescribeService service;
		while (it.hasNext()) {
			service = this.services.get(it.next());
			for (String category : service.getCategories()) {
				if (!categories.contains(category)) {
					categories.add(category);
				}
			}
		}

		return categories;
	}
256315
def available_services():
    
    all_datas = ()
    data = ()

    for class_path in settings.TH_SERVICES:
        class_name = class_path.rsplit('.', 1)[1]
        # 2nd array position contains the name of the service
        data = (class_name, class_name.rsplit('Service', 1)[1])
        all_datas = (data,) + all_datas
    return all_datas
932078
def service_list(profile=None, **connection_args):
    '''
    
    '''
    kstone = auth(profile, **connection_args)
    ret = {}
    for service in kstone.services.list():
        ret[service.name] = dict((value, getattr(service, value)) for value in dir(service)
                                 if not value.startswith('_') and
                                 isinstance(getattr(service, value), (six.string_types, dict, bool)))
    return ret
827166
def service_references(self):
        
        services_blue_print = self._scheme_references.get('services')
        if services_blue_print is None:
            raise LookupError('unable to find any services in the config.')

        # TODO: this needs to be cleaned up and made solid. maybe when creating the blueprint ref normalize the damn keys
        return {key.replace('-', '_'): key for key in services_blue_print['keys']}