def to_wbem_uri(self, format='standard'):
        # pylint: disable=redefined-builtin
        """
        Return the (untyped) WBEM URI string of this CIM class path.

        The returned WBEM URI contains its components as follows:

        * it does not contain a namespace type (URI scheme).
        * it contains an authority (host) component according to the
          :attr:`~pywbem.CIMClassName.host` attribute, if that is not
          `None`. Otherwise, it does not contain the authority component.
        * it contains a namespace component according to the
          :attr:`~pywbem.CIMClassName.namespace` attribute, if that is not
          `None`. Otherwise, it does not contain the namespace component.
        * it contains a class name component according to the
          :attr:`~pywbem.CIMClassName.classname` attribute.

        Note that when you do not want some of these components to show up
        in the resulting WBEM URI string, you can set them to `None` before
        calling this method.

        Except when using the format "canonical", this method should not be
        used to compare class paths for equality: :term:`DSP0004` defines
        several components of a class path to be compared case insensitively.
        All WBEM URI formats returned by this method except for the format
        "canonical" return a WBEM URI string that preserves the lexical case of
        any components. Therefore, two class paths that are considered equal
        according to :term:`DSP0004` may not have equal WBEM URI strings as
        as returned by this method.

        Instead, equality of class paths represented by
        :class:`~pywbem.CIMClassName` objects should be determined by using
        the ``==`` operator, which performs the comparison conformant to
        :term:`DSP0004`. If you have WBEM URI strings without the
        corresponding :class:`~pywbem.CIMClassName` object, such an object
        can be created by using the static method
        :meth:`~pywbem.CIMClassName.from_wbem_uri`.

        Parameters:

          format (:term:`string`): Format for the generated WBEM URI string,
            using one of the following values:

            * ``"standard"`` - Standard format that is conformant to untyped
              WBEM URIs for class paths defined in :term:`DSP0207`.

            * ``"canonical"`` - Like ``"standard"``, except that the following
              items have been converted to lower case: host, namespace, and
              classname.
              This format guarantees that two class paths that are
              considered equal according to :term:`DSP0004` result in equal
              WBEM URI strings. Therefore, the returned WBEM URI is suitable to
              be used as a key in dictionaries of CIM classes.

            * ``"cimobject"`` - Format for the `CIMObject` header field in
              CIM-XML messages for representing class paths (used
              internally, see :term:`DSP0200`).

            * ``"historical"`` - Historical format for WBEM URIs (used by
              :meth:`~pywbem.CIMClassName.__str__`; should not be used by
              new code). The historical format has the following differences to
              the standard format:

              - If the host component is not present, the slash after the
                host is also omitted. In the standard format, that slash
                is always present.

              - If the namespace component is not present, the colon after the
                namespace is also omitted. In the standard format, that colon
                is always present.

        Examples:

        * With host and namespace, standard format::

            //ACME.com/cimv2/Test:CIM_RegisteredProfile

        * With host and namespace, canonical format::

            //acme.com/cimv2/test:cim_registeredprofile

        * Without host but with namespace, standard format::

            /cimv2/Test:CIM_RegisteredProfile

        * Without host but with namespace, canonical format::

            /cimv2/test:cim_registeredprofile

        * Without host and without namespace, standard format::

            /:CIM_RegisteredProfile

        Returns:

          :term:`unicode string`: Untyped WBEM URI of the CIM class path,
          in the specified format.

        Raises:

          ValueError: Invalid format
        """

        def case(str_):
            """Return the string in the correct lexical case for the format."""
            if format == 'canonical':
                str_ = str_.lower()
            return str_

        if format not in ('standard', 'canonical', 'cimobject', 'historical'):
            raise ValueError(
                _format("Invalid format argument: {0}", format))

        ret = []

        if self.host is not None and format != 'cimobject':
            # The CIMObject format assumes there is no host component
            ret.append('//')
            ret.append(case(self.host))

        if self.host is not None or format not in ('cimobject', 'historical'):
            ret.append('/')

        if self.namespace is not None:
            ret.append(case(self.namespace))

        if self.namespace is not None or format != 'historical':
            ret.append(':')

        ret.append(case(self.classname))

        return _ensure_unicode(''.join(ret))
Return the (untyped) WBEM URI string of this CIM class path.

        The returned WBEM URI contains its components as follows:

        * it does not contain a namespace type (URI scheme).
        * it contains an authority (host) component according to the
          :attr:`~pywbem.CIMClassName.host` attribute, if that is not
          `None`. Otherwise, it does not contain the authority component.
        * it contains a namespace component according to the
          :attr:`~pywbem.CIMClassName.namespace` attribute, if that is not
          `None`. Otherwise, it does not contain the namespace component.
        * it contains a class name component according to the
          :attr:`~pywbem.CIMClassName.classname` attribute.

        Note that when you do not want some of these components to show up
        in the resulting WBEM URI string, you can set them to `None` before
        calling this method.

        Except when using the format "canonical", this method should not be
        used to compare class paths for equality: :term:`DSP0004` defines
        several components of a class path to be compared case insensitively.
        All WBEM URI formats returned by this method except for the format
        "canonical" return a WBEM URI string that preserves the lexical case of
        any components. Therefore, two class paths that are considered equal
        according to :term:`DSP0004` may not have equal WBEM URI strings as
        as returned by this method.

        Instead, equality of class paths represented by
        :class:`~pywbem.CIMClassName` objects should be determined by using
        the ``==`` operator, which performs the comparison conformant to
        :term:`DSP0004`. If you have WBEM URI strings without the
        corresponding :class:`~pywbem.CIMClassName` object, such an object
        can be created by using the static method
        :meth:`~pywbem.CIMClassName.from_wbem_uri`.

        Parameters:

          format (:term:`string`): Format for the generated WBEM URI string,
            using one of the following values:

            * ``"standard"`` - Standard format that is conformant to untyped
              WBEM URIs for class paths defined in :term:`DSP0207`.

            * ``"canonical"`` - Like ``"standard"``, except that the following
              items have been converted to lower case: host, namespace, and
              classname.
              This format guarantees that two class paths that are
              considered equal according to :term:`DSP0004` result in equal
              WBEM URI strings. Therefore, the returned WBEM URI is suitable to
              be used as a key in dictionaries of CIM classes.

            * ``"cimobject"`` - Format for the `CIMObject` header field in
              CIM-XML messages for representing class paths (used
              internally, see :term:`DSP0200`).

            * ``"historical"`` - Historical format for WBEM URIs (used by
              :meth:`~pywbem.CIMClassName.__str__`; should not be used by
              new code). The historical format has the following differences to
              the standard format:

              - If the host component is not present, the slash after the
                host is also omitted. In the standard format, that slash
                is always present.

              - If the namespace component is not present, the colon after the
                namespace is also omitted. In the standard format, that colon
                is always present.

        Examples:

        * With host and namespace, standard format::

            //ACME.com/cimv2/Test:CIM_RegisteredProfile

        * With host and namespace, canonical format::

            //acme.com/cimv2/test:cim_registeredprofile

        * Without host but with namespace, standard format::

            /cimv2/Test:CIM_RegisteredProfile

        * Without host but with namespace, canonical format::

            /cimv2/test:cim_registeredprofile

        * Without host and without namespace, standard format::

            /:CIM_RegisteredProfile

        Returns:

          :term:`unicode string`: Untyped WBEM URI of the CIM class path,
          in the specified format.

        Raises:

          ValueError: Invalid format