ovirtsdk4.reader module
Module variables
var TZ_OFFSET_RE
var TZ_USEC_RE
Classes
class Reader
This is the base class for all the readers of the SDK. It contains the utility methods used by all of them.
Ancestors (in MRO)
- Reader
- __builtin__.object
Static methods
def parse_boolean(
text)
Converts the given text to a boolean value.
def parse_date(
text)
Converts the given text to a date value.
def parse_decimal(
text)
Converts the given text to a decimal value.
def parse_enum(
enum_type, text)
Converts the given text to an enum.
def parse_integer(
text)
Converts the given text to an integer value.
def read_boolean(
reader)
Reads a boolean value, assuming that the cursor is positioned at the start element that contains the value.
def read_booleans(
reader)
Reads a list of boolean values, assuming that the cursor is positioned at the start element of the element that contains the first value.
def read_date(
reader)
Reads a date value, assuming that the cursor is positioned at the start element that contains the value.
def read_dates(
reader)
Reads a list of date values, assuming that the cursor is positioned at the start element of the element that contains the first value.
def read_decimal(
reader)
Reads a decimal value, assuming that the cursor is positioned at the start element that contains the value.
def read_decimals(
reader)
Reads a list of decimal values, assuming that the cursor is positioned at the start element of the element that contains the first value.
def read_enum(
enum_type, reader)
Reads a enum value, assuming that the cursor is positioned at the start element that contains the value.
def read_enums(
enum_type, reader)
Reads a list of enum values, assuming that the cursor is positioned at the start element of the element that contains the first value.
def read_integer(
reader)
Reads an integer value, assuming that the cursor is positioned at the start element that contains the value.
def read_integers(
reader)
Reads a list of integer values, assuming that the cursor is positioned at the start element of the element that contains the first value.
def read_string(
reader)
Reads a string value, assuming that the cursor is positioned at the start element that contains the value.
def read_strings(
reader)
Reads a list of string values, assuming that the cursor is positioned at the start element of the element that contains the first value.
Methods
def __init__(
self)
def read(
cls, source)
Reads one object, determining the reader method to use based on the
tag name of the first element. For example, if the first tag name
is vm
then it will create a Vm
object, if it the tag is vms
it will create an array of Vm
objects, so on.
def register(
cls, tag, reader)
Registers a read method.
class TZ
This is a simple implementation of the tzinfo
class, that contains a
fixed offset.
Ancestors (in MRO)
- TZ
- datetime.tzinfo
- __builtin__.object
Methods
def __init__(
self, minutes, name)
def dst(
self, date_time)
def tzname(
self, date_time)
def utcoffset(
self, date_time)