Returns request types supported by a service desk instance.
        :param service_desk: The service desk instance.
        :type service_desk: ServiceDesk
        :rtype: List[RequestType]
337434
def request_types(self, service_desk):
        
        if hasattr(service_desk, 'id'):
            service_desk = service_desk.id
        url = (self._options['server'] +
               '/rest/servicedeskapi/servicedesk/%s/requesttype'
               % service_desk)
        headers = {'X-ExperimentalApi': 'opt-in'}
        r_json = json_loads(self._session.get(url, headers=headers))
        request_types = [
            RequestType(self._options, self._session, raw_type_json)
            for raw_type_json in r_json['values']]
        return request_types
295009
def getServiceDependenciesUIDs(self):
        
        deps = self.getServiceDependencies()
        deps_uids = [service.UID() for service in deps]
        return deps_uids
675914
def ListClients(self, request, timeout=None):
    
    return self._RetryLoop(
        lambda t: self._stub.ListClients(request, timeout=t))
1246985
@Override
    public <T> List<T> getServices(final Class<T> serviceType) {
        @SuppressWarnings("unchecked")
        List<T> found = (List<T>) servicesLoaded.get(serviceType);
        if (found != null) {
            return found;
        }

        return loadServices(serviceType);
    }
30937
def list_types(self):
        
        uri = "/notification_types"
        resp, resp_body = self.api.method_get(uri)
        return [CloudMonitorNotificationType(self, info)
                for info in resp_body["values"]]
146200
async def get_supported_methods(self):
        
        response = await self.request_supported_methods()

        if "result" in response:
            services = response["result"][0]
            _LOGGER.debug("Got %s services!" % len(services))

            for x in services:
                serv = await Service.from_payload(
                    x, self.endpoint, self.idgen, self.debug, self.force_protocol
                )
                if serv is not None:
                    self.services[x["service"]] = serv
                else:
                    _LOGGER.warning("Unable to create service %s", x["service"])

            for service in self.services.values():
                if self.debug > 1:
                    _LOGGER.debug("Service %s", service)
                for api in service.methods:
                    # self.logger.debug("%s > %s" % (service, api))
                    if self.debug > 1:
                        _LOGGER.debug("> %s" % api)
            return self.services

        return None
274966
def get_supported_types(resource_root, category_name):
  
  return call(resource_root.get,
      EXTERNAL_ACCOUNT_FETCH_PATH % ("supportedTypes", category_name,),
      ApiExternalAccountType, True)
721810
def create_customer_request(self, service_desk_id, request_type_id, values_dict, raise_on_behalf_of=None):
        
        log.warning('Creating request...')
        data = {
            "serviceDeskId": service_desk_id,
            "requestTypeId": request_type_id,
            "requestFieldValues": values_dict
        }

        if raise_on_behalf_of:
            data["raiseOnBehalfOf"] = raise_on_behalf_of

        return self.post('rest/servicedeskapi/request', data=data)
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', [])]
357646
def manage_request_types_view(request):
    ''' 
    '''
    request_types = RequestType.objects.all()
    return render_to_response('manage_request_types.html', {
        'page_name': "Admin - Manage Request Types",
        'request_types': request_types
        }, context_instance=RequestContext(request))
1162923
def get_sampletypes(self):
        
        query = {
            "portal_type": "SampleType",
            "sort_on": "sortable_title",
            "sort_order": "ascending",
            "is_active": True,
        }
        results = api.search(query, "bika_setup_catalog")
        return map(api.get_object, results)
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
4081
def list_services(self, namespace=None):
        

        if namespace:
            return [Service(name=s.metadata.name,
                            ports=k8s_ports_to_metadata_ports(s.spec.ports),
                            namespace=s.metadata.namespace,
                            labels=s.metadata.labels, selector=s.spec.selector, spec=s.spec)
                    for s in self.core_api.list_namespaced_service(namespace, watch=False).items]

        return [Service(name=s.metadata.name,
                        ports=k8s_ports_to_metadata_ports(s.spec.ports),
                        namespace=s.metadata.namespace,
                        labels=s.metadata.labels, selector=s.spec.selector, spec=s.spec)
                for s in self.core_api.list_service_for_all_namespaces(watch=False).items]
175065
def list(self, request, *args, **kwargs):
        
        return super(ServicesViewSet, self).list(request, *args, **kwargs)
373991
def has_service_of_type(self, service_type):
        
        summary = self.get_space_summary()
        for instance in summary['services']:
            if 'service_plan' in instance:
                if service_type == instance['service_plan']['service']['label']:
                    return True

        return False
701553
def services(self, service_group=None):
    
    # Specific service group requested
    if service_group is not None:
      if service_group not in EFConfig.SERVICE_GROUPS:
        raise RuntimeError("service registry: {} doesn't have '{}' section listed in EFConfig".format(
          self._service_registry_file, service_group))
      else:
        return self.service_registry_json[service_group]
    # Specific service group not requested - flatten and return all service records
    else:
      result = dict()
      for service_group in EFConfig.SERVICE_GROUPS:
        result.update(self.service_registry_json[service_group])
      return result
17579
def find_service_by_type(self, service_type):
        
        for service in self._services:
            if service_type == service.type:
                return service
        return None