From 1be096dc3374b3aacc8ee988e65087f8f66f98f1 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Tue, 1 Nov 2011 18:13:41 +0100 Subject: [PATCH] a word on how to use the generic framework --- sfa/generic/architecture.txt | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 sfa/generic/architecture.txt diff --git a/sfa/generic/architecture.txt b/sfa/generic/architecture.txt new file mode 100644 index 00000000..ff63549b --- /dev/null +++ b/sfa/generic/architecture.txt @@ -0,0 +1,40 @@ +We identify 3 layers in the server-side aspects: + +. api: this object reacts to an incoming SFA request + +. manager: this implements a given interface, either registry, +aggregate, or slicemgr + +. driver: this object is in charge of actually talking to the +underlying testbed + +----- + +the generic layer is in charge of instantiating these and to link them +as follows: +* the classes actually used for creating the 3 elements are +configurable in a flavour (e.g. sfa.generic.pl.py) +* which is then configured from sfa-config-tty as SFA_GENERIC_FLAVOUR + +* a call to make_api will then create the 3 elements with the + following layout: + +api.manager +manager.driver +api.driver (for convenience) + +------ +example + +from sfa.generic import Generic +generic=Generic.the_flavour() +-> returns an instance of a Generic object with a flavour from the + config; by default it would thus be an instance of sfa.generic.pl + +api = generic.make_api (...) returns an instance of the given class +with the arguments passed as arguments to the constructor + +------ +more in sfa/generic/__init__.py + + -- 2.47.0