rough cleanup of the slicemanager business
[sfa.git] / sfa / generic / architecture.txt
1 We identify 3 layers in the server-side aspects:
2
3 . api: this object reacts to an incoming SFA request
4
5 . manager: this implements a given interface, either registry,
6 or aggregate
7
8 . driver: this object is in charge of actually talking to the
9 underlying testbed
10
11 -----
12
13 the generic layer is in charge of instantiating these and to link them
14 as follows:
15 * the classes actually used for creating the 3 elements are
16 configurable in a flavour (e.g. sfa.generic.pl.py)
17 * which is then configured from sfa-config-tty as SFA_GENERIC_FLAVOUR
18
19 * a call to make_api will then create the 3 elements with the
20   following layout:
21
22 api.manager
23 api.driver
24 driver.api
25
26 ------
27 example
28
29 from sfa.generic import Generic
30 generic=Generic.the_flavour()
31 -> returns an instance of a Generic object with a flavour from the
32    config; by default it would thus be an instance of sfa.generic.pl
33
34 api = generic.make_api (...) returns an instance of the given class
35 with the arguments passed as arguments to the constructor
36
37 ------
38 more in sfa/generic/__init__.py