used to fetch the resource path of the given name.

    <name> must match a name of defined resource in metadata.yaml

    returns either a path or False if resource not available
5850
def resource_get(name):
    
    if not name:
        return False

    cmd = ['resource-get', name]
    try:
        return subprocess.check_output(cmd).decode('UTF-8')
    except subprocess.CalledProcessError:
        return False
459730
def get_by_name(self, name):
        
        managed_sans = self.get_all()
        result = [x for x in managed_sans if x['name'] == name]

        resource = result[0] if result else None
        if resource:
            resource = self.new(self._connection, resource)

        return resource
578885
def get_starter_kit_meta(name):
    
    kits = yaml.safe_load(requests.get(url=starter_kits_url).content)['kits']
    kits_meta_url = [x['metaUrl'] for x in kits if x['name'] == name]

    assert len(kits_meta_url)==1, "No component %s found in meta:\n %s" % (name, kits)
    meta = yaml.safe_load(requests.get(url=kits_meta_url[0]).content)['download_url']
    return meta
61025
def get(self, path, name):
        
        container = self.get_container(path)
        try:
            return container._values[name]
        except KeyError:
            raise KeyError()
963701
function getResourceName (data, schema) {
  // Try to find the "name" property using several different methods
  let propInfo =
        getResourceNameByValue(data, schema) ||
        getResourceNameByName(data, schema) ||
        getResourceNameByRequired(data, schema) ||
        getResourceNameByFile(data, schema);

  if (propInfo) {
    util.debug('The "%s" property (%j) appears to be the REST resource\'s name', propInfo.name, propInfo.value);

    if (propInfo.value === undefined) {
      propInfo.value = new JsonSchema(propInfo.schema).sample();
      util.debug('Generated new value (%j) for the "%s" property', propInfo.value, propInfo.name);
    }

    return propInfo;
  }
  else {
    util.debug("Unable to determine the unique name for the REST resource. Generating a unique value instead");
    return {
      name: "",
      schema: { type: "string" },
      value: _.uniqueId()
    };
  }
}
561168
def find_resource_in_modules(resource_name, ancestors)
      if namespace = ancestors.detect { |a| a.constants.include?(resource_name.to_sym) }
        return namespace.const_get(resource_name)
      else
        raise NameError, "Namespace for #{namespace} not found"
      end
    end
232209
def _load_resource(version, name)
      _version_module(version).const_get(name.camelcase.singularize).new
    rescue NameError
      nil
    end
1360264
def _getSyntaxBySourceFileName(self, name):
        
        for regExp, xmlFileName in self._extensionToXmlFileName.items():
            if regExp.match(name):
                return self._getSyntaxByXmlFileName(xmlFileName)
        else:
            raise KeyError("No syntax for " + name)
280115
def get_property(self, name):
        
        for prop in self.resource.properties:
            if prop.name == name:
                return prop

        raise AttributeError(name)
37845
@Override
	public Set<String> getResourcePaths(final String name) {
		final String normalizedname = Path.normalizeResourcePath(name);
		LOG.debug("Searching bundle [" + bundle + "] for resource paths of ["
				+ normalizedname + "]");
		final Enumeration<String> entryPaths = bundle
				.getEntryPaths(normalizedname);
		if (entryPaths == null || !entryPaths.hasMoreElements()) {
			return null;
		}
		Set<String> foundPaths = new HashSet<>();
		while (entryPaths.hasMoreElements()) {
			foundPaths.add(entryPaths.nextElement());
		}
		return foundPaths;
	}
563593
public static boolean resourceExists(String name) {
        Objects.requireNonNull(name, Required.NAME.toString());
        
        URL resource = null;
        try {
            resource = Resources.getResource(name);            
        } catch (IllegalArgumentException e) { // NOSONAR Intentionally not logging or throwing this exception
           // Intentionally left blank
        }
        
        return resource != null;
    }
344284
def get_meta_type_by_name(name):
    data = get_default_metadata_data()
    child_data = get_child_metadata_data()
    for item in data["metadataObjects"]:
        if 'xmlName' in item and item['xmlName'] == name:
            return item
    for item in child_data:
        if 'xmlName' in item and item['xmlName'] == name:
            return item
    '''
        
    '''
    try:
        if config.describe_data != None:
            project_org_describe = config.describe_data
        if config.project != None and os.path.isfile(os.path.join(config.project.location,'config','.describe')):
            project_org_describe = parse_json_from_file(os.path.join(config.project.location,'config','.describe'))
        if project_org_describe != None and 'metadataObjects' in project_org_describe:
            for item in project_org_describe["metadataObjects"]:
                if 'xmlName' in item and item['xmlName'] == name:
                    return item
    except:
        pass
3461
public ResourceMetadata getResourceMetadata(String resourceName) {
    if (!resourceMetadataMap.containsKey(resourceName)) {
      throw new RuntimeException("No resource metadata for " + resourceName);
    }
    return resourceMetadataMap.get(resourceName);
  }
529547
def get(self, name, param=None):
        
        if name not in self.attribs:
            raise exceptions.SoftLayerError('Unknown metadata attribute.')

        call_details = self.attribs[name]

        if call_details.get('param_req'):
            if not param:
                raise exceptions.SoftLayerError(
                    'Parameter required to get this attribute.')

        params = tuple()
        if param is not None:
            params = (param,)
        try:
            return self.client.call('Resource_Metadata',
                                    self.attribs[name]['call'],
                                    *params)
        except exceptions.SoftLayerAPIError as ex:
            if ex.faultCode == 404:
                return None
            raise ex
706368
def get_service_name(self, name, search_filter):
        
        service_filter = "services[?name=='{}'].metadata.name".format(name)
        return one(jmespath.search(service_filter, self.get(search_filter)))
370497
def get_manifest_from_meta(metaurl, name):
    
    if 'http' in metaurl:
        kit = yaml.safe_load(requests.get(url=metaurl).content)['kit']['applications']
    else:
        kit = yaml.safe_load(open(metaurl).read())['kit']['applications']
    app_urls = [x['manifest'] for x in kit if x['name'] == name]
    assert len(app_urls) == 1
    return app_urls[0]
530091
def load_from_resource(name):
  
  filepath = Path(USER_DIR) / name
  if filepath.exists():
    with filepath.open() as fh:
      return fh.read()
  else:
    return resource_string('wdiffhtml', 'data/' + name).decode('utf-8')