Пример #1
0
 def map(self, requested_resources, start, end, strictend, onlynodes=None):
     """The mapping function
     
     The mapping function takes a set of requested resources and maps
     them to physical resources (based on the availability 
     in the slot table) in a specified time interval. The mapper
     may return a mapping that only satisfies part of the specified
     time interval.
     
     Arguments:
     requested_resources -- A dictionary mapping lease nodes (integers) to
     ResourceTuples (representing the desired amount of resources for
     that lease node)
     start -- Starting time of the interval during which the resources
     are required
     end -- Ending time of the interval
     strictend -- If True, the only valid mappings are those that span
     the entire requested interval. If False, the mapper is allowed to
     return mappings that only span part of the interval (this reduced
     interval must always start at "start"; the earlier end time is
     returned as a return value)
     onlynodes -- List of physical nodes. Only look for a mapping in
     these nodes.
     
     Returns:
     mapping -- A dictionary mapping lease nodes to physical nodes
     maxend -- The end of the interval for which a mapping was found.
     As noted in argument "strictend", this return value might not
     be the same as "end"
     preempting -- Leases that would have to be preempted for the
     mapping to be valid.
     
     If no mapping is found, the three return values are set to None
     """
     abstract()
Пример #2
0
 def map(self, requested_resources, start, end, strictend, onlynodes = None):
     """The mapping function
     
     The mapping function takes a set of requested resources and maps
     them to physical resources (based on the availability 
     in the slot table) in a specified time interval. The mapper
     may return a mapping that only satisfies part of the specified
     time interval.
     
     Arguments:
     requested_resources -- A dictionary mapping lease nodes (integers) to
     ResourceTuples (representing the desired amount of resources for
     that lease node)
     start -- Starting time of the interval during which the resources
     are required
     end -- Ending time of the interval
     strictend -- If True, the only valid mappings are those that span
     the entire requested interval. If False, the mapper is allowed to
     return mappings that only span part of the interval (this reduced
     interval must always start at "start"; the earlier end time is
     returned as a return value)
     onlynodes -- List of physical nodes. Only look for a mapping in
     these nodes.
     
     Returns:
     mapping -- A dictionary mapping lease nodes to physical nodes
     maxend -- The end of the interval for which a mapping was found.
     As noted in argument "strictend", this return value might not
     be the same as "end"
     preempting -- Leases that would have to be preempted for the
     mapping to be valid.
     
     If no mapping is found, the three return values are set to None
     """
     abstract()
Пример #3
0
 def price_lease(self, lease, preempted_leases):
     """Computes the price of a lease
     
     Arguments:
     lease -- Lease that is being scheduled.
     preempted_leases -- Leases that would have to be preempted to support this lease.
     """
     abstract()
Пример #4
0
 def accept_lease(self, lease):
     """Lease admission function
     
     Returns True if the lease can be accepted, False if it should be rejected.
     
     Argument
     lease -- Lease request
     """        
     abstract()
Пример #5
0
 def accept_lease(self, lease):
     """Lease admission function
     
     Returns True if the lease can be accepted, False if it should be rejected.
     
     Argument
     lease -- Lease request
     """
     abstract()
Пример #6
0
 def get_host_score(self, node, time, lease):
     """Computes the score of a host
     
     Given a physical host, a time, and a lease we would like to
     schedule at that time, this method returns a score indicating
     how desireable that host is for that lease at that time.
     The score can be between 0.0 and 1.0. The higher the score,
     the "more desireable" the physical host is (this is a relative measure; 
     the score should be used to determine which of several physical hosts
     is more desireable for this lease).
     
     Arguments:
     node -- Physical node (the integer identifier used in the slot table)
     time -- Time at which the lease might be scheduled
     lease -- Lease that is being scheduled.
     """
     abstract()
Пример #7
0
 def get_host_score(self, node, time, lease):
     """Computes the score of a host
     
     Given a physical host, a time, and a lease we would like to
     schedule at that time, this method returns a score indicating
     how desireable that host is for that lease at that time.
     The score can be between 0.0 and 1.0. The higher the score,
     the "more desireable" the physical host is (this is a relative measure; 
     the score should be used to determine which of several physical hosts
     is more desireable for this lease).
     
     Arguments:
     node -- Physical node (the integer identifier used in the slot table)
     time -- Time at which the lease might be scheduled
     lease -- Lease that is being scheduled.
     """               
     abstract()    
Пример #8
0
 def get_next_schedulable_time(self): 
     """Return the next time at which resources could be scheduled.
     
     The "next schedulable time" server sanity measure when running 
     in real time (to avoid scheduling something "now" to actually 
     have "now" be in the past once the scheduling function returns. 
     i.e., the "next schedulable time" has nothing to do with whether 
     there are resources available at that time or not.
     """
     return abstract()
Пример #9
0
 def get_next_schedulable_time(self): 
     """Return the next time at which resources could be scheduled.
     
     The "next schedulable time" server sanity measure when running 
     in real time (to avoid scheduling something "now" to actually 
     have "now" be in the past once the scheduling function returns. 
     i.e., the "next schedulable time" has nothing to do with whether 
     there are resources available at that time or not.
     """
     return abstract()
Пример #10
0
 def get_lease_preemptability_score(self, preemptor, preemptee, time):
     """Computes the lease preemptability score
     
     Given a lease that needs to preempt resources (the "preemptor"),
     another lease (the "preemptee") that may be preempted by it, and a time,
     this method determines the preemptability score of the preemptee or
     "how preemptable is the preemptee by the preemptor at the given time".
     The score can be the following:
     
     -1 : Cannot be preempted under any circumstances
     0.0 <= x <= 1.0: Lease can be preempted. The higher the score,
     the "more preemptable" it is (this is a relative measure; the score
     should be used to determine which of several leases is a better
     candidate for preemption)
     
     Arguments:
     preemptor -- Preemptor lease
     preemptee -- Preemptee lease
     time -- Time at which preemption would take place
     """
     abstract()
Пример #11
0
 def get_lease_preemptability_score(self, preemptor, preemptee, time):
     """Computes the lease preemptability score
     
     Given a lease that needs to preempt resources (the "preemptor"),
     another lease (the "preemptee") that may be preempted by it, and a time,
     this method determines the preemptability score of the preemptee or
     "how preemptable is the preemptee by the preemptor at the given time".
     The score can be the following:
     
     -1 : Cannot be preempted under any circumstances
     0.0 <= x <= 1.0: Lease can be preempted. The higher the score,
     the "more preemptable" it is (this is a relative measure; the score
     should be used to determine which of several leases is a better
     candidate for preemption)
     
     Arguments:
     preemptor -- Preemptor lease
     preemptee -- Preemptee lease
     time -- Time at which preemption would take place
     """             
     abstract()    
Пример #12
0
 def run(self):
     """Start and run the clock. This function is, in effect,
     the main loop of the resource manager."""
     return abstract()     
Пример #13
0
 def get_nodes(self):
     """ Returns the nodes in the resource pool. """
     abstract()
Пример #14
0
 def cleanup(self, lease):
     abstract()
Пример #15
0
 def refresh(self):
     abstract()
Пример #16
0
 def resume(self, vms):
     abstract()
Пример #17
0
 def get_resource_types(self):
     abstract()
Пример #18
0
 def get_accumulated_requests(self): abstract()
 
 def exists_more_requests(self): abstract()
Пример #19
0
 def get_time(self): 
     """Return the current time"""
     return abstract()
Пример #20
0
 def get_start_time(self): 
     """Return the time at which the clock started ticking"""
     return abstract()
Пример #21
0
 def run(self):
     """Start and run the clock. This function is, in effect,
     the main loop of the resource manager."""
     return abstract()     
Пример #22
0
 def start(self, vms):
     abstract()
Пример #23
0
 def get_nodes(self): 
     """ Returns the nodes in the resource pool. """
     abstract()
Пример #24
0
 def stop(self, vms):
     abstract()
Пример #25
0
 def get_start_time(self): 
     """Return the time at which the clock started ticking"""
     return abstract()
Пример #26
0
    def resume(self, vms): abstract()
    
class DeploymentEnactment(object):
Пример #27
0
 def refresh(self): 
     abstract()
Пример #28
0
 def suspend(self, vms):
     abstract()
Пример #29
0
 def get_time(self): 
     """Return the current time"""
     return abstract()
Пример #30
0
 def get_resource_types(self):
     abstract()
Пример #31
0
 def start(self, vms): abstract()
 
 def stop(self, vms): abstract()
Пример #32
0
 def stop(self, vms): abstract()
 
 def suspend(self, vms): abstract()
Пример #33
0
 def load(self, manager): abstract()
 
 def get_accumulated_requests(self): abstract()
Пример #34
0
 def suspend(self, vms): abstract()
 
 def resume(self, vms): abstract()
Пример #35
0
 def exists_more_requests(self): abstract()
Пример #36
0
 def get(self): 
     abstract()