X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=src%2Fnepi%2Fexecution%2Fresource.py;h=a9087aec4b2db4b7136f32c27c358056df1146b5;hb=4b0e922489532434f0968647886021542b77cece;hp=95e31ff932d1958dd11a31948eaff2c630212369;hpb=0016ed76a0c9b5d058510df63d42e71c346a4e64;p=nepi.git diff --git a/src/nepi/execution/resource.py b/src/nepi/execution/resource.py index 95e31ff9..a9087aec 100644 --- a/src/nepi/execution/resource.py +++ b/src/nepi/execution/resource.py @@ -83,9 +83,22 @@ def clsinit_copy(cls): # Decorator to invoke class initialization method @clsinit class ResourceManager(Logger): + """ Base clase for all ResourceManagers. + + A ResourceManger is specific to a resource type (e.g. Node, + Switch, Application, etc) on a specific backend (e.g. PlanetLab, + OMF, etc). + + The ResourceManager instances are responsible for interacting with + and controlling concrete (physical or virtual) resources in the + experimental backends. + + """ _rtype = "Resource" _attributes = None _traces = None + _help = None + _backend = None @classmethod def _register_attribute(cls, attr): @@ -187,6 +200,21 @@ class ResourceManager(Logger): """ return copy.deepcopy(cls._traces.values()) + @classmethod + def get_help(cls): + """ Returns the description of the type of Resource + + """ + return cls._help + + @classmethod + def get_backend(cls): + """ Returns the identified of the backend (i.e. testbed, environment) + for the Resource + + """ + return cls._backend + def __init__(self, ec, guid): super(ResourceManager, self).__init__(self.rtype())