Package haizea :: Package core :: Module leases :: Class LeaseWorkload
[hide private]
[frames] | no frames]

Class LeaseWorkload

source code


Reprents a sequence of lease requests.

A lease workload is a sequence of lease requests with a specific arrival time for each lease. This class is currently only used to load LWF (Lease Workload File) files. See the Haizea documentation for details on the LWF format.

Instance Methods [hide private]
 
__init__(self, leases)
Constructor.
source code
 
get_leases(self)
Returns the leases in the workload.
source code

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

Class Methods [hide private]
 
from_xml_file(cls, xml_file, inittime=<mx.DateTime.DateTime object for '0000-01-01 00:00:00.00' at 1...)
Constructs a lease workload from an XML file.
source code
 
__from_xml_element(cls, element, inittime)
Constructs a lease from an ElementTree element.
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, leases)
(Constructor)

source code 

Constructor.

Arguments: leases -- An ordered list (by arrival time) of leases in the workload

Overrides: object.__init__

from_xml_file(cls, xml_file, inittime=<mx.DateTime.DateTime object for '0000-01-01 00:00:00.00' at 1...)
Class Method

source code 

Constructs a lease workload from an XML file.

See the Haizea documentation for details on the lease workload XML format.

Argument: xml_file -- XML file containing the lease in XML format. inittime -- The starting time of the lease workload. All relative times in the XML file will be converted to absolute times by adding them to inittime. If inittime is not specified, it will arbitrarily be 0000/01/01 00:00:00.

__from_xml_element(cls, element, inittime)
Class Method

source code 

Constructs a lease from an ElementTree element.

See the Haizea documentation for details on the lease XML format.

Argument: element -- Element object containing a "<lease-workload>" element. inittime -- The starting time of the lease workload. All relative times in the XML file will be converted to absolute times by adding them to inittime.