Home | Trees | Indices | Help |
|
---|
|
Types to represent CIM typed values, and related conversion functions.
The following table shows how CIM typed values are represented as Python objects:
CIM type | Python type |
---|---|
boolean | bool |
char16 | unicode or str |
string | unicode or str |
string (EmbeddedInstance) | CIMInstance |
string (EmbeddedObject) | CIMInstance or CIMClass |
datetime | CIMDateTime |
reference | CIMInstanceName |
uint8 | Uint8 |
uint16 | Uint16 |
uint32 | Uint32 |
uint64 | Uint64 |
sint8 | Sint8 |
sint16 | Sint16 |
sint32 | Sint32 |
sint64 | Sint64 |
real32 | Real32 |
real64 | Real64 |
[] (array) | list |
Note that constructors of PyWBEM classes that take CIM typed values as input
may support Python types in addition to those shown above. For example, the
CIMProperty class represents CIM datetime values internally as a
CIMDateTime object, but its constructor accepts datetime.timedelta
,
datetime.datetime
, str
, and unicode
objects in addition to
CIMDateTime objects.
Classes | |
MinutesFromUTC A datetime.tzinfo implementation defined using a fixed offset in +/-
minutes from UTC.
|
|
CIMType Base type for numeric and datetime CIM types. |
|
CIMDateTime A value of CIM type datetime. |
|
CIMInt Base type for integer CIM types. |
|
Uint8 A value of CIM type uint8. |
|
Sint8 A value of CIM type sint8. |
|
Uint16 A value of CIM type uint16. |
|
Sint16 A value of CIM type sint16. |
|
Uint32 A value of CIM type uint32. |
|
Sint32 A value of CIM type sint32. |
|
Uint64 A value of CIM type uint64. |
|
Sint64 A value of CIM type sint64. |
|
CIMFloat Base type for real (floating point) CIM types. |
|
Real32 A value of CIM type real32. |
|
Real64 A value of CIM type real64. |
Functions | |||
|
|||
|
|||
|
Function Details |
Return the CIM type name of a value, as a string. For an array, the type is determined from the first array element because CIM arrays must be homogeneous. If the array is empty, ValueError is raised. If the type of the value is not a CIM type, TypeError is raised.
|
Return the Python type object for a given CIM type name. For example, type name
|
Convert a value of an atomic scalar CIM type to a CIM-XML unicode string and return that string. TODO: Verify whether we can change this function to raise a ValueError in case the value is not CIM typed.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Jan 23 01:23:05 2015 | http://epydoc.sourceforge.net |