Changing ResourceManager naming for platform::ResourceName
[nepi.git] / doc / user_manual / planetlab_resources.tex
index f5d0b9d..080da1c 100644 (file)
@@ -20,7 +20,7 @@ In order for NEPI to select healthy nodes for your experiment and add them to yo
 name. pluser and plpassword are the user and password used for authenticate yourself in the Planetlab web page (www.planet-lab.eu). For example, when registering a Planetlab node for your experiment, the
 experiment description will look a lot like this:
 \begin{lstlisting}[language=Python]
-node = ec.register_resource("PlanetlabNode")
+node = ec.register_resource("planetlab::Node")
 ec.set(node, "username", "institute_project")
 ec.set(node, "pluser", "​​john.doe@institute.edu")
 ec.set(node, "plpassword", "guessit")
@@ -64,7 +64,7 @@ operating_system = Attribute("operatingSystem",
 \end{lstlisting}
 Now we know how to add a filter to the node description:
 \begin{lstlisting}[language=Python]
-    node = ec.register_resource("PlanetlabNode??")
+    node = ec.register_resource("planetlab::Node??")
     ec.set(node, "username", "institute_project")
     ec.set(node, "pluser", "​​jhon.doe@institute.edu")
     ec.set(node, "plpassword", "guessit")
@@ -73,7 +73,7 @@ Now we know how to add a filter to the node description:
 In case of more filters, an AND between the filters will be applied:
 
 \begin{lstlisting}[language=Python]
-    node = ec.register_resource("PlanetlabNode??")
+    node = ec.register_resource("planetlab::Node??")
     ec.set(node, "username", "institute_project")
     ec.set(node, "pluser", "​​jhon.doe@institute.edu")
     ec.set(node, "plpassword", "guessit")
@@ -97,14 +97,14 @@ Current list of filters available :
 
 In this case, our experiment description will look like this:
 \begin{lstlisting}[language=Python]
-node1 = ec.register_resource("PlanetlabNode")
+node1 = ec.register_resource("planetlab::Node")
 ec.set(node1, "username", "institute_project")
 ec.set(node1, "pluser", "​​john.doe@institute.edu")
 ec.set(node1, "plpassword", "guessit")
 ec.set(node1, "hostname", "planetlab2.utt.fr") 
 ## planetlab2.utt.fr is the specific node we want to use
 
-node2 = ec.register_resource("PlanetlabNode")
+node2 = ec.register_resource("planetlab::Node")
 ec.set(node2, "username", "institute_project")
 ec.set(node2, "pluser", "​​john.doe@institute.edu")
 ec.set(node2, "plpassword", "guessit")
@@ -122,34 +122,34 @@ For a better example on how to use filters and register conditions, there is the
 
 PlanetLab nodes may fail for different reasons, ssh authentication failure, file system corrupted, nodes unreachable, between others. Moreover, the mal functioning nodes can vary from one experiment run to the next one. In NEPI there is the ability to register these mal functioning nodes in order run the experiment in a more efficient way. Also, this information can be use to evaluate the performance of the experiment and the nodes themselves.
 
-The PlanetlabNode resource, is instantiated for each Planetlab node defined in the experiment. The node discovery and provisioning occurs in parallel for every node defined, so a list of the nodes failures is needed while deploying, in order to avoid to repeat the provision of mal functioning nodes. This list of blacklisted nodes during the experiment, can be saved and maintain for following run of the same experiment or others experiments. This list it is called blacklist. Moreover, the nodes in the blacklist in the moment the experiment is started, can be use to directly discard from the node discover and provision the unwanted nodes.
+The planetlab::Node resource, is instantiated for each Planetlab node defined in the experiment. The node discovery and provisioning occurs in parallel for every node defined, so a list of the nodes failures is needed while deploying, in order to avoid to repeat the provision of mal functioning nodes. This list of blacklisted nodes during the experiment, can be saved and maintain for following run of the same experiment or others experiments. This list it is called blacklist. Moreover, the nodes in the blacklist in the moment the experiment is started, can be use to directly discard from the node discover and provision the unwanted nodes.
 
-There is an attribute available for this matter, is called 'persist\_blacklist' and is a global attribute, meaning that if set, is set for every resource of type PlanetlabNode.
+There is an attribute available for this matter, is called 'persist\_blacklist' and is a global attribute, meaning that if set, is set for every resource of type planetlab::Node.
 The blacklist file is stored in ~/.nepi/plblacklist.txt.
 
 Example on how to use the attribute:
 
 Two Planetlab nodes that read from the blacklist at the beginning of the experiment, and write new blacklisted nodes (if any) at the end.
 \begin{lstlisting}[language=Python]
-node1 = ec.register_resource("PlanetlabNode")
+node1 = ec.register_resource("planetlab::Node")
 ec.set(node1, "username", username)
 ec.set(node1, "pluser", pl_user)
 ec.set(node1, "plpassword", pl_password)
 ec.set(node1, "cleanHome", True)
 ec.set(node1, "cleanProcesses", True)
 
-node2 = ec.register_resource("PlanetlabNode")
+node2 = ec.register_resource("planetlab::Node")
 ec.set(node2, "username", username)
 ec.set(node2, "pluser", pl_user)
 ec.set(node2, "plpassword", pl_password)
 ec.set(node2, "cleanHome", True)
 ec.set(node2, "cleanProcesses", True)
 
-ec.set_global('PlanetlabNode', 'persist_blacklist', True)
+ec.set_global("planetlab::Node", 'persist_blacklist', True)
 \end{lstlisting}
 The attribute can be retrieved with the method get\_global :
 \begin{lstlisting}[language=Python]
-ec.get_global('PlanetlabNode', 'persist_blacklist').
+ec.get_global("planetlab::Node", 'persist_blacklist').
 \end{lstlisting}
 \subsection{SFA Support}
 
@@ -176,7 +176,7 @@ username = os.environ.get('SFA_SLICE')  --- for example 'inria_lguevgeo'
 sfauser = os.environ.get('SFA_USER')  --- for example 'ple.inria.lucia_guevgeozian_odizzio'
 sfaPrivateKey = os.environ.get('SFA_PK')  --- for example '/home/.sfi/lucia_guevgeozian_odizzio.pkey'
 
-node1 = ec.register_resource("PlanetlabSfaNode")
+node1 = ec.register_resource("planetlab::sfa::Node")
 ec.set(node1, "hostname", 'planetlab1.cs.vu.nl')
 ec.set(node1, "username", username)
 ec.set(node1, "sfauser", sfauser)
@@ -186,7 +186,7 @@ ec.set(node1, "cleanProcesses", True)
 \end{lstlisting}
 \subsubsection{SFA with iMinds Testbed (w-iLab.t)}
 
-The control and management software running in w-iLab.t is OMF 6, but its resources can be discover and provisioned using SFA, the experiment description for the WilabtSfaNode in NEPI is similar to the one in PlanetlabNode. Below is an example :
+The control and management software running in w-iLab.t is OMF 6, but its resources can be discover and provisioned using SFA, the experiment description for the WilabtSfaNode in NEPI is similar to the one in Planetlab::Node. Below is an example :
 \begin{lstlisting}[language=Python]
 from nepi.execution.ec import ExperimentController
 import os
@@ -200,7 +200,7 @@ sfauser = os.environ.get('SFA_USER')
 sfaPrivateKey = os.environ.get('SFA_PK')
 
 # nodes
-node1 = ec.register_resource("WilabtSfaNode")
+node1 = ec.register_resource("wilabt::sfa::Node")
 ec.set(node1, "hostname", 'zotacM20')
 ec.set(node1, "slicename", slicename)
 ec.set(node1, "sfauser", sfauser)