Returns aggregated resources to be monitored
 @param uri_prefix Prefix of Resource URI
 @param [Hash] opts the optional parameters
 @return [Array<AggregatedResourceEachResponse>]
437486
def list_aggregated_resources(uri_prefix, opts = {})
      data, _status_code, _headers = list_aggregated_resources_with_http_info(uri_prefix, opts)
      return data
    end
566945
def get_resource_siblings(raml_resource):
    
    path = raml_resource.path
    return [res for res in raml_resource.root.resources
            if res.path == path]
896360
def get(self, uri, params={}):
        '''
        '''
        return self._session.get(urljoin(Investigate.BASE_URL, uri),
            params=params, headers=self._auth_header, proxies=self.proxies
        )
282231
def get_qos_aggregated_configuration(self):
        
        uri = "{}{}".format(self.data["uri"], self.QOS_AGGREGATED_CONFIGURATION)
        return self._helper.do_get(uri)
1284024
def get_job(id_or_uri, opts = {})
      data, _status_code, _headers = get_job_with_http_info(id_or_uri, opts)
      return data
    end
482724
def get_resource_operations(cls):
        ''''''
        operations = []
        for http, callback in cls.implemented_methods.items():
            # Parse docstring
            summary, notes = utils.parse_docstring(callback)
            # Parse return annotations
            responses = utils.parse_return_annotation(callback)
            ok_result_model = responses[200]['responseModel']
            operations.append({
                'method': http,
                'nickname': callback.__name__,
                'type': ok_result_model,
                'parameters': cls.parse_signature(callback),
                'summary': summary.strip(),
                'notes': notes.strip(),
                'responseMessages': list(responses.values())
            })
        return operations
132197
function _request_creator(mod_opts) {
	mod_opts = mod_opts || {};

	var _path = mod_opts.path || '';
	var _id = 0;
	var _cache = {};

	/** */
	function _cache_has_id(id) {
		return Object.prototype.hasOwnProperty.call(_cache, id) ? true : false;
	}

	/** */
	function _cache_cleanup(id) {
		if(_cache_has_id(id)) {
			delete _cache[id];
		}
	}
	
	/** HTTP request runner */
	function request_handler(req, res) {
		var server_start_time = get_time();
		var cache, url, id;
		
		url = require('url').parse(req.url, true);
		
		if(url.pathname === _path + '/time') {
			_id = Math.floor(Math.random()*100000000000000000);
			cache = {'id':_id, 'start': server_start_time, 'end':undefined};
			_cache[_id] = cache;
			
			req.on('close', _cache_cleanup.bind(undefined, _id) );
			
			req.on('end', function() {
				cache.status = true;
				cache.end = get_time();
			});
			
			setTimeout(_cache_cleanup.bind(undefined, _id), 1000*30);
		
			res.writeHead(200, {'Content-Type': 'application/json'});
			res.end(JSON.stringify(_id));
		} else if(url.pathname.substr(0, _path.length + 6) === _path + '/fetch') {
			id = parseInt(url.query.id, 10);
			if(_cache_has_id(id)) {
				res.writeHead(200, {'Content-Type': 'application/json'});
	
				res.end(JSON.stringify(_cache[id]));
				_cache_cleanup(id);
			} else {
				res.writeHead(404, {'Content-Type': 'application/json'});
				res.end(JSON.stringify("404 - Not Found"));
			}
		} else {
			res.writeHead(404, {'Content-Type': 'application/json'});
			res.end(JSON.stringify("404 - Not Found"));
		}
	}

	return request_handler;
}
508690
function get( opts, clbk ) {
	var ratelimit;
	var scount;
	var fcount;
	var count;
	var users;
	var eFLG;
	var out;
	var idx;
	var len;
	var i;

	// Output data store:
	out = {};
	out.meta = {};
	out.data = {};
	out.failures = {};

	// Number of completed requests:
	count = 0;
	scount = 0; // success
	fcount = 0; // failures

	// Request id:
	idx = 0;

	users = opts.usernames;
	len = users.length;

	debug( 'Number of usernames: %d.', len );
	out.meta.total = len;

	debug( 'Beginning queries...' );
	for ( i = 0; i < NUM_CONCURRENT_REQUESTS; i++ ) {
		next();
	}
	/**
	* FUNCTION: next()
	*	Requests user details data for the next username in the queue. Once requests for all desired usernames have completed, invokes the provided callback.
	*
	* @private
	* @returns {Void}
	*/
	function next() {
		var u;
		if ( count === len ) {
			debug( 'Finished all queries.' );
			out.meta.success = scount;
			out.meta.failure = fcount;
			return clbk( null, out, ratelimit );
		}
		if ( idx < len ) {
			u = users[ idx ];
			debug( 'Querying for username: `%s` (%d).', u, idx );
			opts.pathname = '/users/' + u;
			request( opts, onResponse( u, idx ) );
			idx += 1;
		}
	} // end FUNCTION next()

	/**
	* FUNCTION: onResponse( username, idx )
	*	Returns a response callback.
	*
	* @private
	* @param {String} username - username
	* @param {Number} idx - request index
	* @returns {Function} response callback
	*/
	function onResponse( username, idx ) {
		/**
		* FUNCTION: onResponse( error, details, info )
		*	Callback invoked upon receiving a request response.
		*
		* @private
		* @param {Error|Null} error - error object
		* @param {Object} details - response data
		* @param {Object} info - rate limit info
		* @returns {Void}
		*/
		return function onResponse( error, details, info ) {
			if ( eFLG ) {
				return;
			}
			debug( 'Response received for username: `%s` (%d).', username, idx );
			if ( arguments.length === 1 ) {
				eFLG = true;
				debug( 'Encountered an application-level error for username `%s` (%d): %s', username, idx, error.message );
				return clbk( error );
			}
			ratelimit = updateRateLimit( ratelimit, info );
			if ( error ) {
				debug( 'Failed to resolve username `%s` (%d): %s', username, idx, error.message );
				out.failures[ username ] = error.message;
				fcount += 1;
			} else {
				debug( 'Successfully resolved username `%s` (%d).', username, idx );
				out.data[ username ] = details;
				scount += 1;
			}
			count += 1;
			debug( 'Request %d of %d complete.', count, len );
			next();
		}; // end FUNCTION onResponse()
	} // end FUNCTION onResponse()
}
65076
def get_token(params, access_token_opts={})
      params = params.merge(:parse => :json)
      access_token_opts = access_token_opts.merge({:header_format => "OAuth2 %s", :param_name => "access_token"})
      
      @token = super(params, access_token_opts)
    end
1264253
public static function allSources($id, $params = null, $opts = null)
    {
        return self::_allNestedResources($id, static::PATH_SOURCES, $params, $opts);
    }
1085213
function addApiRoutes(opts) {
    var resources   = this.pancakes.cook('resources', null);
    var apiPrefix   = opts.apiPrefix;
    var server      = opts.server;
    var me          = this;
    var cors = {
        origin:         opts.hosts || [],
        headers:        ['Accept', 'Accept-Version', 'Content-Type', 'Api-Version', 'X-Requested-With', 'Authorization'],
        credentials:    true
    };

    _.each(resources, function (resource) {
        _.each(resource.api, function (methodInfo, httpMethod) {
            _.each(methodInfo, function (operation, path) {

                // if path includes {_id} convert to {_id?} so optional
                // this will allow both /users/someid and /users to work
                // we want this because pancakes handles param validation
                // only do this if path without {_id} is not already defined
                var lenWithoutId = path.length - 6;
                var pathWithoutId = path.substring(0, lenWithoutId);
                if (path.substring(lenWithoutId) === '/{_id}' && !methodInfo[pathWithoutId]) {
                    path = pathWithoutId + '/{_id?}';
                }

                // if the operation is a string, then it is the name of the handler method
                if (_.isString(operation)) {
                    server.route({
                        method:             httpMethod,
                        path:               apiPrefix + path,
                        config: {
                            cors:           cors,
                            handler:        me.getApiRouteHandler(resource, operation)
                        }
                    });
                }

                // else if object with type stream, need to use a slightly different call to server.route
                else if (_.isObject(operation) && operation.type === 'stream' && operation.operation) {
                    server.route({
                        method:             httpMethod,
                        path:               apiPrefix + path,
                        config: {
                            payload: {
                                maxBytes:   209715200,
                                output:     'stream',
                                parse:      true
                            },
                            cors:           cors,
                            handler:        me.getApiRouteHandler(resource, operation.operation)
                        }
                    });
                }
                // or xml...
                else if (_.isObject(operation) && operation.type === 'xml' && operation.operation) {
                    server.route({
                        method:             httpMethod,
                        path:               apiPrefix + path,
                        config: {
                            cors:           cors,
                            handler:        me.getApiRouteHandler(resource, operation.operation, 'application/xml; charset=utf-8')
                        }
                    });
                }

                // else error
                else {
                    throw new Error('Invalid type of operation for ' + resource.name + ' ' + path);
                }
            });
        });
    });

    server.on('response', function (request) {
        // careful because we don't want to screw up all/any requests...
        if ( request.response && request.response.statusCode && request.response.statusCode > 399 && request.method
                && request.method.toUpperCase && request.url && request.url.path ) {
            var lapse = -1;
            if ( request.info && request.info.responded && request.info.received ) {
                lapse = request.info.responded - request.info.received;
            }
            var msg = request.method.toUpperCase() + ' ' + request.url.path + ' -> '
                + request.response.statusCode + ' ' + '(' + lapse + 'ms)';
            if ( request.info && request.info.referrer && request.info.referrer.length ) {
                msg += ' ref: ' + request.info.referrer;
            }

            /* eslint no-console:0 */
            console.log(msg);
        }
    });
}
708067
function(opts) {
      opts = opts || {};
      var path = opts.path || this.path,
          callback = opts.callback,
          method = opts.method || this.method,
          ws = getWebsocketPlugin(),
          transports = app.config.transports,
          self = this,
          i = 0,
          error,
          response;

      if (ws) {
        if (transports && transports.length > 0) {
          async.whilst(
            function () {
              return (i < transports.length);
            },
            function (done) {
              self.doConnect(transports[i], method, path, function (err, res) {
                error = err;
                response = res;
                if (!err && res) {
                  i = transports.length;
                } else {
                  i++;
                  if (i < transports.length) {
                    delete self.request;
                  }
                }
                done();
              });
            },
            function (err) {
              callback(err || error, response);
            }
          );
        } else {
          error = 'no transport available';
          log.error('%s %s', app.name, error);
          callback(error);
        }
      } else {
        this.doConnect('http', method, path, callback);
      }
      return this;
    }
1080400
def route_and_method_from_resource_method_and_name_prefix(method, name_prefix)
      route_method = method.to_s.sub(/resource(s)?/) { $1 ? "#{name_prefix}#{route_name.pluralize}" : "#{name_prefix}#{route_name}" }
      return [Rails.application.routes.named_routes.get(route_method.sub(/_(path|url)$/,'').to_sym), route_method]
    end
1186049
def make_request_uri(uri, opts)
      uri = uri.to_s

      if default_options.persistent? && uri !~ HTTP_OR_HTTPS_RE
        uri = "#{default_options.persistent}#{uri}"
      end

      uri = HTTP::URI.parse uri

      if opts.params && !opts.params.empty?
        uri.query_values = uri.query_values(Array).to_a.concat(opts.params.to_a)
      end

      # Some proxies (seen on WEBRick) fail if URL has
      # empty path (e.g. `http://example.com`) while it's RFC-complaint:
      # http://tools.ietf.org/html/rfc1738#section-3.1
      uri.path = "/" if uri.path.empty?

      uri
    end
325858
def resources(opts={})
      Tripod::ResourceCollection.new(
        self.resource_class._resources_from_sparql(self.as_query(opts)),
         # pass in the criteria that was used to generate this collection, as well as whether the user specified return graph
        :return_graph => (opts.has_key?(:return_graph) ? opts[:return_graph] : true),
        :criteria => self
      )
    end
689413
def get_schema(schema_prefix)
      response = rest_get('/redfish/v1/Schemas/')
      schemas = response_handler(response)['Items']
      schema = schemas.select { |s| s['Schema'].start_with?(schema_prefix) }
      raise "NO schema found with this schema prefix : #{schema_prefix}" if schema.empty?
      info = []
      schema.each do |sc|
        response = rest_get(sc['Location'][0]['Uri']['extref'])
        schema_store = response_handler(response)
        info.push(schema_store)
      end
      info
    end
789621
def get_uri_list(self, **kwargs):
        
        index_status_filter = """
                optional {{ ?s dcterm:modified ?modTime }} .
                optional {{ ?s kds:esIndexTime ?time }} .
                optional {{ ?s kds:esIndexError ?error }}
                filter (
                    !(bound(?time)) ||
                    ?time<?modTime  ||
                    (bound(?error) && ?time < {idx_start_time}))
                """.format(idx_start_time=self.idx_start_time.sparql)
        items_query_template = """
            SELECT DISTINCT ?s ?es_id
            {{
                VALUES ?rdftypes {{\n\t\t{rdf_types} }} .
                ?s a ?rdftypes .
                BIND(SHA1(STR(?s)) as ?es_id) .
                {status_filter}
            }}
            {order_by}
            """
        status_filter = index_status_filter \
                        if not kwargs.get("no_status") else ""
        order_by = kwargs.get("order_by", "")
        sparql = items_query_template.format(
                rdf_types="\n\t\t".join(self.rdf_types),
                status_filter=status_filter,
                order_by=order_by)
        results = [(Uri(item['s']['value']), item['es_id']['value'],)
                   for item in self.tstore_conn.query(sparql=sparql)]
        return results