Query the configuration of a service using QueryServiceConfigW

 @param [String] service_name name of the service to query
 @return [QUERY_SERVICE_CONFIGW.struct] the configuration of the service
777035
def service_start_type(service_name)
      start_type = nil
      open_service(service_name, SC_MANAGER_CONNECT, SERVICE_QUERY_CONFIG) do |service|
        query_config(service) do |config|
          start_type = SERVICE_START_TYPES[config[:dwStartType]]
        end
      end
      if start_type.nil?
        raise Puppet::Error.new(_("Unknown start type '%{start_type}' for '%{service_name}'") % { start_type: start_type.to_s, service_name: service_name})
      end
      start_type
    end
182631
def get_service_offering(name)

      # TODO: use name parameter
      # listServiceOfferings in CloudStack 2.2 doesn't seem to work
      # when the name parameter is specified. When this is fixed,
      # the name parameter should be added to the request.
      params = {
          'command' => 'listServiceOfferings'
      }
      json = send_request(params)

      services = json['serviceoffering']
      return nil unless services

      services.each { |s|
        if name.is_uuid? then
          return s if s['id'] == name
        else
          return s if s['name'] == name
        end
      }
      nil
    end
483654
def service_group(self, service_name):
    
    for group in EFConfig.SERVICE_GROUPS:
      if self.services(group).has_key(service_name):
        return group
    return None
1071259
def _get_service_keys(self, service_name):
        
        guid = self.get_instance_guid(service_name)
        uri = "/v2/service_instances/%s/service_keys" % (guid)
        return self.api.get(uri)
672714
public Service getService(String name) {
        Service service = store.get(name);
        if (service == null) {
            throw HttpException.notFound("Service not found for name '" + name + "'");
        }
        return service;
    }
1186169
def get_service_details(self, service_id):
        
        service_query = \
            self._soap_client.service['LDBServiceSoap']['GetServiceDetails']
        try:
            soap_response = service_query(serviceID=service_id)
        except WebFault:
            raise WebServiceError
        return ServiceDetails(soap_response)
800367
def get_service_by_name(self, service_name):
		""""""
		content = self._fetch("/service/search?name=%s" % service_name)
		return FastlyService(self, content)
507231
def get_config(self, service, setting):
        
        try:
            return self.get_service(service)[setting]
        except KeyError:
            return getattr(self, setting + '_DEFAULT')
1026692
def get(name)
      if respond_to?(name)
        send(name)
      elsif Configuration.setting_name_to_property(name)
        send Configuration.setting_name_to_property(name)
      else
        build_settings[name]
      end
    end
606938
public static <T> ServiceController<T> findService(ServiceRegistry registry, ServiceName name) {
        return (ServiceController<T>) registry.getService(name);
    }
805145
def __links_for_service(service)
      if service.is_a?(GridService)
        service.grid_service_links.select{|l| l.linked_grid_service.stack == service.stack }.map{ |l| l.linked_grid_service.name }
      else
        (service[:links] || []).select{|l| !l[:name].include? '/'}.map{|l| l[:name] }
      end
    end
1159036
def get_service_name_resources(cls, service_name):
        
        from django.apps import apps

        resources = cls._registry[service_name]['resources'].keys()
        return [apps.get_model(resource) for resource in resources]
265991
def QueryService(svc_name):
  """"""
  hscm = win32service.OpenSCManager(None, None,
                                    win32service.SC_MANAGER_ALL_ACCESS)
  result = None
  try:
    hs = win32serviceutil.SmartOpenService(hscm, svc_name,
                                           win32service.SERVICE_ALL_ACCESS)
    result = win32service.QueryServiceConfig(hs)
    win32service.CloseServiceHandle(hs)
  finally:
    win32service.CloseServiceHandle(hscm)

  return result
804707
public Service getService(String type, String name) {
        for (int i = 0; i < configs.length; i++) {
            Provider p = getProvider(i);
            Service s = p.getService(type, name);
            if (s != null) {
                return s;
            }
        }
        return null;
    }
256186
public static service get(nitro_service service, String name) throws Exception{
		service obj = new service();
		obj.set_name(name);
		service response = (service) obj.get_resource(service);
		return response;
	}
270175
def get_service_keys(self, service_name):
        
        keys = []
        for key in self._get_service_keys(service_name)['resources']:
            keys.append(key['entity']['name'])

        return keys
1302009
def get(cls, name, service=Service()):
        ''''''
        path = pathjoin(cls.path, name)
        response = service.send(SRequest('GET', path))
        return cls.from_response(response, service=service)