Package archipelcentralagentplatformrequest :: Module scorecomputing :: Class TNBasicPlatformScoreComputing
[hide private]
[frames] | no frames]

Class TNBasicPlatformScoreComputing

source code

object --+
         |
        TNBasicPlatformScoreComputing

This class is a basic score computing. If you want to provide your own score computing unit, you can subclass this and implement your own computing system.

Instance Methods [hide private]
 
__init__(self)
Put custom initialization here.
source code
list
score(self, database, limit=10)
Perform the score.
source code

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

Static Methods [hide private]
dict
plugin_info()
Return informations about the plugin.
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Put custom initialization here.

Overrides: object.__init__

plugin_info()
Static Method

source code 

Return informations about the plugin.

Returns: dict
dictionary contaning plugin informations

score(self, database, limit=10)

source code 

Perform the score. The highest score is, the highest chance you got to perform the action. If you want to decline the performing of the action, return 0.0 or None. the max score you can return is 1.0 (so basically see it as a percentage).

Parameters:
  • limit (float) - max numbers of hypervisors to suggest
Returns: list
scores of the top hypervisors