Merge branch 'geni-v3' of ssh://git.onelab.eu/git/sfa into geni-v3
[sfa.git] / sfa / cortexlab / docs / source / index.rst
1 .. cortexlab_sfa_driver documentation master file, created by
2    sphinx-quickstart on Mon Nov 18 12:11:50 2013.
3    You can adapt this file completely to your liking, but it should at least
4    contain the root `toctree` directive.
5
6 Welcome to cortexlab_sfa_driver's documentation!
7 ================================================
8
9 ===================
10 Code tree overview
11 ===================
12
13 ------
14 Driver
15 ------
16
17 The Cortexlab driver source code is under the folder /sfa, along with the other
18 testbeds driver folders. The /cortexlab directory contains the necessary files
19 defining API for LDAP, the postgresql database as well as for the SFA
20 managers.
21
22 CortexlabShell
23 --------------
24
25 **fill missing code in this class**
26
27 This class contains methods to check reserved nodes, leases and launch/delete
28 experiments on the testbed. Methods interacting with the testbed have
29 to be completed.
30
31 Cortexlabnodes
32 ---------------
33
34 **fill missing code in this class**
35
36 CortexlabQueryTestbed class's goal is to get information from the testbed
37 about the site and its nodes.
38 There are two types of information about the nodes:
39
40 * their properties : hostname, radio type, position, site, node_id and so on.
41  (For a complete list of properties, please refer to the method
42  get_all_nodes in cortexlabnodes.py).
43
44 * their availability, whether the node is currently in use, in a scheduled experiment
45  in the future or available. The availability of the nodes can be managed by a
46  scheduler or a database. The node's availabity status is  modified when it is
47  added to/ deleted from an experiment. In SFA, this corresponds to
48  creating/deleting a lease involving this node.
49
50 Currently, CortexlabQueryTestbed is merely a skeleton of methods that have to be
51 implemented with the real testbed API in order to provide the functionality
52 they were designed for (see the cortxlabnodes file for further information
53 on which methods have to be completed).
54
55
56 In the LDAP file, the LDAPapi class is based on the unix schema.
57 If this class is reused in another context, it might not work without some bit
58 of customization. The naming (turning a hostname into a sfa hrn, a LDAP login
59 into a hrn ) is also done in this class.
60
61 The cortexlabpostgres file defines a dedicated cortexlab database, separated from the
62 SFA database. Its purpose is to hold information that we can't store anywhere
63 given the Cortexlab architecture with OAR and LDAP, namely the association of a
64 job and the slice hrn for which the job is supposed to run. Indeed, one user
65 may register on another federated testbed then use his federated slice to book
66 cortexlab nodes. In this case, an Cortexlab LDAP account will be created. Later on,
67 when new users will be imported from the LDAP to the SFA database, a Cortexlab
68 slice will be  created for each new user found in the LDAP. Thus leading us to
69 the situation where one user may have the possibility to use different slices
70 to book Cortexlab nodes.
71
72 Contents:
73
74 .. toctree::
75    :maxdepth: 2
76
77
78
79 Indices and tables
80 ==================
81
82 * :ref:`genindex`
83 * :ref:`modindex`
84 * :ref:`search`
85