示例#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
文件: policy.py 项目: queba/haizea
 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
文件: policy.py 项目: queba/haizea
 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
文件: policy.py 项目: queba/haizea
 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
文件: stats.py 项目: queba/haizea
 def get(self): 
     abstract()