::

            <!ELEMENT VALUE.NAMEDINSTANCE (INSTANCENAME, INSTANCE)>

        Returns:
            CIMInstance object with path set (without host or namespace).
347067
def parse_value_namedinstance(self, tup_tree):
        

        self.check_node(tup_tree, 'VALUE.NAMEDINSTANCE')

        k = kids(tup_tree)
        if len(k) != 2:
            raise CIMXMLParseError(
                _format("Element {0!A} has invalid number of child elements "
                        "{1!A} (expecting two child elements "
                        "(INSTANCENAME, INSTANCE))",
                        name(tup_tree), k),
                conn_id=self.conn_id)

        inst_path = self.parse_instancename(k[0])
        instance = self.parse_instance(k[1])
        instance.path = inst_path

        return instance
398825
def instances(cls):
        
        l = [i for i in cls.allinstances() if isinstance(i, cls)]
        return l
84276
def _fake_openreferenceinstancepaths(self, namespace, **params):
        # pylint: disable=invalid-name
        
        self._validate_namespace(namespace)
        self._validate_open_params(**params)
        params['ObjectName'] = params['InstanceName']
        del params['InstanceName']

        result = self._fake_referencenames(namespace, **params)

        objects = [] if result is None else [x[2] for x in result[0][2]]

        return self._open_response(objects, namespace,
                                   'PullInstancePaths', **params)
1359149
def show_instance(name, call=None):
    '''
    
    '''
    node = get_node(name)
    ret = query(command='my/machines/{0}'.format(node['id']),
                location=node['location'], method='GET')

    return ret
292624
def get_value(self, instance):
        
        return instance.values.get(self.alias, self.default)
364547
def instantiate_by_name_with_default(self, object_name, default_value=None):
        
        if object_name not in self.instances:
            if object_name not in self.environment:
                return default_value
            else:
                instance = self.instantiate_from_data(self.environment[object_name])

                self.instances[object_name] = instance
                return instance
        else:
            return self.instances[object_name]
84508
def MI_getInstance(self,
                       env,
                       instanceName,
                       propertyList,
                       cimClass):
        # pylint: disable=invalid-name
        

        logger = env.get_logger()
        logger.log_debug('CIMProvider MI_getInstance called...')
        keyNames = get_keys_from_class(cimClass)
        plist = None
        if propertyList is not None:
            lkns = [kn.lower() for kn in keyNames]
            props = pywbem.NocaseDict()
            plist = [s.lower() for s in propertyList]
            pklist = plist + lkns
            [props.__setitem__(p.name, p) for p in cimClass.properties.values()
             if p.name.lower() in pklist]
        else:
            props = cimClass.properties
        _strip_quals(props)
        model = pywbem.CIMInstance(classname=instanceName.classname,
                                   properties=props,
                                   path=instanceName)
        for k, v in instanceName.keybindings.items():
            type_ = cimClass.properties[k].type

            if type_ != 'reference':
                v = val = pywbem.tocimobj(_type, v)
            model.__setitem__(k, pywbem.CIMProperty(name=k, type=type_,
                                                    value=v))

        rval = self.get_instance(env=env,
                                 model=model,
                                 cim_class=cimClass)
        if self.filter_results:
            filter_instance(rval, plist)
        logger.log_debug('CIMProvider MI_getInstance returning')
        if rval is None:
            raise pywbem.CIMError(pywbem.CIM_ERR_NOT_FOUND, "")
        return rval
1165324
function getInstanceFromNode(node) {
  var inst = getClosestInstanceFromNode(node);
  if (inst != null && inst._hostNode === node) {
    return inst;
  } else {
    return null;
  }
}
641220
def xpathRegisterVariable(self, name, ns_uri, value):
        
        ret = libxml2mod.xmlXPathRegisterVariable(self._o, name, ns_uri, value)
        return ret
46870
def namespace(self, name=None, function=None, recursive=None):
        

        return (
            self._find_single(
                scopedef.scopedef_t._impl_matchers[namespace_t.namespace],
                name=name,
                function=function,
                recursive=recursive)
        )
448218
function getInstancesOf(_typeName) {
        var _instances = [],
            _typeNames = [];

        if (_.isArray(_typeName)) {
            _typeNames = _typeName;
        } else if (_.isString(_typeName)) {
            _typeNames.push(_typeName);
        }

        _.each(_idMap, function (elem) {
            var i, len, _typeTest = false;

            for (i = 0, len = _typeNames.length; i < len; i++) {
                if (elem instanceof _global.type[_typeNames[i]]) {
                    _typeTest = true;
                    break;
                }
            }

            if (_typeTest) {
                _instances.push(elem);
            }
        });

        return _instances;
    }
469228
def dir_instance(inst):
    
    # Skip instance attributes; __slots__ is automatically defined, and
    # descriptors are used to define attributes. Instead, go straight to class
    # attributes (including methods).
    for name, value in vars_class(type(inst)).items():
        if isinstance(value, ObjectMethod):
            if value.has_instancemethod:
                yield name
        elif isinstance(value, Disabled):
            pass  # Hide this; disabled.
        elif isinstance(value, (classmethod, staticmethod)):
            pass  # Hide this; not interesting here.
        else:
            yield name
923583
public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment)
      throws Exception
   {
      Reference ref = (Reference)obj;
      String objName = (String)ref.get("name").getContent();

      return objs.get(objName);
   }
521941
def get_instance namespace, classname=nil, properties={}
    case namespace
    when Openwsman::ObjectPath
      classname = namespace.classname
      properties = namespace.properties
      namespace = namespace.namespace
      uri = epr_uri_for(namespace, classname)
    when Openwsman::EndPointReference
      namespace.each do |k,v|
        properties[k] = v
      end
      classname = namespace.classname
      uri = namespace.resource_uri
      namespace = namespace.namespace
    else
      uri = epr_uri_for(namespace, classname)
    end
    @options.set_dump_request if Wbem.debug
    @options.cim_namespace = namespace if @product == :openwsman
    @options.selectors = properties unless properties.empty?
    STDERR.puts "@client.get(namepace '#{@options.cim_namespace}', props #{properties.inspect}, uri #{uri}" if Wbem.debug
    res = @client.get(@options, uri)
    raise Openwsman::Exception.new res if res.fault?
    Wbem::Instance.new self, Openwsman::EndPointReference.new(uri, "", properties), res
  end
924511
def parse_localinstancepath(self, tup_tree):
        

        self.check_node(tup_tree, 'LOCALINSTANCEPATH')

        k = kids(tup_tree)

        if len(k) != 2:
            raise CIMXMLParseError(
                _format("Element {0!A} has invalid number of child elements "
                        "{1!A} (expecting two child elements "
                        "(LOCALNAMESPACEPATH, INSTANCENAME))",
                        name(tup_tree), k),
                conn_id=self.conn_id)

        namespace = self.parse_localnamespacepath(k[0])
        inst_path = self.parse_instancename(k[1])
        inst_path.namespace = namespace

        return inst_path
545138
def read_instance(self, cls, sdmxobj, offset=None, first_only=True):
        '''
          
        '''
        if offset:
            try:
                base = self._paths[offset](sdmxobj._elem)[0]
            except IndexError:
                return None
        else:
            base = sdmxobj._elem
        result = self._paths[cls](base)
        if result:
            if first_only:
                return cls(self, result[0])
            else:
                return [cls(self, i) for i in result]
655136
def new_instance(self, name):
        
        ist = lib.EnvCreateRawInstance(self._env, self._cls, name.encode())
        if ist == ffi.NULL:
            raise CLIPSError(self._env)

        return Instance(self._env, ist)