Show all available Resources
169320
public function resources()
    {   
        $options = Config::get('laravel-swagger::getResourceListOptions');

        $excludedPath = Config::get('laravel-swagger::excludedPath');
        $swagger = new Swagger($this->getPaths(), $excludedPath);

        if (Config::get('laravel-swagger::cache')) {
            $resourceList = Cache::remember('resourceList', $this->getExpireAt(), function() use ($swagger, $options)
            {
                return $swagger->getResourceList($options);
            });
        } else {
            $resourceList = $swagger->getResourceList($options);
        }

        return $resourceList;
    }
427132
def createSimpleResourceMap(ore_pid, sci_meta_pid, data_pids):
    """"""
    ore = ResourceMap()
    ore.initialize(ore_pid)
    ore.addMetadataDocument(sci_meta_pid)
    ore.addDataDocuments(data_pids, sci_meta_pid)
    return ore
488804
def list(context, resource, **kwargs):
    """"""
    data = utils.sanitize_kwargs(**kwargs)
    id = data.pop('id', None)
    subresource = data.pop('subresource', None)

    if subresource:
        uri = '%s/%s/%s/%s' % (context.dci_cs_api, resource, id, subresource)
    else:
        uri = '%s/%s' % (context.dci_cs_api, resource)

    return context.session.get(uri, timeout=HTTP_TIMEOUT, params=data)
71526
def get_available_modes(self):
        """"""
        resource = "modes"
        resource_event = self.publish_and_get_event(resource)
        if resource_event:
            properties = resource_event.get("properties")
            return properties.get("modes")

        return None
898994
def _all_resources(self):
        
        queryset = self.__model__.query
        args = {k: v for (k, v) in request.args.items() if k not in ('page', 'export')}
        limit = None
        if args:
            filters = []
            order = []
            for key, value in args.items():
                if value.startswith('%'):
                    filters.append(getattr(self.__model__, key).like(str(value), escape='/'))
                elif key == 'sort':
                    direction = desc if value.startswith('-') else asc
                    order.append(direction(getattr(self.__model__, value.lstrip('-'))))
                elif key == 'limit':
                    limit = int(value)
                elif hasattr(self.__model__, key):
                    filters.append(getattr(self.__model__, key) == value)
                else:
                    raise BadRequestException('Invalid field [{}]'.format(key))
                queryset = queryset.filter(*filters).order_by(*order)
        if 'page' in request.args:
            resources = queryset.paginate(page=int(request.args['page']), per_page=limit).items
        else:
            queryset = queryset.limit(limit)
            resources = queryset.all()
        return [r.to_dict() for r in resources]
1039188
def resource_list(cls):
        
        items = cls.list({'items_per_page': 500})
        ret = [vm['hostname'] for vm in items]
        ret.extend([str(vm['id']) for vm in items])
        return ret
151949
function () {
            var res = this.__resources;
            if (!res) {
                var src = this.$resources;
                if (src) {
                    this.__resources = res = {};
                    for (var itm in src) {
                        if (src.hasOwnProperty(itm)) {
                            res[itm] = this[itm];
                        }
                    }
                }
            }
            return res;
        }
79847
def check_availability(self):
        
        # Only check remote resources.
        remote_resources = [resource
                            for resource in self.resources
                            if resource.filetype == 'remote']
        if not remote_resources:
            return []
        return [resource.check_availability() for resource in remote_resources]
190807
def resource_list(cls):
        
        items = cls.list()
        ret = [vlan['name'] for vlan in items]
        ret.extend([str(vlan['id']) for vlan in items])
        return ret
1089759
def resources(name)
      get "#{name}", to: "#{name}#index"
      get "#{name}/new", to: "#{name}#new" unless api_mode?
      get "#{name}/:id", to: "#{name}#show"
      post "#{name}", to: "#{name}#create"
      get "#{name}/:id/edit", to: "#{name}#edit" unless api_mode?
      put "#{name}/:id", to: "#{name}#update"
      post "#{name}/:id", to: "#{name}#update" # for binary uploads
      patch "#{name}/:id", to: "#{name}#update"
      delete "#{name}/:id", to: "#{name}#delete"
    end
579416
def get_all_services(self, view = None):
    
    return services.get_all_services(self._get_resource_root(), self.name, view)
422270
def all(self, archived=False, limit=None, page=None):
        """"""
        path = partial(_path, self.adapter)
        if not archived:
            path = _path(self.adapter)
        else:
            path = _path(self.adapter, 'archived')
        return self._get(path, limit=limit, page=page)
1138608
def do_resource(self,args):
        """"""
        parser = CommandArgumentParser("resource")
        parser.add_argument('-i','--logical-id',dest='logical-id',help='logical id of the child resource');
        args = vars(parser.parse_args(args))

        stackName = self.wrappedStack['rawStack'].name
        logicalId = args['logical-id']
        self.stackResource(stackName,logicalId)
1367217
def resources(self):
        
        data = self.query(MyPlexResource.key)
        return [MyPlexResource(self, elem) for elem in data]
942278
def list_resources(self, session, query='?*::INSTR'):
        

        # For each session type, ask for the list of connected resources and
        # merge them into a single list.

        resources = sum([st.list_resources()
                         for key, st in sessions.Session.iter_valid_session_classes()], [])

        resources = rname.filter(resources, query)

        return resources
1339618
def get_resources(name, config):
    
    return tz.get_in(["resources", name], config,
                     tz.get_in(["resources", "default"], config, {}))
521238
def populate_resource_list(self):
        
        minimum_needs = self.minimum_needs.get_full_needs()
        for full_resource in minimum_needs["resources"]:
            self.add_resource(full_resource)
        self.provenance.setText(minimum_needs["provenance"])