Package pywbem :: Module cim_obj :: Class CIMInstanceName

[frames] | no frames]

# Class CIMInstanceName

source code

    object --+
             |
            CIMInstanceName

A CIM instance path (aka instance name).

A CIM instance path references a CIM instance in a namespace in a WBEM server. Namespace and WBEM server may be unknown.

This object can be used like a dictionary to retrieve the key bindings.

Instance Methods

__init__(self, classname, keybindings=None, host=None, namespace=None) Initialize the CIMInstanceName object. | source code

copy(self) | source code

__cmp__(self, other) | source code

__str__(self) str(x) | source code

__repr__(self) repr(x) | source code

__getitem__(self, key) | source code

__contains__(self, key) | source code

__delitem__(self, key) | source code

__setitem__(self, key, value) | source code

__len__(self) | source code

has_key(self, key) | source code

keys(self) | source code

values(self) | source code

items(self) | source code

iterkeys(self) | source code

itervalues(self) | source code

iteritems(self) | source code

update(self, *args, **kwargs) | source code

get(self, key, default=None) Get the value of a specific key property, or the specified default value if a key binding with that name does not exist. | source code

tocimxml(self) Generate a CIM-XML representation of the instance name (class name and key bindings). | source code

Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Instance Variables
| ... All parameters of __init__ are set as instance variables.

Properties
Inherited from `object`: `__class__`

Method Details

### __init__(self, classname, keybindings=None, host=None, namespace=None)
(Constructor)

source code

Initialize the CIMInstanceName object.

Parameters:
  - `classname` (`unicode` or UTF-8 encoded `str`) - Name of the creation class of the referenced instance.

  - `keybindings` (`dict` or NocaseDict) - Optional: Dictionary of key bindings, specifying key properties that identify the referenced instance. The dictionary must contain one item for each key property, where:

    - its key is the property name.
    - its value is the property value, as a CIM typed value as described in cim_types.

    If `None`, an empty dictionary of key bindings will be created.

    Default: `None`.

  - `host` (`unicode` or UTF-8 encoded `str`) - Optional: URL of the WBEM server that contains the CIM namespace of this instance path.

    If `None`, the instance path will not specify a WBEM server.

    Default: `None`.

  - `namespace` (`unicode` or UTF-8 encoded `str`) - Optional: Name of the CIM namespace that contains the referenced instance.

    If `None`, the instance path will not specify a CIM namespace.

    Default: `None`.

Raises:
  - `TypeError`
  - `ValueError`
Overrides: object.__init__

### __str__(self)
(Informal representation operator)

source code

str(x)

Overrides: object.__str__
  (inherited documentation)

### __repr__(self)
(Representation operator)

source code

repr(x)

Overrides: object.__repr__
  (inherited documentation)