-------------
Released: 2018-04-11
**Incompatible changes:**
* Finalized the Iter support that was experimental so far. This affects the
`Iter...()` methods of class `WBEMConnection`, the `use_pull_operations`
init parameter and instance attribute of class `WBEMConnection`, and the
iter-related shortcuts in the `wbemcli` script.
* The following initialization parameters of some CIM object classes that are
required not to be `None` (as per the documentation) are now enforced not to
be `None`, and `ValueError` is now raised when providing them as `None`:
- `CIMInstanceName.classname` (already raised `ValueError`)
- `CIMInstance.classname`
- `CIMClassName.classname` (previously raised `TypeError`)
- `CIMClass.classname`
- `CIMProperty.name` (already raised `ValueError`)
- `CIMMethod.name` (previously raised `TypeError`)
- `CIMParameter.name`
- `CIMParameter.type`
- `CIMQualifier.name`
- `CIMQualifierDeclaration.name`
- `CIMQualifierDeclaration.type`
Unless otherwise noted, the previous behavior was to tolerate `None`.
Note that in all cases, the requirement not to be `None` had previously been
documented.
* When setting some attributes of CIM object classes that are required not to
be `None` (as per the documentation), `ValueError` is now raised when
attempting to set them to `None`:
- `CIMInstanceName.classname`
- `CIMInstance.classname`
- `CIMClassName.classname`
- `CIMClass.classname`
- `CIMProperty.name`
- `CIMMethod.name`
- `CIMParameter.name`
- `CIMParameter.type`
- `CIMQualifier.name`
- `CIMQualifierDeclaration.name`
- `CIMQualifierDeclaration.type`
The previous behavior was to tolerate `None`.
Note that in all cases, the requirement not to be `None` had previously been
documented.
* When initializing objects of the CIM object classes `CIMProperty` and
`CIMQualifier` with a `type` parameter of `None`, and when initializing
the properties of `CIMInstance`, their CIM type is (and has previously been)
inferred from the value.
If inferring the type is not possible (for example because the value is a
Python integer, float, long (Python 2 only), or `None`), the exception that
is raised is now `ValueError`. Previously, `TypeError` was raised in that
case.
* When setting the `type` attribute of the CIM object classes `CIMProperty` and
`CIMQualifier`, the type is now enforced not to be `None`, and `ValueError`
is raised when providing it as `None`.
Previously, setting a type of `None` was tolerated.
Note that in both cases, the requirement not to be `None` had previously been
documented.
* For CIM elements passed as dictionaries into CIM object classes (i.e.
the aparameters/attributes `properties`, `keybindings`, `parameters`,
`qualifiers`), the consistency between the dictionary key and the name of the
CIM object that is the dictionary value is now checked and `ValueError` is
raised if it does not match (case insensitively).
* Initializing a `CIMProperty` object as an embedded object or embedded
instance and with a value of `None` now requires specifying `type="string"`.
Previously (but only starting with pywbem 0.8.1), the type was inferred from
the `embedded_instance` parameter and thus could be omitted. This new
requirement for specifying `type` is not really intentional, but a by-product
of simplifying the implementation of `CIMProperty`. It was considered
acceptable because that should not be a common case (and has not been
supported before pywbem 0.8.1 anyway).
* When converting a `CIMInstance` object to CIM-XML using its `tocimxml()`
method, instance properties whose values are simple types instead of
`CIMProperty` objects are no longer converted into `CIMProperty` objects
because that has worked only for a very limited set of cases, and
because they are required to be `CIMProperty` objects anyway. A `TypeError`
is now raised if that is detected.
* The `atomic_to_cim_xml()` function now raises `TypeError` if it cannot
convert the input value. Previously, it used `str()` on the input value
as a last resort.
* The global `tocimxml()` function now raises `TypeError` if it cannot
convert the input value. Previously, it raised `ValueError`.
* The `CIMQualifierDeclaration.tomof()` method now generates the flavor
keywords only if the `tosubclass` and `overridable` attributes are set
to `True` or `False`. Previously, default keywords were generated when
these attributes were set to `None` (and these defaults were the opposite of
the defaults defined in DSP0004 and DSP0201). The new behavior is consistent
with the definition that `None` for these attributes means the information is
not available, and it is also consistent with the `tocimxml()` method.
If you used this method and relied on the defaults being generated, you will
now have to set these attributes explicitly.
* If a WBEM server specifies contradicting `TYPE` and `VALUETYPE` attributes on
a `KEYVALUE` element returned to the client (this element is used in instance
paths, e.g. for the result of the `EnumerateInstanceNames` operation), `TYPE`
now takes precedence. Previously, `VALUETYPE` took precedence. DSP0201 leaves
the handling of such discrepancies open, and it seems more logical to let the
more precise value take precedence. Because WBEM servers are required to
specify consistent values for these attributes, this change should not affect
users of pywbem.
* Values of CIM type 'reference' in CIM objects (`CIMProperty`,
`CIMParameter`, `CIMQualifier`, and `CIMQualifierDeclaration`) may now be
`CIMClassName` objects (i.e. class paths). This has been changed for
consistency with DSP0201 (Issue 1035).
* Renamed the `enable_stats` init argument of class `WBEMConnection` to
`stats_enabled`, as part of its finalization. It was experimental, before.
(Issue 1068).
* Renamed the `-e`, `--enable-stats` options of the `wbemcli` utility to
`--statistics` , as part of its finalization. It was experimental, before.
(Issue 1068).
* Changed the `WBEMConnection` attributes for the last request and last
response to become read-only (`last_request`, `last_raw_request`,
`last_reply`, `last_raw_reply`). They have never been supposed to be
writeable by users. (Issue 1068).
* In the wbemcli shell, renamed the following function parameters. This
is only relevant if you wrote scripts against the shell and named these
parameters: (Issue 1110).
- The "op" parameter of iter functions that have it was renamed to "ip",
because it is always an instance path.
- The "qi" parameter of the query functions was renamed to "qs",
for consistency with the filtering functions.
- The "fq" parameter of the filtering functions was renamed to "fs",
for consistency with the query functions.
* Revamped the (experimental) logger configuration mechanism completely.
It remains experimental. See issue 859. The changes include:
- Created 3 methods in `WBEMConnection` that allow pywbem logs to be
configured and activated. These methods contain parameters for:
a. configuring the Python loggers for either/or/both the api and http
loggers. b. Setting the level of detail in the log output. c. Activating
each logger within `WBEMConnection`.
- Allow for the standard Python loggers to be used to configure logger
names that will be used by the pywbem loggers. This allows the pywbem
loggers to be compatible with user code that creates their specific logger
configurations.
- Eliminated the `PyWBEMLogger` class that was the original
logging setup tool in pywbem 0.11.0 since its use was incompatible with
using standard Python logging configuration methods to define loggers.
- Created a function in the _logging module that allows pywbem logging
to be defined by a single string input.
- Addition of a new property `conn_id` to `WBEMConnection` which is a
unique identifier for each `WBEMConnection` object and is part of each log
record. This allows linking logs for each `WBEMConnection` in the log.
**Deprecations:**
* Deprecated modifications of the connection-related attributes of
`WBEMConnection` objects (Issue 1068).
* Deprecated the value `None` for the `value` argument of
`pywbem.tocimxml()`, because it generates an empty `VALUE` element
(which represents an empty string) (Issue 1136).
**Enhancements:**
* Finalized the time statistics support that was experimental so far. This
affects classes `OperationStatistic`, `Statistics`, the init argument
`enable_stats` of class `WBEMConnection`, and the properties
`stats_enabled`, `statistics`, `last_operation_time`, and
`last_server_response_time` of class `WBEMConnection`. As part of that,
renamed the `enable_stats` init argument to `stats_enabled`, consistent with
the corresponding property.
* For `CIMInstanceName`, the values of keybindings can now be specified as
`CIMProperty` objects from which their value will be used (this is in
addition to specfying the values of keybindings as CIM data types).
* For `CIMInstanceName`, values of keybindings specified as binary strings are
now converted to Unicode.
* For `CIMInstanceName`, the type of the input keybindings is now checked
and TypeError is raised if the value is not a CIM data type.
* Updating attributes of CIM objects (e.g. updating `CIMInstance.properties`)
now goes through the same conversions (e.g. binary string to unicode string)
as for the same-named constructor parameters. As a result, it is ensured
that all attributes that are strings (e.g. `name`) contain unicode strings,
all attributes that are booleans (e.g. `propagated`) contain bool values,
and all CIM values (e.g. `CIMProperty.value`) are of a :term:`CIM data type`.
* Added static `from_wbem_uri()` methods to `CIMInstanceName` and
`CIMClassName`, that create a new object of these classes from a
WBEM URI string.
* Added a `cimvalue()` function that converts input values specified
at the interface of CIM object classes, into the internally stored
CIM value. It is mainly used internally by the CIM object classes, but
has also been made available at the public API of pywbem.
Its functionality is very close to the existing `tocimobj()` function.
* Changed public attributes to Python properties with getter and setter methods
in all CIM object classes (e.g. `CIMInstance`). This allows normalizing and
applying checks for new values of these properties. In addition, it solves
the Sphinx warnings about duplicate 'host' attribute when building the
documentation (issue 761).
* Added catching of some exceptions M2Cryptro can raise that were not caught
so far: SSL.SSLError, SSL.Checker.SSLVerificationError. These exceptions
are now transformed into `pywbem.ConnectionError` and will therefore be
caught by a caller of pywbem who is prepared for pywbem's own exceptions,
but not necessarily aware of these M2Crypto exceptions. (issue 891)
* Added the catching of a httplib base exception to make sure all httplib
exceptions are surfaced by WBEMConnection methods as a
pywbem.ConnectionError (issue 916).
* In the `tomof()` methods of the CIM object classes, changed the formatting
of the generated MOF to be more consistent with the CIM Schema MOF.
* Added new methods `CIMInstanceName.to_wbem_uri()` and
`CIMClassName.to_wbem_uri()` that return the path as a WBEM URI string that
conforms to untyped WBEM URIs as defined in DSP0207.
The `CIMInstanceName.__str__()` and `CIMClassName.__str__()` methods still
return the same WBEM URI string they previously did, but that is a historical
format close to but not conformant to DSP0207 (issues 928, 943).
* Improved the way CIM-XML parsing errors are handled, by providing the
original traceback information when re-raising a low-level exception
as pywbem.ParseError, and re-established the improved exception message
for invalid UTF-8 and XML characters that was broken since the move to
using the SAX parser.
* Added support for properly hashing CIM objects (`CIMClass`, etc.) and
CIM data types (particularly `CIMDateTime`), as long as these (mutable)
objects are not changed. Because the objects must not be changed while
being in a set, a new term "changed-hashable" has been introduced that
describes this. This allows to have CIM objects in sets such that they
behave as one would expect from a set. Previously, two CIM objects that
were equal could both be in the same set, because their hash value was
different. In the documentation, added a new section "Putting CIM objects
in sets" that explains the considerations when utilizing the hash value of
the mutable CIM objects.
* Added support for retrieving the operation recorders of a connection
via a new `operation_recorders` read-only property (Issue 976).
* Extended `CIMParameter` to represent CIM parameter values in method
invocations. As part of that, removed the deprecation from its `value`
property and added an `embedded_object` property. Extended the testcases
accordingly. Added an `as_value` argument to `CIMParameter.tocimxml()`
and to `tocimxmlstr()` to allow control over whether the object is
interpreted as a value or as a declaration. (Issue 950).
* Added a new conversion function to the public API: `cimtype()` takes a CIM
data typed value (e.g. `Uint8(42)`) and returns the CIM data type name for
it (e.g. "uint8"). Previously, this was an internal function (Issue 993).
* Added a new conversion function to the public API: `type_from_name()` takes
a CIM data type name (e.g. "uint8") and returns the Python type representing
that CIM data type (e.g. `Uint8`). Previously, this was an internal
function (Issue 993).
* Extended `WBEMConnection.InvokeMethod()` to accept an iterable of
`CIMParameter` objects as input parameters, in addition to the currently
supported forms of input parameters. This allows specifying the
`embedded_object` attribute (instead of inferring it from the value).
(Issue 950).
* Docs: Improved the descriptions of CIM objects and their attributes to
describe how the attributes are used to determine object equality and
the hash value of the object.
* The child elements of CIM objects (e.g. properties of `CIMClass`) now
preserve the order in which they had been added to their parent object.
Methods such as `tomof()`, `tocimxml()`, and `to_wbem_uri()` now
output the child elements of the target object in the preserved order.
If a child element is initialized with an object that does not preserve
order of items (e.g. a standard dict), a UserWarning is now issued.
* Added a new kind of input object for initializing CIM objects: An iterable
of the desired CIM object type, and documented the already supported iterable
of tuple(key, value) as a further input type.
* Improved checking of input objects when initializing a list of child
elements in a CIM object(e.g. properties of `CIMClass`), and raise
TypeError if not supported.
* Made the `ValueMapping` class more generally available and no longer tied
to the `WBEMServer` class. It is now described in the "Client" chapter of the
documentation, and it is possible to create new `ValueMapping` objects by
providing a `WBEMConnection` object (as an alternative to the `WBEMServer`
object that is still supported, for compatibility). Issue 997.
* Extended the `ValueMapping` class; its objects now remember the context in
which the value mapping is defined, in terms of the connection, namespace,
class, and of the mapped CIM element (i.e. property, method or parameter).
* Extended the `ValueMapping` class by adding a `__repr__()` method that
prints all of its attributes, for debug purposes.
* Added capability to mock WBEM Operations so that both pywbem and pywbem
users can create unit tests without requiring a working WBEM Server,
This feature allows the user to create CIM objects
in a mock WBEM Server defined with the class `FakedWBEMConnection` and
substitute that class for `WBEMConnection` to create a mock WBEM Server
that responds to wbem operations.
This enhancement is documented in the pywbem documentation section 10,
Mock Support. See issue 838.
* Improved the messages in `ParseError` exceptions raised when parsing CIM-XML
received from a WBEM server.
* The type of keybinding names in `CIMInstanceName` objects is now checked
to be a string (or None, for unnamed keys). The requirement for a string
has always been documented. This was changed as part of addressing issue
1026.
* Fixed the support for unnamed keys (i.e. instance paths with `KEYVALUE`
or `VALUE.REFERENCE` elements without a parent `KEYBINDINGS` element).
DSP0201 allows for this as a special case. (Issue 1026).
* Added support for instance qualifiers when parsing received CIM-XML responses
(Issue 1030).
* CIM data type names specified for the `type` or `return_type` parameter
of CIM objects are now checked for validity, and `ValueError` is raised
if not valid (Issue 1043).
* Added a new method `CIMInstanceName.from_instance()` to create
`CIMInstanceName` objects from class and instance. This was done as part of
building the pywbem_mock environment. See issue 1069.
* The `url` property of `WBEMConnection` now transforms its input value
to unicode. (Issue 1068).
* In the `WBEMListener` class, added support for using it as a context
manager in order to ensure that the listener is stopped automatically
upon leaving the context manager scope.
* In the `WBEMListener` class, added properties `http_started` and
`https_started` indicating whether the listener is started for the
respective port.
* `CIMInstance.tocimxml()/tocimxmlstr()` were extended to allow controlling
whether the path is ignored even if present. This capability is used for
ignoring the path in embedded instance parameter values (as part of
fixing issue 1136).
* `CIMInstanceName/CIMClassName.tocimxml()/tocimxmlstr()` were extended to
allow controlling whether the host and namespace are ignored even if
present. This capability is not currently used but was introduced for
consistency with ignoring the path on
`CIMInstance.tocimxml()/tocimxmlstr()` (as part of fixing issue 1136).
* Improved the handling of certain connection errors by retrying and by
issuing user warnings instead of printing if debug. (Issue 1118).
**Bug fixes:**
* Added `libxml2` operating system package as a dependency. It provides xmllint,
which is used for testing.
* Fixed issue where `MOFCompiler.compile_str()` could not compile MOF that was
defined through a MOF file containing `pragma include` statements.
This precluded using a string to define the classes to include in
a mof compile in a string and required that the include be a file.
See issue 1138.
* Fixed issue in `IterReferenceNames` and `IterAssociatiorNames` where it was
not passing the `IncludeQualifiers` input parameter to the
`OpenReferenceNames` operation. This should not have been a significant issue
since in general qualifiers are not parts of instances. See issue 833.
* Also changed code in `IterQueryInstances` were parameters that are required
by the called `ExecQuery` and `OpenQueryInstances` were defined as named
arguments where since they are required, the name component is not required.
This should not change operations except that when we were mocking the
methods, it returns sees the parameter as `name=value` rather than value.
See issue 833.
* Fixed the bug that `CIMInstanceName.tocimxml()` produced invalid CIM-XML
if a keybinding value was set to an invalid CIM object type (e.g. to
`CIMParameter`). The only allowed CIM object type for a keybinding value
is `CIMInstanceName`, for keys that are references. Now, `TypeError` is
raised in that case.
* Fix issues in `cim_operations.py` where a open or pull that returned with
missing `enumeration_context` and `eos` would pass one of the internal tests.
See issue 844
* Fixed an error in the CIM-XML representation of qualifier values where
the values were not properly converted to CIM-XML. They are now properly
converted using `atomic_to_cim_xml()`.
* Fixed local authentication for OpenWBEM and OpenPegasus. Due to one bug
introduced in pywbem 0.9.0, it was disabled by accident. A second bug in
local authentication has been there at least since pywbem 0.7.0.
* Fixed missing exception handling for CIM-XML parsing errors when parsing
embedded objects. This could have caused low-level exceptions to be raised
at the pywbem API.
* Fixed the problem that a `for`-loop over `CIMInstance` / `CIMInstanceName`
objects iterated over the lower-case-converted property/key names. They now
iterate over the names in their original lexical case, as documented,
and consistent with the other iteration mechanisms for CIM objects.
The test cases that were supposed to verify that did not perform the
correct check and were also fixed.
* Fixed the bug that an (unsupported!) reference type could be specified for
the return value of CIM methods, by raising `ValueError` if
`CIMMethod.return_value` is initialized or set to "reference".
* Fixed issue introduced in mof_compiler when atomic_to_cimxml was cleaned up
that did not allow using alias with some association classes. Also
added test for this issue. See issue 936
* Fixed the `CIMInstanceName.__str__()` and `CIMClassName.__str__()` methods to
now return WBEM URI strings that are compliant to DSP0207. Changes include:
* Local WBEM URIs (i.e. when authority/host is not set) now have a leading
slash. That leading slash was previously omitted.
* WBEM URIs with no namespace set now have a colon before the class name.
Previously, the colon was produced only when a namespace was set.
Issue 928.
* Fixed the comparison of `CIMProperty` objects to also consider the
`embedded_object` attribute. Previously, this attribute was not considered,
probably due to mistake (there is no reason not to consider it, as it is a
user-provided input argument). Fixed the yaml testcases for embedded objects
that failed as a result of that fix. These testcases did not set the
`embedded_object` attribute to 'object', so it got its default value
'instance', which caused the testcases to fail. Needed to use the long
form for specifying property values inthe yaml now, because the short
form does not allow for specifying the embedded_object attribute.
* Fixed the comparison of `CIMProperty` and `CIMMethod` objects to compare
their `class_origin` attribute case-insensitively. If set, it contains a CIM
class name. Previously, that attribute was compared case-sensitively.
* Fixed the use of hard coded value limits in the `ValueMapping` class
for open ranges of the `ValueMap` qualifier, by making them dependent on
the data type of the qualified element. This only affected elements
with data types other than Uint32 and only if the `ValueMap` qualifier
defined open ranges whose open side reached the min or max limit (i.e.
was first or last in the list). Extended the test cases to include
this situation (Issue 992).
* Fixed the lookup of the `Values` string for negative values in the
`ValueMapping` class (found when solving 992).
* Added support for octal, binary and hex numbers when parsing MOF
using the `MOFCompiler` class, in compliance with DSP0004 (Issue 974).
Extended the testcases to cover such numbers.
* Fixed the issue that any use of `CIMDateTime` objects in the
`TestClientRecorder` resulted in a `RepresenterError` being raised, by adding
PyYAML representer and constructor functions that serialize `CIMDateTime`
objects to YAML. Extended the testcases in `test_recorder.py` accordingly
(Issues 702, 588).
* Fixed an AttributeError when `ValueMapping` was used for methods, when an
internal method attempted to access the 'type' attribute of the CIM object.
For methods, that attribute is called 'return_type'. Testcases for methods
and parameters have now been added.
* Fixed the issue that leading and trailing slash characters in namespace
names were preserved. This was leading to empty `NAMESPACE/NAME` elements,
which can be rejected by WBEM servers. Now, leading and trailing slash
characters on namespace names are stripped off in pywbem before sending
the request to the server. (Issue 255).
* Fixed the issue that the parser for CIM-XML received from the WBEM server
required the `VALUETYPE` attribute of the `KEYVALUE` element. DSP0201 defines
`VALUETYPE` as optional, with a default of 'string'. That is now implemented.
* Fixed the issue that the parser for CIM-XML received from the WBEM server
did not support hexadecimal representations of integers in the `KEYVALUE`
element. They are now supported.
* Fixed the issue that the parser for CIM-XML received from the WBEM server
accepted characters for char16 typed values outside of the range for
UCS-2 characters. Such characters are now rejected by raising `ParseError`.
* Fixed the issue that the parser for CIM-XML received from the WBEM server
tolerated invalid child elements under `INSTANCE`, `ERROR` and
`PROPERTY.REFERENCE` elements, and invalid attributes on the `PROPERTY.ARRAY`
element. This now results in a `ParseError` being raised.
* Fixed the issue that the parser for CIM-XML received from the WBEM server
did not set the `propagated` attribute to `False` in `CIMProperty` objects
retrieved from operations (e.g. as part of a class or instance), as
required by DSP0201. It does now.
* Fixed the issue that `VALUE.NULL` (for representing array items that are NULL)
was not supported in array values returned by the WBEM server. Note that it
already had been supported for array values sent to the server, or in CIM-XML
created by `toximcml()` methods (Issue 1022).
* Fixed the issue that the size of a fixed-size array property declaration was
ignored when retrieving classes from CIM operations. It is now represented
in the `array_size` attribute of the returned `CIMProperty` objects.
(Issue 1031).
* Fixed the issue that the `xml:lang` attributes that are allowed on some
CIM-XML elements have been rejected by raising `ParseError`. They are now
tolerated but ignored (Issue 1033).
* Fixed the issue that mixed case values (e.g. "True") for the boolean
attributes of the `QUALIFIER` element in CIM-XML was not supported and
resulted in `ParseError` to be raised (Issue 1042).
* Fixed the issue that an empty boolean value in a CIM-XML response returned
from a WBEM server was accepted and treated as a NULL value. This treatment
does not conform to DSP0201. Empty boolean values now cause a `UserWarning`
to be issued, but otherwise continue to work as before. (Issue 1032).
* Fixed the issue that invalid values were accepted for the boolean attributes
of the `SCOPE` element in CIM-XML received from a WBEM server. They now cause
`ParseError` to be raised (Issue 1040).
* Fixed the issue that invalid values for the boolean attributes of
`QUALIFIER.DECLARATION` elements in CIM-XML responses from WBEM servers were
tolerated and treated as `False`. They now cause `ParseError` to be raised
(Issue 1041).
* Fixed the incorrect default value for the `propagated` constructor parameter
of `CIMMethod`. Previously, the default value was `False` and it has been
corrected to be `None`, consistent with its meaning of "information not
available".
The only CIM operations that take a `CIMMethod` object as input are
`CreateClass()` and `ModifyClass()` (as part of the class that is created
or modified). Because WBEM servers must ignore the `propagated` information
on any elements in the provided class, this change is backwards compatible
for the CIM operations. (Issue 1039).
* Added support for setting the `propagated` attribute on `CIMQualifier`
objects returned from CIM operations to a default of `False` when it is
not specified in the CIM-XML response, consistent with DSP0201, and
consistent with how it was already done for other CIM objects.
This change should normally be backwards compatible for pywbem users,
because they don't even know whether the information has been set by
the server or defaulted by the client as it is now done. (Issue 1039).
* Added support for setting the flavor attributes on `CIMQualifier` and
`CIMQUalifierDeclaration` objects returned from CIM operations to their
default values defined in CIM-XML, when they are not specified in the
CIM-XML response, consistent with DSP0201, and consistent with how it
was already done for other CIM objects.
This change should normally be backwards compatible for pywbem users,
because they don't even know whether the information has been set by
the server or defaulted by the client as it is now done. (Issue 1039).
* In the wbemcli shell, fixed the "\*params" parameter of the `im()` function,
to become "params" (an iterable). (Issue 1110).
* For the `InvokeMethod` operation, fixed that passing Python `None` as an input
parameter valus resulted in `TypeError`. Extended the testclient testcases
for `InvokeMethod` accordingly. Documented that `None` is a valid CIM typed
value (Issue 1123).
* Fixed the error that embedded instances in parameter values were incorrectly
represented with the CIM-XML element corresponding to their path (e.g.
`VALUE.NAMEDINSTANCE`). The path is now correctly ignored on embedded instance
parameter values, and they are always represented as `INSTANCE` elements
(Issue 1136).
* Fixed the error that `CIMInstance.tocimxml()/tocimxmlstr()` represented its
instance path always with a `VALUE.NAMEDINSTANCE` element and generated
incorrect child elements depending which components of the instance path
were present. Now, the element for the path depends correctly on the
components that are present in the instance path (Issue 1136).
* Fixed the missing support for generating a `VALUE.INSTANCEWITHPATH` element
in CIM-XML. This is needed when a `CIMInstance` with path has namespace and
host. This error was previously now showing up because the
`VALUE.NAMEDINSTANCE` element was always created (Issue 1136).
* Fixed the error that the `tocimxml()` and `tocimxmlstr()` methods of
`CIMProperty`, `CIMQualifier` and `CIMQualifierDeclaration` represented
NULL entries in array values using an empty `VALUE` element. They now
correctly generate the `VALUE.NULL` element for NULL entries (Issue 1136).
In order to provide for backwards compatibility to WBEM servers that
do not support `VALUE.NULL`, a config option `SEND_VALUE_NULL` was added
that by default sends `VALUE.NULL`, but allows for disabling that
(Issue 1144).
* Fixed the error that the special float values `INF`, `-INF` and `NaN`
were represented in lower case in CIM-XML. DSP0201 requires the
exact case INF, -INF and NaN (Issue 1136).
* Fixed the error that float values in CIM-XML were truncated to six
significant digits. They now have at least the minimum number of
significant digits required by DSP0201: 11 for real32, and 17 for real64.
(Issue 1136).
* In the `WBEMServer.get_central_instances()` method, fixed the error that a
CIM status code of `CIM_ERR_METHOD_NOT_FOUND` returned when attempting to
invoke the `GetCentralInstances()` CIM method lead to failing the
`get_central_instances()` method. Now, execution continues with attempting
the next approach for determining the central instances (Issue 1145).
* In the mof_compiler.bat script file, fixed the issue that it did not return
an exit code if the MOF compiler failed (Issue 1156).
* Several fixes and display related improvements in the mof_compiler script:
MOF file not found is now also handled instead of failing with an exception
traceback. Exceptions are now displayed before exiting. Dry-run mode is now
displayed, for information. The target MOF repository is now always
displayed; previously it was displayed only in verbose mode. (Issue 1157).
**Cleanup:**
* Removed the unimplemented and unused `popitem()` method of `NocaseDict`.
* The `atomic_to_cim_xml()` function and any generated CIM-XML now generates
boolean values in upper case 'TRUE' and 'FALSE', following the recommendation
in DSP0201. Previously, boolean values were produced in lower case. This
change is compatible for WBEM servers that meet the requirement of DSP0201
to treat boolean values case-insensitively.
* Cleaned up the implementation of `CIMProperty/CIMParameter.tocimxml()`,
so that it is now easier understandable (as part of fixing issue 1136).
* Removed any logging.NullHandler objects on pywbem loggers, including
the pywbem listener loggers, because it turns out that for the use
of loggers as a trace tool, the DEBUG level is used by the pywbem client
and the INFO level is used by the pywbem listener, which are both not
printed by default by the Python root logger, so the use of null handlers
is not really needed (Issue 1175).
**Build, test, quality:**
* Added a boolean config variable `DEBUG_WARNING_ORIGIN` that when enabled
causes a stack traceback to be added to the message of most warnings issued
by pywbem. This allows identifying which code originated the warning.
* Cleaned up a lot of pylint warnings, for things like missing-doc, etc. so that
we can actually review the remainder. See issue 808.
* Update to current DMTF Schema (2.49.0) for pywbem tests. This also validates
that pywbem can compile this DMTF released schema. See issue 816
* Add unit tests for the iter... operations. See issue 818
* Migrated installation and development setup to use `pbr` and Pip requirements
files. As a consequence, removed files no longer used: `os_setup.py`,
`uninstall_pbr_on_py26.py`.
* Added ability to test with minimum Python package level, according
to the package versions defined in `minimum-constraints.txt`.
* Fixed a setup issue on Travis CI with duplicate metadata directories for the
setuptools package. This issue prevented downgrading setuptools for the test
with minimum package levels. Added script `remove_duplicate_setuptools.py`
for that.
* Reorganized the make targets for installing pywbem and its dependencies
somewhat. They now need to be used in this order:
- make install - installs pywbem and dependencies for runtime
- make develop - installs dependencies for development
There are two new targets (that are included in the targets above,
when first run after a `make clobber`):
- make install_os - installs OS-level dependencies for runtime
- make develop_os - installs OS-level dependencies for development
* Enabled testing on OS-X in the Travis CI.
* Added unit test for `WBEMServer` class using pywbem_mock. See the file
testsuite/test_wbemserverclass.py. This test is incomplete today but tests
most of the main paths.
**Documentation:**
Improved the complete pywbem documentation (Issue 1115). Some specific
changes are listed in the remainder of this section.
* The installation for Windows on Python 2.7 now requires an additional
manual step for installing the M2CryptoWin32/64 Python package. For details,
see the Installation section in the documentation.
* Fixed the documentation of the `CIMInstanceName.keybindings` setter
method, by adding 'number' as an allowed input type.
* Moved the detail documentation of input to child element lists (e.g.
for properties of `CIMInstance`) as a data type 'properties input object',
etc., into the glossary. These types are now referenced as the type of
the corresponding parameter.
* Clarified that the return type of `BaseOperationRecorder.open_file()`
is a file-like object and that the caller is responsible for closing that
file.
* Clarified in the description of the `return_type` init parameter of
`CIMMethod` that array return types, void return types, and reference
return types are all not supported in pywbem. See issue 1038, for void.
* Fixed the type `string` for the keys of the `CIMInstance.qualifiers`
attribute to be `unicode string`.
* Many clarifications for CIM objects, e.g. about case preservation of
CIM element names, or making copies of input parameters vs. storing the
provided object.
* Improved the description of the `WBEMConnection.ModifyInstance()` method.
* Improved the description of the `tocimxml()` and `tocimxmlstr()` methods
on CIM objects.
* Clarifications and small fixes in the documentation of the
`WBEMConnection.Iter...()` generator functions.
* Added "New in pywbem M.N ..." text to descriptions of anything that was
introduced in pywbem 0.8.0 or later.
* Clarified use of `ca_certs` parameter of `WBEMConnection` and its defaults in
`DEFAULT_CA_CERT_PATHS`.
* Clarified that the instance path returned by the `CreateInstance()` operation
method has classname, keybindings and namespace set.
* For CIM floating point types (real32, real64), added cautionary text for
equality comparison and hash value calculation.
* Clarified that CIM-XML multi-requests are not supported by pywbem and why
that is not a functional limitation.
* In the wbemcli shell, improved and fixed the description of operation
functions (Issue 1110).
* Improved and fixed the description of `WBEMConnection` operation methods
(Issue 1110).
* Improved and fixed the description of the pywbem statistics support
(Issue 1115).
* Clarified the use of logging for the pywbem client (in section
4.8 "WBEM operation logging") and for the pywbem listener (in
section 6.1.2 "Logging in the listener" (Issue 1175).