Return resources for this application.

        Returns a dict mapping resource name to
        :class:`~juju._definitions.CharmResource` instances.
552315
async def get_resources(self):
        
        facade = client.ResourcesFacade.from_connection(self.connection)
        response = await facade.ListResources([client.Entity(self.tag)])

        resources = dict()
        for result in response.results:
            for resource in result.charm_store_resources or []:
                resources[resource.name] = resource
            for resource in result.resources or []:
                if resource.charmresource:
                    resource = resource.charmresource
                    resources[resource.name] = resource
        return resources
349477
def resource_names(self, repo_type):
        
        try:
            names = self._resource_names[repo_type]
        except KeyError:
            names = [self.name, self.name.upper()]
        return names
181332
def get_resource(name):
    
    # get the resource
    resource = resource_string('trimesh',
                               os.path.join('resources', name))
    # make sure we return it as a string
    if hasattr(resource, 'decode'):
        return resource.decode('utf-8')
    return resource
836690
def get_services(self):
        
        services = []
        for resource in self._get_services()['resources']:
            services.append(resource['entity']['label'])

        return services
1333156
def get_resource(self, name):
        ''

        if name in self.resources:
            return self.resources[name]
        elif name in self.pushable_resources:
            return self.pushable_resources[name]
        else:
            return False
1259960
def groups_with_resources(cls, instance):
        
        return instance.groups_dynamic.options(
            sa.orm.eagerload(cls.models_proxy.Group.resources)
        )
970127
def virtual_storage_resources(self):
        
        # We do here some lazy loading.
        if not self._virtual_storage_resources:
            self._virtual_storage_resources = \
                VirtualStorageResourceManager(self)
        return self._virtual_storage_resources
834522
def get_resources(self):
        
        status, _, body = self._request('GET', '/',
                                        {'Accept': 'application/json'})
        if status == 200:
            tmp, resources = json.loads(bytes_to_str(body)), {}
            for k in tmp:
                # The keys and values returned by json.loads() are unicode,
                # which will cause problems when passed into httplib later
                # (expecting bytes both in Python 2.x and 3.x).
                # We just encode the resource paths into bytes, with an
                # encoding consistent with what the resources module expects.
                resources[k] = tmp[k].encode('utf-8')
            return resources
        else:
            return {}
1320303
public com.google.appengine.v1.Resources getResources() {
    return resources_ == null ? com.google.appengine.v1.Resources.getDefaultInstance() : resources_;
  }
338047
def _retrieve_resources(self, url, class_, full):
        ''''''
        objects_to_return = []
        response = self.session.get(url)
        if response.status_code == 200:
            result = response.json()
            resources = result['results']
            objects_to_return.extend([class_(session=self.session, **resource)
                                      for resource in resources])
            while full and result['next'] is not None:
                response = self.session.get(result['next'])
                if response.status_code == 200:
                    result = response.json()
                    resources = result['results']
                    objects_to_return.extend([class_(session=self.session,
                                                     **resource)
                                              for resource in resources])
                else:
                    raise RuntimeError("Failed downloading data with status {}"
                            ". The response was: '{}'"
                            .format(response.status_code, response.text))
            return objects_to_return
        else:
            raise RuntimeError("Failed downloading data with status {}"
                    ". The response was: '{}'"
                    .format(response.status_code, response.text))
474962
def resources_assigned(self) -> List[Resource]:
        """"""
        resources_str = DB.get_hash_value(self.key, 'resources_assigned')
        resources_assigned = []
        for resource in ast.literal_eval(resources_str):
            resources_assigned.append(Resource(resource))
        return resources_assigned
751146
def get(self):
        
        resource = dict()
        resource.update(self._parse_config())
        resource.update(self._parse_interfaces())

        return resource
1151556
def get_resource_url(self):
        

        name = self.__class__.resource_name
        url = self.__class__.rest_base_url()

        if self.id is not None:
            return "%s/%s/%s" % (url, name, self.id)

        return "%s/%s" % (url, name)
1102931
def get_android_resources(self):
        
        try:
            return self.arsc["resources.arsc"]
        except KeyError:
            self.arsc["resources.arsc"] = ARSCParser(self.zip.read(
                "resources.arsc"))
            return self.arsc["resources.arsc"]
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
1122034
async def GetResourceInfo(self, resource_names):
        '''
        
        '''
        # map input types to rpc msg
        _params = dict()
        msg = dict(type='ResourcesHookContext',
                   request='GetResourceInfo',
                   version=1,
                   params=_params)
        _params['resource-names'] = resource_names
        reply = await self.rpc(msg)
        return reply
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]