From d50ba1a08e541ded7a8b322493ebb1d0cc59c6ff Mon Sep 17 00:00:00 2001 From: Alina Quereilhac Date: Mon, 15 Dec 2014 00:51:17 +0100 Subject: [PATCH] Changing ResourceManager naming for platform::ResourceName --- doc/user_manual/faq.tex | 4 +- doc/user_manual/getting_started.tex | 4 +- doc/user_manual/planetlab_resources.tex | 28 +++--- examples/ccn_emu_live/dce.py | 16 ++-- examples/ccn_emu_live/dce_4_nodes_linear.py | 16 ++-- examples/ccn_emu_live/planetlab.py | 12 +-- .../ccn_emu_live/planetlab_4_nodes_linear.py | 26 +++--- examples/dce/custom_dlm_ping.py | 6 +- examples/dce/custom_local_csma_ping.py | 6 +- examples/dce/custom_local_p2p_ccn.py | 16 ++-- examples/dce/custom_local_p2p_ping.py | 6 +- examples/dce/custom_local_wifi_ping.py | 6 +- examples/dce/wrapped_local_p2p_ccncat.py | 16 ++-- examples/dce/wrapped_local_p2p_ccnpeek.py | 10 +-- examples/dce/wrapped_local_p2p_ping.py | 6 +- examples/linux/ccn_simple_transfer.py | 18 ++-- examples/linux/ccn_transfer_using_linuxapp.py | 8 +- examples/linux/hello_world.py | 6 +- examples/linux/netcat_file_transfer.py | 10 +-- examples/linux/nitos_testbed_bootstrap.py | 22 ++--- examples/linux/ping.py | 6 +- examples/linux/testing/ccncat_2_nodes.py | 10 +-- .../testing/ccncat_extended_ring_topo.py | 14 +-- examples/linux/testing/multihop_ssh.py | 12 +-- examples/linux/testing/scalability.py | 6 +- examples/linux/vlc_streaming.py | 8 +- examples/ns3/local_csma_p2p_star_ping.py | 4 +- examples/ns3/local_csma_ping.py | 4 +- examples/ns3/local_mobile_wifi_ping.py | 4 +- examples/ns3/local_p2p_ping.py | 4 +- examples/ns3/local_wifi_ping.py | 4 +- examples/ns3/remote_p2p_ping.py | 4 +- examples/omf/iminds_omf6_ping.py | 12 +-- examples/omf/iminds_omf6_vlc.py | 20 ++--- examples/omf/nitos_omf6_ping.py | 12 +-- examples/omf/nitos_omf6_vlc.py | 14 +-- .../omf/testing/nepi_omf5_iminds_stdin.py | 4 +- .../omf/testing/nepi_omf5_nitos_ccncat.py | 8 +- .../omf/testing/nepi_omf5_nitos_ccnring.py | 8 +- examples/omf/testing/nepi_omf5_nitos_vlc.py | 18 ++-- .../testing/nepi_omf5_nitos_vlc_tribino.py | 18 ++-- examples/omf/testing/nepi_omf5_nitos_xeyes.py | 10 +-- .../testing/nepi_omf5_plexus_ccncat_linear.py | 8 +- .../omf/testing/nepi_omf5_plexus_stdin.py | 4 +- examples/omf/testing/nepi_omf5_plexus_vlc.py | 18 ++-- examples/omf/testing/nepi_omf6_iminds_vlc.py | 20 ++--- examples/omf/testing/nepi_omf6_nitos_vlc.py | 14 +-- .../omf/testing/nepi_omf6_plexus_hostname.py | 8 +- examples/omf/testing/nepi_omf6_plexus_ping.py | 14 +-- .../nepi_omf6_plexus_ping_with_traces.py | 14 +-- examples/omf/testing/nitos_omf5_ping.py | 10 +-- examples/omf/vod_exp/vod_experiment.py | 14 +-- examples/openvswitch/ovs_ping_2switches.py | 17 ++-- .../openvswitch/ovs_ping_3switches_line.py | 17 ++-- .../openvswitch/ovs_ping_3switches_loop.py | 17 ++-- ...TapTunnel_performance_test_triangleTopo.py | 15 ++-- examples/planetlab/ccn_simple_transfer.py | 18 ++-- examples/planetlab/ping.py | 8 +- examples/planetlab/ping_with_filters.py | 6 +- examples/planetlab/select_nodes.py | 4 +- examples/planetlab/testing/blacklist.py | 20 ++--- examples/planetlab/testing/ping_sfa.py | 18 ++-- examples/planetlab/testing/scalability.py | 4 +- src/nepi/resources/linux/application.py | 2 +- .../resources/linux/ccn/ccnapplication.py | 2 +- src/nepi/resources/linux/ccn/ccncat.py | 2 +- src/nepi/resources/linux/ccn/ccncontent.py | 2 +- src/nepi/resources/linux/ccn/ccnd.py | 2 +- src/nepi/resources/linux/ccn/ccnpeek.py | 2 +- src/nepi/resources/linux/ccn/ccnping.py | 2 +- src/nepi/resources/linux/ccn/ccnpingserver.py | 2 +- src/nepi/resources/linux/ccn/ccnpoke.py | 2 +- src/nepi/resources/linux/ccn/ccnr.py | 2 +- src/nepi/resources/linux/ccn/fibentry.py | 6 +- src/nepi/resources/linux/channel.py | 2 +- src/nepi/resources/linux/gretunnel.py | 4 +- src/nepi/resources/linux/interface.py | 2 +- src/nepi/resources/linux/mtr.py | 2 +- src/nepi/resources/linux/node.py | 2 +- src/nepi/resources/linux/nping.py | 2 +- .../linux/ns3/ccn/ns3ccncatdceapplication.py | 2 +- .../linux/ns3/ccn/ns3ccndceapplication.py | 2 +- .../linux/ns3/ccn/ns3ccnddceapplication.py | 2 +- .../linux/ns3/ccn/ns3ccnpeekdceapplication.py | 2 +- .../linux/ns3/ccn/ns3ccnpokedceapplication.py | 2 +- .../linux/ns3/ccn/ns3ccnrdceapplication.py | 2 +- .../ns3/ccn/ns3fibentrydceapplication.py | 2 +- .../resources/linux/ns3/ns3dceapplication.py | 2 +- .../linux/ns3/ns3pingdceapplication.py | 2 +- src/nepi/resources/linux/ns3/ns3simulation.py | 2 +- src/nepi/resources/linux/ping.py | 2 +- src/nepi/resources/linux/tap.py | 2 +- src/nepi/resources/linux/tcpdump.py | 2 +- src/nepi/resources/linux/traceroute.py | 2 +- src/nepi/resources/linux/tun.py | 2 +- src/nepi/resources/linux/tunnel.py | 2 +- src/nepi/resources/linux/udptest.py | 2 +- src/nepi/resources/linux/udptunnel.py | 2 +- .../resources/ns3/classes/dce_application.py | 65 -------------- src/nepi/resources/omf/application.py | 4 +- src/nepi/resources/omf/channel.py | 6 +- src/nepi/resources/omf/interface.py | 4 +- src/nepi/resources/omf/node.py | 4 +- src/nepi/resources/omf/omf_resource.py | 2 +- src/nepi/resources/omf/wilabt_node.py | 2 +- src/nepi/resources/planetlab/node.py | 2 +- .../resources/planetlab/openvswitch/ovs.py | 4 +- .../planetlab/openvswitch/ovsport.py | 8 +- src/nepi/resources/planetlab/sfa_node.py | 2 +- src/nepi/resources/planetlab/tap.py | 2 +- src/nepi/resources/planetlab/tun.py | 2 +- src/nepi/resources/planetlab/vroute.py | 2 +- test/resources/linux/application.py | 50 +++++------ test/resources/linux/ccn/ccncat.py | 10 +-- test/resources/linux/ccn/ccnpeek.py | 10 +-- test/resources/linux/ccn/ccnping.py | 20 ++--- test/resources/linux/ccn/fibentry.py | 16 ++-- test/resources/linux/gretunnel.py | 32 +++---- test/resources/linux/interface.py | 6 +- test/resources/linux/mtr.py | 6 +- test/resources/linux/multirun.py | 6 +- test/resources/linux/nping.py | 6 +- test/resources/linux/ns3/ccn/ns3dceccn.py | 18 ++-- test/resources/linux/ns3/ccn/ns3dceccnpeek.py | 20 ++--- test/resources/linux/ns3/ns3dceapplication.py | 24 +++--- test/resources/linux/ns3/ns3dceping.py | 6 +- test/resources/linux/ns3/ns3fdnetdevice.py | 4 +- test/resources/linux/ns3/ns3simulation.py | 44 +++++----- test/resources/linux/ns3/serialization.py | 16 ++-- test/resources/linux/ping.py | 6 +- test/resources/linux/serialization.py | 8 +- test/resources/linux/tap.py | 8 +- test/resources/linux/tcpdump.py | 8 +- test/resources/linux/traceroute.py | 6 +- test/resources/linux/tun.py | 8 +- test/resources/linux/udptest.py | 12 +-- test/resources/linux/udptunnel.py | 32 +++---- test/resources/omf/omf5_vlc_normal_case.py | 40 ++++----- test/resources/omf/omf5_vlc_wrong_critical.py | 52 ++++++------ .../omf/omf5_vlc_wrong_non_critical.py | 82 +++++++++--------- test/resources/omf/omf6_vlc_normal_case.py | 40 ++++----- test/resources/omf/omf6_vlc_traces.py | 8 +- test/resources/omf/omf6_vlc_wrong_critical.py | 52 ++++++------ .../omf/omf6_vlc_wrong_non_critical.py | 85 ++++++++++--------- test/resources/omf/set_hook.py | 10 +-- test/resources/planetlab/gretunnel.py | 36 ++++---- test/resources/planetlab/node.py | 6 +- test/resources/planetlab/ovs.py | 42 ++++----- test/resources/planetlab/sfa_node.py | 20 ++--- test/resources/planetlab/tap.py | 8 +- test/resources/planetlab/tun.py | 8 +- test/resources/planetlab/udptunnel.py | 28 +++--- 152 files changed, 859 insertions(+), 939 deletions(-) delete mode 100644 src/nepi/resources/ns3/classes/dce_application.py diff --git a/doc/user_manual/faq.tex b/doc/user_manual/faq.tex index 38cd6ce2..5b345ed8 100644 --- a/doc/user_manual/faq.tex +++ b/doc/user_manual/faq.tex @@ -107,12 +107,12 @@ hostname = # Host that can be accessed with an SSH account username = # SSH user account on host ssh_key = # Path to SSH public key file to access host -node = ec.register_resource("LinuxNode") +node = ec.register_resource("linux::Node") ec.set(node, "hostname", hostname) ec.set(node, "username", username) ec.set(node, "identity", ssh_key) -app = ec.register_resource("LinuxApplication") +app = ec.register_resource("linux::Application") ec.set(app, "command", "ping -c3 nepi.inria.fr") ec.register_connection(app, node) diff --git a/doc/user_manual/getting_started.tex b/doc/user_manual/getting_started.tex index 148c54bd..4456ad75 100644 --- a/doc/user_manual/getting_started.tex +++ b/doc/user_manual/getting_started.tex @@ -297,7 +297,7 @@ register LinuxApplications resources. %cpaste def add_node(ec, hostname, username, ssh_key): - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") ec.set(node, "hostname", hostname) ec.set(node, "username", username) ec.set(node, "identity", ssh_key) @@ -306,7 +306,7 @@ def add_node(ec, hostname, username, ssh_key): return node def add_app(ec, command, node): - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") ec.set(app, "command", command) ec.register_connection(app, node) return app diff --git a/doc/user_manual/planetlab_resources.tex b/doc/user_manual/planetlab_resources.tex index f5d0b9d3..080da1cc 100644 --- a/doc/user_manual/planetlab_resources.tex +++ b/doc/user_manual/planetlab_resources.tex @@ -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) diff --git a/examples/ccn_emu_live/dce.py b/examples/ccn_emu_live/dce.py index 693293aa..dcbdf978 100644 --- a/examples/ccn_emu_live/dce.py +++ b/examples/ccn_emu_live/dce.py @@ -38,13 +38,13 @@ repofile = os.path.join( os.path.dirname(os.path.realpath(__file__)), "repoFile1.0.8.2") def get_simulator(ec): - simulator = ec.filter_resources("LinuxNS3Simulation") + simulator = ec.filter_resources("linux::ns3::Simulation") if not simulator: - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") ec.set(node, "hostname", "localhost") - simu = ec.register_resource("LinuxNS3Simulation") + simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "enableDump", True) ec.set(simu, "StopTime", STOP_TIME) ec.register_connection(simu, node) @@ -76,7 +76,7 @@ def add_dce_ccnd(ec, nid): host = ec.netgraph.node_annotation(nid, "host") # Add dce ccnd to the dce node - ccnd = ec.register_resource("ns3::LinuxDceCCND") + ccnd = ec.register_resource("linux::ns3::dce::CCND") ec.set (ccnd, "stackSize", 1<<20) ec.set (ccnd, "debug", 7) ec.set (ccnd, "capacity", 50000) @@ -95,7 +95,7 @@ def add_dce_ccnr(ec, nid): host = ec.netgraph.node_annotation(nid, "host") # Add a CCN content repository to the dce node - ccnr = ec.register_resource("ns3::LinuxDceCCNR") + ccnr = ec.register_resource("linux::ns3::dce::CCNR") ec.set (ccnr, "repoFile1", repofile) ec.set (ccnr, "stackSize", 1<<20) ec.set (ccnr, "StartTime", "2s") @@ -106,7 +106,7 @@ def add_dce_ccncat(ec, nid): host = ec.netgraph.node_annotation(nid, "host") # Add a ccncat application to the dce host - ccncat = ec.register_resource("ns3::LinuxDceCCNCat") + ccncat = ec.register_resource("linux::ns3::dce::CCNCat") ec.set (ccncat, "contentName", content_name) ec.set (ccncat, "stackSize", 1<<20) ec.set (ccncat, "StartTime", "8s") @@ -119,7 +119,7 @@ def add_dce_fib_entry(ec, nid1, nid2): ip2 = net[nid2] # Add FIB entry between peer hosts - ccndc = ec.register_resource("ns3::LinuxDceFIBEntry") + ccndc = ec.register_resource("linux::ns3::dce::FIBEntry") ec.set (ccndc, "protocol", "udp") ec.set (ccndc, "uri", "ccnx:/") ec.set (ccndc, "host", ip2) @@ -218,7 +218,7 @@ if __name__ == '__main__': print "Results stored at", ec.exp_dir #### Retrieve the consumer to wait for ot to finish - ccncat = ec.filter_resources("ns3::LinuxDceCCNCat") + ccncat = ec.filter_resources("linux::ns3::dce::CCNCat") #### Run experiment until metric convergences rnr = ExperimentRunner() diff --git a/examples/ccn_emu_live/dce_4_nodes_linear.py b/examples/ccn_emu_live/dce_4_nodes_linear.py index 1658ebe1..7078d97f 100644 --- a/examples/ccn_emu_live/dce_4_nodes_linear.py +++ b/examples/ccn_emu_live/dce_4_nodes_linear.py @@ -102,13 +102,13 @@ repofile = os.path.join( "repoFile1.0.8.2") def get_simulator(ec): - simulator = ec.filter_resources("LinuxNS3Simulation") + simulator = ec.filter_resources("linux::ns3::Simulation") if not simulator: - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") ec.set(node, "hostname", "localhost") - simu = ec.register_resource("LinuxNS3Simulation") + simu = ec.register_resource("linux::ns3::Simulation") ec.register_connection(simu, node) return simu @@ -138,7 +138,7 @@ def add_dce_ccnd(ec, nid): host = ec.netgraph.node_annotation(nid, "host") # Add dce ccnd to the dce node - ccnd = ec.register_resource("ns3::LinuxDceCCND") + ccnd = ec.register_resource("linux::ns3::dce::CCND") ec.set (ccnd, "stackSize", 1<<20) ec.set (ccnd, "debug", 7) ec.set (ccnd, "capacity", 50000) @@ -158,7 +158,7 @@ def add_dce_ccnr(ec, nid): host = ec.netgraph.node_annotation(nid, "host") # Add a CCN content repository to the dce node - ccnr = ec.register_resource("ns3::LinuxDceCCNR") + ccnr = ec.register_resource("linux::ns3::dce::CCNR") ec.set (ccnr, "repoFile1", repofile) ec.set (ccnr, "stackSize", 1<<20) ec.set (ccnr, "StartTime", "2s") @@ -170,7 +170,7 @@ def add_dce_ccncat(ec, nid): host = ec.netgraph.node_annotation(nid, "host") # Add a ccncat application to the dce host - ccncat = ec.register_resource("ns3::LinuxDceCCNCat") + ccncat = ec.register_resource("linux::ns3::dce::CCNCat") ec.set (ccncat, "contentName", content_name) ec.set (ccncat, "stackSize", 1<<20) ec.set (ccncat, "StartTime", "8s") @@ -184,7 +184,7 @@ def add_dce_fib_entry(ec, nid1, nid2): ip2 = net[nid2] # Add FIB entry between peer hosts - ccndc = ec.register_resource("ns3::LinuxDceFIBEntry") + ccndc = ec.register_resource("linux::ns3::dce::FIBEntry") ec.set (ccndc, "protocol", "udp") ec.set (ccndc, "uri", "ccnx:/") ec.set (ccndc, "host", ip2) @@ -239,7 +239,7 @@ def add_node(ec, nid): add_dce_ccncat(ec, nid) def wait_guids(ec): - return ec.filter_resources("ns3::LinuxDceCCNCat") + return ec.filter_resources("linux::ns3::dce::CCNCat") if __name__ == '__main__': diff --git a/examples/ccn_emu_live/planetlab.py b/examples/ccn_emu_live/planetlab.py index 3fd83611..c256b709 100644 --- a/examples/ccn_emu_live/planetlab.py +++ b/examples/ccn_emu_live/planetlab.py @@ -76,7 +76,7 @@ def add_pl_host(ec, nid): hostname = PL_NODES[nid] # Add a planetlab host to the experiment description - host = ec.register_resource("PlanetlabNode") + host = ec.register_resource("planetlab::Node") ec.set(host, "hostname", hostname) ec.set(host, "username", pl_slice) ec.set(host, "identity", pl_ssh_key) @@ -100,7 +100,7 @@ def add_pl_ccnd(ec, nid): host = ec.netgraph.node_annotation(nid, "host") # Add a CCN daemon to the planetlab node - ccnd = ec.register_resource("LinuxCCND") + ccnd = ec.register_resource("linux::CCND") ec.set(ccnd, "debug", 7) ec.register_connection(ccnd, host) @@ -116,7 +116,7 @@ def add_pl_ccnr(ec, nid): ccnd = ec.netgraph.node_annotation(nid, "ccnd") # Add a CCN content repository to the planetlab node - ccnr = ec.register_resource("LinuxCCNR") + ccnr = ec.register_resource("linux::CCNR") ec.set(ccnr, "repoFile1", repofile) ec.register_connection(ccnr, ccnd) @@ -126,7 +126,7 @@ def add_pl_ccncat(ec, nid): ccnd = ec.netgraph.node_annotation(nid, "ccnd") # Add a CCN cat application to the planetlab node - ccncat = ec.register_resource("LinuxCCNCat") + ccncat = ec.register_resource("linux::CCNCat") ec.set(ccncat, "pipeline", pipeline) ec.set(ccncat, "contentName", content_name) ec.register_connection(ccncat, ccnd) @@ -137,7 +137,7 @@ def add_pl_fib_entry(ec, nid1, nid2): hostname2 = ec.netgraph.node_annotation(nid2, "hostname") # Add a FIB entry between one planetlab node and its peer - entry = ec.register_resource("LinuxFIBEntry") + entry = ec.register_resource("linux::FIBEntry") ec.set(entry, "host", hostname2) ec.register_connection(entry, ccnd1) @@ -211,7 +211,7 @@ if __name__ == '__main__': print "Results stored at", ec.exp_dir #### Retrieve the content producing resource to wait for ot to finish - ccncat = ec.filter_resources("LinuxCCNCat") + ccncat = ec.filter_resources("linux::CCNCat") #### Run experiment until metric convergences rnr = ExperimentRunner() diff --git a/examples/ccn_emu_live/planetlab_4_nodes_linear.py b/examples/ccn_emu_live/planetlab_4_nodes_linear.py index d027a59f..21d7be65 100644 --- a/examples/ccn_emu_live/planetlab_4_nodes_linear.py +++ b/examples/ccn_emu_live/planetlab_4_nodes_linear.py @@ -130,13 +130,13 @@ repofile = os.path.join( "repoFile1.0.8.2") def get_simulator(ec): - simulator = ec.filter_resources("LinuxNS3Simulation") + simulator = ec.filter_resources("linux::ns3::Simulation") if not simulator: - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") ec.set(node, "hostname", "localhost") - simu = ec.register_resource("LinuxNS3Simulation") + simu = ec.register_resource("linux::ns3::Simulation") ec.register_connection(simu, node) return simu @@ -166,7 +166,7 @@ def add_dce_ccnd(ec, nid): host = ec.netgraph.node_annotation(nid, "host") # Add dce ccnd to the dce node - ccnd = ec.register_resource("ns3::LinuxDceCCND") + ccnd = ec.register_resource("linux::ns3::dce::CCND") ec.set (ccnd, "stackSize", 1<<20) ec.set (ccnd, "debug", 7) ec.set (ccnd, "capacity", 50000) @@ -186,7 +186,7 @@ def add_dce_ccnr(ec, nid): host = ec.netgraph.node_annotation(nid, "host") # Add a CCN content repository to the dce node - ccnr = ec.register_resource("ns3::LinuxDceCCNR") + ccnr = ec.register_resource("linux::ns3::dce::CCNR") ec.set (ccnr, "repoFile1", repofile) ec.set (ccnr, "stackSize", 1<<20) ec.set (ccnr, "StartTime", "2s") @@ -198,7 +198,7 @@ def add_dce_ccncat(ec, nid): host = ec.netgraph.node_annotation(nid, "host") # Add a ccncat application to the dce host - ccncat = ec.register_resource("ns3::LinuxDceCCNCat") + ccncat = ec.register_resource("linux::ns3::dce::CCNCat") ec.set (ccncat, "contentName", content_name) ec.set (ccncat, "stackSize", 1<<20) ec.set (ccncat, "StartTime", "8s") @@ -212,7 +212,7 @@ def add_dce_fib_entry(ec, nid1, nid2): ip2 = net[nid2] # Add FIB entry between peer hosts - ccndc = ec.register_resource("ns3::LinuxDceFIBEntry") + ccndc = ec.register_resource("linux::ns3::dce::FIBEntry") ec.set (ccndc, "protocol", "udp") ec.set (ccndc, "uri", "ccnx:/") ec.set (ccndc, "host", ip2) @@ -243,7 +243,7 @@ def add_pl_host(ec, nid): hostname = NODES[nid] # Add a planetlab host to the experiment description - host = ec.register_resource("PlanetlabNode") + host = ec.register_resource("planetlab::Node") ec.set(host, "hostname", hostname) ec.set(host, "username", pl_slice) ec.set(host, "identity", pl_ssh_key) @@ -263,7 +263,7 @@ def add_pl_ccnd(ec, nid): host = ec.netgraph.node_annotation(nid, "host") # Add a CCN daemon to the planetlab node - ccnd = ec.register_resource("LinuxCCND") + ccnd = ec.register_resource("linux::CCND") ec.set(ccnd, "debug", 7) ec.register_connection(ccnd, host) @@ -279,7 +279,7 @@ def add_pl_ccnr(ec, nid): ccnd = ec.netgraph.node_annotation(nid, "ccnd") # Add a CCN content repository to the planetlab node - ccnr = ec.register_resource("LinuxCCNR") + ccnr = ec.register_resource("linux::CCNR") ec.set(ccnr, "repoFile1", repofile) ec.register_connection(ccnr, ccnd) @@ -289,7 +289,7 @@ def add_pl_ccncat(ec, nid): ccnd = ec.netgraph.node_annotation(nid, "ccnd") # Add a CCN cat application to the planetlab node - ccncat = ec.register_resource("LinuxCCNCat") + ccncat = ec.register_resource("linux::CCNCat") ec.set(ccncat, "contentName", content_name) ec.register_connection(ccncat, ccnd) @@ -299,7 +299,7 @@ def add_pl_fib_entry(ec, nid1, nid2): hostname2 = ec.netgraph.node_annotation(nid2, "hostname") # Add a FIB entry between one planetlab node and its peer - entry = ec.register_resource("LinuxFIBEntry") + entry = ec.register_resource("linux::FIBEntry") ec.set(entry, "host", hostname2) ec.register_connection(entry, ccnd1) @@ -338,7 +338,7 @@ def add_node(ec, nid): add_pl_ccncat(ec, nid) def wait_guids(ec): - return ec.filter_resources("LinuxCCNCat") + return ec.filter_resources("linux::CCNCat") if __name__ == '__main__': diff --git a/examples/dce/custom_dlm_ping.py b/examples/dce/custom_dlm_ping.py index 8f04f75a..b5bb8f20 100644 --- a/examples/dce/custom_dlm_ping.py +++ b/examples/dce/custom_dlm_ping.py @@ -54,11 +54,11 @@ def add_device(ec, node, ip, prefix): ec = ExperimentController(exp_id = "dce-custom-dlm-ping") -node = ec.register_resource("LinuxNode") +node = ec.register_resource("linux::Node") ec.set(node, "hostname", "localhost") ec.set(node, "cleanProcesses", True) -simu = ec.register_resource("LinuxNS3Simulation") +simu = ec.register_resource("linux::ns3:Simulation") ec.set(simu, "verbose", True) #ec.set(simu, "enableDump", True) ec.register_connection(simu, node) @@ -79,7 +79,7 @@ ec.register_connection(chan, dev1) ec.register_connection(chan, dev2) ### create applications -ping = ec.register_resource("ns3::LinuxDceApplication") +ping = ec.register_resource("linux::ns3::dce::Application") ec.set (ping, "sources", "http://www.skbuff.net/iputils/iputils-s20101006.tar.bz2") ec.set (ping, "build", "tar xvjf ${SRC}/iputils-s20101006.tar.bz2 && " "cd iputils-s20101006/ && " diff --git a/examples/dce/custom_local_csma_ping.py b/examples/dce/custom_local_csma_ping.py index f9f40af9..27aff338 100644 --- a/examples/dce/custom_local_csma_ping.py +++ b/examples/dce/custom_local_csma_ping.py @@ -54,11 +54,11 @@ def add_device(ec, node, ip, prefix): ec = ExperimentController(exp_id = "dce-custom-csma-ping") -node = ec.register_resource("LinuxNode") +node = ec.register_resource("linux::Node") ec.set(node, "hostname", "localhost") ec.set(node, "cleanProcesses", True) -simu = ec.register_resource("LinuxNS3Simulation") +simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "verbose", True) ec.register_connection(simu, node) @@ -76,7 +76,7 @@ ec.register_connection(chan, dev1) ec.register_connection(chan, dev2) ### create applications -ping = ec.register_resource("ns3::LinuxDceApplication") +ping = ec.register_resource("linux::ns3::dce::Application") ec.set (ping, "sources", "http://www.skbuff.net/iputils/iputils-s20101006.tar.bz2") ec.set (ping, "build", "tar xvjf ${SRC}/iputils-s20101006.tar.bz2 && " "cd iputils-s20101006/ && " diff --git a/examples/dce/custom_local_p2p_ccn.py b/examples/dce/custom_local_p2p_ccn.py index 3ba901a5..c743598a 100644 --- a/examples/dce/custom_local_p2p_ccn.py +++ b/examples/dce/custom_local_p2p_ccn.py @@ -56,11 +56,11 @@ def add_device(ec, node, ip, prefix): ec = ExperimentController(exp_id = "dce-custom-ccn") -node = ec.register_resource("LinuxNode") +node = ec.register_resource("linux::Node") ec.set(node, "hostname", "localhost") ec.set(node, "cleanProcesses", True) -simu = ec.register_resource("LinuxNS3Simulation") +simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "verbose", True) ec.register_connection(simu, node) @@ -83,7 +83,7 @@ ec.register_connection(chan, dev2) # Add a LinuxCCNDceApplication to ns-3 node 1 to install custom ccnx sources # and run a CCNx daemon -ccnd1 = ec.register_resource("ns3::LinuxCCNDceApplication") +ccnd1 = ec.register_resource("linux::ns3::dce::CCNApplication") # NOTE THAT INSTALLATION MIGHT FAIL IF openjdk-6-jdk is not installed ec.set(ccnd1, "depends", "libpcap0.8-dev openjdk-6-jdk ant1.8 autoconf " "libssl-dev libexpat-dev libpcap-dev libecryptfs0 libxml2-utils auto" @@ -110,7 +110,7 @@ repofile = os.path.join( "..", "..", "test", "resources", "linux", "ns3", "ccn", "repoFile1") -ccnr = ec.register_resource("ns3::LinuxCCNDceApplication") +ccnr = ec.register_resource("linux::ns3::dce::CCNApplication") ec.set (ccnr, "binary", "ccnr") ec.set (ccnr, "environment", "CCNR_DIRECTORY=/REPO/") ec.set (ccnr, "files", "%s=/REPO/repoFile1" % repofile) @@ -123,7 +123,7 @@ ec.register_connection(ccnr, nsnode1) # daemon. Note that the CCNx sources and build instructions # do not need to be specified again (NEPI will take the # instructions from the first definition). -ccnd2 = ec.register_resource("ns3::LinuxCCNDceApplication") +ccnd2 = ec.register_resource("linux::ns3::dce::CCNApplication") ec.set (ccnd2, "binary", "ccnd") ec.set (ccnd2, "stackSize", 1<<20) ec.set (ccnd2, "environment", "CCND_CAP=50000; CCND_DEBUG=7") @@ -133,7 +133,7 @@ ec.register_connection(ccnd2, nsnode2) # Add DCE application to configure peer CCN faces between # nodes -ccndc1 = ec.register_resource("ns3::LinuxCCNDceApplication") +ccndc1 = ec.register_resource("linux::ns3::dce::CCNApplication") ec.set (ccndc1, "binary", "ccndc") ec.set (ccndc1, "arguments", "-v;add;ccnx:/;udp;10.0.0.2") ec.set (ccndc1, "stackSize", 1<<20) @@ -141,7 +141,7 @@ ec.set (ccndc1, "StartTime", "2s") ec.set (ccndc1, "StopTime", "120s") ec.register_connection(ccndc1, nsnode1) -ccndc2 = ec.register_resource("ns3::LinuxCCNDceApplication") +ccndc2 = ec.register_resource("linux::ns3::dce::CCNApplication") ec.set (ccndc2, "binary", "ccndc") ec.set (ccndc2, "arguments", "-v;add;ccnx:/;udp;10.0.0.1") ec.set (ccndc2, "stackSize", 1<<20) @@ -150,7 +150,7 @@ ec.set (ccndc2, "StopTime", "120s") ec.register_connection(ccndc2, nsnode2) # Add a DCE application to perform a ccncat and retrieve content -ccncat = ec.register_resource("ns3::LinuxCCNDceApplication") +ccncat = ec.register_resource("linux::ns3::dce::CCNApplication") ec.set (ccncat, "binary", "ccncat") ec.set (ccncat, "arguments", "ccnx:/test/bunny.ts") ec.set (ccncat, "stdinFile", "") diff --git a/examples/dce/custom_local_p2p_ping.py b/examples/dce/custom_local_p2p_ping.py index 153b3812..38e9ccd3 100644 --- a/examples/dce/custom_local_p2p_ping.py +++ b/examples/dce/custom_local_p2p_ping.py @@ -54,11 +54,11 @@ def add_device(ec, node, ip, prefix): ec = ExperimentController(exp_id = "dce-custom-p2p-ping") -node = ec.register_resource("LinuxNode") +node = ec.register_resource("linux::Node") ec.set(node, "hostname", "localhost") ec.set(node, "cleanProcesses", True) -simu = ec.register_resource("LinuxNS3Simulation") +simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "verbose", True) ec.register_connection(simu, node) @@ -78,7 +78,7 @@ ec.register_connection(chan, dev1) ec.register_connection(chan, dev2) ### create applications -ping = ec.register_resource("ns3::LinuxDceApplication") +ping = ec.register_resource("linux::ns3::dce::Application") ec.set (ping, "sources", "http://www.skbuff.net/iputils/iputils-s20101006.tar.bz2") ec.set (ping, "build", "tar xvjf ${SRC}/iputils-s20101006.tar.bz2 && " "cd iputils-s20101006/ && " diff --git a/examples/dce/custom_local_wifi_ping.py b/examples/dce/custom_local_wifi_ping.py index 7c61df39..667f27e7 100644 --- a/examples/dce/custom_local_wifi_ping.py +++ b/examples/dce/custom_local_wifi_ping.py @@ -86,11 +86,11 @@ def add_wifi_channel(ec): ec = ExperimentController(exp_id = "dce-custom-wifi-ping") -node = ec.register_resource("LinuxNode") +node = ec.register_resource("linux::Node") ec.set(node, "hostname", "localhost") ec.set(node, "cleanProcesses", True) -simu = ec.register_resource("LinuxNS3Simulation") +simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "verbose", True) ec.register_connection(simu, node) @@ -108,7 +108,7 @@ ec.register_connection(chan, phy1) ec.register_connection(chan, phy2) ### create applications -ping = ec.register_resource("ns3::LinuxDceApplication") +ping = ec.register_resource("linux::ns3::dce::Application") ec.set (ping, "sources", "http://www.skbuff.net/iputils/iputils-s20101006.tar.bz2") ec.set (ping, "build", "tar xvjf ${SRC}/iputils-s20101006.tar.bz2 && " "cd iputils-s20101006/ && " diff --git a/examples/dce/wrapped_local_p2p_ccncat.py b/examples/dce/wrapped_local_p2p_ccncat.py index 94f69c20..5567af1e 100644 --- a/examples/dce/wrapped_local_p2p_ccncat.py +++ b/examples/dce/wrapped_local_p2p_ccncat.py @@ -56,11 +56,11 @@ def add_device(ec, node, ip, prefix): ec = ExperimentController(exp_id = "dce-ccncat") -node = ec.register_resource("LinuxNode") +node = ec.register_resource("linux::Node") ec.set(node, "hostname", "localhost") ec.set(node, "cleanProcesses", True) -simu = ec.register_resource("LinuxNS3Simulation") +simu = ec.register_resource("linux::ns3::Simulation") ec.register_connection(simu, node) nsnode1 = add_ns3_node(ec, simu) @@ -80,7 +80,7 @@ ec.register_connection(chan, dev2) ### create applications # Add ccnd to ns-3 node1 -ccnd1 = ec.register_resource("ns3::LinuxDceCCND") +ccnd1 = ec.register_resource("linux::ns3::dce::CCND") ec.set (ccnd1, "stackSize", 1<<20) ec.set (ccnd1, "debug", 7) ec.set (ccnd1, "capacity", 50000) @@ -94,7 +94,7 @@ repofile = os.path.join( "..", "..", "test", "resources", "linux", "ns3", "ccn", "repoFile1") -ccnr = ec.register_resource("ns3::LinuxDceCCNR") +ccnr = ec.register_resource("linux::ns3::dce::CCNR") ec.set (ccnr, "repoFile1", repofile) ec.set (ccnr, "stackSize", 1<<20) ec.set (ccnr, "StartTime", "2s") @@ -102,7 +102,7 @@ ec.set (ccnr, "StopTime", "120s") ec.register_connection(ccnr, nsnode1) # Add CCN repository with content to ns-3 node2 -ccnd2 = ec.register_resource("ns3::LinuxDceCCND") +ccnd2 = ec.register_resource("linux::ns3::dce::CCND") ec.set (ccnd2, "stackSize", 1<<20) ec.set (ccnd2, "debug", 7) ec.set (ccnd2, "capacity", 50000) @@ -111,7 +111,7 @@ ec.set (ccnd2, "StopTime", "20s") ec.register_connection(ccnd2, nsnode2) # Add face from ns-3 node1 to ns-3 node2 -ccndc1 = ec.register_resource("ns3::LinuxDceFIBEntry") +ccndc1 = ec.register_resource("linux::ns3::dce::FIBEntry") ec.set (ccndc1, "protocol", "udp") ec.set (ccndc1, "uri", "ccnx:/") ec.set (ccndc1, "host", "10.0.0.2") @@ -121,7 +121,7 @@ ec.set (ccndc1, "StopTime", "120s") ec.register_connection(ccndc1, nsnode1) # Add face from ns-3 node2 to ns-3 node1 -ccndc2 = ec.register_resource("ns3::LinuxDceFIBEntry") +ccndc2 = ec.register_resource("linux::ns3::dce::FIBEntry") ec.set (ccndc2, "protocol", "udp") ec.set (ccndc2, "uri", "ccnx:/") ec.set (ccndc2, "host", "10.0.0.1") @@ -131,7 +131,7 @@ ec.set (ccndc2, "StopTime", "120s") ec.register_connection(ccndc2, nsnode2) # Add a ccncat to node2 to retrieve content -ccncat = ec.register_resource("ns3::LinuxDceCCNCat") +ccncat = ec.register_resource("linux::ns3::dce::CCNCat") ec.set (ccncat, "contentName", "ccnx:/test/bunny.ts") ec.set (ccncat, "stackSize", 1<<20) ec.set (ccncat, "StartTime", "4s") diff --git a/examples/dce/wrapped_local_p2p_ccnpeek.py b/examples/dce/wrapped_local_p2p_ccnpeek.py index f1ca9e6d..1b40176f 100644 --- a/examples/dce/wrapped_local_p2p_ccnpeek.py +++ b/examples/dce/wrapped_local_p2p_ccnpeek.py @@ -43,29 +43,29 @@ def add_ns3_node(ec, simu): ec = ExperimentController(exp_id = "dce-local-ccnpeek") -node = ec.register_resource("LinuxNode") +node = ec.register_resource("linux::Node") ec.set(node, "hostname", "localhost") ec.set(node, "cleanProcesses", True) -simu = ec.register_resource("LinuxNS3Simulation") +simu = ec.register_resource("linux::ns3::Simulation") ec.register_connection(simu, node) nsnode = add_ns3_node(ec, simu) ### create applications -ccnd = ec.register_resource("ns3::LinuxDceCCND") +ccnd = ec.register_resource("linux::ns3::dce::CCND") ec.set (ccnd, "stackSize", 1<<20) ec.set (ccnd, "StartTime", "1s") ec.register_connection(ccnd, nsnode) -ccnpoke = ec.register_resource("ns3::LinuxDceCCNPoke") +ccnpoke = ec.register_resource("linux::ns3::dce::CCNPoke") ec.set (ccnpoke, "contentName", "ccnx:/chunk0") ec.set (ccnpoke, "content", "DATA") ec.set (ccnpoke, "stackSize", 1<<20) ec.set (ccnpoke, "StartTime", "2s") ec.register_connection(ccnpoke, nsnode) -ccnpeek = ec.register_resource("ns3::LinuxDceCCNPeek") +ccnpeek = ec.register_resource("linux::ns3::dce::CCNPeek") ec.set (ccnpeek, "contentName", "ccnx:/chunk0") ec.set (ccnpeek, "stackSize", 1<<20) ec.set (ccnpeek, "StartTime", "4s") diff --git a/examples/dce/wrapped_local_p2p_ping.py b/examples/dce/wrapped_local_p2p_ping.py index e94c349b..c86bf552 100644 --- a/examples/dce/wrapped_local_p2p_ping.py +++ b/examples/dce/wrapped_local_p2p_ping.py @@ -54,11 +54,11 @@ def add_device(ec, node, ip, prefix): ec = ExperimentController(exp_id = "dce-ping-app") -node = ec.register_resource("LinuxNode") +node = ec.register_resource("linux::Node") ec.set(node, "hostname", "localhost") ec.set(node, "cleanProcesses", True) -simu = ec.register_resource("LinuxNS3Simulation") +simu = ec.register_resource("linux::ns3::Simulation") ec.register_connection(simu, node) nsnode1 = add_ns3_node(ec, simu) @@ -77,7 +77,7 @@ ec.register_connection(chan, dev1) ec.register_connection(chan, dev2) ### create applications -ping = ec.register_resource("ns3::LinuxDcePing") +ping = ec.register_resource("linux::ns3::dce::Ping") ec.set (ping, "stackSize", 1<<20) ec.set (ping, "target", "10.0.0.2") ec.set (ping, "count", "10") diff --git a/examples/linux/ccn_simple_transfer.py b/examples/linux/ccn_simple_transfer.py index cf2f8be0..f4577f3e 100644 --- a/examples/linux/ccn_simple_transfer.py +++ b/examples/linux/ccn_simple_transfer.py @@ -62,7 +62,7 @@ ec = ExperimentController(exp_id = "ccn_simple_transfer") ##### CONFIGURING NODE 1 ## Register node 1 -node1 = ec.register_resource("LinuxNode") +node1 = ec.register_resource("linux::Node") # Set the hostname of the first node to use for the experiment ec.set(node1, "hostname", hostname1) # username should be your SSH user @@ -75,13 +75,13 @@ ec.set(node1, "cleanExperiment", True) ec.set(node1, "cleanProcesses", True) ## Register a CCN daemon in node 1 -ccnd1 = ec.register_resource("LinuxCCND") +ccnd1 = ec.register_resource("linux::CCND") # Set ccnd log level to 7 ec.set(ccnd1, "debug", 7) ec.register_connection(ccnd1, node1) ## Register a repository in node 1 -ccnr1 = ec.register_resource("LinuxCCNR") +ccnr1 = ec.register_resource("linux::CCNR") ec.register_connection(ccnr1, ccnd1) ## Push the file into the repository @@ -92,7 +92,7 @@ local_path_to_content = os.path.join( content_name = "ccnx:/test/FILE" # Add a content to the repository -co = ec.register_resource("LinuxCCNContent") +co = ec.register_resource("linux::CCNContent") ec.set(co, "contentName", content_name) # NEPI will upload the specified file to the remote node and write it # into the CCN repository @@ -102,7 +102,7 @@ ec.register_connection(co, ccnr1) ##### CONFIGURING NODE 2 ## Register node 2 -node2 = ec.register_resource("LinuxNode") +node2 = ec.register_resource("linux::Node") # Set the hostname of the first node to use for the experiment ec.set(node2, "hostname", hostname2) # username should be your SSH user @@ -115,25 +115,25 @@ ec.set(node2, "cleanExperiment", True) ec.set(node2, "cleanProcesses", True) ## Register a CCN daemon in node 2 -ccnd2 = ec.register_resource("LinuxCCND") +ccnd2 = ec.register_resource("linux::CCND") # Set ccnd log level to 7 ec.set(ccnd2, "debug", 7) ec.register_connection(ccnd2, node2) ## Retrieve the file stored in node 1 from node 2 -ccncat = ec.register_resource("LinuxCCNCat") +ccncat = ec.register_resource("linux::CCNCat") ec.set(ccncat, "contentName", content_name) ec.register_connection(ccncat, ccnd2) ##### INTERCONNECTING CCN NODES ... # Register a FIB entry from node 1 to node 2 -entry1 = ec.register_resource("LinuxFIBEntry") +entry1 = ec.register_resource("linux::FIBEntry") ec.set(entry1, "host", hostname2) ec.register_connection(entry1, ccnd1) # Register a FIB entry from node 2 to node 1 -entry2 = ec.register_resource("LinuxFIBEntry") +entry2 = ec.register_resource("linux::FIBEntry") ec.set(entry2, "host", hostname1) ec.register_connection(entry2, ccnd2) diff --git a/examples/linux/ccn_transfer_using_linuxapp.py b/examples/linux/ccn_transfer_using_linuxapp.py index de855705..81b7195e 100644 --- a/examples/linux/ccn_transfer_using_linuxapp.py +++ b/examples/linux/ccn_transfer_using_linuxapp.py @@ -67,7 +67,7 @@ username = options.username ssh_key = options.ssh_key def add_node(ec, host, user, ssh_key = None): - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") ec.set(node, "hostname", host) ec.set(node, "username", user) ec.set(node, "identity", ssh_key) @@ -121,7 +121,7 @@ def add_ccnd(ec, peers): command += " ; ".join(peers) + " && " command += " ccnr & " - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") ec.set(app, "depends", depends) ec.set(app, "sources", sources) ec.set(app, "install", install) @@ -135,7 +135,7 @@ def add_publish(ec, movie, content_name): env = "PATH=$PATH:${BIN}/ccnx-0.8.2/bin" command = "ccnseqwriter -r %s" % content_name - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") ec.set(app, "stdin", movie) ec.set(app, "env", env) ec.set(app, "command", command) @@ -146,7 +146,7 @@ def add_ccncat(ec, content_name): env = "PATH=$PATH:${BIN}/ccnx-0.8.2/bin" command = "ccncat %s" % content_name - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") ec.set(app, "env", env) ec.set(app, "command", command) diff --git a/examples/linux/hello_world.py b/examples/linux/hello_world.py index 172547f5..b7688996 100644 --- a/examples/linux/hello_world.py +++ b/examples/linux/hello_world.py @@ -46,18 +46,18 @@ ssh_key = options.ssh_key ec = ExperimentController(exp_id = "src-up-exp") -node = ec.register_resource("LinuxNode") +node = ec.register_resource("linux::Node") ec.set(node, "hostname", hostname) ec.set(node, "username", username) ec.set(node, "identity", ssh_key) -ec.set(node, "cleanHome", True) +ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) path_to_sources = os.path.join( os.path.dirname(os.path.realpath(__file__)), "hello.c") -app = ec.register_resource("LinuxApplication") +app = ec.register_resource("linux::Application") ec.set(app, "sources", path_to_sources) ec.set(app, "build", "gcc ${SRC}/hello.c -o ${BIN}/hello") ec.set(app, "command", "${BIN}/hello") diff --git a/examples/linux/netcat_file_transfer.py b/examples/linux/netcat_file_transfer.py index e2047d10..d42166e7 100644 --- a/examples/linux/netcat_file_transfer.py +++ b/examples/linux/netcat_file_transfer.py @@ -54,7 +54,7 @@ ssh_key = options.ssh_key ec = ExperimentController(exp_id = "nc_file_transfer") ## Register node 1 -node1 = ec.register_resource("LinuxNode") +node1 = ec.register_resource("linux::Node") # Set the hostname of the first node to use for the experiment ec.set(node1, "hostname", hostname1) # username should be your SSH user @@ -67,7 +67,7 @@ ec.set(node1, "cleanExperiment", True) ec.set(node1, "cleanProcesses", True) ## Register node 2 -node2 = ec.register_resource("LinuxNode") +node2 = ec.register_resource("linux::Node") # Set the hostname of the first node to use for the experiment ec.set(node2, "hostname", hostname2) # username should be your SSH user @@ -88,7 +88,7 @@ local_path_to_video = os.path.join( command = "cat ${SHARE}/%s | pv -fbt 2> bw.txt | nc %s 1234" % ( video, hostname2 ) -server = ec.register_resource("LinuxApplication") +server = ec.register_resource("linux::Application") ec.set(server, "depends", "pv nc tcpdump") ec.set(server, "files", local_path_to_video) ec.set(server, "command", command) @@ -100,7 +100,7 @@ ec.register_connection(server, node1) # if not nc in the client side close the socket suddently if runned in background command = "nc -dl 1234 > %s" % video -client = ec.register_resource("LinuxApplication") +client = ec.register_resource("linux::Application") ec.set(client, "depends", "nc") ec.set(client, "command", command) ec.register_connection(client, node2) @@ -108,7 +108,7 @@ ec.register_connection(client, node2) # Register a tcpdump in the server node to monitor the file transfer command = "tcpdump -ni eth0 -w file_transfer.pcap -s0 port 1234 2>&1" -capture = ec.register_resource("LinuxApplication") +capture = ec.register_resource("linux::Application") ec.set(capture, "depends", "tcpdump") ec.set(capture, "command", command) ec.set(capture, "sudo", True) diff --git a/examples/linux/nitos_testbed_bootstrap.py b/examples/linux/nitos_testbed_bootstrap.py index 9810de59..ad44d126 100644 --- a/examples/linux/nitos_testbed_bootstrap.py +++ b/examples/linux/nitos_testbed_bootstrap.py @@ -64,23 +64,23 @@ apps = [] ec = ExperimentController(exp_id="ath5k") for hostname in hosts: - node = ec.register_resource("LinuxNode") - ec.set(node, "username", username) - ec.set(node, "hostname", hostname) - ec.set(node, "gateway", gateway ) - ec.set(node, "gatewayUser", gateway_username) - ec.set(node, "cleanExperiment", True) + node = ec.register_resource("linux::Node") + ec.set(node, "username", username) + ec.set(node, "hostname", hostname) + ec.set(node, "gateway", gateway) + ec.set(node, "gatewayUser", gateway_username) + ec.set(node, "cleanExperiment", True) - app = ec.register_resource("LinuxApplication") - ec.set(app, "command", "modprobe ath5k && ip a | grep wlan0 && service omf_rc restart") - ec.register_connection(app, node) + app = ec.register_resource("linux::Application") + ec.set(app, "command", "modprobe ath5k && ip a | grep wlan0 && service omf_rc restart") + ec.register_connection(app, node) - apps.append(app) + apps.append(app) ec.deploy() ec.wait_finished(apps) for app in apps: - print ec.trace(app, "stdout") + print ec.trace(app, "stdout") diff --git a/examples/linux/ping.py b/examples/linux/ping.py index 3e9f03a8..0b8715af 100644 --- a/examples/linux/ping.py +++ b/examples/linux/ping.py @@ -47,14 +47,14 @@ ssh_key = options.ssh_key ec = ExperimentController(exp_id = "ping-exp") -node = ec.register_resource("LinuxNode") +node = ec.register_resource("linux::Node") ec.set(node, "hostname", hostname) ec.set(node, "username", username) ec.set(node, "identity", ssh_key) -ec.set(node, "cleanHome", True) +ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) -app = ec.register_resource("LinuxApplication") +app = ec.register_resource("linux::Application") ec.set(app, "command", "ping -c3 nepi.inria.fr") ec.register_connection(app, node) diff --git a/examples/linux/testing/ccncat_2_nodes.py b/examples/linux/testing/ccncat_2_nodes.py index 7efe1187..4ff29369 100644 --- a/examples/linux/testing/ccncat_2_nodes.py +++ b/examples/linux/testing/ccncat_2_nodes.py @@ -48,11 +48,11 @@ import os import time def add_node(ec, host, user, ssh_key = None): - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") ec.set(node, "hostname", host) ec.set(node, "username", user) ec.set(node, "identity", ssh_key) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) return node @@ -101,7 +101,7 @@ def add_ccnd(ec, os_type, peers): command += " ; ".join(peers) + " && " command += " ccnr & " - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") ec.set(app, "depends", depends) ec.set(app, "sources", sources) ec.set(app, "install", install) @@ -115,7 +115,7 @@ def add_publish(ec, movie): env = "PATH=$PATH:${BIN}/ccnx-0.7.1/bin" command = "ccnseqwriter -r ccnx:/VIDEO" - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") ec.set(app, "stdin", movie) ec.set(app, "env", env) ec.set(app, "command", command) @@ -126,7 +126,7 @@ def add_stream(ec): env = "PATH=$PATH:${BIN}/ccnx-0.7.1/bin" command = "sudo -S dbus-uuidgen --ensure ; ( ccncat ccnx:/VIDEO | vlc - ) " - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") ec.set(app, "depends", "vlc") ec.set(app, "forwardX11", True) ec.set(app, "env", env) diff --git a/examples/linux/testing/ccncat_extended_ring_topo.py b/examples/linux/testing/ccncat_extended_ring_topo.py index af823a26..ec06b06e 100644 --- a/examples/linux/testing/ccncat_extended_ring_topo.py +++ b/examples/linux/testing/ccncat_extended_ring_topo.py @@ -49,33 +49,33 @@ import os import time def add_node(ec, host, user, ssh_key = None): - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linuxNode") ec.set(node, "hostname", host) ec.set(node, "username", user) ec.set(node, "identity", ssh_key) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) return node def add_ccnd(ec, node): - ccnd = ec.register_resource("LinuxCCND") + ccnd = ec.register_resource("linux::CCND") ec.set(ccnd, "debug", 7) ec.register_connection(ccnd, node) return ccnd def add_ccnr(ec, ccnd): - ccnr = ec.register_resource("LinuxCCNR") + ccnr = ec.register_resource("linux::CCNR") ec.register_connection(ccnr, ccnd) return ccnr def add_fib_entry(ec, ccnd, peer_host): - entry = ec.register_resource("LinuxFIBEntry") + entry = ec.register_resource("linux::FIBEntry") ec.set(entry, "host", peer_host) ec.register_connection(entry, ccnd) return entry def add_content(ec, ccnr, content_name, content): - co = ec.register_resource("LinuxCCNContent") + co = ec.register_resource("linux::CCNContent") ec.set(co, "contentName", content_name) ec.set(co, "content", content) ec.register_connection(co, ccnr) @@ -86,7 +86,7 @@ def add_stream(ec, ccnd, content_name): command = "ccnpeek %(content_name)s; ccncat %(content_name)s" % { "content_name" : content_name} - app = ec.register_resource("LinuxCCNApplication") + app = ec.register_resource("linux::CCNApplication") ec.set(app, "command", command) ec.register_connection(app, ccnd) diff --git a/examples/linux/testing/multihop_ssh.py b/examples/linux/testing/multihop_ssh.py index 8bcd47f3..95403e07 100644 --- a/examples/linux/testing/multihop_ssh.py +++ b/examples/linux/testing/multihop_ssh.py @@ -26,31 +26,31 @@ exp_id = "multihop_ssh" ec = ExperimentController(exp_id) # server -node1 = ec.register_resource("LinuxNode") +node1 = ec.register_resource("linux::Node") ec.set(node1, "hostname", "wlab29.") ec.set(node1, "username", "root") ec.set(node1, "gatewayUser", "etourdi") ec.set(node1, "gateway", "etourdi.pl.sophia.inria.fr") -ec.set(node1, "cleanHome", True) +ec.set(node1, "cleanExperiment", True) ec.set(node1, "cleanProcesses", True) # client -node2 = ec.register_resource("LinuxNode") +node2 = ec.register_resource("linux::Node") ec.set(node2, "hostname", "wlab5.") ec.set(node2, "username", "root") ec.set(node2, "gatewayUser", "etourdi") ec.set(node2, "gateway", "etourdi.pl.sophia.inria.fr") -ec.set(node2, "cleanHome", True) +ec.set(node2, "cleanExperiment", True) ec.set(node2, "cleanProcesses", True) -app1 = ec.register_resource("LinuxApplication") +app1 = ec.register_resource("linux::Application") video= "../big_buck_bunny_240p_mpeg4_lq.ts" ec.set(app1, "sources", video) command = "cat ${SRC}/big_buck_bunny_240p_mpeg4_lq.ts| nc wlab5. 1234" ec.set(app1, "command", command) ec.register_connection(app1, node1) -app2 = ec.register_resource("LinuxApplication") +app2 = ec.register_resource("linux::Application") command = "nc -dl 1234 > big_buck_copied_movie.ts" ec.set(app2, "command", command) ec.register_connection(app2, node2) diff --git a/examples/linux/testing/scalability.py b/examples/linux/testing/scalability.py index 0972961e..7c43941f 100644 --- a/examples/linux/testing/scalability.py +++ b/examples/linux/testing/scalability.py @@ -27,15 +27,15 @@ import os import time def add_node(ec, host, user): - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") ec.set(node, "hostname", host) ec.set(node, "username", user) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) return node def add_app(ec): - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") ec.set(app, "command", "sleep 30; echo 'HOLA'") return app diff --git a/examples/linux/vlc_streaming.py b/examples/linux/vlc_streaming.py index 49e2e7e0..7ddd20e3 100644 --- a/examples/linux/vlc_streaming.py +++ b/examples/linux/vlc_streaming.py @@ -51,7 +51,7 @@ ssh_key = options.ssh_key ec = ExperimentController(exp_id = "vlc_streamming") ## Register node 1 -node1 = ec.register_resource("LinuxNode") +node1 = ec.register_resource("linux::Node") # Set the hostname of the first node to use for the experiment ec.set(node1, "hostname", hostname1) # username should be your SSH user @@ -64,7 +64,7 @@ ec.set(node1, "cleanExperiment", True) ec.set(node1, "cleanProcesses", True) ## Register node 2 -node2 = ec.register_resource("LinuxNode") +node2 = ec.register_resource("linux::Node") # Set the hostname of the first node to use for the experiment ec.set(node2, "hostname", hostname2) # username should be your SSH user @@ -87,7 +87,7 @@ command = ("sudo -S dbus-uuidgen --ensure; sleep 3;" "--sout '#rtp{dst=%s,port=5004,mux=ts}' vlc://quit") % \ (video, hostname2) -server = ec.register_resource("LinuxApplication") +server = ec.register_resource("linux::Application") ec.set(server, "depends", "vlc") ec.set(server, "files", local_path_to_video) ec.set(server, "command", command) @@ -99,7 +99,7 @@ command = ("sudo -S dbus-uuidgen --ensure; sleep 3; " "--sout '#std{access=file,mux=ts,dst=VIDEO}'") % \ (hostname2, video) -client = ec.register_resource("LinuxApplication") +client = ec.register_resource("linux::Application") ec.set(client, "depends", "vlc") ec.set(client, "command", command) ec.register_connection(client, node2) diff --git a/examples/ns3/local_csma_p2p_star_ping.py b/examples/ns3/local_csma_p2p_star_ping.py index 9626a44f..e8ebb204 100644 --- a/examples/ns3/local_csma_p2p_star_ping.py +++ b/examples/ns3/local_csma_p2p_star_ping.py @@ -93,11 +93,11 @@ def add_p2p_chan(ec, dev1, dev2): ec = ExperimentController(exp_id = "ns3-csma-p2p-ping") # Simulation will run in a remote machine -node = ec.register_resource("LinuxNode") +node = ec.register_resource("linux::Node") ec.set(node, "hostname", "localhost") # Add a simulation resource -simu = ec.register_resource("LinuxNS3Simulation") +simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "verbose", True) ec.set(simu, "enableDump", True) ec.register_connection(simu, node) diff --git a/examples/ns3/local_csma_ping.py b/examples/ns3/local_csma_ping.py index b2cca6bf..1f686d3d 100644 --- a/examples/ns3/local_csma_ping.py +++ b/examples/ns3/local_csma_ping.py @@ -23,11 +23,11 @@ from nepi.execution.ec import ExperimentController ec = ExperimentController(exp_id = "ns3-local-csma-ping") # Simulation will executed in the local machine -node = ec.register_resource("LinuxNode") +node = ec.register_resource("linux::Node") ec.set(node, "hostname", "localhost") # Add a simulation resource -simu = ec.register_resource("LinuxNS3Simulation") +simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "verbose", True) ec.register_connection(simu, node) diff --git a/examples/ns3/local_mobile_wifi_ping.py b/examples/ns3/local_mobile_wifi_ping.py index f0be5485..97f2bb8d 100644 --- a/examples/ns3/local_mobile_wifi_ping.py +++ b/examples/ns3/local_mobile_wifi_ping.py @@ -119,11 +119,11 @@ speed = 1 ec = ExperimentController(exp_id = "ns3-wifi-ping") # Simulation will run in a remote machine -node = ec.register_resource("LinuxNode") +node = ec.register_resource("linux::Node") ec.set(node, "hostname", "localhost") # Add a simulation resource -simu = ec.register_resource("LinuxNS3Simulation") +simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "verbose", True) ec.set(simu, "enableDump", True) ec.set (simu, "StopTime", "22s") diff --git a/examples/ns3/local_p2p_ping.py b/examples/ns3/local_p2p_ping.py index 8b9f3791..7f1dfa7f 100644 --- a/examples/ns3/local_p2p_ping.py +++ b/examples/ns3/local_p2p_ping.py @@ -23,11 +23,11 @@ from nepi.execution.ec import ExperimentController ec = ExperimentController(exp_id = "ns3-local-p2p-ping") # Simulation will executed in the local machine -node = ec.register_resource("LinuxNode") +node = ec.register_resource("linux::Node") ec.set(node, "hostname", "localhost") # Add a simulation resource -simu = ec.register_resource("LinuxNS3Simulation") +simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "verbose", True) ec.register_connection(simu, node) diff --git a/examples/ns3/local_wifi_ping.py b/examples/ns3/local_wifi_ping.py index a17a9e95..dd75f3a4 100644 --- a/examples/ns3/local_wifi_ping.py +++ b/examples/ns3/local_wifi_ping.py @@ -23,11 +23,11 @@ from nepi.execution.ec import ExperimentController ec = ExperimentController(exp_id = "ns3-local-wifi-ping") # Simulation will executed in the local machine -node = ec.register_resource("LinuxNode") +node = ec.register_resource("linux::Node") ec.set(node, "hostname", "localhost") # Add a simulation resource -simu = ec.register_resource("LinuxNS3Simulation") +simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "verbose", True) ec.register_connection(simu, node) diff --git a/examples/ns3/remote_p2p_ping.py b/examples/ns3/remote_p2p_ping.py index 6f04d78c..b96d2bf7 100644 --- a/examples/ns3/remote_p2p_ping.py +++ b/examples/ns3/remote_p2p_ping.py @@ -41,7 +41,7 @@ identity = options.ssh_key ec = ExperimentController(exp_id = "ns3-remote-p2p-ping") # Simulation will run in a remote machine -node = ec.register_resource("LinuxNode") +node = ec.register_resource("linux::Node") ec.set(node, "hostname", hostname) ec.set(node, "username", username) ec.set(node, "identity", identity) @@ -49,7 +49,7 @@ ec.set(node, "cleanProcesses", True) ec.set(node, "cleanExperiment", True) # Add a simulation resource -simu = ec.register_resource("LinuxNS3Simulation") +simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "verbose", True) ec.register_connection(simu, node) diff --git a/examples/omf/iminds_omf6_ping.py b/examples/omf/iminds_omf6_ping.py index 327409da..b3b58859 100644 --- a/examples/omf/iminds_omf6_ping.py +++ b/examples/omf/iminds_omf6_ping.py @@ -79,14 +79,14 @@ ec = ExperimentController(exp_id="iminds_omf6_ping") # Create and Configure the Nodes -node1 = ec.register_resource("OMFNode") +node1 = ec.register_resource("omf::Node") ec.set(node1, "hostname", nodex) ec.set(node1, "xmppUser", slicename) ec.set(node1, "xmppServer", "xmpp.ilabt.iminds.be") ec.set(node1, "xmppPort", "5222") ec.set(node1, "xmppPassword", "1234") -iface1 = ec.register_resource("OMFWifiInterface") +iface1 = ec.register_resource("omf::WifiInterface") ec.set(iface1, "name", "wlan0") ec.set(iface1, "mode", "adhoc") ec.set(iface1, "hw_mode", "g") @@ -94,14 +94,14 @@ ec.set(iface1, "essid", "ping") ec.set(iface1, "ip", "192.168.0.1/24") ec.register_connection(iface1, node1) -node2 = ec.register_resource("OMFNode") +node2 = ec.register_resource("omf::Node") ec.set(node2, "hostname", nodez) ec.set(node2, "xmppUser", slicename) ec.set(node2, "xmppServer", "xmpp.ilabt.iminds.be") ec.set(node2, "xmppPort", "5222") ec.set(node2, "xmppPassword", "1234") -iface2 = ec.register_resource("OMFWifiInterface") +iface2 = ec.register_resource("omf::WifiInterface") ec.set(iface2, "name", "wlan0") ec.set(iface2, "mode", "adhoc") ec.set(iface2, "hw_mode", "g") @@ -109,13 +109,13 @@ ec.set(iface2, "essid", "ping") ec.set(iface2, "ip", "192.168.0.2/24") ec.register_connection(iface2, node2) -channel = ec.register_resource("OMFChannel") +channel = ec.register_resource("omf::Channel") ec.set(channel, "channel", "6") ec.register_connection(iface1, channel) ec.register_connection(iface2, channel) # Create and Configure the Application -app1 = ec.register_resource("OMFApplication") +app1 = ec.register_resource("omf::Application") ec.set(app1, "command", "ping -c3 192.168.0.2") ec.register_connection(app1, node1) diff --git a/examples/omf/iminds_omf6_vlc.py b/examples/omf/iminds_omf6_vlc.py index 2c4b4744..74c53fb8 100644 --- a/examples/omf/iminds_omf6_vlc.py +++ b/examples/omf/iminds_omf6_vlc.py @@ -84,14 +84,14 @@ ec = ExperimentController(exp_id="iminds_omf6_ping") # Create and Configure the Nodes -node1 = ec.register_resource("OMFNode") +node1 = ec.register_resource("omf::Node") ec.set(node1, "hostname", nodex) ec.set(node1, "xmppUser", slicename) ec.set(node1, "xmppServer", "xmpp.ilabt.iminds.be") ec.set(node1, "xmppPort", "5222") ec.set(node1, "xmppPassword", "1234") -iface1 = ec.register_resource("OMFWifiInterface") +iface1 = ec.register_resource("omf::WifiInterface") ec.set(iface1, "name", "wlan0") ec.set(iface1, "mode", "adhoc") ec.set(iface1, "hw_mode", "g") @@ -99,14 +99,14 @@ ec.set(iface1, "essid", "vlc") ec.set(iface1, "ip", "192.168.0.1/24") ec.register_connection(iface1, node1) -node2 = ec.register_resource("OMFNode") +node2 = ec.register_resource("omf::Node") ec.set(node2, "hostname", nodez) ec.set(node2, "xmppUser", slicename) ec.set(node2, "xmppServer", "xmpp.ilabt.iminds.be") ec.set(node2, "xmppPort", "5222") ec.set(node2, "xmppPassword", "1234") -iface2 = ec.register_resource("OMFWifiInterface") +iface2 = ec.register_resource("omf::WifiInterface") ec.set(iface2, "name", "wlan0") ec.set(iface2, "mode", "adhoc") ec.set(iface2, "hw_mode", "g") @@ -114,7 +114,7 @@ ec.set(iface2, "essid", "vlc") ec.set(iface2, "ip", "192.168.0.2/24") ec.register_connection(iface2, node2) -channel = ec.register_resource("OMFChannel") +channel = ec.register_resource("omf::Channel") ec.set(channel, "channel", "6") ec.register_connection(iface1, channel) ec.register_connection(iface2, channel) @@ -122,28 +122,28 @@ ec.register_connection(iface2, channel) client_ip = "192.168.0.2" # Create and Configure the Application -app1 = ec.register_resource("OMFApplication") +app1 = ec.register_resource("omf::Application") ec.set(app1, "command", "/root/vlc/vlc-1.1.13/cvlc /root/10-by-p0d.avi --sout '#rtp{dst=%s,port=5004,mux=ts}'" % client_ip) ec.register_connection(app1, node1) ## Add a OMFApplication to run the client VLC -app2 = ec.register_resource("OMFApplication") +app2 = ec.register_resource("omf::Application") ## Send the transmitted video to a file. ec.set(app2, "command", "/root/vlc/vlc-1.1.13/cvlc rtp://%s:5004 --sout '#standard{access=file,mux=ts,dst=/root/video.ts}'" % client_ip) ec.register_connection(app2, node2) ## Add a OMFApplication to count the number of bytes in the transmitted video -app3 = ec.register_resource("OMFApplication") +app3 = ec.register_resource("omf::Application") ## Send the transmitted video to a file. ec.set(app3, "command", "ls -lah /root/video.ts") ec.register_connection(app3, node2) -app4 = ec.register_resource("OMFApplication") +app4 = ec.register_resource("omf::Application") ec.set(app4, "command", "/usr/bin/killall vlc_app") ec.register_connection(app4, node1) -app5 = ec.register_resource("OMFApplication") +app5 = ec.register_resource("omf::Application") ec.set(app5, "command", "/usr/bin/killall vlc_app") ec.register_connection(app5, node2) diff --git a/examples/omf/nitos_omf6_ping.py b/examples/omf/nitos_omf6_ping.py index 1f6d8716..5623a0ea 100644 --- a/examples/omf/nitos_omf6_ping.py +++ b/examples/omf/nitos_omf6_ping.py @@ -79,7 +79,7 @@ chan = options.channel ec = ExperimentController(exp_id="nitos_omf6_ping") # Create and Configure the Nodes -node1 = ec.register_resource("OMFNode") +node1 = ec.register_resource("omf::Node") ec.set(node1, "hostname", nodex) ec.set(node1, "xmppUser", slicename) ec.set(node1, "xmppServer", "nitlab.inf.uth.gr") @@ -87,7 +87,7 @@ ec.set(node1, "xmppPort", "5222") ec.set(node1, "xmppPassword", "1234") # Create and Configure the Interfaces -iface1 = ec.register_resource("OMFWifiInterface") +iface1 = ec.register_resource("omf::WifiInterface") ec.set(iface1, "name", "wlan0") ec.set(iface1, "mode", "adhoc") ec.set(iface1, "hw_mode", "g") @@ -96,7 +96,7 @@ ec.set(iface1, "ip", "192.168.0.%s/24" % nodex[-2:]) ec.register_connection(node1, iface1) # Create and Configure the Nodes -node2 = ec.register_resource("OMFNode") +node2 = ec.register_resource("omf::Node") ec.set(node2, "hostname", nodez) ec.set(node2, "xmppUser", slicename) ec.set(node2, "xmppServer", "nitlab.inf.uth.gr") @@ -104,7 +104,7 @@ ec.set(node2, "xmppPort", "5222") ec.set(node2, "xmppPassword", "1234") # Create and Configure the Interfaces -iface2 = ec.register_resource("OMFWifiInterface") +iface2 = ec.register_resource("omf::WifiInterface") ec.set(iface2, "name", "wlan0") ec.set(iface2, "mode", "adhoc") ec.set(iface2, "hw_mode", "g") @@ -113,7 +113,7 @@ ec.set(iface2, "ip", "192.168.0.%s/24" % nodez[-2:]) ec.register_connection(node2, iface2) # Create and Configure the Channel -channel = ec.register_resource("OMFChannel") +channel = ec.register_resource("omf::Channel") ec.set(channel, "channel", chan) ec.set(channel, "xmppUser", slicename) ec.set(channel, "xmppServer", "nitlab.inf.uth.gr") @@ -123,7 +123,7 @@ ec.register_connection(iface1, channel) ec.register_connection(iface2, channel) # Create and Configure the PING Application -app1 = ec.register_resource("OMFApplication") +app1 = ec.register_resource("omf::Application") ec.set(app1, "appid", "Ping#1") ec.set(app1, "command", "/bin/ping -c3 192.168.0.%s" % nodez[-2:]) ec.register_connection(app1, node1) diff --git a/examples/omf/nitos_omf6_vlc.py b/examples/omf/nitos_omf6_vlc.py index ec7f7bed..9b7443b3 100644 --- a/examples/omf/nitos_omf6_vlc.py +++ b/examples/omf/nitos_omf6_vlc.py @@ -80,7 +80,7 @@ chan = options.channel ec = ExperimentController(exp_id="nitos_omf6_vlc") # Create and Configure the Nodes -node1 = ec.register_resource("OMFNode") +node1 = ec.register_resource("omf::Node") ec.set(node1, "hostname", nodex) ec.set(node1, "xmppUser", slicename) ec.set(node1, "xmppServer", "nitlab.inf.uth.gr") @@ -88,7 +88,7 @@ ec.set(node1, "xmppPort", "5222") ec.set(node1, "xmppPassword", "1234") # Create and Configure the Interfaces -iface1 = ec.register_resource("OMFWifiInterface") +iface1 = ec.register_resource("omf::WifiInterface") ec.set(iface1, "name", "wlan0") ec.set(iface1, "mode", "adhoc") ec.set(iface1, "hw_mode", "g") @@ -97,7 +97,7 @@ ec.set(iface1, "ip", "192.168.0.%s/24" % nodex[-2:]) ec.register_connection(node1, iface1) # Create and Configure the Nodes -node2 = ec.register_resource("OMFNode") +node2 = ec.register_resource("omf::Node") ec.set(node2, "hostname", nodez) ec.set(node2, "xmppUser", slicename) ec.set(node2, "xmppServer", "nitlab.inf.uth.gr") @@ -105,7 +105,7 @@ ec.set(node2, "xmppPort", "5222") ec.set(node2, "xmppPassword", "1234") # Create and Configure the Interfaces -iface2 = ec.register_resource("OMFWifiInterface") +iface2 = ec.register_resource("omf::WifiInterface") ec.set(iface2, "name", "wlan0") ec.set(iface2, "mode", "adhoc") ec.set(iface2, "hw_mode", "g") @@ -114,7 +114,7 @@ ec.set(iface2, "ip", "192.168.0.%s/24" % nodez[-2:]) ec.register_connection(node2, iface2) # Create and Configure the Channel -channel = ec.register_resource("OMFChannel") +channel = ec.register_resource("omf::Channel") ec.set(channel, "channel", chan) ec.set(channel, "xmppUser", slicename) ec.set(channel, "xmppServer", "nitlab.inf.uth.gr") @@ -126,14 +126,14 @@ ec.register_connection(iface2, channel) client_ip = "192.168.0.%s" % nodez[-2:] # Create and Configure the Application -app1 = ec.register_resource("OMFApplication") +app1 = ec.register_resource("omf::Application") ec.set(app1, "command", "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority /root/vlc/vlc-1.1.13/cvlc /root/10-by-p0d.avi --sout '#rtp{dst=%s,port=5004,mux=ts}'" % client_ip) ec.register_connection(app1, node1) ## Add a OMFApplication to run the client VLC and count the numer of bytes ## transmitted, using wc. -app2 = ec.register_resource("OMFApplication") +app2 = ec.register_resource("omf::Application") ec.set(app2, "command", "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority /root/vlc/vlc-1.1.13/cvlc rtp://%s:5004 | wc -c "% client_ip) diff --git a/examples/omf/testing/nepi_omf5_iminds_stdin.py b/examples/omf/testing/nepi_omf5_iminds_stdin.py index e597360a..76968174 100644 --- a/examples/omf/testing/nepi_omf5_iminds_stdin.py +++ b/examples/omf/testing/nepi_omf5_iminds_stdin.py @@ -48,7 +48,7 @@ import time ec = ExperimentController() # Create and Configure the Node -node1 = ec.register_resource("OMFNode") +node1 = ec.register_resource("omf::Node") # If the hostname is not declared, Nepi will take SFA to provision one. ec.set(node1, 'hostname', 'node0.nepi-robot.nepi.wilab2.ilabt.iminds.be') # XMPP credentials @@ -59,7 +59,7 @@ ec.set(node1, 'xmppPassword', "1234") ec.set(node1, 'version', "5") # Create and Configure the Application -app1 = ec.register_resource("OMFRobotApplication") +app1 = ec.register_resource("omf::RobotApplication") ec.set(app1, 'appid', "robot") ec.set(app1, 'version', "5") ec.set(app1, 'command', "/users/jtribino/RobotCTRLComm.rb /users/jtribino/coordinate.csv") diff --git a/examples/omf/testing/nepi_omf5_nitos_ccncat.py b/examples/omf/testing/nepi_omf5_nitos_ccncat.py index 91652876..69d4f06f 100644 --- a/examples/omf/testing/nepi_omf5_nitos_ccncat.py +++ b/examples/omf/testing/nepi_omf5_nitos_ccncat.py @@ -41,7 +41,7 @@ from optparse import OptionParser, SUPPRESS_HELP ### Define OMF Method to simplify definition of resources ### def add_node(ec, hostname, xmppServer, xmppUser, xmppPort = "5222", xmppPassword = "1234"): - node = ec.register_resource("OMFNode") + node = ec.register_resource("omf::Node") ec.set(node, 'hostname', hostname) ec.set(node, 'xmppServer', xmppServer) ec.set(node, 'xmppUser', xmppUser) @@ -52,7 +52,7 @@ def add_node(ec, hostname, xmppServer, xmppUser, xmppPort = "5222", xmppPassword def add_interface(ec, ip, xmppServer, xmppUser, essid = "ccn", name = "wlan0", mode = "adhoc", typ = "g", xmppPort = "5222", xmppPassword = "1234"): - iface = ec.register_resource("OMFWifiInterface") + iface = ec.register_resource("omf::WifiInterface") ec.set(iface, 'name', name) ec.set(iface, 'mode', mode) ec.set(iface, 'hw_mode', typ) @@ -62,7 +62,7 @@ def add_interface(ec, ip, xmppServer, xmppUser, essid = "ccn", name = "wlan0", m return iface def add_channel(ec, channel, xmppServer, xmppUser, xmppPort = "5222", xmppPassword = "1234"): - chan = ec.register_resource("OMFChannel") + chan = ec.register_resource("omf::Channel") ec.set(chan, 'channel', channel) ec.set(chan, 'xmppServer', xmppServer) ec.set(chan, 'xmppUser', xmppUser) @@ -73,7 +73,7 @@ def add_channel(ec, channel, xmppServer, xmppUser, xmppPort = "5222", xmppPasswo def add_app(ec, appid, command, env, xmppServer, xmppUser, xmppPort = "5222", xmppPassword = "1234"): - app = ec.register_resource("OMFApplication") + app = ec.register_resource("omf::Application") ec.set(app, 'appid', appid) ec.set(app, 'command', command) ec.set(app, 'env', env) diff --git a/examples/omf/testing/nepi_omf5_nitos_ccnring.py b/examples/omf/testing/nepi_omf5_nitos_ccnring.py index 86370d4d..4ca07ff0 100644 --- a/examples/omf/testing/nepi_omf5_nitos_ccnring.py +++ b/examples/omf/testing/nepi_omf5_nitos_ccnring.py @@ -48,7 +48,7 @@ from optparse import OptionParser, SUPPRESS_HELP ### Define OMF Method to simplify definition of resources ### def add_node(ec, hostname, xmppServer, xmppUser, xmppPort = "5222", xmppPassword = "1234"): - node = ec.register_resource("OMFNode") + node = ec.register_resource("omf::Node") ec.set(node, 'hostname', hostname) ec.set(node, 'xmppServer', xmppServer) ec.set(node, 'xmppUser', xmppUser) @@ -59,7 +59,7 @@ def add_node(ec, hostname, xmppServer, xmppUser, xmppPort = "5222", xmppPassword def add_interface(ec, ip, xmppServer, xmppUser, essid = "ccn", name = "wlan0", mode = "adhoc", typ = "g", xmppPort = "5222", xmppPassword = "1234"): - iface = ec.register_resource("OMFWifiInterface") + iface = ec.register_resource("omf::WifiInterface") ec.set(iface, 'name', name) ec.set(iface, 'mode', mode) ec.set(iface, 'hw_mode', typ) @@ -69,7 +69,7 @@ def add_interface(ec, ip, xmppServer, xmppUser, essid = "ccn", name = "wlan0", m return iface def add_channel(ec, channel, xmppServer, xmppUser, xmppPort = "5222", xmppPassword = "1234"): - chan = ec.register_resource("OMFChannel") + chan = ec.register_resource("omf::Channel") ec.set(chan, 'channel', channel) ec.set(chan, 'xmppServer', xmppServer) ec.set(chan, 'xmppUser', xmppUser) @@ -80,7 +80,7 @@ def add_channel(ec, channel, xmppServer, xmppUser, xmppPort = "5222", xmppPasswo def add_app(ec, host, appid, command, env, xmppServer, xmppUser, xmppPort = "5222", xmppPassword = "1234"): - app = ec.register_resource("OMFApplication") + app = ec.register_resource("omf::Application") ec.set(app, 'appid', appid) ec.set(app, 'command', command) ec.set(app, 'env', env) diff --git a/examples/omf/testing/nepi_omf5_nitos_vlc.py b/examples/omf/testing/nepi_omf5_nitos_vlc.py index d0d590a1..0b19c05c 100644 --- a/examples/omf/testing/nepi_omf5_nitos_vlc.py +++ b/examples/omf/testing/nepi_omf5_nitos_vlc.py @@ -49,7 +49,7 @@ from nepi.execution.ec import ExperimentController ec = ExperimentController() # Create and Configure the Nodes -node1 = ec.register_resource("OMFNode") +node1 = ec.register_resource("omf::Node") ec.set(node1, 'hostname', 'omf.nitos.node0XX') ec.set(node1, 'xmppServer', "ZZZ") ec.set(node1, 'xmppUser', "nitlab.inf.uth.gr") @@ -57,7 +57,7 @@ ec.set(node1, 'xmppPort', "5222") ec.set(node1, 'xmppPassword', "1234") ec.set(node1, 'version', "5") -node2 = ec.register_resource("OMFNode") +node2 = ec.register_resource("omf::Node") ec.set(node2, 'hostname', "omf.nitos.node0YY") ec.set(node2, 'xmppServer', "ZZZ") ec.set(node2, 'xmppUser', "nitlab.inf.uth.gr") @@ -66,7 +66,7 @@ ec.set(node2, 'xmppPassword', "1234") ec.set(node2, 'version', "5") # Create and Configure the Interfaces -iface1 = ec.register_resource("OMFWifiInterface") +iface1 = ec.register_resource("omf::WifiInterface") ec.set(iface1, 'name', "wlan0") ec.set(iface1, 'mode', "adhoc") ec.set(iface1, 'hw_mode', "g") @@ -74,7 +74,7 @@ ec.set(iface1, 'essid', "vlcexp") ec.set(iface1, 'ip', "192.168.0.XX/24") ec.set(iface1, 'version', "5") -iface2 = ec.register_resource("OMFWifiInterface") +iface2 = ec.register_resource("omf::WifiInterface") ec.set(iface2, 'name', "wlan0") ec.set(iface2, 'mode', "adhoc") ec.set(iface2, 'hw_mode', 'g') @@ -83,7 +83,7 @@ ec.set(iface2, 'ip', "192.168.0.YY/24") ec.set(iface2, 'version', "5") # Create and Configure the Channel -channel = ec.register_resource("OMFChannel") +channel = ec.register_resource("omf::Channel") ec.set(channel, 'channel', "6") ec.set(channel, 'xmppServer', "ZZZ") ec.set(channel, 'xmppUser', "nitlab.inf.uth.gr") @@ -92,25 +92,25 @@ ec.set(channel, 'xmppPassword', "1234") ec.set(channel, 'version', "5") # Create and Configure the Application -app1 = ec.register_resource("OMFApplication") +app1 = ec.register_resource("omf::Application") ec.set(app1, 'appid', 'Vlc#1') ec.set(app1, 'command', "/root/vlc/vlc-1.1.13/cvlc /root/10-by-p0d.avi --sout '#rtp{dst=192.168.0.YY,port=1234,mux=ts}'") ec.set(app1, 'env', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority") ec.set(app1, 'version', "5") -app2 = ec.register_resource("OMFApplication") +app2 = ec.register_resource("omf::Application") ec.set(app2, 'appid', 'Vlc#2') ec.set(app2, 'command', "/root/vlc/vlc-1.1.13/cvlc rtp://192.168.0.YY:1234") ec.set(app2, 'env', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority") ec.set(app2, 'version', "5") -app3 = ec.register_resource("OMFApplication") +app3 = ec.register_resource("omf::Application") ec.set(app3, 'appid', 'Kill#2') ec.set(app3, 'command', "/usr/bin/killall vlc_app") ec.set(app3, 'env', " ") ec.set(app3, 'version', "5") -app4 = ec.register_resource("OMFApplication") +app4 = ec.register_resource("omf::Application") ec.set(app4, 'appid', 'Kill#1') ec.set(app4, 'command', "/usr/bin/killall vlc_app") ec.set(app4, 'env', " ") diff --git a/examples/omf/testing/nepi_omf5_nitos_vlc_tribino.py b/examples/omf/testing/nepi_omf5_nitos_vlc_tribino.py index e1eabf5c..d4934433 100644 --- a/examples/omf/testing/nepi_omf5_nitos_vlc_tribino.py +++ b/examples/omf/testing/nepi_omf5_nitos_vlc_tribino.py @@ -49,7 +49,7 @@ from nepi.execution.ec import ExperimentController ec = ExperimentController() # Create and Configure the Nodes -node1 = ec.register_resource("OMFNode") +node1 = ec.register_resource("omf::Node") ec.set(node1, 'hostname', 'omf.nitos.node025') ec.set(node1, 'xmppServer', "tribino") ec.set(node1, 'xmppUser', "nitlab.inf.uth.gr") @@ -57,7 +57,7 @@ ec.set(node1, 'xmppPort', "5222") ec.set(node1, 'xmppPassword', "1234") ec.set(node1, 'version', "5") -node2 = ec.register_resource("OMFNode") +node2 = ec.register_resource("omf::Node") ec.set(node2, 'hostname', "omf.nitos.node028") ec.set(node2, 'xmppServer', "tribino") ec.set(node2, 'xmppUser', "nitlab.inf.uth.gr") @@ -66,7 +66,7 @@ ec.set(node2, 'xmppPassword', "1234") ec.set(node2, 'version', "5") # Create and Configure the Interfaces -iface1 = ec.register_resource("OMFWifiInterface") +iface1 = ec.register_resource("omf::WifiInterface") ec.set(iface1, 'name', "wlan0") ec.set(iface1, 'mode', "adhoc") ec.set(iface1, 'hw_mode', "g") @@ -74,7 +74,7 @@ ec.set(iface1, 'essid', "vlcexp") ec.set(iface1, 'ip', "192.168.0.25/24") ec.set(iface1, 'version', "5") -iface2 = ec.register_resource("OMFWifiInterface") +iface2 = ec.register_resource("omf::WifiInterface") ec.set(iface2, 'name', "wlan0") ec.set(iface2, 'mode', "adhoc") ec.set(iface2, 'hw_mode', 'g') @@ -83,7 +83,7 @@ ec.set(iface2, 'ip', "192.168.0.28/24") ec.set(iface2, 'version', "5") # Create and Configure the Channel -channel = ec.register_resource("OMFChannel") +channel = ec.register_resource("omf::Channel") ec.set(channel, 'channel', "6") ec.set(channel, 'xmppServer', "tribino") ec.set(channel, 'xmppUser', "nitlab.inf.uth.gr") @@ -92,25 +92,25 @@ ec.set(channel, 'xmppPassword', "1234") ec.set(channel, 'version', "5") # Create and Configure the Application -app1 = ec.register_resource("OMFApplication") +app1 = ec.register_resource("omf::Application") ec.set(app1, 'appid', 'Vlc#1') ec.set(app1, 'command', "/root/vlc/vlc-1.1.13/cvlc /root/10-by-p0d.avi --sout '#rtp{dst=192.168.0.28,port=1234,mux=ts}'") ec.set(app1, 'env', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority") ec.set(app1, 'version', "5") -app2 = ec.register_resource("OMFApplication") +app2 = ec.register_resource("omf::Application") ec.set(app2, 'appid', 'Vlc#2') ec.set(app2, 'command', "/root/vlc/vlc-1.1.13/cvlc rtp://192.168.0.28:1234") ec.set(app2, 'env', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority") ec.set(app2, 'version', "5") -app3 = ec.register_resource("OMFApplication") +app3 = ec.register_resource("omf::Application") ec.set(app3, 'appid', 'Kill#2') ec.set(app3, 'command', "/usr/bin/killall vlc_app") ec.set(app3, 'env', " ") ec.set(app3, 'version', "5") -app4 = ec.register_resource("OMFApplication") +app4 = ec.register_resource("omf::Application") ec.set(app4, 'appid', 'Kill#1') ec.set(app4, 'command', "/usr/bin/killall vlc_app") ec.set(app4, 'env', " ") diff --git a/examples/omf/testing/nepi_omf5_nitos_xeyes.py b/examples/omf/testing/nepi_omf5_nitos_xeyes.py index b39c335a..818e1c99 100644 --- a/examples/omf/testing/nepi_omf5_nitos_xeyes.py +++ b/examples/omf/testing/nepi_omf5_nitos_xeyes.py @@ -47,7 +47,7 @@ from nepi.execution.ec import ExperimentController ec = ExperimentController() # Create and Configure the Nodes -node1 = ec.register_resource("OMFNode") +node1 = ec.register_resource("omf::Node") ec.set(node1, 'hostname', 'omf.nitos.node0XX') ec.set(node1, 'xmppServer', "nitlab.inf.uth.gr") ec.set(node1, 'xmppUser', "") @@ -56,7 +56,7 @@ ec.set(node1, 'xmppPassword', "1234") ec.set(node1, 'version', "5") # Create and Configure the Interfaces -iface1 = ec.register_resource("OMFWifiInterface") +iface1 = ec.register_resource("omf::WifiInterface") ec.set(iface1, 'name', "wlan0") ec.set(iface1, 'mode', "adhoc") ec.set(iface1, 'hw_mode', "g") @@ -65,7 +65,7 @@ ec.set(iface1, 'ip', "192.168.0.XX/24") ec.set(iface1, 'version', "5") # Create and Configure the Channel -channel = ec.register_resource("OMFChannel") +channel = ec.register_resource("omf::Channel") ec.set(channel, 'channel', "6") ec.set(channel, 'xmppServer', "ZZZ") ec.set(channel, 'xmppUser', "nitlab.inf.uth.gr") @@ -74,13 +74,13 @@ ec.set(channel, 'xmppPassword', "1234") ec.set(channel, 'version', "5") # Create and Configure the Application -app1 = ec.register_resource("OMFApplication") +app1 = ec.register_resource("omf::Application") ec.set(app1, 'appid', 'XEyes#1') ec.set(app1, 'command', "/usr/bin/xeyes") ec.set(app1, 'env', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority") ec.set(app1, 'version', "5") -app2 = ec.register_resource("OMFApplication") +app2 = ec.register_resource("omf::Application") ec.set(app2, 'appid', 'Kill#1') ec.set(app2, 'path', "/usr/bin/kill") ec.set(app2, 'args', "xeyes") diff --git a/examples/omf/testing/nepi_omf5_plexus_ccncat_linear.py b/examples/omf/testing/nepi_omf5_plexus_ccncat_linear.py index 2280be53..9d2906e5 100644 --- a/examples/omf/testing/nepi_omf5_plexus_ccncat_linear.py +++ b/examples/omf/testing/nepi_omf5_plexus_ccncat_linear.py @@ -45,7 +45,7 @@ from optparse import OptionParser, SUPPRESS_HELP ### Define OMF Method to simplify definition of resources ### def add_node(ec, hostname, xmppServer, xmppUser, xmppPort = "5222", xmppPassword = "1234"): - node = ec.register_resource("OMFNode") + node = ec.register_resource("omf::Node") ec.set(node, 'hostname', hostname) ec.set(node, 'xmppServer', xmppServer) ec.set(node, 'xmppUser', xmppUser) @@ -56,7 +56,7 @@ def add_node(ec, hostname, xmppServer, xmppUser, xmppPort = "5222", xmppPassword def add_interface(ec, ip, xmppServer, xmppUser, essid = "ccn", name = "wlan0", mode = "adhoc", typ = "g", xmppPort = "5222", xmppPassword = "1234"): - iface = ec.register_resource("OMFWifiInterface") + iface = ec.register_resource("omf::WifiInterface") ec.set(iface, 'name', name) ec.set(iface, 'mode', mode) ec.set(iface, 'hw_mode', typ) @@ -66,7 +66,7 @@ def add_interface(ec, ip, xmppServer, xmppUser, essid = "ccn", name = "wlan0", m return iface def add_channel(ec, channel, xmppServer, xmppUser, xmppPort = "5222", xmppPassword = "1234"): - chan = ec.register_resource("OMFChannel") + chan = ec.register_resource("omf::Channel") ec.set(chan, 'channel', channel) ec.set(chan, 'xmppServer', xmppServer) ec.set(chan, 'xmppUser', xmppUser) @@ -77,7 +77,7 @@ def add_channel(ec, channel, xmppServer, xmppUser, xmppPort = "5222", xmppPasswo def add_app(ec, host, appid, command, env, xmppServer, xmppUser, xmppPort = "5222", xmppPassword = "1234"): - app = ec.register_resource("OMFApplication") + app = ec.register_resource("omf::Application") ec.set(app, 'appid', appid) ec.set(app, 'command', command) ec.set(app, 'env', env) diff --git a/examples/omf/testing/nepi_omf5_plexus_stdin.py b/examples/omf/testing/nepi_omf5_plexus_stdin.py index f856c1b5..fc3a4289 100644 --- a/examples/omf/testing/nepi_omf5_plexus_stdin.py +++ b/examples/omf/testing/nepi_omf5_plexus_stdin.py @@ -48,7 +48,7 @@ import time ec = ExperimentController() # Create and Configure the Nodes -node1 = ec.register_resource("OMFNode") +node1 = ec.register_resource("omf::Node") ec.set(node1, 'hostname', 'omf.plexus.wlab17') ec.set(node1, 'xmppServer', "nepi") ec.set(node1, 'xmppUser', "xmpp-plexus.onelab.eu") @@ -57,7 +57,7 @@ ec.set(node1, 'xmppPassword', "1234") ec.set(node1, 'version', "5") # Create and Configure the Application -app1 = ec.register_resource("OMFApplication") +app1 = ec.register_resource("omf::Application") ec.set(app1, 'appid', "robot") ec.set(app1, 'command', "/root/CTRL_test.rb coord.csv") ec.set(app1, 'env', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority") diff --git a/examples/omf/testing/nepi_omf5_plexus_vlc.py b/examples/omf/testing/nepi_omf5_plexus_vlc.py index 12930139..1572c192 100644 --- a/examples/omf/testing/nepi_omf5_plexus_vlc.py +++ b/examples/omf/testing/nepi_omf5_plexus_vlc.py @@ -49,7 +49,7 @@ from nepi.execution.ec import ExperimentController ec = ExperimentController() # Create and Configure the Nodes -node1 = ec.register_resource("OMFNode") +node1 = ec.register_resource("omf::Node") ec.set(node1, 'hostname', 'omf.plexus.wlab17') ec.set(node1, 'xmppUser', "nepi") ec.set(node1, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -57,7 +57,7 @@ ec.set(node1, 'xmppPort', "5222") ec.set(node1, 'xmppPassword', "1234") ec.set(node1, 'version', "5") -node2 = ec.register_resource("OMFNode") +node2 = ec.register_resource("omf::Node") ec.set(node2, 'hostname', "omf.plexus.wlab37") ec.set(node2, 'xmppUser', "nepi") ec.set(node2, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -66,7 +66,7 @@ ec.set(node2, 'xmppPassword', "1234") ec.set(node2, 'version', "5") # Create and Configure the Interfaces -iface1 = ec.register_resource("OMFWifiInterface") +iface1 = ec.register_resource("omf::WifiInterface") ec.set(iface1, 'name', "wlan0") ec.set(iface1, 'mode', "adhoc") ec.set(iface1, 'hw_mode', "g") @@ -74,7 +74,7 @@ ec.set(iface1, 'essid', "vlcexp") ec.set(iface1, 'ip', "10.0.0.17") ec.set(iface1, 'version', "5") -iface2 = ec.register_resource("OMFWifiInterface") +iface2 = ec.register_resource("omf::WifiInterface") ec.set(iface2, 'name', "wlan0") ec.set(iface2, 'mode', "adhoc") ec.set(iface2, 'hw_mode', 'g') @@ -83,7 +83,7 @@ ec.set(iface2, 'ip', "10.0.0.37/24") ec.set(iface2, 'version', "5") # Create and Configure the Channel -channel = ec.register_resource("OMFChannel") +channel = ec.register_resource("omf::Channel") ec.set(channel, 'channel', "6") ec.set(channel, 'xmppUser', "nepi") ec.set(channel, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -92,7 +92,7 @@ ec.set(channel, 'xmppPassword', "1234") ec.set(channel, 'version', "5") # Create and Configure the Application -app1 = ec.register_resource("OMFApplication") +app1 = ec.register_resource("omf::Application") ec.set(app1, 'appid', 'Vlc#1') ec.set(app1, 'command', "/opt/vlc-1.1.13/cvlc --quiet /opt/10-by-p0d.avi --sout '#rtp{dst=10.0.0.37,port=1234,mux=ts}'") #ec.set(app1, 'command', "/opt/vlc-1.1.13/cvlc --quiet /opt/big_buck_bunny_240p_mpeg4.ts --sout '#rtp{dst=10.0.0.XX,port=1234,mux=ts} '") @@ -100,19 +100,19 @@ ec.set(app1, 'command', "/opt/vlc-1.1.13/cvlc --quiet /opt/10-by-p0d.avi --sout ec.set(app1, 'env', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority") ec.set(app1, 'version', "5") -app2 = ec.register_resource("OMFApplication") +app2 = ec.register_resource("omf::Application") ec.set(app2, 'appid', 'Vlc#2') ec.set(app2, 'command', "/opt/vlc-1.1.13/cvlc --quiet rtp://10.0.0.37:1234") ec.set(app2, 'env', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority") ec.set(app2, 'version', "5") -app3 = ec.register_resource("OMFApplication") +app3 = ec.register_resource("omf::Application") ec.set(app3, 'appid', 'Kill#1') ec.set(app3, 'command', "/usr/bin/killall vlc") ec.set(app3, 'env', " ") ec.set(app3, 'version', "5") -app4 = ec.register_resource("OMFApplication") +app4 = ec.register_resource("omf::Application") ec.set(app4, 'appid', 'Kill#2') ec.set(app4, 'command', "/usr/bin/killall vlc") ec.set(app4, 'env', " ") diff --git a/examples/omf/testing/nepi_omf6_iminds_vlc.py b/examples/omf/testing/nepi_omf6_iminds_vlc.py index 49123e6f..af1512bf 100644 --- a/examples/omf/testing/nepi_omf6_iminds_vlc.py +++ b/examples/omf/testing/nepi_omf6_iminds_vlc.py @@ -30,59 +30,59 @@ ec = ExperimentController() # Create and Configure the Nodes -node1 = ec.register_resource("OMFNode") +node1 = ec.register_resource("omf::Node") ec.set(node1, 'hostname', 'servernode.nepivlcexperiment.nepi.wilab2.ilabt.iminds.be') ec.set(node1, 'xmppServer', "xmpp.ilabt.iminds.be") ec.set(node1, 'xmppUser', "nepi") ec.set(node1, 'xmppPort', "5222") ec.set(node1, 'xmppPassword', "1234") -iface1 = ec.register_resource("OMFWifiInterface") +iface1 = ec.register_resource("omf::WifiInterface") ec.set(iface1, 'name', 'wlan0') ec.set(iface1, 'mode', "adhoc") ec.set(iface1, 'hw_mode', "g") ec.set(iface1, 'essid', "vlc") ec.set(iface1, 'ip', "192.168.0.1/24") -node2 = ec.register_resource("OMFNode") +node2 = ec.register_resource("omf::Node") ec.set(node2, 'hostname', 'client1node.nepivlcexperiment.nepi.wilab2.ilabt.iminds.be') ec.set(node2, 'xmppServer', "xmpp.ilabt.iminds.be") ec.set(node2, 'xmppUser', "nepi") ec.set(node2, 'xmppPort', "5222") ec.set(node2, 'xmppPassword', "1234") -iface2 = ec.register_resource("OMFWifiInterface") +iface2 = ec.register_resource("omf::WifiInterface") ec.set(iface2, 'name', 'wlan0') ec.set(iface2, 'mode', "adhoc") ec.set(iface2, 'hw_mode', "g") ec.set(iface2, 'essid', "vlc") ec.set(iface2, 'ip', "192.168.0.2/24") -node3 = ec.register_resource("OMFNode") +node3 = ec.register_resource("omf::Node") ec.set(node3, 'hostname', 'client2node.nepivlcexperiment.nepi.wilab2.ilabt.iminds.be') ec.set(node3, 'xmppServer', "xmpp.ilabt.iminds.be") ec.set(node3, 'xmppUser', "nepi") ec.set(node3, 'xmppPort', "5222") ec.set(node3, 'xmppPassword', "1234") -iface3 = ec.register_resource("OMFWifiInterface") +iface3 = ec.register_resource("omf::WifiInterface") ec.set(iface3, 'name', 'wlan0') ec.set(iface3, 'mode', "adhoc") ec.set(iface3, 'hw_mode', "g") ec.set(iface3, 'essid', "vlc") ec.set(iface3, 'ip', "192.168.0.3/24") -chan = ec.register_resource("OMFChannel") +chan = ec.register_resource("omf::Channel") ec.set(chan, 'channel', "6") # Create and Configure the Application -app1 = ec.register_resource("OMFApplication") +app1 = ec.register_resource("omf::Application") ec.set(app1, 'command', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority /root/vlc/vlc-1.1.13/cvlc /root/10-by-p0d.avi --sout '#duplicate{dst=rtp{dst=192.168.0.2,port=1234,mux=ts},dst=rtp{dst=192.168.0.3,port=1234,mux=ts}}'") -app2 = ec.register_resource("OMFApplication") +app2 = ec.register_resource("omf::Application") ec.set(app2, 'command', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority /root/vlc/vlc-1.1.13/cvlc rtp://192.168.0.2:1234") -app3 = ec.register_resource("OMFApplication") +app3 = ec.register_resource("omf::Application") ec.set(app3, 'command', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority /root/vlc/vlc-1.1.13/cvlc rtp://192.168.0.3:1234") diff --git a/examples/omf/testing/nepi_omf6_nitos_vlc.py b/examples/omf/testing/nepi_omf6_nitos_vlc.py index fb04f04d..11890bb5 100644 --- a/examples/omf/testing/nepi_omf6_nitos_vlc.py +++ b/examples/omf/testing/nepi_omf6_nitos_vlc.py @@ -30,42 +30,42 @@ ec = ExperimentController() # Create and Configure the Nodes -node1 = ec.register_resource("OMFNode") +node1 = ec.register_resource("omf::Node") ec.set(node1, 'hostname', 'node025') ec.set(node1, 'xmppServer', "nitlab.inf.uth.gr") ec.set(node1, 'xmppUser', "nepi") ec.set(node1, 'xmppPort', "5222") ec.set(node1, 'xmppPassword', "1234") -iface1 = ec.register_resource("OMFWifiInterface") +iface1 = ec.register_resource("omf::WifiInterface") ec.set(iface1, 'name', 'wlan0') ec.set(iface1, 'mode', "adhoc") ec.set(iface1, 'hw_mode', "g") ec.set(iface1, 'essid', "vlc") ec.set(iface1, 'ip', "192.168.0.25/24") -node2 = ec.register_resource("OMFNode") +node2 = ec.register_resource("omf::Node") ec.set(node2, 'hostname', 'node027') ec.set(node2, 'xmppServer', "nitlab.inf.uth.gr") ec.set(node2, 'xmppUser', "nepi") ec.set(node2, 'xmppPort', "5222") ec.set(node2, 'xmppPassword', "1234") -iface2 = ec.register_resource("OMFWifiInterface") +iface2 = ec.register_resource("omf::WifiInterface") ec.set(iface2, 'name', 'wlan0') ec.set(iface2, 'mode', "adhoc") ec.set(iface2, 'hw_mode', "g") ec.set(iface2, 'essid', "vlc") ec.set(iface2, 'ip', "192.168.0.27/24") -chan = ec.register_resource("OMFChannel") +chan = ec.register_resource("omf::Channel") ec.set(chan, 'channel', "6") # Create and Configure the Application -app1 = ec.register_resource("OMFApplication") +app1 = ec.register_resource("omf::Application") ec.set(app1, 'command', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority /root/vlc/vlc-1.1.13/cvlc /root/10-by-p0d.avi --sout '#rtp{dst=192.168.0.27,port=1234,mux=ts}'") -app2 = ec.register_resource("OMFApplication") +app2 = ec.register_resource("omf::Application") ec.set(app2, 'command', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority /root/vlc/vlc-1.1.13/cvlc rtp://192.168.0.27:1234") diff --git a/examples/omf/testing/nepi_omf6_plexus_hostname.py b/examples/omf/testing/nepi_omf6_plexus_hostname.py index 5f58e959..4734d48b 100644 --- a/examples/omf/testing/nepi_omf6_plexus_hostname.py +++ b/examples/omf/testing/nepi_omf6_plexus_hostname.py @@ -30,7 +30,7 @@ ec = ExperimentController() # Create and Configure the Nodes -node1 = ec.register_resource("OMFNode") +node1 = ec.register_resource("omf::Node") ec.set(node1, 'hostname', 'wlab12') ec.set(node1, 'xmppServer', "xmpp-plexus.onelab.eu") ec.set(node1, 'xmppUser', "nepi") @@ -38,15 +38,15 @@ ec.set(node1, 'xmppPort', "5222") ec.set(node1, 'xmppPassword', "1234") # Create and Configure the Application -app1 = ec.register_resource("OMFApplication") +app1 = ec.register_resource("omf::Application") ec.set(app1, 'command', '/bin/hostname -f') ec.set(app1, 'env', "") -app2 = ec.register_resource("OMFApplication") +app2 = ec.register_resource("omf::Application") ec.set(app2, 'command', '/bin/date') ec.set(app2, 'env', "") -app3 = ec.register_resource("OMFApplication") +app3 = ec.register_resource("omf::Application") ec.set(app3, 'command', '/bin/hostname -f') ec.set(app3, 'env', "") diff --git a/examples/omf/testing/nepi_omf6_plexus_ping.py b/examples/omf/testing/nepi_omf6_plexus_ping.py index 96ac2ef3..04e074af 100644 --- a/examples/omf/testing/nepi_omf6_plexus_ping.py +++ b/examples/omf/testing/nepi_omf6_plexus_ping.py @@ -30,43 +30,43 @@ ec = ExperimentController() # Create and Configure the Nodes -node1 = ec.register_resource("OMFNode") +node1 = ec.register_resource("omf::Node") ec.set(node1, 'hostname', 'wlab12') ec.set(node1, 'xmppServer', "xmpp-plexus.onelab.eu") ec.set(node1, 'xmppUser', "nepi") ec.set(node1, 'xmppPort', "5222") ec.set(node1, 'xmppPassword', "1234") -iface1 = ec.register_resource("OMFWifiInterface") +iface1 = ec.register_resource("omf::WifiInterface") ec.set(iface1, 'name', 'wlan0') ec.set(iface1, 'mode', "adhoc") ec.set(iface1, 'hw_mode', "g") ec.set(iface1, 'essid', "ping") ec.set(iface1, 'ip', "192.168.0.12/24") -node2 = ec.register_resource("OMFNode") +node2 = ec.register_resource("omf::Node") ec.set(node2, 'hostname', 'wlab49') ec.set(node2, 'xmppServer', "xmpp-plexus.onelab.eu") ec.set(node2, 'xmppUser', "nepi") ec.set(node2, 'xmppPort', "5222") ec.set(node2, 'xmppPassword', "1234") -iface2 = ec.register_resource("OMFWifiInterface") +iface2 = ec.register_resource("omf::WifiInterface") ec.set(iface2, 'name', 'wlan0') ec.set(iface2, 'mode', "adhoc") ec.set(iface2, 'hw_mode', "g") ec.set(iface2, 'essid', "ping") ec.set(iface2, 'ip', "192.168.0.49/24") -chan = ec.register_resource("OMFChannel") +chan = ec.register_resource("omf::Channel") ec.set(chan, 'channel', "6") # Create and Configure the Application -app1 = ec.register_resource("OMFApplication") +app1 = ec.register_resource("omf::Application") ec.set(app1, 'command', '/bin/ping -c5 192.168.0.49') ec.set(app1, 'env', "") -app2 = ec.register_resource("OMFApplication") +app2 = ec.register_resource("omf::Application") ec.set(app2, 'command', '/bin/ping -c5 192.168.0.12') ec.set(app2, 'env', "") diff --git a/examples/omf/testing/nepi_omf6_plexus_ping_with_traces.py b/examples/omf/testing/nepi_omf6_plexus_ping_with_traces.py index 1e76917f..29d2e752 100644 --- a/examples/omf/testing/nepi_omf6_plexus_ping_with_traces.py +++ b/examples/omf/testing/nepi_omf6_plexus_ping_with_traces.py @@ -30,43 +30,43 @@ ec = ExperimentController() # Create and Configure the Nodes -node1 = ec.register_resource("OMFNode") +node1 = ec.register_resource("omf::Node") ec.set(node1, 'hostname', 'wlab12') ec.set(node1, 'xmppServer', "xmpp-plexus.onelab.eu") ec.set(node1, 'xmppUser', "nepi") ec.set(node1, 'xmppPort', "5222") ec.set(node1, 'xmppPassword', "1234") -iface1 = ec.register_resource("OMFWifiInterface") +iface1 = ec.register_resource("omf::WifiInterface") ec.set(iface1, 'name', 'wlan0') ec.set(iface1, 'mode', "adhoc") ec.set(iface1, 'hw_mode', "g") ec.set(iface1, 'essid', "ping") ec.set(iface1, 'ip', "192.168.0.12/24") -node2 = ec.register_resource("OMFNode") +node2 = ec.register_resource("omf::Node") ec.set(node2, 'hostname', 'wlab49') ec.set(node2, 'xmppServer', "xmpp-plexus.onelab.eu") ec.set(node2, 'xmppUser', "nepi") ec.set(node2, 'xmppPort', "5222") ec.set(node2, 'xmppPassword', "1234") -iface2 = ec.register_resource("OMFWifiInterface") +iface2 = ec.register_resource("omf::WifiInterface") ec.set(iface2, 'name', 'wlan0') ec.set(iface2, 'mode', "adhoc") ec.set(iface2, 'hw_mode', "g") ec.set(iface2, 'essid', "ping") ec.set(iface2, 'ip', "192.168.0.49/24") -chan = ec.register_resource("OMFChannel") +chan = ec.register_resource("omf::Channel") ec.set(chan, 'channel', "6") # Create and Configure the Application -app1 = ec.register_resource("OMFApplication") +app1 = ec.register_resource("omf::Application") ec.set(app1, 'command', '/bin/ping -c5 192.168.0.49') ec.set(app1, 'env', "") -app2 = ec.register_resource("OMFApplication") +app2 = ec.register_resource("omf::Application") ec.set(app2, 'command', '/bin/ping -c5 192.168.0.12') ec.set(app2, 'env', "") diff --git a/examples/omf/testing/nitos_omf5_ping.py b/examples/omf/testing/nitos_omf5_ping.py index ee0c316f..8d541198 100644 --- a/examples/omf/testing/nitos_omf5_ping.py +++ b/examples/omf/testing/nitos_omf5_ping.py @@ -76,7 +76,7 @@ chan = options.channel ec = ExperimentController(exp_id="nitos_omf5_ping") # Create and Configure the Nodes -node1 = ec.register_resource("OMFNode") +node1 = ec.register_resource("omf::Node") ec.set(node1, "hostname", nodex) ec.set(node1, "xmppUser", slicename) ec.set(node1, "xmppServer", "nitlab.inf.uth.gr") @@ -85,7 +85,7 @@ ec.set(node1, "xmppPassword", "1234") ec.set(node1, "version", "5") # Create and Configure the Interfaces -iface1 = ec.register_resource("OMFWifiInterface") +iface1 = ec.register_resource("omf::WifiInterface") ec.set(iface1, "name", "wlan0") ec.set(iface1, "mode", "adhoc") ec.set(iface1, "hw_mode", "g") @@ -95,7 +95,7 @@ ec.set(iface1, "version", "5") ec.register_connection(node1, iface1) # Create and Configure the Channel -channel = ec.register_resource("OMFChannel") +channel = ec.register_resource("omf::Channel") ec.set(channel, "channel", chan) ec.set(channel, "xmppUser", slicename) ec.set(channel, "xmppServer", "nitlab.inf.uth.gr") @@ -105,13 +105,13 @@ ec.set(channel, "version", "5") ec.register_connection(iface1, channel) # Create and Configure the PING Application -app1 = ec.register_resource("OMFApplication") +app1 = ec.register_resource("omf::Application") ec.set(app1, "appid", "Ping#1") ec.set(app1, "command", "/bin/ping -c3 192.168.0.%s" % nodex[-2:]) ec.set(app1, "version", "5") ec.register_connection(app1, node1) -app2 = ec.register_resource("OMFApplication") +app2 = ec.register_resource("omf::Application") ec.set(app2, "appid", "Kill#1") ec.set(app2, "command", "/usr/bin/killall ping") ec.set(app2, "version", "5") diff --git a/examples/omf/vod_exp/vod_experiment.py b/examples/omf/vod_exp/vod_experiment.py index 7fd5e1a0..910b95cd 100755 --- a/examples/omf/vod_exp/vod_experiment.py +++ b/examples/omf/vod_exp/vod_experiment.py @@ -46,7 +46,7 @@ sfaPrivateKey = '/home/alina/.sfi/aquereilhac.pkey' # Functions for nodes and ifaces registration def create_planetlab_node(ec, host): - node = ec.register_resource("PlanetlabSfaNode") + node = ec.register_resource("planetlab::sfa::Node") ec.set(node, "hostname", host) ec.set(node, "username", "inria_nepi") ec.set(node, "sfauser", sfauser) @@ -55,7 +55,7 @@ def create_planetlab_node(ec, host): return node def create_omf_node(ec, host): - node = ec.register_resource("WilabtSfaNode") + node = ec.register_resource("wilabt::sfa::Node") ec.set(node, "host", host) ec.set(node, "slicename", slicename) ec.set(node, "sfauser", sfauser) @@ -70,7 +70,7 @@ def create_omf_node(ec, host): return node def create_omf_iface(ec, ip, node): - iface = ec.register_resource("OMFWifiInterface") + iface = ec.register_resource("omf::WifiInterface") ec.set(iface, 'name', 'wlan0') ec.set(iface, 'mode', "adhoc") ec.set(iface, 'hw_mode', "g") @@ -107,7 +107,7 @@ omf_ifaces = [iface_center, iface_client1, iface_client2, iface_client3, iface_c # Register channel -chan = ec.register_resource("OMFChannel") +chan = ec.register_resource("omf::Channel") ec.set(chan, 'channel', "6") # Register connection ifaces - channel @@ -132,7 +132,7 @@ time.sleep(3) # Functions for applications registration in the nodes def create_vlc_server(ec, video_server, mode): - vlc_server = ec.register_resource("LinuxApplication") + vlc_server = ec.register_resource("linux::Application") ec.set(vlc_server, "depends", "vlc") ec.set(vlc_server, "sources", "examples/omf/demo_openlab/big_buck_bunny_240p_mpeg4_lq.ts") # Depending on the mode selected to run the experiment, @@ -148,7 +148,7 @@ def create_vlc_server(ec, video_server, mode): return vlc_server def create_omf_app(ec, command, node): - app = ec.register_resource("OMFApplication") + app = ec.register_resource("omf::Application") ec.set(app, 'command', command) ec.register_connection(app, node) return app @@ -179,7 +179,7 @@ ec.register_condition(upload_conf, ResourceAction.START, vlc_server, ResourceSta ec.register_condition(vlc_wificenter, ResourceAction.START, upload_conf, ResourceState.STARTED , "2s") # measurements in video server (PL node) -measure_videoserver = ec.register_resource("LinuxApplication") +measure_videoserver = ec.register_resource("linux::Application") ec.set(measure_videoserver, "depends", "tcpdump") ec.set(measure_videoserver, "sudo", True) command = "tcpdump -i eth0 not arp -n -w /tmp/capplserver_%s.pcap" % ("$(date +'%Y%m%d%H%M%S')") diff --git a/examples/openvswitch/ovs_ping_2switches.py b/examples/openvswitch/ovs_ping_2switches.py index 47789117..f48210f2 100644 --- a/examples/openvswitch/ovs_ping_2switches.py +++ b/examples/openvswitch/ovs_ping_2switches.py @@ -34,20 +34,20 @@ import os, time import sys def add_node(ec, host, user, pl_user, pl_password): - node = ec.register_resource("PlanetlabNode") + node = ec.register_resource("planetlab::Node") ec.set(node, "hostname", host) ec.set(node, "username", user) if pl_user: ec.set(node, "pluser", pl_user) if pl_password: ec.set(node, "plpassword", pl_password) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) return node def add_ovs(ec, bridge_name, virtual_ip_pref, controller_ip, controller_port, node): - ovs = ec.register_resource("OVSSwitch") + ovs = ec.register_resource("planetlab::OVSSwitch") ec.set(ovs, "bridge_name", bridge_name) ec.set(ovs, "virtual_ip_pref", virtual_ip_pref) ec.set(ovs, "controller_ip", controller_ip) @@ -56,14 +56,14 @@ def add_ovs(ec, bridge_name, virtual_ip_pref, controller_ip, controller_port, no return ovs def add_port(ec, port_name, network, ovs): - port = ec.register_resource("OVSPort") + port = ec.register_resource("planetlab::OVSPort") ec.set(port, "port_name", port_name) ec.set(port, "network", network) ec.register_connection(port, ovs) return port def add_tap(ec, endpoint_ip, endpoint_prefix, pointopoint, node): - tap = ec.register_resource("PlanetlabTap") + tap = ec.register_resource("planetlab::Tap") ec.set(tap, "endpoint_ip", endpoint_ip) ec.set(tap, "endpoint_prefix", endpoint_prefix) ec.set(tap, "pointopoint", pointopoint) @@ -72,13 +72,13 @@ def add_tap(ec, endpoint_ip, endpoint_prefix, pointopoint, node): return tap def add_tunnel(ec, port0, tap): - tunnel = ec.register_resource("LinuxUdpTunnel") + tunnel = ec.register_resource("linux::UdpTunnel") ec.register_connection(port0, tunnel) ec.register_connection(tunnel, tap) return tunnel def add_app(ec, command, node): - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") ec.set(app, "command", command) ec.register_connection(app, node) return app @@ -197,6 +197,3 @@ f.close() ec.shutdown() - - - diff --git a/examples/openvswitch/ovs_ping_3switches_line.py b/examples/openvswitch/ovs_ping_3switches_line.py index b48485ee..4182d81f 100644 --- a/examples/openvswitch/ovs_ping_3switches_line.py +++ b/examples/openvswitch/ovs_ping_3switches_line.py @@ -32,20 +32,20 @@ from nepi.execution.ec import ExperimentController import os, time def add_node(ec, host, user, pl_user, pl_password): - node = ec.register_resource("PlanetlabNode") + node = ec.register_resource("planetlab::Node") ec.set(node, "hostname", host) ec.set(node, "username", user) if pl_user: ec.set(node, "pluser", pl_user) if pl_password: ec.set(node, "plpassword", pl_password) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) return node def add_ovs(ec, bridge_name, virtual_ip_pref, controller_ip, controller_port, node): - ovs = ec.register_resource("OVSSwitch") + ovs = ec.register_resource("planetlab::OVSSwitch") ec.set(ovs, "bridge_name", bridge_name) ec.set(ovs, "virtual_ip_pref", virtual_ip_pref) ec.set(ovs, "controller_ip", controller_ip) @@ -54,14 +54,14 @@ def add_ovs(ec, bridge_name, virtual_ip_pref, controller_ip, controller_port, no return ovs def add_port(ec, port_name, network, ovs): - port = ec.register_resource("OVSPort") + port = ec.register_resource("planetlab::OVSPort") ec.set(port, "port_name", port_name) ec.set(port, "network", network) ec.register_connection(port, ovs) return port def add_tap(ec, endpoint_ip, endpoint_prefix, pointopoint, node): - tap = ec.register_resource("PlanetlabTap") + tap = ec.register_resource("planetlab::Tap") ec.set(tap, "endpoint_ip", endpoint_ip) ec.set(tap, "endpoint_prefix", endpoint_prefix) ec.set(tap, "pointopoint", pointopoint) @@ -70,13 +70,13 @@ def add_tap(ec, endpoint_ip, endpoint_prefix, pointopoint, node): return tap def add_tunnel(ec, port0, tap): - tunnel = ec.register_resource("LinuxUdpTunnel") + tunnel = ec.register_resource("linux::UdpTunnel") ec.register_connection(port0, tunnel) ec.register_connection(tunnel, tap) return tunnel def add_app(ec, command, node): - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") ec.set(app, "command", command) ec.register_connection(app, node) return app @@ -208,6 +208,3 @@ f.close() ec.shutdown() - - - diff --git a/examples/openvswitch/ovs_ping_3switches_loop.py b/examples/openvswitch/ovs_ping_3switches_loop.py index 7dac0956..3052b78a 100644 --- a/examples/openvswitch/ovs_ping_3switches_loop.py +++ b/examples/openvswitch/ovs_ping_3switches_loop.py @@ -42,20 +42,20 @@ from nepi.execution.ec import ExperimentController import os, time def add_node(ec, host, user, pl_user, pl_password): - node = ec.register_resource("PlanetlabNode") + node = ec.register_resource("planetlab::Node") ec.set(node, "hostname", host) ec.set(node, "username", user) if pl_user: ec.set(node, "pluser", pl_user) if pl_password: ec.set(node, "plpassword", pl_password) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) return node def add_ovs(ec, bridge_name, virtual_ip_pref, controller_ip, controller_port, node): - ovs = ec.register_resource("OVSSwitch") + ovs = ec.register_resource("planetlab::OVSSwitch") ec.set(ovs, "bridge_name", bridge_name) ec.set(ovs, "virtual_ip_pref", virtual_ip_pref) ec.set(ovs, "controller_ip", controller_ip) @@ -64,14 +64,14 @@ def add_ovs(ec, bridge_name, virtual_ip_pref, controller_ip, controller_port, no return ovs def add_port(ec, port_name, network, ovs): - port = ec.register_resource("OVSPort") + port = ec.register_resource("planetlab::OVSPort") ec.set(port, "port_name", port_name) ec.set(port, "network", network) ec.register_connection(port, ovs) return port def add_tap(ec, endpoint_ip, endpoint_prefix, pointopoint, node): - tap = ec.register_resource("PlanetlabTap") + tap = ec.register_resource("planetlab::Tap") ec.set(tap, "endpoint_ip", endpoint_ip) ec.set(tap, "endpoint_prefix", endpoint_prefix) ec.set(tap, "pointopoint", pointopoint) @@ -80,13 +80,13 @@ def add_tap(ec, endpoint_ip, endpoint_prefix, pointopoint, node): return tap def add_tunnel(ec, port0, tap): - tunnel = ec.register_resource("LinuxUdpTunnel") + tunnel = ec.register_resource("linux::UdpTunnel") ec.register_connection(port0, tunnel) ec.register_connection(tunnel, tap) return tunnel def add_app(ec, command, node): - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") ec.set(app, "command", command) ec.register_connection(app, node) return app @@ -220,6 +220,3 @@ f.close() ec.shutdown() - - - diff --git a/examples/openvswitch/ping_over_udpTapTunnel_performance_test_triangleTopo.py b/examples/openvswitch/ping_over_udpTapTunnel_performance_test_triangleTopo.py index f5941f1f..51aa60db 100644 --- a/examples/openvswitch/ping_over_udpTapTunnel_performance_test_triangleTopo.py +++ b/examples/openvswitch/ping_over_udpTapTunnel_performance_test_triangleTopo.py @@ -43,15 +43,15 @@ import time ### Useful Method to Create RM ## def add_node(ec, host, user): - node = ec.register_resource("PlanetlabNode") + node = ec.register_resource("planetlab::Node") ec.set(node, "hostname", host) ec.set(node, "username", user) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) return node def add_tap(ec, endpoint_ip, endpoint_prefix, pointopoint, node): - tap = ec.register_resource("PlanetlabTap") + tap = ec.register_resource("planetlab::Tap") ec.set(tap, "endpoint_ip", endpoint_ip) ec.set(tap, "endpoint_prefix", endpoint_prefix) ec.set(tap, "pointopoint", pointopoint) @@ -60,20 +60,20 @@ def add_tap(ec, endpoint_ip, endpoint_prefix, pointopoint, node): return tap def add_udptun(ec, tap1, tap2): - udptun = ec.register_resource("UdpTunnel") + udptun = ec.register_resource("udp::Tunnel") ec.register_connection(tap1, udptun) ec.register_connection(tap2, udptun) return udptun def add_vroute(ec, network, tap): - vroute = ec.register_resource("PlanetlabVroute") + vroute = ec.register_resource("planetlab::Vroute") ec.set(vroute, "action", "add") ec.set(vroute, "network", network) ec.register_connection(vroute, tap) return vroute def add_app(ec, command, node): - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") ec.set(app, "command", command) ec.register_connection(app, node) return app @@ -223,6 +223,3 @@ f.close() ec.shutdown() - - - diff --git a/examples/planetlab/ccn_simple_transfer.py b/examples/planetlab/ccn_simple_transfer.py index 9a3d5b09..43f537b2 100644 --- a/examples/planetlab/ccn_simple_transfer.py +++ b/examples/planetlab/ccn_simple_transfer.py @@ -69,7 +69,7 @@ ec = ExperimentController(exp_id = "pl_ccn_simple_transfer") ##### CONFIGURING NODE 1 ## Register node 1 -node1 = ec.register_resource("PlanetlabNode") +node1 = ec.register_resource("planetlab::Node") # Set the hostname of the first node to use for the experiment ec.set(node1, "hostname", hostname1) # username should be your SSH user @@ -85,13 +85,13 @@ ec.set(node1, "cleanExperiment", True) ec.set(node1, "cleanProcesses", True) ## Register a CCN daemon in node 1 -ccnd1 = ec.register_resource("LinuxCCND") +ccnd1 = ec.register_resource("linux::CCND") # Set ccnd log level to 7 ec.set(ccnd1, "debug", 7) ec.register_connection(ccnd1, node1) ## Register a repository in node 1 -ccnr1 = ec.register_resource("LinuxCCNR") +ccnr1 = ec.register_resource("linux::CCNR") ec.register_connection(ccnr1, ccnd1) ## Push the file into the repository @@ -102,7 +102,7 @@ local_path_to_content = os.path.join( content_name = "ccnx:/test/FILE" # Add a content to the repository -co = ec.register_resource("LinuxCCNContent") +co = ec.register_resource("linux::CCNContent") ec.set(co, "contentName", content_name) # NEPI will upload the specified file to the remote node and write it # into the CCN repository @@ -112,7 +112,7 @@ ec.register_connection(co, ccnr1) ##### CONFIGURING NODE 2 ## Register node 2 -node2 = ec.register_resource("PlanetlabNode") +node2 = ec.register_resource("planetlab::Node") # Set the hostname of the first node to use for the experiment ec.set(node2, "hostname", hostname2) # username should be your SSH user @@ -128,25 +128,25 @@ ec.set(node2, "cleanExperiment", True) ec.set(node2, "cleanProcesses", True) ## Register a CCN daemon in node 2 -ccnd2 = ec.register_resource("LinuxCCND") +ccnd2 = ec.register_resource("linux::CCND") # Set ccnd log level to 7 ec.set(ccnd2, "debug", 7) ec.register_connection(ccnd2, node2) ## Retrieve the file stored in node 1 from node 2 -ccncat = ec.register_resource("LinuxCCNCat") +ccncat = ec.register_resource("linux::CCNCat") ec.set(ccncat, "contentName", content_name) ec.register_connection(ccncat, ccnd2) ##### INTERCONNECTING CCN NODES ... # Register a FIB entry from node 1 to node 2 -entry1 = ec.register_resource("LinuxFIBEntry") +entry1 = ec.register_resource("linux::FIBEntry") ec.set(entry1, "host", hostname2) ec.register_connection(entry1, ccnd1) # Register a FIB entry from node 2 to node 1 -entry2 = ec.register_resource("LinuxFIBEntry") +entry2 = ec.register_resource("linux::FIBEntry") ec.set(entry2, "host", hostname1) ec.register_connection(entry2, ccnd2) diff --git a/examples/planetlab/ping.py b/examples/planetlab/ping.py index e36ba61f..3766992b 100644 --- a/examples/planetlab/ping.py +++ b/examples/planetlab/ping.py @@ -56,7 +56,7 @@ pl_password = options.pl_password ec = ExperimentController(exp_id = "pl_ping") # Register a Planetlab Node with no restrictions, it can be any node -node = ec.register_resource("PlanetlabNode") +node = ec.register_resource("planetlab::Node") # The username in this case is the slice name, the one to use for login in # via ssh into PlanetLab nodes. Replace with your own slice name. @@ -69,11 +69,11 @@ ec.set(node, "pluser", pl_user) ec.set(node, "plpassword", pl_password) # Remove previous results -ec.set(node, "cleanHome", True) +ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) # Define a ping application -app = ec.register_resource("LinuxApplication") +app = ec.register_resource("linux::Application") ec.set(app, "command", "ping -c3 nepi.inria.fr") # Connect the application to the node @@ -89,7 +89,7 @@ trace = ec.trace(app, "stdout") print "PING outout ", trace -# Do the experiment controller shutdown: +# Do the experiment controller shutdown ec.shutdown() # END diff --git a/examples/planetlab/ping_with_filters.py b/examples/planetlab/ping_with_filters.py index 71f23d9a..9f15733c 100644 --- a/examples/planetlab/ping_with_filters.py +++ b/examples/planetlab/ping_with_filters.py @@ -34,7 +34,7 @@ def create_node(ec, pl_slice, pl_ssh_key, pl_user, pl_password, hostname = None, country = None, operatingSystem = None, minBandwidth = None, minCpu = None): - node = ec.register_resource("PlanetlabNode") + node = ec.register_resource("planetlab::Node") ec.set(node, "username", pl_slice) ec.set(node, "identity", pl_ssh_key) @@ -52,14 +52,14 @@ def create_node(ec, pl_slice, pl_ssh_key, pl_user, pl_password, if minCpu: ec.set(node, "minCpu", minCpu) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) return node def add_app(ec, command, node, newname = None, sudo = None, video = None, depends = None, forward_x11 = None, env = None): - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") if sudo is not None: ec.set(app, "sudo", sudo) diff --git a/examples/planetlab/select_nodes.py b/examples/planetlab/select_nodes.py index c95ef06d..c8e3da0b 100644 --- a/examples/planetlab/select_nodes.py +++ b/examples/planetlab/select_nodes.py @@ -64,7 +64,7 @@ os = options.os node_count = options.node_count def add_node(ec, pl_slice, pl_ssh_key, pl_user, pl_password, country, os): - node = ec.register_resource("PlanetlabNode") + node = ec.register_resource("planetlab::Node") ec.set(node, "username", pl_slice) ec.set(node, "identity", pl_ssh_key) ec.set(node, "pluser", pl_user) @@ -75,7 +75,7 @@ def add_node(ec, pl_slice, pl_ssh_key, pl_user, pl_password, country, os): if os: ec.set(node, "operatingSystem", os) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) return node diff --git a/examples/planetlab/testing/blacklist.py b/examples/planetlab/testing/blacklist.py index 173417e0..68b01c6c 100644 --- a/examples/planetlab/testing/blacklist.py +++ b/examples/planetlab/testing/blacklist.py @@ -32,25 +32,25 @@ pl_password = os.environ.get("PL_PASS") username = 'inria_sfatest' # nodes -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, "cleanExperiment", 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, "cleanExperiment", True) ec.set(node2, "cleanProcesses", True) -node3 = ec.register_resource("PlanetlabNode") +node3 = ec.register_resource("planetlab::Node") ec.set(node3, "username", username) ec.set(node3, "pluser", pl_user) ec.set(node3, "plpassword", pl_password) -ec.set(node3, "cleanHome", True) +ec.set(node3, "cleanExperiment", True) ec.set(node3, "cleanProcesses", True) # Set the global attribute 'persist_blacklist' @@ -58,20 +58,20 @@ ec.set(node3, "cleanProcesses", True) # use of the blacklist, meaning leaving out of the # provisioning the nodes in that file, and adding the new blacklisted # nodes to the file. -ec.set_global('PlanetlabNode', 'persist_blacklist', True) +ec.set_global("planetlab::Node", "persist_blacklist", True) # apps -app1 = ec.register_resource("LinuxApplication") +app1 = ec.register_resource("linux::Application") command = "ping -c5 google.com" ec.set(app1, "command", command) ec.register_connection(app1, node1) -app2 = ec.register_resource("LinuxApplication") +app2 = ec.register_resource("linux::Application") command = "ping -c5 google.com" ec.set(app2, "command", command) ec.register_connection(app2, node2) -app3 = ec.register_resource("LinuxApplication") +app3 = ec.register_resource("linux::Application") command = "ping -c5 google.com" ec.set(app3, "command", command) ec.register_connection(app3, node3) diff --git a/examples/planetlab/testing/ping_sfa.py b/examples/planetlab/testing/ping_sfa.py index 287e83b4..b6dd2a4b 100644 --- a/examples/planetlab/testing/ping_sfa.py +++ b/examples/planetlab/testing/ping_sfa.py @@ -32,37 +32,37 @@ sfauser = os.environ.get('SFA_USER') sfaPrivateKey = os.environ.get('SFA_PK') # server -node1 = ec.register_resource("PlanetlabSfaNode") -ec.set(node1, "hostname", 'planetlab3.xeno.cl.cam.ac.uk') +node1 = ec.register_resource("planetlab::sfa::Node") +ec.set(node1, "hostname", "planetlab3.xeno.cl.cam.ac.uk") ec.set(node1, "username", username) ec.set(node1, "sfauser", sfauser) ec.set(node1, "sfaPrivateKey", sfaPrivateKey) -ec.set(node1, "cleanHome", True) +ec.set(node1, "cleanExperiment", True) ec.set(node1, "cleanProcesses", True) -node2 = ec.register_resource("PlanetlabSfaNode") +node2 = ec.register_resource("planetlab::sfa::Node") ec.set(node2, "username", username) ec.set(node2, "sfauser", sfauser) ec.set(node2, "sfaPrivateKey", sfaPrivateKey) -ec.set(node2, "cleanHome", True) +ec.set(node2, "cleanExperiment", True) ec.set(node2, "cleanProcesses", True) -node3 = ec.register_resource("PlanetlabSfaNode") +node3 = ec.register_resource("planetlab::sfa::Node") ec.set(node3, "username", username) ec.set(node3, "sfauser", sfauser) ec.set(node3, "sfaPrivateKey", sfaPrivateKey) -app1 = ec.register_resource("LinuxApplication") +app1 = ec.register_resource("linux::Application") command = "ping -c5 google.com" ec.set(app1, "command", command) ec.register_connection(app1, node1) -app2 = ec.register_resource("LinuxApplication") +app2 = ec.register_resource("linux::Application") command = "ping -c5 google.com" ec.set(app2, "command", command) ec.register_connection(app2, node2) -app3 = ec.register_resource("LinuxApplication") +app3 = ec.register_resource("linux::Application") command = "ping -c5 google.com" ec.set(app3, "command", command) ec.register_connection(app3, node3) diff --git a/examples/planetlab/testing/scalability.py b/examples/planetlab/testing/scalability.py index 466960a4..4232035d 100644 --- a/examples/planetlab/testing/scalability.py +++ b/examples/planetlab/testing/scalability.py @@ -27,7 +27,7 @@ import time def create_node(ec, username, pl_user, pl_password, critical=True, hostname=None, country=None, operatingSystem=None, minBandwidth=None, minCpu=None): - node = ec.register_resource("PlanetlabNode") + node = ec.register_resource("planetlab::Node") if username: ec.set(node, "username", username) @@ -48,7 +48,7 @@ def create_node(ec, username, pl_user, pl_password, critical=True, hostname=None ec.set(node, "minCpu", minCpu) ec.set(node, "critical", critical) - #ec.set(node, "cleanHome", True) + #ec.set(node, "cleanExperiment", True) #ec.set(node, "cleanProcesses", True) return node diff --git a/src/nepi/resources/linux/application.py b/src/nepi/resources/linux/application.py index 00cd6c77..861bf1e5 100644 --- a/src/nepi/resources/linux/application.py +++ b/src/nepi/resources/linux/application.py @@ -81,7 +81,7 @@ class LinuxApplication(ResourceManager): """ - _rtype = "LinuxApplication" + _rtype = "linux::Application" _help = "Runs an application on a Linux host with a BASH command " _backend_type = "linux" diff --git a/src/nepi/resources/linux/ccn/ccnapplication.py b/src/nepi/resources/linux/ccn/ccnapplication.py index e56fdee7..e53dfab1 100644 --- a/src/nepi/resources/linux/ccn/ccnapplication.py +++ b/src/nepi/resources/linux/ccn/ccnapplication.py @@ -25,7 +25,7 @@ import os @clsinit_copy class LinuxCCNApplication(LinuxApplication): - _rtype = "LinuxCCNApplication" + _rtype = "linux::CCNApplication" def __init__(self, ec, guid): super(LinuxCCNApplication, self).__init__(ec, guid) diff --git a/src/nepi/resources/linux/ccn/ccncat.py b/src/nepi/resources/linux/ccn/ccncat.py index f0f1beac..50a04c27 100644 --- a/src/nepi/resources/linux/ccn/ccncat.py +++ b/src/nepi/resources/linux/ccn/ccncat.py @@ -25,7 +25,7 @@ import os @clsinit_copy class LinuxCCNCat(LinuxCCNApplication): - _rtype = "LinuxCCNCat" + _rtype = "linux::CCNCat" @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/linux/ccn/ccncontent.py b/src/nepi/resources/linux/ccn/ccncontent.py index f75f0a03..cd3a8a16 100644 --- a/src/nepi/resources/linux/ccn/ccncontent.py +++ b/src/nepi/resources/linux/ccn/ccncontent.py @@ -28,7 +28,7 @@ import os @clsinit_copy class LinuxCCNContent(LinuxApplication): - _rtype = "LinuxCCNContent" + _rtype = "linux::CCNContent" @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/linux/ccn/ccnd.py b/src/nepi/resources/linux/ccn/ccnd.py index cbb751c1..48ed807a 100644 --- a/src/nepi/resources/linux/ccn/ccnd.py +++ b/src/nepi/resources/linux/ccn/ccnd.py @@ -32,7 +32,7 @@ import os @clsinit_copy class LinuxCCND(LinuxApplication): - _rtype = "LinuxCCND" + _rtype = "linux::CCND" @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/linux/ccn/ccnpeek.py b/src/nepi/resources/linux/ccn/ccnpeek.py index 1f1338ce..b76951f4 100644 --- a/src/nepi/resources/linux/ccn/ccnpeek.py +++ b/src/nepi/resources/linux/ccn/ccnpeek.py @@ -25,7 +25,7 @@ import os @clsinit_copy class LinuxCCNPeek(LinuxCCNApplication): - _rtype = "LinuxCCNPeek" + _rtype = "linux::CCNPeek" @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/linux/ccn/ccnping.py b/src/nepi/resources/linux/ccn/ccnping.py index 978ec044..b3be4506 100644 --- a/src/nepi/resources/linux/ccn/ccnping.py +++ b/src/nepi/resources/linux/ccn/ccnping.py @@ -27,7 +27,7 @@ import os @clsinit_copy class LinuxCCNPing(LinuxCCNPingServer): - _rtype = "LinuxCCNPing" + _rtype = "linux::CCNPing" @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/linux/ccn/ccnpingserver.py b/src/nepi/resources/linux/ccn/ccnpingserver.py index cc593737..b7f2992d 100644 --- a/src/nepi/resources/linux/ccn/ccnpingserver.py +++ b/src/nepi/resources/linux/ccn/ccnpingserver.py @@ -27,7 +27,7 @@ import os @clsinit_copy class LinuxCCNPingServer(LinuxCCNApplication): - _rtype = "LinuxCCNPingServer" + _rtype = "linux::CCNPingServer" @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/linux/ccn/ccnpoke.py b/src/nepi/resources/linux/ccn/ccnpoke.py index 3511fdc1..8e451f72 100644 --- a/src/nepi/resources/linux/ccn/ccnpoke.py +++ b/src/nepi/resources/linux/ccn/ccnpoke.py @@ -25,7 +25,7 @@ import os @clsinit_copy class LinuxCCNPoke(LinuxCCNApplication): - _rtype = "LinuxCCNPoke" + _rtype = "linux::CCNPoke" @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/linux/ccn/ccnr.py b/src/nepi/resources/linux/ccn/ccnr.py index 50421da9..7b785d99 100644 --- a/src/nepi/resources/linux/ccn/ccnr.py +++ b/src/nepi/resources/linux/ccn/ccnr.py @@ -29,7 +29,7 @@ import os @clsinit_copy class LinuxCCNR(LinuxApplication): - _rtype = "LinuxCCNR" + _rtype = "linux::CCNR" @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/linux/ccn/fibentry.py b/src/nepi/resources/linux/ccn/fibentry.py index 13d9a1a8..98095474 100644 --- a/src/nepi/resources/linux/ccn/fibentry.py +++ b/src/nepi/resources/linux/ccn/fibentry.py @@ -35,7 +35,7 @@ import time @clsinit_copy class LinuxFIBEntry(LinuxApplication): - _rtype = "LinuxFIBEntry" + _rtype = "linux::FIBEntry" @classmethod def _register_attributes(cls): @@ -187,7 +187,7 @@ class LinuxFIBEntry(LinuxApplication): def configure(self): if self.trace_enabled("ping") and not self.ping: self.info("Configuring PING trace") - ping = self.ec.register_resource("LinuxPing") + ping = self.ec.register_resource("linux::Ping") self.ec.set(ping, "printTimestamp", True) self.ec.set(ping, "target", self.get("host")) self.ec.set(ping, "earlyStart", True) @@ -198,7 +198,7 @@ class LinuxFIBEntry(LinuxApplication): if self.trace_enabled("traceroute") and not self.traceroute: self.info("Configuring TRACEROUTE trace") - traceroute = self.ec.register_resource("LinuxTraceroute") + traceroute = self.ec.register_resource("linux::Traceroute") self.ec.set(traceroute, "printTimestamp", True) self.ec.set(traceroute, "continuous", True) self.ec.set(traceroute, "target", self.get("host")) diff --git a/src/nepi/resources/linux/channel.py b/src/nepi/resources/linux/channel.py index 429051ea..2cd3573e 100644 --- a/src/nepi/resources/linux/channel.py +++ b/src/nepi/resources/linux/channel.py @@ -23,7 +23,7 @@ from nepi.execution.resource import ResourceManager, clsinit_copy, \ @clsinit_copy class LinuxChannel(ResourceManager): - _rtype = "LinuxChannel" + _rtype = "linux::Channel" _help = "Represents a wireless channel on a network of Linux hosts" _backend = "linux" diff --git a/src/nepi/resources/linux/gretunnel.py b/src/nepi/resources/linux/gretunnel.py index 087eb7a8..0d4962fa 100644 --- a/src/nepi/resources/linux/gretunnel.py +++ b/src/nepi/resources/linux/gretunnel.py @@ -30,7 +30,7 @@ import os @clsinit_copy class LinuxGRETunnel(LinuxTunnel): - _rtype = "LinuxGRETunnel" + _rtype = "linux::GRETunnel" _help = "Constructs a tunnel between two Linux endpoints using a UDP connection " _backend = "linux" @@ -72,7 +72,7 @@ class LinuxGRETunnel(LinuxTunnel): m = re.search("(\d+)% packet loss", str(out)) if not m or int(m.groups()[0]) == 100: - msg = " Erroro establishing GRE Tunnel" + msg = " Error establishing GRE Tunnel" self.error(msg, out, err) raise RuntimeError, msg diff --git a/src/nepi/resources/linux/interface.py b/src/nepi/resources/linux/interface.py index 01237d16..af527b9b 100644 --- a/src/nepi/resources/linux/interface.py +++ b/src/nepi/resources/linux/interface.py @@ -36,7 +36,7 @@ import time @clsinit_copy class LinuxInterface(ResourceManager): - _rtype = "LinuxInterface" + _rtype = "linux::Interface" _help = "Controls network devices on Linux hosts through the ifconfig tool" _backend = "linux" diff --git a/src/nepi/resources/linux/mtr.py b/src/nepi/resources/linux/mtr.py index 8c526299..0db9bce9 100644 --- a/src/nepi/resources/linux/mtr.py +++ b/src/nepi/resources/linux/mtr.py @@ -26,7 +26,7 @@ import os @clsinit_copy class LinuxMtr(LinuxApplication): - _rtype = "LinuxMtr" + _rtype = "linux::Mtr" @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/linux/node.py b/src/nepi/resources/linux/node.py index 96c9acd4..7092a672 100644 --- a/src/nepi/resources/linux/node.py +++ b/src/nepi/resources/linux/node.py @@ -142,7 +142,7 @@ class LinuxNode(ResourceManager): source compilation, file download, etc) """ - _rtype = "LinuxNode" + _rtype = "linux::Node" _help = "Controls Linux host machines ( either localhost or a host " \ "that can be accessed using a SSH key)" _backend_type = "linux" diff --git a/src/nepi/resources/linux/nping.py b/src/nepi/resources/linux/nping.py index 544b4d9d..f0269af3 100644 --- a/src/nepi/resources/linux/nping.py +++ b/src/nepi/resources/linux/nping.py @@ -26,7 +26,7 @@ import os @clsinit_copy class LinuxNPing(LinuxApplication): - _rtype = "LinuxNPing" + _rtype = "linux::NPing" @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/linux/ns3/ccn/ns3ccncatdceapplication.py b/src/nepi/resources/linux/ns3/ccn/ns3ccncatdceapplication.py index 9904fe4a..2d1c2f5b 100644 --- a/src/nepi/resources/linux/ns3/ccn/ns3ccncatdceapplication.py +++ b/src/nepi/resources/linux/ns3/ccn/ns3ccncatdceapplication.py @@ -23,7 +23,7 @@ from nepi.resources.linux.ns3.ccn.ns3ccndceapplication import LinuxNS3CCNDceAppl @clsinit_copy class LinuxNS3DceCCNCat(LinuxNS3CCNDceApplication): - _rtype = "ns3::LinuxDceCCNCat" + _rtype = "linux::ns3::dce::CCNCat" @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/linux/ns3/ccn/ns3ccndceapplication.py b/src/nepi/resources/linux/ns3/ccn/ns3ccndceapplication.py index e72239a4..efb5f967 100644 --- a/src/nepi/resources/linux/ns3/ccn/ns3ccndceapplication.py +++ b/src/nepi/resources/linux/ns3/ccn/ns3ccndceapplication.py @@ -23,7 +23,7 @@ from nepi.resources.ns3.ns3ccndceapplication import NS3BaseCCNDceApplication @clsinit_copy class LinuxNS3CCNDceApplication(NS3BaseCCNDceApplication): - _rtype = "ns3::LinuxCCNDceApplication" + _rtype = "linux::ns3::dce::CCNApplication" @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/linux/ns3/ccn/ns3ccnddceapplication.py b/src/nepi/resources/linux/ns3/ccn/ns3ccnddceapplication.py index a42bb5d9..43f929b9 100644 --- a/src/nepi/resources/linux/ns3/ccn/ns3ccnddceapplication.py +++ b/src/nepi/resources/linux/ns3/ccn/ns3ccnddceapplication.py @@ -25,7 +25,7 @@ import os @clsinit_copy class LinuxNS3DceCCND(LinuxNS3CCNDceApplication): - _rtype = "ns3::LinuxDceCCND" + _rtype = "linux::ns3::dce::CCND" @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/linux/ns3/ccn/ns3ccnpeekdceapplication.py b/src/nepi/resources/linux/ns3/ccn/ns3ccnpeekdceapplication.py index feb17604..1cd7ec66 100644 --- a/src/nepi/resources/linux/ns3/ccn/ns3ccnpeekdceapplication.py +++ b/src/nepi/resources/linux/ns3/ccn/ns3ccnpeekdceapplication.py @@ -23,7 +23,7 @@ from nepi.resources.linux.ns3.ccn.ns3ccndceapplication import LinuxNS3CCNDceAppl @clsinit_copy class LinuxNS3DceCCNPeek(LinuxNS3CCNDceApplication): - _rtype = "ns3::LinuxDceCCNPeek" + _rtype = "linux::ns3::dce::CCNPeek" @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/linux/ns3/ccn/ns3ccnpokedceapplication.py b/src/nepi/resources/linux/ns3/ccn/ns3ccnpokedceapplication.py index e364c513..3087b06f 100644 --- a/src/nepi/resources/linux/ns3/ccn/ns3ccnpokedceapplication.py +++ b/src/nepi/resources/linux/ns3/ccn/ns3ccnpokedceapplication.py @@ -27,7 +27,7 @@ import tempfile @clsinit_copy class LinuxNS3DceCCNPoke(LinuxNS3CCNDceApplication): - _rtype = "ns3::LinuxDceCCNPoke" + _rtype = "linux::ns3::dce::CCNPoke" @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/linux/ns3/ccn/ns3ccnrdceapplication.py b/src/nepi/resources/linux/ns3/ccn/ns3ccnrdceapplication.py index a3719ba0..37239bce 100644 --- a/src/nepi/resources/linux/ns3/ccn/ns3ccnrdceapplication.py +++ b/src/nepi/resources/linux/ns3/ccn/ns3ccnrdceapplication.py @@ -23,7 +23,7 @@ from nepi.resources.linux.ns3.ccn.ns3ccndceapplication import LinuxNS3CCNDceAppl @clsinit_copy class LinuxNS3DceCCNR(LinuxNS3CCNDceApplication): - _rtype = "ns3::LinuxDceCCNR" + _rtype = "linux::ns3::dce::CCNR" @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/linux/ns3/ccn/ns3fibentrydceapplication.py b/src/nepi/resources/linux/ns3/ccn/ns3fibentrydceapplication.py index a9bae5cf..d9cbdc94 100644 --- a/src/nepi/resources/linux/ns3/ccn/ns3fibentrydceapplication.py +++ b/src/nepi/resources/linux/ns3/ccn/ns3fibentrydceapplication.py @@ -23,7 +23,7 @@ from nepi.resources.linux.ns3.ccn.ns3ccndceapplication import LinuxNS3CCNDceAppl @clsinit_copy class LinuxNS3DceFIBEntry(LinuxNS3CCNDceApplication): - _rtype = "ns3::LinuxDceFIBEntry" + _rtype = "linux::ns3::dce::FIBEntry" @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/linux/ns3/ns3dceapplication.py b/src/nepi/resources/linux/ns3/ns3dceapplication.py index 9ad3692e..eb11291b 100644 --- a/src/nepi/resources/linux/ns3/ns3dceapplication.py +++ b/src/nepi/resources/linux/ns3/ns3dceapplication.py @@ -23,7 +23,7 @@ from nepi.resources.ns3.ns3dceapplication import NS3BaseDceApplication @clsinit_copy class LinuxNS3DceApplication(NS3BaseDceApplication): - _rtype = "ns3::LinuxDceApplication" + _rtype = "linux::ns3::dce::Application" @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/linux/ns3/ns3pingdceapplication.py b/src/nepi/resources/linux/ns3/ns3pingdceapplication.py index 99003ed6..526619bf 100644 --- a/src/nepi/resources/linux/ns3/ns3pingdceapplication.py +++ b/src/nepi/resources/linux/ns3/ns3pingdceapplication.py @@ -23,7 +23,7 @@ from nepi.resources.linux.ns3.ns3dceapplication import LinuxNS3DceApplication @clsinit_copy class LinuxDcePing(LinuxNS3DceApplication): - _rtype = "ns3::LinuxDcePing" + _rtype = "linux::ns3::dce::Ping" @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/linux/ns3/ns3simulation.py b/src/nepi/resources/linux/ns3/ns3simulation.py index 04671bbb..51da3a29 100644 --- a/src/nepi/resources/linux/ns3/ns3simulation.py +++ b/src/nepi/resources/linux/ns3/ns3simulation.py @@ -37,7 +37,7 @@ import threading @clsinit_copy class LinuxNS3Simulation(LinuxApplication, NS3Simulation): - _rtype = "LinuxNS3Simulation" + _rtype = "linux::ns3::Simulation" @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/linux/ping.py b/src/nepi/resources/linux/ping.py index 68098cd8..544e66b8 100644 --- a/src/nepi/resources/linux/ping.py +++ b/src/nepi/resources/linux/ping.py @@ -26,7 +26,7 @@ import os @clsinit_copy class LinuxPing(LinuxApplication): - _rtype = "LinuxPing" + _rtype = "linux::Ping" @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/linux/tap.py b/src/nepi/resources/linux/tap.py index 6477bd3d..4f5492c7 100644 --- a/src/nepi/resources/linux/tap.py +++ b/src/nepi/resources/linux/tap.py @@ -30,7 +30,7 @@ PYTHON_VSYS_VERSION = "1.0" @clsinit_copy class LinuxTap(LinuxApplication): - _rtype = "LinuxTap" + _rtype = "linux::Tap" _help = "Creates a TAP device on a Linux host" _backend = "linux" diff --git a/src/nepi/resources/linux/tcpdump.py b/src/nepi/resources/linux/tcpdump.py index 761c03e4..589f9de7 100644 --- a/src/nepi/resources/linux/tcpdump.py +++ b/src/nepi/resources/linux/tcpdump.py @@ -26,7 +26,7 @@ import os @clsinit_copy class LinuxTcpdump(LinuxApplication): - _rtype = "LinuxTcpdump" + _rtype = "linux::Tcpdump" @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/linux/traceroute.py b/src/nepi/resources/linux/traceroute.py index d5ca818a..564c5d48 100644 --- a/src/nepi/resources/linux/traceroute.py +++ b/src/nepi/resources/linux/traceroute.py @@ -27,7 +27,7 @@ import socket @clsinit_copy class LinuxTraceroute(LinuxApplication): - _rtype = "LinuxTraceroute" + _rtype = "linux::Traceroute" @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/linux/tun.py b/src/nepi/resources/linux/tun.py index 5872f8e0..96317e72 100644 --- a/src/nepi/resources/linux/tun.py +++ b/src/nepi/resources/linux/tun.py @@ -24,7 +24,7 @@ import os @clsinit_copy class LinuxTun(LinuxTap): - _rtype = "LinuxTun" + _rtype = "linux::Tun" _help = "Creates a TUN device on a Linux host" _backend = "linux" diff --git a/src/nepi/resources/linux/tunnel.py b/src/nepi/resources/linux/tunnel.py index a8434423..961d50c4 100644 --- a/src/nepi/resources/linux/tunnel.py +++ b/src/nepi/resources/linux/tunnel.py @@ -28,7 +28,7 @@ state_check_delay = 0.5 @clsinit_copy class LinuxTunnel(LinuxApplication): - _rtype = "abstract::LinuxTunnel" + _rtype = "abstract::linux::Tunnel" _help = "Constructs a tunnel between two Linux endpoints" _backend = "linux" diff --git a/src/nepi/resources/linux/udptest.py b/src/nepi/resources/linux/udptest.py index 857ea374..cbd5f404 100644 --- a/src/nepi/resources/linux/udptest.py +++ b/src/nepi/resources/linux/udptest.py @@ -31,7 +31,7 @@ class LinuxUdpTest(LinuxApplication): http://hpcbench.sourceforge.net/ """ - _rtype = "LinuxUdpTest" + _rtype = "linux::UdpTest" @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/linux/udptunnel.py b/src/nepi/resources/linux/udptunnel.py index 258fbbbc..628f7b59 100644 --- a/src/nepi/resources/linux/udptunnel.py +++ b/src/nepi/resources/linux/udptunnel.py @@ -29,7 +29,7 @@ import time @clsinit_copy class LinuxUdpTunnel(LinuxTunnel): - _rtype = "LinuxUdpTunnel" + _rtype = "linux::UdpTunnel" _help = "Constructs a tunnel between two Linux endpoints using a UDP connection " _backend = "linux" diff --git a/src/nepi/resources/ns3/classes/dce_application.py b/src/nepi/resources/ns3/classes/dce_application.py deleted file mode 100644 index 71fd60d6..00000000 --- a/src/nepi/resources/ns3/classes/dce_application.py +++ /dev/null @@ -1,65 +0,0 @@ -# -# NEPI, a framework to manage network experiments -# Copyright (C) 2014 INRIA -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# - -from nepi.execution.attribute import Attribute, Flags, Types -from nepi.execution.trace import Trace, TraceAttr -from nepi.execution.resource import ResourceManager, clsinit_copy, \ - ResourceState -from nepi.resources.ns3.ns3dceapplication import NS3BaseDceApplication - -@clsinit_copy -class NS3DceApplication(NS3BaseDceApplication): - _rtype = "ns3::DceApplication" - - @classmethod - def _register_attributes(cls): - - attr_starttime = Attribute("StartTime", - "Time at which the application will start", - type = Types.String, - default = "+0.0ns", - allowed = None, - range = None, - flags = Flags.Reserved | Flags.Construct) - - cls._register_attribute(attr_starttime) - - attr_stoptime = Attribute("StopTime", - "Time at which the application will stop", - type = Types.String, - default = "+0.0ns", - allowed = None, - range = None, - flags = Flags.Reserved | Flags.Construct) - - cls._register_attribute(attr_stoptime) - - - - @classmethod - def _register_traces(cls): - - processstarted = Trace("ProcessStarted", "notify when the dce is started") - - cls._register_trace(processstarted) - - - - def __init__(self, ec, guid): - super(NS3DceApplication, self).__init__(ec, guid) - self._home = "ns3-dce-application-%s" % self.guid diff --git a/src/nepi/resources/omf/application.py b/src/nepi/resources/omf/application.py index 0c4bc469..c48298bd 100644 --- a/src/nepi/resources/omf/application.py +++ b/src/nepi/resources/omf/application.py @@ -42,8 +42,8 @@ class OMFApplication(OMFResource): :type guid: int """ - _rtype = "OMFApplication" - _authorized_connections = ["OMFNode", "WilabtSfaNode"] + _rtype = "omf::Application" + _authorized_connections = ["omf::Node", "wilabt::sfa::Node"] @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/omf/channel.py b/src/nepi/resources/omf/channel.py index e3e42cd6..05be6cc0 100644 --- a/src/nepi/resources/omf/channel.py +++ b/src/nepi/resources/omf/channel.py @@ -40,8 +40,8 @@ class OMFChannel(OMFResource): :type creds: dict """ - _rtype = "OMFChannel" - _authorized_connections = ["OMFWifiInterface", "OMFNode"] + _rtype = "omf::Channel" + _authorized_connections = ["omf::WifiInterface", "omf::Node"] ChannelToFreq = dict({ "1" : "2412", @@ -126,7 +126,7 @@ class OMFChannel(OMFResource): rm_iface = self.ec.get_resource(elt) for conn in rm_iface.connections: rm_node = self.ec.get_resource(conn) - if rm_node.get_rtype() == "OMFNode" and rm_node.get('hostname'): + if rm_node.get_rtype() == "omf::Node" and rm_node.get('hostname'): if rm_iface.state < ResourceState.PROVISIONED or \ rm_node.state < ResourceState.READY: return "reschedule" diff --git a/src/nepi/resources/omf/interface.py b/src/nepi/resources/omf/interface.py index 472672c1..d7142d1b 100644 --- a/src/nepi/resources/omf/interface.py +++ b/src/nepi/resources/omf/interface.py @@ -40,8 +40,8 @@ class OMFWifiInterface(OMFResource): :type guid: int """ - _rtype = "OMFWifiInterface" - _authorized_connections = ["OMFNode" , "OMFChannel", "WilabtSfaNode"] + _rtype = "omf::WifiInterface" + _authorized_connections = ["omf::Node" , "omf::Channel", "wilabt::sfa::Node"] @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/omf/node.py b/src/nepi/resources/omf/node.py index 048da190..cfd0e517 100644 --- a/src/nepi/resources/omf/node.py +++ b/src/nepi/resources/omf/node.py @@ -43,8 +43,8 @@ class OMFNode(OMFResource): :type creds: dict """ - _rtype = "OMFNode" - _authorized_connections = ["OMFApplication" , "OMFWifiInterface"] + _rtype = "omf::Node" + _authorized_connections = ["omf::Application" , "omf::WifiInterface"] @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/omf/omf_resource.py b/src/nepi/resources/omf/omf_resource.py index 6f60b09f..9b760e14 100644 --- a/src/nepi/resources/omf/omf_resource.py +++ b/src/nepi/resources/omf/omf_resource.py @@ -48,7 +48,7 @@ class OMFResource(ResourceManager): Generic resource gathering XMPP credential information and common methods for OMF nodes, channels, applications, etc. """ - _rtype = "OMFResource" + _rtype = "abstract::omf::Resource" @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/omf/wilabt_node.py b/src/nepi/resources/omf/wilabt_node.py index bc24906e..c29e8538 100644 --- a/src/nepi/resources/omf/wilabt_node.py +++ b/src/nepi/resources/omf/wilabt_node.py @@ -35,7 +35,7 @@ import datetime @clsinit_copy class WilabtSfaNode(OMFNode): - _rtype = "WilabtSfaNode" + _rtype = "wilabt::sfa::Node" _help = "Controls a Wilabt host accessible using a SSH key " \ "and provisioned using SFA" _backend = "omf" diff --git a/src/nepi/resources/planetlab/node.py b/src/nepi/resources/planetlab/node.py index dc70df56..01b8a859 100644 --- a/src/nepi/resources/planetlab/node.py +++ b/src/nepi/resources/planetlab/node.py @@ -37,7 +37,7 @@ import weakref @clsinit_copy class PlanetlabNode(LinuxNode): - _rtype = "PlanetlabNode" + _rtype = "planetlab::Node" _help = "Controls a PlanetLab host accessible using a SSH key " \ "associated to a PlanetLab user account" _backend = "planetlab" diff --git a/src/nepi/resources/planetlab/openvswitch/ovs.py b/src/nepi/resources/planetlab/openvswitch/ovs.py index 84e45e14..178b5013 100644 --- a/src/nepi/resources/planetlab/openvswitch/ovs.py +++ b/src/nepi/resources/planetlab/openvswitch/ovs.py @@ -39,11 +39,11 @@ class OVSSwitch(LinuxApplication): """ - _rtype = "OVSSwitch" + _rtype = "planetlab::OVSSwitch" _help = "Runs an OpenVSwitch on a PlanetLab host" _backend = "planetlab" - _authorized_connections = ["PlanetlabNode", "OVSPort", "LinuxNode"] + _authorized_connections = ["planetlab::Node", "planetla::OVSPort", "linux::Node"] @classmethod def _register_attributes(cls): diff --git a/src/nepi/resources/planetlab/openvswitch/ovsport.py b/src/nepi/resources/planetlab/openvswitch/ovsport.py index 107c809d..9bdc4153 100644 --- a/src/nepi/resources/planetlab/openvswitch/ovsport.py +++ b/src/nepi/resources/planetlab/openvswitch/ovsport.py @@ -40,11 +40,11 @@ class OVSPort(LinuxApplication): """ - _rtype = "OVSPort" + _rtype = "planetlab::OVSPort" _help = "Runs an OpenVSwitch on a PlanetLab host" _backend = "planetlab" - _authorized_connections = ["OVSSwitch", "LinuxUdpTunnel", "LinuxTunnel"] + _authorized_connections = ["planetlab::OVSSwitch", "linux::UdpTunnel", "linux::Tunnel"] @classmethod def _register_attributes(cls): @@ -183,8 +183,8 @@ class OVSPort(LinuxApplication): self.info("The number of the %s is %s" % (self.get('port_name'), self.port_number)) - if remote_endpoint.is_rm_instance("PlanetlabTap"): - self._vroute = self.ec.register_resource("PlanetlabVroute") + if remote_endpoint.is_rm_instance("planetlab::Tap"): + self._vroute = self.ec.register_resource("planetlab::Vroute") self.ec.set(self._vroute, "action", "add") self.ec.set(self._vroute, "network", self.get("network")) diff --git a/src/nepi/resources/planetlab/sfa_node.py b/src/nepi/resources/planetlab/sfa_node.py index f87831c1..b2d30725 100644 --- a/src/nepi/resources/planetlab/sfa_node.py +++ b/src/nepi/resources/planetlab/sfa_node.py @@ -36,7 +36,7 @@ import datetime @clsinit_copy class PlanetlabSfaNode(LinuxNode): - _rtype = "PlanetlabSfaNode" + _rtype = "planetlab::sfa::Node" _help = "Controls a PlanetLab host accessible using a SSH key " \ "and provisioned using SFA" _backend = "planetlab" diff --git a/src/nepi/resources/planetlab/tap.py b/src/nepi/resources/planetlab/tap.py index 0002c50c..e59e94a5 100644 --- a/src/nepi/resources/planetlab/tap.py +++ b/src/nepi/resources/planetlab/tap.py @@ -30,7 +30,7 @@ PYTHON_VSYS_VERSION = "1.0" @clsinit_copy class PlanetlabTap(LinuxApplication): - _rtype = "PlanetlabTap" + _rtype = "planetlab::Tap" _help = "Creates a TAP device on a PlanetLab host" _backend = "planetlab" diff --git a/src/nepi/resources/planetlab/tun.py b/src/nepi/resources/planetlab/tun.py index cdd3a3b5..6b4ff610 100644 --- a/src/nepi/resources/planetlab/tun.py +++ b/src/nepi/resources/planetlab/tun.py @@ -24,7 +24,7 @@ import os @clsinit_copy class PlanetlabTun(PlanetlabTap): - _rtype = "PlanetlabTun" + _rtype = "planetlab::Tun" _help = "Creates a TUN device on a PlanetLab host" _backend = "planetlab" diff --git a/src/nepi/resources/planetlab/vroute.py b/src/nepi/resources/planetlab/vroute.py index 6b34f94c..3c10d78d 100644 --- a/src/nepi/resources/planetlab/vroute.py +++ b/src/nepi/resources/planetlab/vroute.py @@ -31,7 +31,7 @@ PYTHON_VSYS_VERSION = "1.0" @clsinit_copy class PlanetlabVroute(LinuxApplication): - _rtype = "PlanetlabVroute" + _rtype = "planetlab::Vroute" _help = "Creates a Vroute on a PlanetLab host" _backend = "planetlab" diff --git a/test/resources/linux/application.py b/test/resources/linux/application.py index 0a76dcce..b6ccb6f1 100755 --- a/test/resources/linux/application.py +++ b/test/resources/linux/application.py @@ -45,13 +45,13 @@ class LinuxApplicationTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "test-stdout") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") ec.set(node, "hostname", host) ec.set(node, "username", user) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") cmd = "echo 'HOLA'" ec.set(app, "command", cmd) ec.register_connection(app, node) @@ -73,13 +73,13 @@ class LinuxApplicationTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "test-ping") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") ec.set(node, "hostname", host) ec.set(node, "username", user) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") cmd = "ping -c5 %s" % self.target ec.set(app, "command", cmd) @@ -111,10 +111,10 @@ class LinuxApplicationTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "tests-code") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") ec.set(node, "hostname", host) ec.set(node, "username", user) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) prog = """#include @@ -129,7 +129,7 @@ main (void) cmd = "${RUN_HOME}/hello" build = "gcc -Wall -x c ${APP_HOME}/code -o hello" - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") ec.set(app, "command", cmd) ec.set(app, "code", prog) ec.set(app, "depends", "gcc") @@ -150,15 +150,15 @@ main (void) ec = ExperimentController(exp_id="test-concurrency") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") ec.set(node, "hostname", host) ec.set(node, "username", user) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) apps = list() for i in xrange(50): - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") cmd = "ping -c5 %s" % self.target ec.set(app, "command", cmd) ec.register_connection(app, node) @@ -194,19 +194,19 @@ main (void) ec = ExperimentController(exp_id="test-condition") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") ec.set(node, "hostname", host) ec.set(node, "username", user) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) - server = ec.register_resource("LinuxApplication") + server = ec.register_resource("linux::Application") cmd = "echo 'HOLA' | nc -l 3333" ec.set(server, "command", cmd) ec.set(server, "depends", depends) ec.register_connection(server, node) - client = ec.register_resource("LinuxApplication") + client = ec.register_resource("linux::Application") cmd = "nc 127.0.0.1 3333" ec.set(client, "command", cmd) ec.register_connection(client, node) @@ -233,16 +233,16 @@ main (void) ec = ExperimentController(exp_id="test-http-sources") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") ec.set(node, "hostname", host) ec.set(node, "username", user) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) sources = "http://yans.pl.sophia.inria.fr/code/nef/archive/tip.tar.gz;" \ "http://yans.pl.sophia.inria.fr/code/nef/raw-file/8ace577d4079/src/nef/images/menu/connect.png" - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") ec.set(app, "sources", sources) command = "ls ${SRC}" @@ -276,13 +276,13 @@ main (void) ec = ExperimentController(exp_id="test-xterm") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") ec.set(node, "hostname", host) ec.set(node, "username", user) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") ec.set(app, "command", "xterm") ec.set(app, "depends", "xterm") ec.set(app, "forwardX11", True) @@ -310,13 +310,13 @@ main (void) ec = ExperimentController(exp_id="test-copyfile") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") ec.set(node, "hostname", host) ec.set(node, "username", user) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") ec.set(app, "command", "ls ${SRC}") ec.set(app, "sources", "%s;%s" % (dirpath, f1.name)) ec.register_connection(app, node) diff --git a/test/resources/linux/ccn/ccncat.py b/test/resources/linux/ccn/ccncat.py index 163e94dd..bce73432 100755 --- a/test/resources/linux/ccn/ccncat.py +++ b/test/resources/linux/ccn/ccncat.py @@ -40,14 +40,14 @@ class LinuxCCNPeekTestCase(unittest.TestCase): def test_ccnpeek(self): ec = ExperimentController(exp_id = "test-linux-ccncat") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") ec.set(node, "hostname", self.fedora_host) ec.set(node, "username", self.fedora_user) ec.set(node, "identity", self.fedora_identity) #ec.set(node, "cleanProcesses", True) - #ec.set(node, "cleanHome", True) + #ec.set(node, "cleanExperiment", True) - ccnd = ec.register_resource("LinuxCCND") + ccnd = ec.register_resource("linux::CCND") ec.register_connection(ccnd, node) # REPO file is in test/resources/linux/ns3/ccn/repoFile1 @@ -56,11 +56,11 @@ class LinuxCCNPeekTestCase(unittest.TestCase): "..", "ns3", "ccn", "repoFile1") ## Register a repository in node 1 - ccnr = ec.register_resource("LinuxCCNR") + ccnr = ec.register_resource("linux::CCNR") ec.set(ccnr, "repoFile1", repofile) ec.register_connection(ccnr, ccnd) - ccncat = ec.register_resource("LinuxCCNCat") + ccncat = ec.register_resource("linux::CCNCat") ec.set(ccncat, "contentName", "ccnx:/test/bunny.ts") ec.register_connection(ccncat, ccnd) diff --git a/test/resources/linux/ccn/ccnpeek.py b/test/resources/linux/ccn/ccnpeek.py index ec6f4f84..356751cb 100755 --- a/test/resources/linux/ccn/ccnpeek.py +++ b/test/resources/linux/ccn/ccnpeek.py @@ -40,21 +40,21 @@ class LinuxCCNPeekTestCase(unittest.TestCase): def test_ccnpeek(self): ec = ExperimentController(exp_id = "test-linux-ccnpeek") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") ec.set(node, "hostname", self.fedora_host) ec.set(node, "username", self.fedora_user) ec.set(node, "identity", self.fedora_identity) #ec.set(node, "cleanProcesses", True) - #ec.set(node, "cleanHome", True) + #ec.set(node, "cleanExperiment", True) - ccnd = ec.register_resource("LinuxCCND") + ccnd = ec.register_resource("linux::CCND") ec.register_connection(ccnd, node) - peek = ec.register_resource("LinuxCCNPeek") + peek = ec.register_resource("linux::CCNPeek") ec.set(peek, "contentName", "ccnx:/chunk0") ec.register_connection(peek, ccnd) - poke = ec.register_resource("LinuxCCNPoke") + poke = ec.register_resource("linux::CCNPoke") ec.set(poke, "contentName", "ccnx:/chunk0") ec.set(poke, "content", "DATA") ec.register_connection(poke, ccnd) diff --git a/test/resources/linux/ccn/ccnping.py b/test/resources/linux/ccn/ccnping.py index 2deef2d1..6fdf0051 100755 --- a/test/resources/linux/ccn/ccnping.py +++ b/test/resources/linux/ccn/ccnping.py @@ -41,37 +41,37 @@ class LinuxCCNPingTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "test-ccn-ping-count") - node1 = ec.register_resource("LinuxNode") + node1 = ec.register_resource("linux::Node") ec.set(node1, "hostname", host1) ec.set(node1, "username", user1) - ec.set(node1, "cleanHome", True) + ec.set(node1, "cleanExperiment", True) ec.set(node1, "cleanProcesses", True) - ccnd1 = ec.register_resource("LinuxCCND") + ccnd1 = ec.register_resource("linux::CCND") ec.register_connection(ccnd1, node1) - entry1 = ec.register_resource("LinuxFIBEntry") + entry1 = ec.register_resource("linux::FIBEntry") ec.set(entry1, "host", host2) ec.register_connection(entry1, ccnd1) - server = ec.register_resource("LinuxCCNPingServer") + server = ec.register_resource("linux::CCNPingServer") ec.set(server, "prefix", "ccnx:/test") ec.register_connection(server, ccnd1) - node2 = ec.register_resource("LinuxNode") + node2 = ec.register_resource("linux::Node") ec.set(node2, "hostname", host2) ec.set(node2, "username", user2) - ec.set(node2, "cleanHome", True) + ec.set(node2, "cleanExperiment", True) ec.set(node2, "cleanProcesses", True) - ccnd2 = ec.register_resource("LinuxCCND") + ccnd2 = ec.register_resource("linux::CCND") ec.register_connection(ccnd2, node2) - entry2 = ec.register_resource("LinuxFIBEntry") + entry2 = ec.register_resource("linux::FIBEntry") ec.set(entry2, "host", host1) ec.register_connection(entry2, ccnd2) - client = ec.register_resource("LinuxCCNPing") + client = ec.register_resource("linux::CCNPing") ec.set(client, "c", 15) ec.set(client, "prefix", "ccnx:/test") ec.register_connection(client, ccnd2) diff --git a/test/resources/linux/ccn/fibentry.py b/test/resources/linux/ccn/fibentry.py index c6b219ce..c47c8740 100755 --- a/test/resources/linux/ccn/fibentry.py +++ b/test/resources/linux/ccn/fibentry.py @@ -41,31 +41,31 @@ class LinuxFIBEntryTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "test-fib-traces") - node1 = ec.register_resource("LinuxNode") + node1 = ec.register_resource("linux::Node") ec.set(node1, "hostname", host) ec.set(node1, "username", user) - #ec.set(node1, "cleanHome", True) + ec.set(node1, "cleanExperiment", True) ec.set(node1, "cleanProcesses", True) - ccnd1 = ec.register_resource("LinuxCCND") + ccnd1 = ec.register_resource("linux::CCND") ec.register_connection(ccnd1, node1) - entry1 = ec.register_resource("LinuxFIBEntry") + entry1 = ec.register_resource("linux::FIBEntry") ec.set(entry1, "host", self.target) ec.enable_trace(entry1, "ping") ec.enable_trace(entry1, "mtr") ec.register_connection(entry1, ccnd1) - node2 = ec.register_resource("LinuxNode") + node2 = ec.register_resource("linux::Node") ec.set(node2, "hostname", self.target) ec.set(node2, "username", self.fedora_user) - ec.set(node2, "cleanHome", True) + ec.set(node2, "cleanExperiment", True) ec.set(node2, "cleanProcesses", True) - ccnd2 = ec.register_resource("LinuxCCND") + ccnd2 = ec.register_resource("linux::CCND") ec.register_connection(ccnd2, node2) - entry2 = ec.register_resource("LinuxFIBEntry") + entry2 = ec.register_resource("linux::FIBEntry") ec.set(entry2, "host", host) ec.register_connection(entry2, ccnd2) diff --git a/test/resources/linux/gretunnel.py b/test/resources/linux/gretunnel.py index 6317ae03..0d55fc7e 100755 --- a/test/resources/linux/gretunnel.py +++ b/test/resources/linux/gretunnel.py @@ -43,35 +43,35 @@ class LinuxGRETunnelTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "test-tap-gre-tunnel") - node1 = ec.register_resource("LinuxNode") + node1 = ec.register_resource("linux::Node") ec.set(node1, "hostname", host1) ec.set(node1, "username", user1) ec.set(node1, "identity", identity1) - ec.set(node1, "cleanHome", True) + ec.set(node1, "cleanExperiment", True) ec.set(node1, "cleanProcesses", True) - tap1 = ec.register_resource("LinuxTap") + tap1 = ec.register_resource("linux::Tap") ec.set(tap1, "endpoint_ip", "%s.1" % self.netblock) ec.set(tap1, "endpoint_prefix", 32) ec.register_connection(tap1, node1) - node2 = ec.register_resource("LinuxNode") + node2 = ec.register_resource("linux::Node") ec.set(node2, "hostname", host2) ec.set(node2, "username", user2) ec.set(node2, "identity", identity2) - ec.set(node2, "cleanHome", True) + ec.set(node2, "cleanExperiment", True) ec.set(node2, "cleanProcesses", True) - tap2 = ec.register_resource("LinuxTap") + tap2 = ec.register_resource("linux::Tap") ec.set(tap2, "endpoint_ip", "%s.2" % self.netblock) ec.set(tap2, "endpoint_prefix", 32) ec.register_connection(tap2, node2) - gretun = ec.register_resource("LinuxGRETunnel") + gretun = ec.register_resource("linux::GRETunnel") ec.register_connection(tap1, gretun) ec.register_connection(tap2, gretun) - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") cmd = "ping -c3 %s.2" % self.netblock ec.set(app, "command", cmd) ec.register_connection(app, node1) @@ -98,35 +98,35 @@ class LinuxGRETunnelTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "test-tun-gre-tunnel") - node1 = ec.register_resource("LinuxNode") + node1 = ec.register_resource("linux::Node") ec.set(node1, "hostname", host1) ec.set(node1, "username", user1) ec.set(node1, "identity", identity1) - ec.set(node1, "cleanHome", True) + ec.set(node1, "cleanExperiment", True) ec.set(node1, "cleanProcesses", True) - tun1 = ec.register_resource("LinuxTun") + tun1 = ec.register_resource("linux::Tun") ec.set(tun1, "endpoint_ip", "%s.1" % self.netblock) ec.set(tun1, "endpoint_prefix", 32) ec.register_connection(tun1, node1) - node2 = ec.register_resource("LinuxNode") + node2 = ec.register_resource("linux::Node") ec.set(node2, "hostname", host2) ec.set(node2, "username", user2) ec.set(node2, "identity", identity2) - ec.set(node2, "cleanHome", True) + ec.set(node2, "cleanExperiment", True) ec.set(node2, "cleanProcesses", True) - tun2 = ec.register_resource("LinuxTun") + tun2 = ec.register_resource("linux::Tun") ec.set(tun2, "endpoint_ip", "%s.2" % self.netblock) ec.set(tun2, "endpoint_prefix", 32) ec.register_connection(tun2, node2) - udptun = ec.register_resource("LinuxGRETunnel") + udptun = ec.register_resource("linux::GRETunnel") ec.register_connection(tun1, udptun) ec.register_connection(tun2, udptun) - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") cmd = "ping -c3 %s.2" % self.netblock ec.set(app, "command", cmd) ec.register_connection(app, node1) diff --git a/test/resources/linux/interface.py b/test/resources/linux/interface.py index 379f92e7..4fe2883a 100755 --- a/test/resources/linux/interface.py +++ b/test/resources/linux/interface.py @@ -50,12 +50,12 @@ class LinuxInterfaceTestCase(unittest.TestCase): ec = ExperimentController() - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") ec.set(node, "hostname", host) ec.set(node, "username", user) - iface = ec.register_resource("LinuxInterface") - chan = ec.register_resource("LinuxChannel") + iface = ec.register_resource("linux::Interface") + chan = ec.register_resource("linux::Channel") ec.register_connection(iface, node) ec.register_connection(iface, chan) diff --git a/test/resources/linux/mtr.py b/test/resources/linux/mtr.py index a34068d8..79d0ce5c 100755 --- a/test/resources/linux/mtr.py +++ b/test/resources/linux/mtr.py @@ -41,13 +41,13 @@ class LinuxMtrTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "test-nodns") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") ec.set(node, "hostname", host) ec.set(node, "username", user) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) - app = ec.register_resource("LinuxMtr") + app = ec.register_resource("linux::Mtr") ec.set(app, "noDns", False) ec.set(app, "target", self.target) ec.register_connection(app, node) diff --git a/test/resources/linux/multirun.py b/test/resources/linux/multirun.py index dbee7df8..ad486e26 100755 --- a/test/resources/linux/multirun.py +++ b/test/resources/linux/multirun.py @@ -52,13 +52,13 @@ class LinuxMultiRunTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "test-condition-multirun", local_dir = dirpath) - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") ec.set(node, "hostname", host) ec.set(node, "username", user) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) - ping = ec.register_resource("LinuxApplication") + ping = ec.register_resource("linux::Application") ec.set(ping, "command", "ping -c10 nepi.inria.fr") ec.register_connection(ping, node) diff --git a/test/resources/linux/nping.py b/test/resources/linux/nping.py index 19c4ef44..5130a759 100755 --- a/test/resources/linux/nping.py +++ b/test/resources/linux/nping.py @@ -41,13 +41,13 @@ class LinuxNPingTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "test-nping") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") ec.set(node, "hostname", host) ec.set(node, "username", user) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) - app = ec.register_resource("LinuxNPing") + app = ec.register_resource("linux::NPing") ec.set(app, "c", 1) ec.set(app, "tcp", True) ec.set(app, "p", 80) diff --git a/test/resources/linux/ns3/ccn/ns3dceccn.py b/test/resources/linux/ns3/ccn/ns3dceccn.py index 78d517e6..39ac9ea3 100755 --- a/test/resources/linux/ns3/ccn/ns3dceccn.py +++ b/test/resources/linux/ns3/ccn/ns3dceccn.py @@ -69,7 +69,7 @@ class LinuxNS3CCNDceApplicationTest(unittest.TestCase): def t_dce_ccn(self, host, user = None, identity = None): ec = ExperimentController(exp_id = "test-dce-ccn-app") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") if host == "localhost": ec.set(node, "hostname", host) else: @@ -80,7 +80,7 @@ class LinuxNS3CCNDceApplicationTest(unittest.TestCase): ec.set(node, "cleanProcesses", True) #ec.set(node, "cleanHome", True) - simu = ec.register_resource("LinuxNS3Simulation") + simu = ec.register_resource("linux::ns3::Simulation") #ec.set(simu, "verbose", True) #ec.set(simu, "buildMode", "debug") #ec.set(simu, "nsLog", "DceApplication") @@ -102,7 +102,7 @@ class LinuxNS3CCNDceApplicationTest(unittest.TestCase): ec.register_connection(chan, p2p2) ### create applications - ccnd1 = ec.register_resource("ns3::LinuxDceCCND") + ccnd1 = ec.register_resource("linux::ns3::dce::CCND") ec.set (ccnd1, "stackSize", 1<<20) ec.set (ccnd1, "debug", 7) ec.set (ccnd1, "capacity", 50000) @@ -114,14 +114,14 @@ class LinuxNS3CCNDceApplicationTest(unittest.TestCase): os.path.dirname(os.path.realpath(__file__)), "repoFile1") - ccnr = ec.register_resource("ns3::LinuxDceCCNR") + ccnr = ec.register_resource("linux::ns3::dce::CCNR") ec.set (ccnr, "repoFile1", repofile) ec.set (ccnr, "stackSize", 1<<20) ec.set (ccnr, "StartTime", "2s") ec.set (ccnr, "StopTime", "120s") ec.register_connection(ccnr, nsnode1) - ccndc1 = ec.register_resource("ns3::LinuxDceFIBEntry") + ccndc1 = ec.register_resource("linux::ns3::dce::FIBEntry") ec.set (ccndc1, "protocol", "udp") ec.set (ccndc1, "uri", "ccnx:/") ec.set (ccndc1, "host", "10.0.0.2") @@ -130,7 +130,7 @@ class LinuxNS3CCNDceApplicationTest(unittest.TestCase): ec.set (ccndc1, "StopTime", "120s") ec.register_connection(ccndc1, nsnode1) - ccnd2 = ec.register_resource("ns3::LinuxDceCCND") + ccnd2 = ec.register_resource("linux::ns3::dce::CCND") ec.set (ccnd2, "stackSize", 1<<20) ec.set (ccnd2, "debug", 7) ec.set (ccnd2, "capacity", 50000) @@ -138,7 +138,7 @@ class LinuxNS3CCNDceApplicationTest(unittest.TestCase): ec.set (ccnd2, "StopTime", "20s") ec.register_connection(ccnd2, nsnode2) - ccndc2 = ec.register_resource("ns3::LinuxDceFIBEntry") + ccndc2 = ec.register_resource("linux::ns3::dce::FIBEntry") ec.set (ccndc2, "protocol", "udp") ec.set (ccndc2, "uri", "ccnx:/") ec.set (ccndc2, "host", "10.0.0.1") @@ -147,14 +147,14 @@ class LinuxNS3CCNDceApplicationTest(unittest.TestCase): ec.set (ccndc2, "StopTime", "120s") ec.register_connection(ccndc2, nsnode2) - ccnpeek = ec.register_resource("ns3::LinuxDceCCNPeek") + ccnpeek = ec.register_resource("linux::ns3::dce::CCNPeek") ec.set (ccnpeek, "contentName", "ccnx:/test/bunny.ts") ec.set (ccnpeek, "stackSize", 1<<20) ec.set (ccnpeek, "StartTime", "4s") ec.set (ccnpeek, "StopTime", "120s") ec.register_connection(ccnpeek, nsnode2) - ccncat = ec.register_resource("ns3::LinuxDceCCNCat") + ccncat = ec.register_resource("linux::ns3::dce::CCNCat") ec.set (ccncat, "contentName", "ccnx:/test/bunny.ts") ec.set (ccncat, "stackSize", 1<<20) ec.set (ccncat, "StartTime", "4s") diff --git a/test/resources/linux/ns3/ccn/ns3dceccnpeek.py b/test/resources/linux/ns3/ccn/ns3dceccnpeek.py index 6abfc5ed..adfb2b41 100755 --- a/test/resources/linux/ns3/ccn/ns3dceccnpeek.py +++ b/test/resources/linux/ns3/ccn/ns3dceccnpeek.py @@ -58,7 +58,7 @@ class LinuxNS3CCNPeekDceApplicationTest(unittest.TestCase): def t_dce_ccnpeek(self, host, user = None, identity = None): ec = ExperimentController(exp_id = "test-dce-ccnpeek") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") if host == "localhost": ec.set(node, "hostname", host) else: @@ -69,7 +69,7 @@ class LinuxNS3CCNPeekDceApplicationTest(unittest.TestCase): ec.set(node, "cleanProcesses", True) #ec.set(node, "cleanHome", True) - simu = ec.register_resource("LinuxNS3Simulation") + simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "verbose", True) ec.set(simu, "nsLog", "DceApplication") ec.register_connection(simu, node) @@ -77,19 +77,19 @@ class LinuxNS3CCNPeekDceApplicationTest(unittest.TestCase): nsnode = add_ns3_node(ec, simu) ### create applications - ccnd = ec.register_resource("ns3::LinuxDceCCND") + ccnd = ec.register_resource("linux::ns3::dce::CCND") ec.set (ccnd, "stackSize", 1<<20) ec.set (ccnd, "StartTime", "1s") ec.register_connection(ccnd, nsnode) - ccnpoke = ec.register_resource("ns3::LinuxDceCCNPoke") + ccnpoke = ec.register_resource("linux::ns3::dce::CCNPoke") ec.set (ccnpoke, "contentName", "ccnx:/chunk0") ec.set (ccnpoke, "content", "DATA") ec.set (ccnpoke, "stackSize", 1<<20) ec.set (ccnpoke, "StartTime", "2s") ec.register_connection(ccnpoke, nsnode) - ccnpeek = ec.register_resource("ns3::LinuxDceCCNPeek") + ccnpeek = ec.register_resource("linux::ns3::dce::CCNPeek") ec.set (ccnpeek, "contentName", "ccnx:/chunk0") ec.set (ccnpeek, "stackSize", 1<<20) ec.set (ccnpeek, "StartTime", "4s") @@ -118,7 +118,7 @@ class LinuxNS3CCNPeekDceApplicationTest(unittest.TestCase): def t_dce_ccnpeek_with_stack(self, host, user = None, identity = None): ec = ExperimentController(exp_id = "test-dce-peek-lostack") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") if host == "localhost": ec.set(node, "hostname", host) else: @@ -129,7 +129,7 @@ class LinuxNS3CCNPeekDceApplicationTest(unittest.TestCase): ec.set(node, "cleanProcesses", True) #ec.set(node, "cleanHome", True) - simu = ec.register_resource("LinuxNS3Simulation") + simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "verbose", True) ec.register_connection(simu, node) @@ -138,19 +138,19 @@ class LinuxNS3CCNPeekDceApplicationTest(unittest.TestCase): ec.register_connection(nsnode, simu) ### create applications - ccnd = ec.register_resource("ns3::LinuxDceCCND") + ccnd = ec.register_resource("linux::ns3::dce::CCND") ec.set (ccnd, "stackSize", 1<<20) ec.set (ccnd, "StartTime", "1s") ec.register_connection(ccnd, nsnode) - ccnpoke = ec.register_resource("ns3::LinuxDceCCNPoke") + ccnpoke = ec.register_resource("linux::ns3::dce::CCNPoke") ec.set (ccnpoke, "contentName", "ccnx:/chunk0") ec.set (ccnpoke, "content", "DATA") ec.set (ccnpoke, "stackSize", 1<<20) ec.set (ccnpoke, "StartTime", "2s") ec.register_connection(ccnpoke, nsnode) - ccnpeek = ec.register_resource("ns3::LinuxDceCCNPeek") + ccnpeek = ec.register_resource("linux::ns3::dce::CCNPeek") ec.set (ccnpeek, "contentName", "ccnx:/chunk0") ec.set (ccnpeek, "stackSize", 1<<20) ec.set (ccnpeek, "StartTime", "4s") diff --git a/test/resources/linux/ns3/ns3dceapplication.py b/test/resources/linux/ns3/ns3dceapplication.py index 3f9443a4..c24d07df 100755 --- a/test/resources/linux/ns3/ns3dceapplication.py +++ b/test/resources/linux/ns3/ns3dceapplication.py @@ -144,7 +144,7 @@ class LinuxNS3DceApplicationTest(unittest.TestCase): def t_dce_ping(self, host, user = None, identity = None): ec = ExperimentController(exp_id = "test-dce-ping") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") if host == "localhost": ec.set(node, "hostname", host) else: @@ -155,7 +155,7 @@ class LinuxNS3DceApplicationTest(unittest.TestCase): ec.set(node, "cleanProcesses", True) #ec.set(node, "cleanHome", True) - simu = ec.register_resource("LinuxNS3Simulation") + simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "verbose", True) ec.set(simu, "buildMode", "debug") ec.set(simu, "nsLog", "DceApplication") @@ -177,7 +177,7 @@ class LinuxNS3DceApplicationTest(unittest.TestCase): ec.register_connection(chan, p2p2) ### create applications - ping = ec.register_resource("ns3::LinuxDceApplication") + ping = ec.register_resource("linux::ns3::dce::Application") ec.set (ping, "sources", "http://www.skbuff.net/iputils/iputils-s20101006.tar.bz2") ec.set (ping, "build", "tar xvjf ${SRC}/iputils-s20101006.tar.bz2 && " "cd iputils-s20101006/ && " @@ -217,7 +217,7 @@ class LinuxNS3DceApplicationTest(unittest.TestCase): def t_dce_ccn(self, host, user = None, identity = None): ec = ExperimentController(exp_id = "test-dce-ccn") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") if host == "localhost": ec.set(node, "hostname", host) else: @@ -228,7 +228,7 @@ class LinuxNS3DceApplicationTest(unittest.TestCase): #ec.set(node, "cleanProcesses", True) #ec.set(node, "cleanHome", True) - simu = ec.register_resource("LinuxNS3Simulation") + simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "verbose", True) ec.set(simu, "buildMode", "debug") ec.set(simu, "nsLog", "DceApplication") @@ -250,7 +250,7 @@ class LinuxNS3DceApplicationTest(unittest.TestCase): ec.register_connection(chan, p2p2) ### create applications - ccnd1 = ec.register_resource("ns3::LinuxCCNDceApplication") + ccnd1 = ec.register_resource("linux::ns3::dce::CCNApplication") if host == self.fedora_host: depends = ( " autoconf openssl-devel expat-devel libpcap-devel " @@ -282,7 +282,7 @@ class LinuxNS3DceApplicationTest(unittest.TestCase): os.path.dirname(os.path.realpath(__file__)), "ccn", "repoFile1") - ccnr = ec.register_resource("ns3::LinuxCCNDceApplication") + ccnr = ec.register_resource("linux::ns3::dce::CCNApplication") ec.set (ccnr, "binary", "ccnr") ec.set (ccnr, "environment", "CCNR_DIRECTORY=/REPO/") ec.set (ccnr, "files", "%s=/REPO/repoFile1" % repofile) @@ -291,7 +291,7 @@ class LinuxNS3DceApplicationTest(unittest.TestCase): ec.set (ccnr, "StopTime", "120s") ec.register_connection(ccnr, nsnode1) - ccndc1 = ec.register_resource("ns3::LinuxCCNDceApplication") + ccndc1 = ec.register_resource("linux::ns3::dce::CCNApplication") ec.set (ccndc1, "binary", "ccndc") ec.set (ccndc1, "arguments", "-v;add;ccnx:/;udp;10.0.0.2") ec.set (ccndc1, "stackSize", 1<<20) @@ -299,7 +299,7 @@ class LinuxNS3DceApplicationTest(unittest.TestCase): ec.set (ccndc1, "StopTime", "120s") ec.register_connection(ccndc1, nsnode1) - ccnd2 = ec.register_resource("ns3::LinuxCCNDceApplication") + ccnd2 = ec.register_resource("linux::ns3::dce::CCNApplication") ec.set (ccnd2, "binary", "ccnd") ec.set (ccnd2, "stackSize", 1<<20) ec.set (ccnd2, "environment", "CCND_CAP=50000; CCND_DEBUG=7") @@ -307,7 +307,7 @@ class LinuxNS3DceApplicationTest(unittest.TestCase): ec.set (ccnd2, "StopTime", "120s") ec.register_connection(ccnd2, nsnode2) - ccndc2 = ec.register_resource("ns3::LinuxCCNDceApplication") + ccndc2 = ec.register_resource("linux::ns3::dce::CCNApplication") ec.set (ccndc2, "binary", "ccndc") ec.set (ccndc2, "arguments", "-v;add;ccnx:/;udp;10.0.0.1") ec.set (ccndc2, "stackSize", 1<<20) @@ -315,7 +315,7 @@ class LinuxNS3DceApplicationTest(unittest.TestCase): ec.set (ccndc2, "StopTime", "120s") ec.register_connection(ccndc2, nsnode2) - ccnpeek = ec.register_resource("ns3::LinuxCCNDceApplication") + ccnpeek = ec.register_resource("linux::ns3::dce::CCNApplication") ec.set (ccnpeek, "binary", "ccnpeek") ec.set (ccnpeek, "arguments", "ccnx:/test/bunny.ts") ec.set (ccnpeek, "stdinFile", "") @@ -324,7 +324,7 @@ class LinuxNS3DceApplicationTest(unittest.TestCase): ec.set (ccnpeek, "StopTime", "120s") ec.register_connection(ccnpeek, nsnode2) - ccncat = ec.register_resource("ns3::LinuxCCNDceApplication") + ccncat = ec.register_resource("linux::ns3::dce::CCNApplication") ec.set (ccncat, "binary", "ccncat") ec.set (ccncat, "arguments", "ccnx:/test/bunny.ts") ec.set (ccncat, "stdinFile", "") diff --git a/test/resources/linux/ns3/ns3dceping.py b/test/resources/linux/ns3/ns3dceping.py index 3e111acf..e675853d 100755 --- a/test/resources/linux/ns3/ns3dceping.py +++ b/test/resources/linux/ns3/ns3dceping.py @@ -70,7 +70,7 @@ class LinuxNS3PingDceApplicationTest(unittest.TestCase): def t_dce_ping(self, host, user = None, identity = None): ec = ExperimentController(exp_id = "test-dce-ping-app") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") if host == "localhost": ec.set(node, "hostname", host) else: @@ -81,7 +81,7 @@ class LinuxNS3PingDceApplicationTest(unittest.TestCase): ec.set(node, "cleanProcesses", True) #ec.set(node, "cleanHome", True) - simu = ec.register_resource("LinuxNS3Simulation") + simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "verbose", True) ec.set(simu, "buildMode", "debug") ec.set(simu, "nsLog", "DceApplication") @@ -103,7 +103,7 @@ class LinuxNS3PingDceApplicationTest(unittest.TestCase): ec.register_connection(chan, p2p2) ### create applications - ping = ec.register_resource("ns3::LinuxDcePing") + ping = ec.register_resource("linux::ns3::dce::Ping") ec.set (ping, "stackSize", 1<<20) ec.set (ping, "target", "10.0.0.2") ec.set (ping, "count", "10") diff --git a/test/resources/linux/ns3/ns3fdnetdevice.py b/test/resources/linux/ns3/ns3fdnetdevice.py index b4bbc92c..fb6e009b 100755 --- a/test/resources/linux/ns3/ns3fdnetdevice.py +++ b/test/resources/linux/ns3/ns3fdnetdevice.py @@ -63,7 +63,7 @@ class LinuxNS3FdNetDeviceTest(unittest.TestCase): def t_dummy(self, host, user = None, identity = None): ec = ExperimentController(exp_id = "test-ns3-fd-dummy") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") if host == "localhost": ec.set(node, "hostname", "localhost") else: @@ -74,7 +74,7 @@ class LinuxNS3FdNetDeviceTest(unittest.TestCase): ec.set(node, "cleanProcesses", True) #ec.set(node, "cleanExperiment", True) - simu = ec.register_resource("LinuxNS3Simulation") + simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "simulatorImplementationType", "ns3::RealtimeSimulatorImpl") ec.set(simu, "checksumEnabled", True) ec.set(simu, "verbose", True) diff --git a/test/resources/linux/ns3/ns3simulation.py b/test/resources/linux/ns3/ns3simulation.py index 8501f64b..f663e1f9 100755 --- a/test/resources/linux/ns3/ns3simulation.py +++ b/test/resources/linux/ns3/ns3simulation.py @@ -136,7 +136,7 @@ class LinuxNS3SimulationTest(unittest.TestCase): def t_p2p_ping(self, host, user = None, identity = None): ec = ExperimentController(exp_id = "test-ns3-p2p-ping") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") if host == "localhost": ec.set(node, "hostname", "localhost") else: @@ -147,7 +147,7 @@ class LinuxNS3SimulationTest(unittest.TestCase): ec.set(node, "cleanProcesses", True) #ec.set(node, "cleanHome", True) - simu = ec.register_resource("LinuxNS3Simulation") + simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "verbose", True) ec.register_connection(simu, node) @@ -187,7 +187,7 @@ class LinuxNS3SimulationTest(unittest.TestCase): def t_csma_ping(self, host, user = None, identity = None): ec = ExperimentController(exp_id = "test-ns3-csma-ping") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") if host == "localhost": ec.set(node, "hostname", "localhost") else: @@ -198,7 +198,7 @@ class LinuxNS3SimulationTest(unittest.TestCase): ec.set(node, "cleanProcesses", True) #ec.set(node, "cleanHome", True) - simu = ec.register_resource("LinuxNS3Simulation") + simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "verbose", True) ec.register_connection(simu, node) @@ -238,7 +238,7 @@ class LinuxNS3SimulationTest(unittest.TestCase): def t_user_sources(self, host, user = None, identity = None): ec = ExperimentController(exp_id = "test-ns3-user-sources") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") if host == "localhost": ec.set(node, "hostname", "localhost") else: @@ -249,7 +249,7 @@ class LinuxNS3SimulationTest(unittest.TestCase): ec.set(node, "cleanProcesses", True) #ec.set(node, "cleanHome", True) - simu = ec.register_resource("LinuxNS3Simulation") + simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "verbose", True) sources = os.path.join(os.path.dirname(os.path.realpath(__file__)), "ns-3.18-user.tar.gz") @@ -293,7 +293,7 @@ class LinuxNS3SimulationTest(unittest.TestCase): def t_compile_debug_mode(self, host, user = None, identity = None): ec = ExperimentController(exp_id = "test-ns3-debug-mode") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") if host == "localhost": ec.set(node, "hostname", host) else: @@ -304,7 +304,7 @@ class LinuxNS3SimulationTest(unittest.TestCase): ec.set(node, "cleanProcesses", True) #ec.set(node, "cleanHome", True) - simu = ec.register_resource("LinuxNS3Simulation") + simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "verbose", True) ec.set(simu, "nsLog", "V4Ping:Node") ec.set(simu, "buildMode", "debug") @@ -350,7 +350,7 @@ class LinuxNS3SimulationTest(unittest.TestCase): def t_real_time(self, host, user = None, identity = None): ec = ExperimentController(exp_id = "test-ns3-real-time") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") if host == "localhost": ec.set(node, "hostname", "localhost") else: @@ -361,7 +361,7 @@ class LinuxNS3SimulationTest(unittest.TestCase): #ec.set(node, "cleanHome", True) - simu = ec.register_resource("LinuxNS3Simulation") + simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "simulatorImplementationType", "ns3::RealtimeSimulatorImpl") ec.set(simu, "checksumEnabled", True) ec.set(simu, "verbose", True) @@ -411,7 +411,7 @@ class LinuxNS3SimulationTest(unittest.TestCase): def t_traces(self, host, user = None, identity = None): ec = ExperimentController(exp_id = "test-ns3-traces") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") if host == "localhost": ec.set(node, "hostname", "localhost") else: @@ -422,7 +422,7 @@ class LinuxNS3SimulationTest(unittest.TestCase): ec.set(node, "cleanProcesses", True) #ec.set(node, "cleanHome", True) - simu = ec.register_resource("LinuxNS3Simulation") + simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "verbose", True) ec.register_connection(simu, node) @@ -494,7 +494,7 @@ class LinuxNS3SimulationTest(unittest.TestCase): ec = ExperimentController(exp_id = "test-ns3-wifi-ping") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") if host == "localhost": ec.set(node, "hostname", "localhost") else: @@ -505,7 +505,7 @@ class LinuxNS3SimulationTest(unittest.TestCase): ec.set(node, "cleanProcesses", True) #ec.set(node, "cleanHome", True) - simu = ec.register_resource("LinuxNS3Simulation") + simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "verbose", True) ec.register_connection(simu, node) @@ -557,7 +557,7 @@ class LinuxNS3SimulationTest(unittest.TestCase): """ ec = ExperimentController(exp_id = "test-ns3-routes") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") if host == "localhost": ec.set(node, "hostname", host) else: @@ -568,7 +568,7 @@ class LinuxNS3SimulationTest(unittest.TestCase): ec.set(node, "cleanProcesses", True) #ec.set(node, "cleanHome", True) - simu = ec.register_resource("LinuxNS3Simulation") + simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "verbose", True) ec.register_connection(simu, node) @@ -674,7 +674,7 @@ class LinuxNS3SimulationTest(unittest.TestCase): """ ec = ExperimentController(exp_id = "test-ns3-routing") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") if host == "localhost": ec.set(node, "hostname", "localhost") else: @@ -685,7 +685,7 @@ class LinuxNS3SimulationTest(unittest.TestCase): ec.set(node, "cleanProcesses", True) #ec.set(node, "cleanHome", True) - simu = ec.register_resource("LinuxNS3Simulation") + simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "verbose", True) ec.set(simu, "populateRoutingTables", True) ec.register_connection(simu, node) @@ -756,7 +756,7 @@ class LinuxNS3SimulationTest(unittest.TestCase): def t_dce(self, host, user = None, identity = None): ec = ExperimentController(exp_id = "test-ns3-dce") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") if host == "localhost": ec.set(node, "hostname", host) else: @@ -767,7 +767,7 @@ class LinuxNS3SimulationTest(unittest.TestCase): ec.set(node, "cleanProcesses", True) #ec.set(node, "cleanHome", True) - simu = ec.register_resource("LinuxNS3Simulation") + simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "verbose", True) ec.set(simu, "buildMode", "debug") ec.set(simu, "nsLog", "DceApplication") @@ -789,7 +789,7 @@ class LinuxNS3SimulationTest(unittest.TestCase): ec.register_connection(chan, p2p2) ### create applications - udp_perf = ec.register_resource("ns3::DceApplication") + udp_perf = ec.register_resource("linux::ns3::dce::Application") ec.set (udp_perf, "binary", "udp-perf") ec.set (udp_perf, "stackSize", 1<<20) ec.set (udp_perf, "arguments", "--duration=10;--nodes=2") @@ -797,7 +797,7 @@ class LinuxNS3SimulationTest(unittest.TestCase): ec.set (udp_perf, "StopTime", "20s") ec.register_connection(udp_perf, nsnode1) - udp_perf_client = ec.register_resource("ns3::DceApplication") + udp_perf_client = ec.register_resource("linux::ns3::dce::Application") ec.set (udp_perf_client, "binary", "udp-perf") ec.set (udp_perf_client, "stackSize", 1<<20) ec.set (udp_perf_client, "arguments", "--client;--nodes=2;--host=10.0.0.1;--duration=10") diff --git a/test/resources/linux/ns3/serialization.py b/test/resources/linux/ns3/serialization.py index fbf665f6..75bc60bc 100755 --- a/test/resources/linux/ns3/serialization.py +++ b/test/resources/linux/ns3/serialization.py @@ -145,7 +145,7 @@ class LinuxNS3SimulationSerializationTest(unittest.TestCase): ec = ExperimentController(exp_id = "test-ns3-wifi-ping") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") if host == "localhost": ec.set(node, "hostname", "localhost") else: @@ -156,7 +156,7 @@ class LinuxNS3SimulationSerializationTest(unittest.TestCase): ec.set(node, "cleanProcesses", True) #ec.set(node, "cleanHome", True) - simu = ec.register_resource("LinuxNS3Simulation") + simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "verbose", True) ec.register_connection(simu, node) @@ -231,7 +231,7 @@ class LinuxNS3SimulationSerializationTest(unittest.TestCase): ec = ExperimentController(exp_id = "test-ns3-routes") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") if host == "localhost": ec.set(node, "hostname", host) else: @@ -242,7 +242,7 @@ class LinuxNS3SimulationSerializationTest(unittest.TestCase): ec.set(node, "cleanProcesses", True) #ec.set(node, "cleanHome", True) - simu = ec.register_resource("LinuxNS3Simulation") + simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "verbose", True) ec.register_connection(simu, node) @@ -361,7 +361,7 @@ class LinuxNS3SimulationSerializationTest(unittest.TestCase): ec = ExperimentController(exp_id = "test-ns3-dce") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") if host == "localhost": ec.set(node, "hostname", host) else: @@ -372,7 +372,7 @@ class LinuxNS3SimulationSerializationTest(unittest.TestCase): ec.set(node, "cleanProcesses", True) #ec.set(node, "cleanHome", True) - simu = ec.register_resource("LinuxNS3Simulation") + simu = ec.register_resource("linux::ns3::Simulation") ec.set(simu, "verbose", True) ec.register_connection(simu, node) @@ -392,7 +392,7 @@ class LinuxNS3SimulationSerializationTest(unittest.TestCase): ec.register_connection(chan, p2p2) ### create applications - udp_perf = ec.register_resource("ns3::DceApplication") + udp_perf = ec.register_resource("linux::ns3::dce::Application") ec.set (udp_perf, "binary", "udp-perf") ec.set (udp_perf, "stackSize", 1<<20) ec.set (udp_perf, "arguments", "--duration=10;--nodes=2") @@ -400,7 +400,7 @@ class LinuxNS3SimulationSerializationTest(unittest.TestCase): ec.set (udp_perf, "StopTime", "20s") ec.register_connection(udp_perf, nsnode1) - udp_perf_client = ec.register_resource("ns3::DceApplication") + udp_perf_client = ec.register_resource("linux::ns3::dce::Application") ec.set (udp_perf_client, "binary", "udp-perf") ec.set (udp_perf_client, "stackSize", 1<<20) ec.set (udp_perf_client, "arguments", "--client;--nodes=2;--host=10.0.0.1;--duration=10") diff --git a/test/resources/linux/ping.py b/test/resources/linux/ping.py index 65302767..05f9f921 100755 --- a/test/resources/linux/ping.py +++ b/test/resources/linux/ping.py @@ -41,13 +41,13 @@ class LinuxPingTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "test-ping-count") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") ec.set(node, "hostname", host) ec.set(node, "username", user) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) - app = ec.register_resource("LinuxPing") + app = ec.register_resource("linux::Ping") ec.set(app, "count", "3") ec.set(app, "target", self.target) ec.register_connection(app, node) diff --git a/test/resources/linux/serialization.py b/test/resources/linux/serialization.py index c133ab36..44685d8c 100755 --- a/test/resources/linux/serialization.py +++ b/test/resources/linux/serialization.py @@ -47,19 +47,19 @@ class LinuxSerializationTestCase(unittest.TestCase): ec = ExperimentController(exp_id="test-condition-serial") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") ec.set(node, "hostname", host) ec.set(node, "username", user) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) - server = ec.register_resource("LinuxApplication") + server = ec.register_resource("linux::Application") cmd = "echo 'HOLA' | nc -l 3333" ec.set(server, "command", cmd) ec.set(server, "depends", depends) ec.register_connection(server, node) - client = ec.register_resource("LinuxApplication") + client = ec.register_resource("linux::Application") cmd = "nc 127.0.0.1 3333" ec.set(client, "command", cmd) ec.register_connection(client, node) diff --git a/test/resources/linux/tap.py b/test/resources/linux/tap.py index 8536a329..109fbb66 100755 --- a/test/resources/linux/tap.py +++ b/test/resources/linux/tap.py @@ -38,19 +38,19 @@ class LinuxTapTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "test-tap-create") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") ec.set(node, "hostname", host) ec.set(node, "username", user) ec.set(node, "identity", identity) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) - tap = ec.register_resource("LinuxTap") + tap = ec.register_resource("linux::Tap") ec.set(tap, "endpoint_ip", "%s.1" % self.netblock) ec.set(tap, "endpoint_prefix", 24) ec.register_connection(tap, node) - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") cmd = "ping -c3 %s.1" % self.netblock ec.set(app, "command", cmd) ec.register_connection(app, node) diff --git a/test/resources/linux/tcpdump.py b/test/resources/linux/tcpdump.py index 6ba73753..7a4701b6 100755 --- a/test/resources/linux/tcpdump.py +++ b/test/resources/linux/tcpdump.py @@ -40,18 +40,18 @@ class LinuxTcpdumpTestCase(unittest.TestCase): def t_tofile(self, host, user): ec = ExperimentController(exp_id = "test-to-file") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") ec.set(node, "hostname", host) ec.set(node, "username", user) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) - pcap = ec.register_resource("LinuxTcpdump") + pcap = ec.register_resource("linux::Tcpdump") ec.set(pcap, "i", "eth0") ec.set(pcap, "w", "custom_output") ec.register_connection(pcap, node) - app = ec.register_resource("LinuxPing") + app = ec.register_resource("linux::Ping") ec.set(app, "count", "20") ec.set(app, "target", self.target) ec.register_connection(app, node) diff --git a/test/resources/linux/traceroute.py b/test/resources/linux/traceroute.py index 996472e0..5acf7f58 100755 --- a/test/resources/linux/traceroute.py +++ b/test/resources/linux/traceroute.py @@ -41,13 +41,13 @@ class LinuxTracerouteTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "test-traceroute") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") ec.set(node, "hostname", host) ec.set(node, "username", user) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) - app = ec.register_resource("LinuxTraceroute") + app = ec.register_resource("linux::Traceroute") ec.set(app, "target", self.target) ec.register_connection(app, node) diff --git a/test/resources/linux/tun.py b/test/resources/linux/tun.py index 1f501589..c9402bdf 100755 --- a/test/resources/linux/tun.py +++ b/test/resources/linux/tun.py @@ -38,19 +38,19 @@ class LinuxTunTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "test-tun-create") - node = ec.register_resource("LinuxNode") + node = ec.register_resource("linux::Node") ec.set(node, "hostname", host) ec.set(node, "username", user) ec.set(node, "identity", identity) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) - tun = ec.register_resource("LinuxTun") + tun = ec.register_resource("linux::Tun") ec.set(tun, "endpoint_ip", "%s.1" % self.netblock) ec.set(tun, "endpoint_prefix", 24) ec.register_connection(tun, node) - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") cmd = "ping -c3 %s.1" % self.netblock ec.set(app, "command", cmd) ec.register_connection(app, node) diff --git a/test/resources/linux/udptest.py b/test/resources/linux/udptest.py index 37bfc888..d6447b0a 100755 --- a/test/resources/linux/udptest.py +++ b/test/resources/linux/udptest.py @@ -41,23 +41,23 @@ class LinuxUdpTestTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "test-udptest-rtt") - node1 = ec.register_resource("LinuxNode") + node1 = ec.register_resource("linux::Node") ec.set(node1, "hostname", host1) ec.set(node1, "username", user1) - ec.set(node1, "cleanHome", True) + ec.set(node1, "cleanExperiment", True) ec.set(node1, "cleanProcesses", True) - server = ec.register_resource("LinuxUdpTest") + server = ec.register_resource("linux::UdpTest") ec.set(server, "s", True) ec.register_connection(server, node1) - node2 = ec.register_resource("LinuxNode") + node2 = ec.register_resource("linux::Node") ec.set(node2, "hostname", host2) ec.set(node2, "username", user2) - ec.set(node2, "cleanHome", True) + ec.set(node2, "cleanExperiment", True) ec.set(node2, "cleanProcesses", True) - client = ec.register_resource("LinuxUdpTest") + client = ec.register_resource("linux::UdpTest") ec.set(client, "a", True) ec.set(client, "target", host1) ec.register_connection(client, node2) diff --git a/test/resources/linux/udptunnel.py b/test/resources/linux/udptunnel.py index 24ddf149..a3089d88 100755 --- a/test/resources/linux/udptunnel.py +++ b/test/resources/linux/udptunnel.py @@ -41,35 +41,35 @@ class LinuxUdpTunnelTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "test-tap-udp-tunnel") - node1 = ec.register_resource("LinuxNode") + node1 = ec.register_resource("linux::Node") ec.set(node1, "hostname", host1) ec.set(node1, "username", user1) ec.set(node1, "identity", identity1) - ec.set(node1, "cleanHome", True) + ec.set(node1, "cleanExperiment", True) ec.set(node1, "cleanProcesses", True) - tap1 = ec.register_resource("LinuxTap") + tap1 = ec.register_resource("linux::Tap") ec.set(tap1, "endpoint_ip", "%s.1" % self.netblock) ec.set(tap1, "endpoint_prefix", 32) ec.register_connection(tap1, node1) - node2 = ec.register_resource("LinuxNode") + node2 = ec.register_resource("linux::Node") ec.set(node2, "hostname", host2) ec.set(node2, "username", user2) ec.set(node2, "identity", identity2) - ec.set(node2, "cleanHome", True) + ec.set(node2, "cleanExperiment", True) ec.set(node2, "cleanProcesses", True) - tap2 = ec.register_resource("LinuxTap") + tap2 = ec.register_resource("linux::Tap") ec.set(tap2, "endpoint_ip", "%s.2" % self.netblock) ec.set(tap2, "endpoint_prefix", 32) ec.register_connection(tap2, node2) - udptun = ec.register_resource("LinuxUdpTunnel") + udptun = ec.register_resource("linux::UdpTunnel") ec.register_connection(tap1, udptun) ec.register_connection(tap2, udptun) - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") cmd = "ping -c3 %s.2" % self.netblock ec.set(app, "command", cmd) ec.register_connection(app, node1) @@ -95,35 +95,35 @@ class LinuxUdpTunnelTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "test-tun-udp-tunnel") - node1 = ec.register_resource("LinuxNode") + node1 = ec.register_resource("linux::Node") ec.set(node1, "hostname", host1) ec.set(node1, "username", user1) ec.set(node1, "identity", identity1) - ec.set(node1, "cleanHome", True) + ec.set(node1, "cleanExperiment", True) ec.set(node1, "cleanProcesses", True) - tun1 = ec.register_resource("LinuxTun") + tun1 = ec.register_resource("linux::Tun") ec.set(tun1, "endpoint_ip", "%s.1" % self.netblock) ec.set(tun1, "endpoint_prefix", 32) ec.register_connection(tun1, node1) - node2 = ec.register_resource("LinuxNode") + node2 = ec.register_resource("linux::Node") ec.set(node2, "hostname", host2) ec.set(node2, "username", user2) ec.set(node2, "identity", identity2) - ec.set(node2, "cleanHome", True) + ec.set(node2, "cleanExperiment", True) ec.set(node2, "cleanProcesses", True) - tun2 = ec.register_resource("LinuxTun") + tun2 = ec.register_resource("linux::Tun") ec.set(tun2, "endpoint_ip", "%s.2" % self.netblock) ec.set(tun2, "endpoint_prefix", 32) ec.register_connection(tun2, node2) - udptun = ec.register_resource("LinuxUdpTunnel") + udptun = ec.register_resource("linux::UdpTunnel") ec.register_connection(tun1, udptun) ec.register_connection(tun2, udptun) - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") cmd = "ping -c3 %s.2" % self.netblock ec.set(app, "command", cmd) ec.register_connection(app, node1) diff --git a/test/resources/omf/omf5_vlc_normal_case.py b/test/resources/omf/omf5_vlc_normal_case.py index 88971d3d..07962e8e 100755 --- a/test/resources/omf/omf5_vlc_normal_case.py +++ b/test/resources/omf/omf5_vlc_normal_case.py @@ -36,23 +36,23 @@ import unittest class OMFResourceFactoryTestCase(unittest.TestCase): def test_creation_phase(self): - self.assertEquals(OMFNode.get_rtype(), "OMFNode") + self.assertEquals(OMFNode.get_rtype(), "omf::Node") self.assertEquals(len(OMFNode._attributes), 8) - self.assertEquals(OMFWifiInterface.get_rtype(), "OMFWifiInterface") + self.assertEquals(OMFWifiInterface.get_rtype(), "omf::WifiInterface") self.assertEquals(len(OMFWifiInterface._attributes), 12) - self.assertEquals(OMFChannel.get_rtype(), "OMFChannel") + self.assertEquals(OMFChannel.get_rtype(), "omf::Channel") self.assertEquals(len(OMFChannel._attributes), 8) - self.assertEquals(OMFApplication.get_rtype(), "OMFApplication") + self.assertEquals(OMFApplication.get_rtype(), "omf::Application") self.assertEquals(len(OMFApplication._attributes), 14) class OMFEachTestCase(unittest.TestCase): def setUp(self): self.ec = ExperimentController(exp_id = "99999") - self.node1 = self.ec.register_resource("OMFNode") + self.node1 = self.ec.register_resource("omf::Node") self.ec.set(self.node1, 'hostname', 'omf.plexus.wlab17') self.ec.set(self.node1, 'xmppUser', "nepi") self.ec.set(self.node1, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -60,7 +60,7 @@ class OMFEachTestCase(unittest.TestCase): self.ec.set(self.node1, 'xmppPassword', "1234") self.ec.set(self.node1, 'version', "5") - self.iface1 = self.ec.register_resource("OMFWifiInterface") + self.iface1 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface1, 'name', "wlan0") self.ec.set(self.iface1, 'mode', "adhoc") self.ec.set(self.iface1, 'hw_mode', "g") @@ -68,7 +68,7 @@ class OMFEachTestCase(unittest.TestCase): self.ec.set(self.iface1, 'ip', "10.0.0.17/24") self.ec.set(self.iface1, 'version', "5") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") self.ec.set(self.channel, 'xmppUser', "nepi") self.ec.set(self.channel, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -76,22 +76,22 @@ class OMFEachTestCase(unittest.TestCase): self.ec.set(self.channel, 'xmppPassword', "1234") self.ec.set(self.channel, 'version', "5") - self.app1 = self.ec.register_resource("OMFApplication") + self.app1 = self.ec.register_resource("omf::Application") self.ec.set(self.app1, 'appid', 'Vlc#1') self.ec.set(self.app1, 'command', "/opt/vlc-1.1.13/cvlc /opt/10-by-p0d.avi --sout '#rtp{dst=10.0.0.37,port=1234,mux=ts}'") self.ec.set(self.app1, 'env', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority") self.ec.set(self.app1, 'version', "5") - self.app2 = self.ec.register_resource("OMFApplication") + self.app2 = self.ec.register_resource("omf::Application") self.ec.set(self.app2, 'version', "5") - self.app3 = self.ec.register_resource("OMFApplication") + self.app3 = self.ec.register_resource("omf::Application") self.ec.set(self.app3, 'version', "5") - self.app4 = self.ec.register_resource("OMFApplication") + self.app4 = self.ec.register_resource("omf::Application") self.ec.set(self.app4, 'version', "5") - self.app5 = self.ec.register_resource("OMFApplication") + self.app5 = self.ec.register_resource("omf::Application") self.ec.set(self.app5, 'version', "5") self.ec.register_connection(self.app1, self.node1) @@ -163,7 +163,7 @@ class OMFVLCNormalCase(unittest.TestCase): def test_deploy(self): ec = ExperimentController(exp_id = "5421" ) - self.node1 = ec.register_resource("OMFNode") + self.node1 = ec.register_resource("omf::Node") ec.set(self.node1, 'hostname', 'omf.plexus.wlab17') ec.set(self.node1, 'xmppUser', "nepi") ec.set(self.node1, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -171,7 +171,7 @@ class OMFVLCNormalCase(unittest.TestCase): ec.set(self.node1, 'xmppPassword', "1234") ec.set(self.node1, 'version', "5") - self.iface1 = ec.register_resource("OMFWifiInterface") + self.iface1 = ec.register_resource("omf::WifiInterface") ec.set(self.iface1, 'name', "wlan0") ec.set(self.iface1, 'mode', "adhoc") ec.set(self.iface1, 'hw_mode', "g") @@ -179,7 +179,7 @@ class OMFVLCNormalCase(unittest.TestCase): ec.set(self.iface1, 'ip', "10.0.0.17/24") ec.set(self.iface1, 'version', "5") - self.channel = ec.register_resource("OMFChannel") + self.channel = ec.register_resource("omf::Channel") ec.set(self.channel, 'channel', "6") ec.set(self.channel, 'xmppUser', "nepi") ec.set(self.channel, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -187,31 +187,31 @@ class OMFVLCNormalCase(unittest.TestCase): ec.set(self.channel, 'xmppPassword', "1234") ec.set(self.channel, 'version', "5") - self.app1 = ec.register_resource("OMFApplication") + self.app1 = ec.register_resource("omf::Application") ec.set(self.app1, 'appid', 'Vlc#1') ec.set(self.app1, 'command', "/opt/vlc-1.1.13/cvlc /opt/10-by-p0d.avi --sout '#rtp{dst=10.0.0.37,port=1234,mux=ts}'") ec.set(self.app1, 'env', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority") ec.set(self.app1, 'version', "5") - self.app2 = ec.register_resource("OMFApplication") + self.app2 = ec.register_resource("omf::Application") ec.set(self.app2, 'appid', 'Test#1') ec.set(self.app2, 'command', "/usr/bin/test -1") ec.set(self.app2, 'env', " ") ec.set(self.app2, 'version', "5") - self.app3 = ec.register_resource("OMFApplication") + self.app3 = ec.register_resource("omf::Application") ec.set(self.app3, 'appid', 'Test#2') ec.set(self.app3, 'command', "/usr/bin/test -2") ec.set(self.app3, 'env', " ") ec.set(self.app3, 'version', "5") - self.app4 = ec.register_resource("OMFApplication") + self.app4 = ec.register_resource("omf::Application") ec.set(self.app4, 'appid', 'Test#3') ec.set(self.app4, 'command', "/usr/bin/test -3") ec.set(self.app4, 'env', " ") ec.set(self.app4, 'version', "5") - self.app5 = ec.register_resource("OMFApplication") + self.app5 = ec.register_resource("omf::Application") ec.set(self.app5, 'appid', 'Kill#2') ec.set(self.app5, 'command', "/usr/bin/killall vlc") ec.set(self.app5, 'env', " ") diff --git a/test/resources/omf/omf5_vlc_wrong_critical.py b/test/resources/omf/omf5_vlc_wrong_critical.py index 96230b4b..0ecef847 100755 --- a/test/resources/omf/omf5_vlc_wrong_critical.py +++ b/test/resources/omf/omf5_vlc_wrong_critical.py @@ -41,7 +41,7 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): self.ec = ExperimentController(exp_id = str(OMFVLCWrongCaseAllCritical.id)) OMFVLCWrongCaseAllCritical.id += 1 - self.node1 = self.ec.register_resource("OMFNode") + self.node1 = self.ec.register_resource("omf::Node") self.ec.set(self.node1, 'hostname', 'omf.plexus.wlab17') self.ec.set(self.node1, 'xmppUser', "nepi") self.ec.set(self.node1, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -49,7 +49,7 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): self.ec.set(self.node1, 'xmppPassword', "1234") self.ec.set(self.node1, 'version', "5") - self.iface1 = self.ec.register_resource("OMFWifiInterface") + self.iface1 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface1, 'name', "wlan0") self.ec.set(self.iface1, 'mode', "adhoc") self.ec.set(self.iface1, 'hw_mode', "g") @@ -57,7 +57,7 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): self.ec.set(self.iface1, 'ip', "10.0.0.17/24") self.ec.set(self.iface1, 'version', "5") - self.app1 = self.ec.register_resource("OMFApplication") + self.app1 = self.ec.register_resource("omf::Application") self.ec.set(self.app1, 'appid', 'Vlc#1') self.ec.set(self.app1, 'command', "/opt/vlc-1.1.13/cvlc /opt/10-by-p0d.avi --sout '#rtp{dst=10.0.0.37,port=1234,mux=ts}'") self.ec.set(self.app1, 'env', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority") @@ -67,10 +67,10 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): self.ec.register_connection(self.node1, self.iface1) def test_deploy_wo_node(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, 'version', "5") - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface2, 'name', "wlan0") self.ec.set(self.iface2, 'mode', "adhoc") self.ec.set(self.iface2, 'hw_mode', "g") @@ -78,7 +78,7 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): self.ec.set(self.iface2, 'ip', "10.0.0.37/24") self.ec.set(self.iface2, 'version', "5") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") self.ec.set(self.channel, 'xmppUser', "nepi") self.ec.set(self.channel, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -109,14 +109,14 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): def test_deploy_wo_hostname(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, 'xmppUser', "nepi") self.ec.set(self.node2, 'xmppServer', "xmpp-plexus.onelab.eu") self.ec.set(self.node2, 'xmppPort', "5222") self.ec.set(self.node2, 'xmppPassword', "1234") self.ec.set(self.node2, 'version', "5") - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface2, 'name', "wlan0") self.ec.set(self.iface2, 'mode', "adhoc") self.ec.set(self.iface2, 'hw_mode', "g") @@ -124,7 +124,7 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): self.ec.set(self.iface2, 'ip', "10.0.0.37/24") self.ec.set(self.iface2, 'version', "5") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") self.ec.set(self.channel, 'xmppUser', "nepi") self.ec.set(self.channel, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -154,7 +154,7 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): self.assertEquals(self.ec.get_resource(self.app1).state, ResourceState.RELEASED) def test_deploy_wo_iface(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, 'hostname', 'omf.plexus.wlab17') self.ec.set(self.node2, 'xmppUser', "nepi") self.ec.set(self.node2, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -162,10 +162,10 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): self.ec.set(self.node2, 'xmppPassword', "1234") self.ec.set(self.node2, 'version', "5") - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface2, 'version', "5") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") self.ec.set(self.channel, 'xmppUser', "nepi") self.ec.set(self.channel, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -195,7 +195,7 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): self.assertEquals(self.ec.get_resource(self.app1).state, ResourceState.RELEASED) def test_deploy_wo_ip(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, 'hostname', 'omf.plexus.wlab17') self.ec.set(self.node2, 'xmppUser', "nepi") self.ec.set(self.node2, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -203,14 +203,14 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): self.ec.set(self.node2, 'xmppPassword', "1234") self.ec.set(self.node2, 'version', "5") - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface2, 'name', "wlan0") self.ec.set(self.iface2, 'mode', "adhoc") self.ec.set(self.iface2, 'hw_mode', "g") self.ec.set(self.iface2, 'essid', "vlcexp") self.ec.set(self.iface2, 'version', "5") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") self.ec.set(self.channel, 'xmppUser', "nepi") self.ec.set(self.channel, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -240,7 +240,7 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): self.assertEquals(self.ec.get_resource(self.app1).state, ResourceState.RELEASED) def test_deploy_wo_channel(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, 'hostname', 'omf.plexus.wlab17') self.ec.set(self.node2, 'xmppUser', "nepi") self.ec.set(self.node2, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -248,14 +248,14 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): self.ec.set(self.node2, 'xmppPassword', "1234") self.ec.set(self.node2, 'version', "5") - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface2, 'name', "wlan0") self.ec.set(self.iface2, 'mode', "adhoc") self.ec.set(self.iface2, 'hw_mode', "g") self.ec.set(self.iface2, 'essid', "vlcexp") self.ec.set(self.iface2, 'version', "5") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'version', "5") self.ec.register_connection(self.iface1, self.channel) @@ -280,7 +280,7 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): self.assertEquals(self.ec.get_resource(self.app1).state, ResourceState.RELEASED) def test_deploy_wo_app(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, 'hostname', 'omf.plexus.wlab17') self.ec.set(self.node2, 'xmppUser', "nepi") self.ec.set(self.node2, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -288,7 +288,7 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): self.ec.set(self.node2, 'xmppPassword', "1234") self.ec.set(self.node2, 'version', "5") - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface2, 'name', "wlan0") self.ec.set(self.iface2, 'mode', "adhoc") self.ec.set(self.iface2, 'hw_mode', "g") @@ -296,7 +296,7 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): self.ec.set(self.iface2, 'ip', "10.0.0.37/24") self.ec.set(self.iface2, 'version', "5") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") self.ec.set(self.channel, 'xmppUser', "nepi") self.ec.set(self.channel, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -304,7 +304,7 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): self.ec.set(self.channel, 'xmppPassword', "1234") self.ec.set(self.channel, 'version', "5") - self.app2 = self.ec.register_resource("OMFApplication") + self.app2 = self.ec.register_resource("omf::Application") self.ec.set(self.app2, 'version', "5") self.ec.register_connection(self.iface1, self.channel) @@ -332,7 +332,7 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): self.assertEquals(self.ec.get_resource(self.app2).state, ResourceState.RELEASED) def test_deploy_wo_app_path(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, 'hostname', 'omf.plexus.wlab17') self.ec.set(self.node2, 'xmppUser', "nepi") self.ec.set(self.node2, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -340,7 +340,7 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): self.ec.set(self.node2, 'xmppPassword', "1234") self.ec.set(self.node2, 'version', "5") - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface2, 'name', "wlan0") self.ec.set(self.iface2, 'mode', "adhoc") self.ec.set(self.iface2, 'hw_mode', "g") @@ -348,7 +348,7 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): self.ec.set(self.iface2, 'ip', "10.0.0.37/24") self.ec.set(self.iface2, 'version', "5") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") self.ec.set(self.channel, 'xmppUser', "nepi") self.ec.set(self.channel, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -356,7 +356,7 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): self.ec.set(self.channel, 'xmppPassword', "1234") self.ec.set(self.channel, 'version', "5") - self.app2 = self.ec.register_resource("OMFApplication") + self.app2 = self.ec.register_resource("omf::Application") self.ec.set(self.app2, 'appid', 'Vlc#2') self.ec.set(self.app2, 'version', "5") diff --git a/test/resources/omf/omf5_vlc_wrong_non_critical.py b/test/resources/omf/omf5_vlc_wrong_non_critical.py index d693685a..be619060 100755 --- a/test/resources/omf/omf5_vlc_wrong_non_critical.py +++ b/test/resources/omf/omf5_vlc_wrong_non_critical.py @@ -41,7 +41,7 @@ class OMFVLCWrongCaseWithNonCritical(unittest.TestCase): self.ec = ExperimentController(exp_id = str(OMFVLCWrongCaseWithNonCritical.id)) OMFVLCWrongCaseWithNonCritical.id += 1 - self.node1 = self.ec.register_resource("OMFNode") + self.node1 = self.ec.register_resource("omf::Node") self.ec.set(self.node1, 'hostname', 'omf.plexus.wlab17') self.ec.set(self.node1, 'xmppUser', "nepi") self.ec.set(self.node1, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -49,7 +49,7 @@ class OMFVLCWrongCaseWithNonCritical(unittest.TestCase): self.ec.set(self.node1, 'xmppPassword', "1234") self.ec.set(self.node1, 'version', "5") - self.iface1 = self.ec.register_resource("OMFWifiInterface") + self.iface1 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface1, 'name', "wlan0") self.ec.set(self.iface1, 'mode', "adhoc") self.ec.set(self.iface1, 'hw_mode', "g") @@ -57,7 +57,7 @@ class OMFVLCWrongCaseWithNonCritical(unittest.TestCase): self.ec.set(self.iface1, 'ip', "10.0.0.17/24") self.ec.set(self.iface1, 'version', "5") - self.app1 = self.ec.register_resource("OMFApplication") + self.app1 = self.ec.register_resource("omf::Application") self.ec.set(self.app1, 'appid', 'Kill#1') self.ec.set(self.app1, 'command', "/usr/bin/test -1") self.ec.set(self.app1, 'env', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority") @@ -67,11 +67,11 @@ class OMFVLCWrongCaseWithNonCritical(unittest.TestCase): self.ec.register_connection(self.node1, self.iface1) def test_deploy_with_node_nc(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, "critical", False) self.ec.set(self.node2, 'version', "5") - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface2, 'name', "wlan0") self.ec.set(self.iface2, 'mode', "adhoc") self.ec.set(self.iface2, 'hw_mode', "g") @@ -79,7 +79,7 @@ class OMFVLCWrongCaseWithNonCritical(unittest.TestCase): self.ec.set(self.iface2, 'ip', "10.0.0.37/24") self.ec.set(self.iface2, 'version', "5") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") self.ec.set(self.channel, 'xmppUser', "nepi") self.ec.set(self.channel, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -110,11 +110,11 @@ class OMFVLCWrongCaseWithNonCritical(unittest.TestCase): self.assertEquals(self.ec.get_resource(self.app1).state, ResourceState.RELEASED) def test_deploy_with_node_and_iface_nc(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, "critical", False) self.ec.set(self.node2, 'version', "5") - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.node2, "critical", False) self.ec.set(self.iface2, 'name', "wlan0") self.ec.set(self.iface2, 'mode', "adhoc") @@ -123,7 +123,7 @@ class OMFVLCWrongCaseWithNonCritical(unittest.TestCase): self.ec.set(self.iface2, 'ip', "10.0.0.37/24") self.ec.set(self.iface2, 'version', "5") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") self.ec.set(self.channel, 'xmppUser', "nepi") self.ec.set(self.channel, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -154,12 +154,12 @@ class OMFVLCWrongCaseWithNonCritical(unittest.TestCase): self.assertEquals(self.ec.get_resource(self.app1).state, ResourceState.RELEASED) def test_deploy_with_node_iface_channel_nc(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, "critical", False) self.ec.set(self.node2, 'hostname', 'omf.plexus.wlab37') self.ec.set(self.node2, 'version', "5") - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.node2, "critical", False) self.ec.set(self.iface2, 'name', "wlan0") self.ec.set(self.iface2, 'mode', "adhoc") @@ -168,7 +168,7 @@ class OMFVLCWrongCaseWithNonCritical(unittest.TestCase): self.ec.set(self.iface2, 'ip', "10.0.0.37/24") self.ec.set(self.iface2, 'version', "5") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") self.ec.set(self.channel, "critical", False) self.ec.set(self.channel, 'version', "5") @@ -197,7 +197,7 @@ class OMFVLCWrongCaseWithNonCritical(unittest.TestCase): self.assertEquals(self.ec.get_resource(self.app1).state, ResourceState.RELEASED) def test_deploy_with_app_nc(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, 'hostname', 'omf.plexus.wlab37') self.ec.set(self.node2, 'xmppUser', "nepi") self.ec.set(self.node2, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -205,7 +205,7 @@ class OMFVLCWrongCaseWithNonCritical(unittest.TestCase): self.ec.set(self.node2, 'xmppPassword', "1234") self.ec.set(self.node2, 'version', "5") - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface2, 'name', "wlan0") self.ec.set(self.iface2, 'mode', "adhoc") self.ec.set(self.iface2, 'hw_mode', "g") @@ -213,7 +213,7 @@ class OMFVLCWrongCaseWithNonCritical(unittest.TestCase): self.ec.set(self.iface2, 'ip', "10.0.0.37/24") self.ec.set(self.iface2, 'version', "5") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") self.ec.set(self.channel, 'xmppUser', "nepi") self.ec.set(self.channel, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -221,7 +221,7 @@ class OMFVLCWrongCaseWithNonCritical(unittest.TestCase): self.ec.set(self.channel, 'xmppPassword', "1234") self.ec.set(self.channel, 'version', "5") - self.app2 = self.ec.register_resource("OMFApplication") + self.app2 = self.ec.register_resource("omf::Application") self.ec.set(self.app2, "critical", False) self.ec.set(self.app2, 'appid', 'Kill#22') self.ec.set(self.app2, 'version', "5") @@ -252,21 +252,21 @@ class OMFVLCWrongCaseWithNonCritical(unittest.TestCase): self.assertEquals(self.ec.get_resource(self.app2).state, ResourceState.RELEASED) def test_deploy_with_all_nc_and_app_critical(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, "critical", False) self.ec.set(self.node2, 'hostname', 'omf.plexus.wlab37') self.ec.set(self.node2, 'version', "5") - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface2, "critical", False) self.ec.set(self.iface2, 'version', "5") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, "critical", False) self.ec.set(self.channel, 'channel', "6") self.ec.set(self.channel, 'version', "5") - self.app2 = self.ec.register_resource("OMFApplication") + self.app2 = self.ec.register_resource("omf::Application") self.ec.set(self.app2, 'appid', 'Kill#22') self.ec.set(self.app2, 'version', "5") @@ -303,7 +303,7 @@ class OMFVLCWrongCaseWithNonCriticalDep(unittest.TestCase): self.ec = ExperimentController(exp_id = str(OMFVLCWrongCaseWithNonCriticalDep.id)) OMFVLCWrongCaseWithNonCriticalDep.id += 1 - self.node1 = self.ec.register_resource("OMFNode") + self.node1 = self.ec.register_resource("omf::Node") self.ec.set(self.node1, 'hostname', 'omf.plexus.wlab17') self.ec.set(self.node1, 'xmppUser', "nepi") self.ec.set(self.node1, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -311,7 +311,7 @@ class OMFVLCWrongCaseWithNonCriticalDep(unittest.TestCase): self.ec.set(self.node1, 'xmppPassword', "1234") self.ec.set(self.node1, 'version', "5") - self.iface1 = self.ec.register_resource("OMFWifiInterface") + self.iface1 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface1, 'name', "wlan0") self.ec.set(self.iface1, 'mode', "adhoc") self.ec.set(self.iface1, 'hw_mode', "g") @@ -319,7 +319,7 @@ class OMFVLCWrongCaseWithNonCriticalDep(unittest.TestCase): self.ec.set(self.iface1, 'ip', "10.0.0.17/24") self.ec.set(self.iface1, 'version', "5") - self.app1 = self.ec.register_resource("OMFApplication") + self.app1 = self.ec.register_resource("omf::Application") self.ec.set(self.app1, 'appid', 'Kill#1') self.ec.set(self.app1, 'command', "/usr/bin/test -1") self.ec.set(self.app1, 'env', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority") @@ -329,7 +329,7 @@ class OMFVLCWrongCaseWithNonCriticalDep(unittest.TestCase): self.ec.register_connection(self.node1, self.iface1) def test_deploy_with_app_nc_and_critical_wrong(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, 'hostname', 'omf.plexus.wlab37') self.ec.set(self.node2, 'xmppUser', "nepi") self.ec.set(self.node2, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -337,7 +337,7 @@ class OMFVLCWrongCaseWithNonCriticalDep(unittest.TestCase): self.ec.set(self.node2, 'xmppPassword', "1234") self.ec.set(self.node2, 'version', "5") - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface2, 'name', "wlan0") self.ec.set(self.iface2, 'mode', "adhoc") self.ec.set(self.iface2, 'hw_mode', "g") @@ -345,7 +345,7 @@ class OMFVLCWrongCaseWithNonCriticalDep(unittest.TestCase): self.ec.set(self.iface2, 'ip', "10.0.0.37/24") self.ec.set(self.iface2, 'version', "5") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") self.ec.set(self.channel, 'xmppUser', "nepi") self.ec.set(self.channel, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -353,12 +353,12 @@ class OMFVLCWrongCaseWithNonCriticalDep(unittest.TestCase): self.ec.set(self.channel, 'xmppPassword', "1234") self.ec.set(self.channel, 'version', "5") - self.app2 = self.ec.register_resource("OMFApplication") + self.app2 = self.ec.register_resource("omf::Application") self.ec.set(self.app2, "critical", False) self.ec.set(self.app2, 'appid', 'Kill#32') self.ec.set(self.app2, 'version', "5") - self.app3 = self.ec.register_resource("OMFApplication") + self.app3 = self.ec.register_resource("omf::Application") self.ec.set(self.app3, 'appid', 'Kill#33') self.ec.set(self.app3, 'version', "5") @@ -391,7 +391,7 @@ class OMFVLCWrongCaseWithNonCriticalDep(unittest.TestCase): self.assertEquals(self.ec.get_resource(self.app3).state, ResourceState.RELEASED) def test_deploy_with_app_nc_and_critical_right(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, 'hostname', 'omf.plexus.wlab37') self.ec.set(self.node2, 'xmppUser', "nepi") self.ec.set(self.node2, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -399,7 +399,7 @@ class OMFVLCWrongCaseWithNonCriticalDep(unittest.TestCase): self.ec.set(self.node2, 'xmppPassword', "1234") self.ec.set(self.node2, 'version', "5") - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface2, 'name', "wlan0") self.ec.set(self.iface2, 'mode', "adhoc") self.ec.set(self.iface2, 'hw_mode', "g") @@ -407,7 +407,7 @@ class OMFVLCWrongCaseWithNonCriticalDep(unittest.TestCase): self.ec.set(self.iface2, 'ip', "10.0.0.37/24") self.ec.set(self.iface2, 'version', "5") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") self.ec.set(self.channel, 'xmppUser', "nepi") self.ec.set(self.channel, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -415,12 +415,12 @@ class OMFVLCWrongCaseWithNonCriticalDep(unittest.TestCase): self.ec.set(self.channel, 'xmppPassword', "1234") self.ec.set(self.channel, 'version', "5") - self.app2 = self.ec.register_resource("OMFApplication") + self.app2 = self.ec.register_resource("omf::Application") self.ec.set(self.app2, "critical", False) self.ec.set(self.app2, 'appid', 'Kill#32') self.ec.set(self.app2, 'version', "5") - self.app3 = self.ec.register_resource("OMFApplication") + self.app3 = self.ec.register_resource("omf::Application") self.ec.set(self.app3, 'appid', 'Kill#3') self.ec.set(self.app3, 'command', "/usr/bin/test -1") self.ec.set(self.app3, 'env', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority") @@ -457,7 +457,7 @@ class OMFVLCWrongCaseWithNonCriticalDep(unittest.TestCase): def test_deploy_with_many_app_nc_and_critical(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, 'hostname', 'omf.plexus.wlab37') self.ec.set(self.node2, 'xmppUser', "nepi") self.ec.set(self.node2, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -465,7 +465,7 @@ class OMFVLCWrongCaseWithNonCriticalDep(unittest.TestCase): self.ec.set(self.node2, 'xmppPassword', "1234") self.ec.set(self.node2, 'version', "5") - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface2, 'name', "wlan0") self.ec.set(self.iface2, 'mode', "adhoc") self.ec.set(self.iface2, 'hw_mode', "g") @@ -473,7 +473,7 @@ class OMFVLCWrongCaseWithNonCriticalDep(unittest.TestCase): self.ec.set(self.iface2, 'ip', "10.0.0.37/24") self.ec.set(self.iface2, 'version', "5") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") self.ec.set(self.channel, 'xmppUser', "nepi") self.ec.set(self.channel, 'xmppServer', "xmpp-plexus.onelab.eu") @@ -481,30 +481,30 @@ class OMFVLCWrongCaseWithNonCriticalDep(unittest.TestCase): self.ec.set(self.channel, 'xmppPassword', "1234") self.ec.set(self.channel, 'version', "5") - self.app2 = self.ec.register_resource("OMFApplication") + self.app2 = self.ec.register_resource("omf::Application") self.ec.set(self.app2, "critical", False) self.ec.set(self.app2, 'appid', 'Kill#32') self.ec.set(self.app2, 'version', "5") - self.app3 = self.ec.register_resource("OMFApplication") + self.app3 = self.ec.register_resource("omf::Application") self.ec.set(self.app3, "critical", False) self.ec.set(self.app3, 'appid', 'Kill#3') self.ec.set(self.app3, 'command', "/usr/bin/test -1") self.ec.set(self.app3, 'env', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority") self.ec.set(self.app3, 'version', "5") - self.app4 = self.ec.register_resource("OMFApplication") + self.app4 = self.ec.register_resource("omf::Application") self.ec.set(self.app4, 'appid', 'Kill#4') self.ec.set(self.app4, 'command', "/usr/bin/test -1") self.ec.set(self.app4, 'env', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority") self.ec.set(self.app4, 'version', "5") - self.app5 = self.ec.register_resource("OMFApplication") + self.app5 = self.ec.register_resource("omf::Application") self.ec.set(self.app5, "critical", False) self.ec.set(self.app5, 'appid', 'Kill#32') self.ec.set(self.app5, 'version', "5") - self.app6 = self.ec.register_resource("OMFApplication") + self.app6 = self.ec.register_resource("omf::Application") self.ec.set(self.app6, 'appid', 'Kill#6') self.ec.set(self.app6, 'command', "/usr/bin/test -1") self.ec.set(self.app6, 'env', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority") diff --git a/test/resources/omf/omf6_vlc_normal_case.py b/test/resources/omf/omf6_vlc_normal_case.py index b8f5b471..c1d11974 100755 --- a/test/resources/omf/omf6_vlc_normal_case.py +++ b/test/resources/omf/omf6_vlc_normal_case.py @@ -36,55 +36,55 @@ import unittest class OMFResourceFactoryTestCase(unittest.TestCase): def test_creation_phase(self): - self.assertEquals(OMFNode.get_rtype(), "OMFNode") + self.assertEquals(OMFNode.get_rtype(), "omf::Node") self.assertEquals(len(OMFNode._attributes), 8) - self.assertEquals(OMFWifiInterface.get_rtype(), "OMFWifiInterface") + self.assertEquals(OMFWifiInterface.get_rtype(), "omf::WifiInterface") self.assertEquals(len(OMFWifiInterface._attributes), 12) - self.assertEquals(OMFChannel.get_rtype(), "OMFChannel") + self.assertEquals(OMFChannel.get_rtype(), "omf::Channel") self.assertEquals(len(OMFChannel._attributes), 8) - self.assertEquals(OMFApplication.get_rtype(), "OMFApplication") + self.assertEquals(OMFApplication.get_rtype(), "omf::Application") self.assertEquals(len(OMFApplication._attributes), 14) class OMFEachTestCase(unittest.TestCase): def setUp(self): self.ec = ExperimentController(exp_id = "99999") - self.node1 = self.ec.register_resource("OMFNode") + self.node1 = self.ec.register_resource("omf::Node") self.ec.set(self.node1, 'hostname', 'wlab12') self.ec.set(self.node1, 'xmppUser', "nepi") self.ec.set(self.node1, 'xmppServer', "xmpp-plexus.onelab.eu") self.ec.set(self.node1, 'xmppPort', "5222") self.ec.set(self.node1, 'xmppPassword', "1234") - self.iface1 = self.ec.register_resource("OMFWifiInterface") + self.iface1 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface1, 'name', "wlan0") self.ec.set(self.iface1, 'mode', "adhoc") self.ec.set(self.iface1, 'hw_mode', "g") self.ec.set(self.iface1, 'essid', "vlcexp") self.ec.set(self.iface1, 'ip', "10.0.0.17/24") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") self.ec.set(self.channel, 'xmppUser', "nepi") self.ec.set(self.channel, 'xmppServer', "xmpp-plexus.onelab.eu") self.ec.set(self.channel, 'xmppPort', "5222") self.ec.set(self.channel, 'xmppPassword', "1234") - self.app1 = self.ec.register_resource("OMFApplication") + self.app1 = self.ec.register_resource("omf::Application") self.ec.set(self.app1, 'appid', 'Vlc#1') self.ec.set(self.app1, 'command', "/opt/vlc-1.1.13/cvlc /opt/10-by-p0d.avi --sout '#rtp{dst=10.0.0.37,port=1234,mux=ts}'") self.ec.set(self.app1, 'env', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority") - self.app2 = self.ec.register_resource("OMFApplication") + self.app2 = self.ec.register_resource("omf::Application") - self.app3 = self.ec.register_resource("OMFApplication") + self.app3 = self.ec.register_resource("omf::Application") - self.app4 = self.ec.register_resource("OMFApplication") + self.app4 = self.ec.register_resource("omf::Application") - self.app5 = self.ec.register_resource("OMFApplication") + self.app5 = self.ec.register_resource("omf::Application") self.ec.register_connection(self.app1, self.node1) self.ec.register_connection(self.app2, self.node1) @@ -155,48 +155,48 @@ class OMFVLCNormalCase(unittest.TestCase): def test_deploy(self): ec = ExperimentController(exp_id = "5421" ) - self.node1 = ec.register_resource("OMFNode") + self.node1 = ec.register_resource("omf::Node") ec.set(self.node1, 'hostname', 'wlab12') ec.set(self.node1, 'xmppUser', "nepi") ec.set(self.node1, 'xmppServer', "xmpp-plexus.onelab.eu") ec.set(self.node1, 'xmppPort', "5222") ec.set(self.node1, 'xmppPassword', "1234") - self.iface1 = ec.register_resource("OMFWifiInterface") + self.iface1 = ec.register_resource("omf::WifiInterface") ec.set(self.iface1, 'name', "wlan0") ec.set(self.iface1, 'mode', "adhoc") ec.set(self.iface1, 'hw_mode', "g") ec.set(self.iface1, 'essid', "vlcexp") ec.set(self.iface1, 'ip', "10.0.0.17/24") - self.channel = ec.register_resource("OMFChannel") + self.channel = ec.register_resource("omf::Channel") ec.set(self.channel, 'channel', "6") ec.set(self.channel, 'xmppUser', "nepi") ec.set(self.channel, 'xmppServer', "xmpp-plexus.onelab.eu") ec.set(self.channel, 'xmppPort', "5222") ec.set(self.channel, 'xmppPassword', "1234") - self.app1 = ec.register_resource("OMFApplication") + self.app1 = ec.register_resource("omf::Application") ec.set(self.app1, 'appid', 'Vlc#1') ec.set(self.app1, 'command', "/opt/vlc-1.1.13/cvlc /opt/10-by-p0d.avi --sout '#rtp{dst=10.0.0.37,port=1234,mux=ts}'") ec.set(self.app1, 'env', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority") - self.app2 = ec.register_resource("OMFApplication") + self.app2 = ec.register_resource("omf::Application") ec.set(self.app2, 'appid', 'Test#1') ec.set(self.app2, 'command', "/usr/bin/test -1") ec.set(self.app2, 'env', " ") - self.app3 = ec.register_resource("OMFApplication") + self.app3 = ec.register_resource("omf::Application") ec.set(self.app3, 'appid', 'Test#2') ec.set(self.app3, 'command', "/usr/bin/test -2") ec.set(self.app3, 'env', " ") - self.app4 = ec.register_resource("OMFApplication") + self.app4 = ec.register_resource("omf::Application") ec.set(self.app4, 'appid', 'Test#3') ec.set(self.app4, 'command', "/usr/bin/test -3") ec.set(self.app4, 'env', " ") - self.app5 = ec.register_resource("OMFApplication") + self.app5 = ec.register_resource("omf::Application") ec.set(self.app5, 'appid', 'Kill#2') ec.set(self.app5, 'command', "/usr/bin/killall vlc") ec.set(self.app5, 'env', " ") diff --git a/test/resources/omf/omf6_vlc_traces.py b/test/resources/omf/omf6_vlc_traces.py index e06fa337..65ce2157 100755 --- a/test/resources/omf/omf6_vlc_traces.py +++ b/test/resources/omf/omf6_vlc_traces.py @@ -38,28 +38,28 @@ class OMFPingNormalCase(unittest.TestCase): def test_deploy(self): ec = ExperimentController(exp_id = "5421" ) - self.node1 = ec.register_resource("OMFNode") + self.node1 = ec.register_resource("omf::Node") ec.set(self.node1, 'hostname', 'wlab12') ec.set(self.node1, 'xmppUser', "nepi") ec.set(self.node1, 'xmppServer', "xmpp-plexus.onelab.eu") ec.set(self.node1, 'xmppPort', "5222") ec.set(self.node1, 'xmppPassword', "1234") - self.iface1 = ec.register_resource("OMFWifiInterface") + self.iface1 = ec.register_resource("omf::WifiInterface") ec.set(self.iface1, 'name', "wlan0") ec.set(self.iface1, 'mode', "adhoc") ec.set(self.iface1, 'hw_mode', "g") ec.set(self.iface1, 'essid', "vlcexp") ec.set(self.iface1, 'ip', "10.0.0.17/24") - self.channel = ec.register_resource("OMFChannel") + self.channel = ec.register_resource("omf::Channel") ec.set(self.channel, 'channel', "6") ec.set(self.channel, 'xmppUser', "nepi") ec.set(self.channel, 'xmppServer', "xmpp-plexus.onelab.eu") ec.set(self.channel, 'xmppPort', "5222") ec.set(self.channel, 'xmppPassword', "1234") - self.app1 = ec.register_resource("OMFApplication") + self.app1 = ec.register_resource("omf::Application") ec.set(self.app1, 'appid', 'Vlc#1') ec.set(self.app1, 'command', "ping -c5 10.0.0.17") diff --git a/test/resources/omf/omf6_vlc_wrong_critical.py b/test/resources/omf/omf6_vlc_wrong_critical.py index d3fbae94..ba49207c 100755 --- a/test/resources/omf/omf6_vlc_wrong_critical.py +++ b/test/resources/omf/omf6_vlc_wrong_critical.py @@ -41,21 +41,21 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): self.ec = ExperimentController(exp_id = str(OMFVLCWrongCaseAllCritical.id)) OMFVLCWrongCaseAllCritical.id += 1 - self.node1 = self.ec.register_resource("OMFNode") + self.node1 = self.ec.register_resource("omf::Node") self.ec.set(self.node1, 'hostname', 'wlab12') self.ec.set(self.node1, 'xmppUser', "nepi") self.ec.set(self.node1, 'xmppServer', "xmpp-plexus.onelab.eu") self.ec.set(self.node1, 'xmppPort', "5222") self.ec.set(self.node1, 'xmppPassword', "1234") - self.iface1 = self.ec.register_resource("OMFWifiInterface") + self.iface1 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface1, 'name', "wlan0") self.ec.set(self.iface1, 'mode', "adhoc") self.ec.set(self.iface1, 'hw_mode', "g") self.ec.set(self.iface1, 'essid', "vlcexp") self.ec.set(self.iface1, 'ip', "10.0.0.12/24") - self.app1 = self.ec.register_resource("OMFApplication") + self.app1 = self.ec.register_resource("omf::Application") self.ec.set(self.app1, 'appid', 'Vlc#1') self.ec.set(self.app1, 'command', "/opt/vlc-1.1.13/cvlc /opt/10-by-p0d.avi --sout '#rtp{dst=10.0.0.49,port=1234,mux=ts}'") self.ec.set(self.app1, 'env', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority") @@ -64,16 +64,16 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): self.ec.register_connection(self.node1, self.iface1) def test_deploy_wo_node(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface2, 'name', "wlan0") self.ec.set(self.iface2, 'mode', "adhoc") self.ec.set(self.iface2, 'hw_mode', "g") self.ec.set(self.iface2, 'essid', "vlcexp") self.ec.set(self.iface2, 'ip', "10.0.0.49/24") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") self.ec.register_connection(self.iface1, self.channel) @@ -99,20 +99,20 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): def test_deploy_wo_hostname(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, 'xmppUser', "nepi") self.ec.set(self.node2, 'xmppServer', "xmpp-plexus.onelab.eu") self.ec.set(self.node2, 'xmppPort', "5222") self.ec.set(self.node2, 'xmppPassword', "1234") - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface2, 'name', "wlan0") self.ec.set(self.iface2, 'mode', "adhoc") self.ec.set(self.iface2, 'hw_mode', "g") self.ec.set(self.iface2, 'essid', "vlcexp") self.ec.set(self.iface2, 'ip', "10.0.0.49/24") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") self.ec.register_connection(self.iface1, self.channel) @@ -137,16 +137,16 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): self.assertEquals(self.ec.get_resource(self.app1).state, ResourceState.RELEASED) def test_deploy_wo_iface(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, 'hostname', 'wlab49') self.ec.set(self.node2, 'xmppUser', "nepi") self.ec.set(self.node2, 'xmppServer', "xmpp-plexus.onelab.eu") self.ec.set(self.node2, 'xmppPort', "5222") self.ec.set(self.node2, 'xmppPassword', "1234") - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") self.ec.register_connection(self.iface1, self.channel) @@ -171,21 +171,21 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): self.assertEquals(self.ec.get_resource(self.app1).state, ResourceState.RELEASED) def test_deploy_wo_channel(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, 'hostname', 'wlab49') self.ec.set(self.node2, 'xmppUser', "nepi") self.ec.set(self.node2, 'xmppServer', "xmpp-plexus.onelab.eu") self.ec.set(self.node2, 'xmppPort', "5222") self.ec.set(self.node2, 'xmppPassword', "1234") - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface2, 'name', "wlan0") self.ec.set(self.iface2, 'mode', "adhoc") self.ec.set(self.iface2, 'hw_mode', "g") self.ec.set(self.iface2, 'essid', "vlcexp") self.ec.set(self.iface2, 'ip', "10.0.0.49/24") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.register_connection(self.iface1, self.channel) self.ec.register_connection(self.node2, self.iface2) @@ -208,20 +208,20 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): self.assertEquals(self.ec.get_resource(self.app1).state, ResourceState.RELEASED) def test_deploy_wo_ip(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, 'hostname', 'wlab49') self.ec.set(self.node2, 'xmppUser', "nepi") self.ec.set(self.node2, 'xmppServer', "xmpp-plexus.onelab.eu") self.ec.set(self.node2, 'xmppPort', "5222") self.ec.set(self.node2, 'xmppPassword', "1234") - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface2, 'name', "wlan0") self.ec.set(self.iface2, 'mode', "adhoc") self.ec.set(self.iface2, 'hw_mode', "g") self.ec.set(self.iface2, 'essid', "vlcexp") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") self.ec.register_connection(self.iface1, self.channel) @@ -246,24 +246,24 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): self.assertEquals(self.ec.get_resource(self.app1).state, ResourceState.RELEASED) def test_deploy_wo_app(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, 'hostname', 'wlab49') self.ec.set(self.node2, 'xmppUser', "nepi") self.ec.set(self.node2, 'xmppServer', "xmpp-plexus.onelab.eu") self.ec.set(self.node2, 'xmppPort', "5222") self.ec.set(self.node2, 'xmppPassword', "1234") - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface2, 'name', "wlan0") self.ec.set(self.iface2, 'mode', "adhoc") self.ec.set(self.iface2, 'hw_mode', "g") self.ec.set(self.iface2, 'essid', "vlcexp") self.ec.set(self.iface2, 'ip', "10.0.0.49/24") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") - self.app2 = self.ec.register_resource("OMFApplication") + self.app2 = self.ec.register_resource("omf::Application") self.ec.register_connection(self.iface1, self.channel) self.ec.register_connection(self.iface2, self.channel) @@ -290,24 +290,24 @@ class OMFVLCWrongCaseAllCritical(unittest.TestCase): self.assertEquals(self.ec.get_resource(self.app2).state, ResourceState.RELEASED) def test_deploy_wo_app_path(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, 'hostname', 'wlab49') self.ec.set(self.node2, 'xmppUser', "nepi") self.ec.set(self.node2, 'xmppServer', "xmpp-plexus.onelab.eu") self.ec.set(self.node2, 'xmppPort', "5222") self.ec.set(self.node2, 'xmppPassword', "1234") - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface2, 'name', "wlan0") self.ec.set(self.iface2, 'mode', "adhoc") self.ec.set(self.iface2, 'hw_mode', "g") self.ec.set(self.iface2, 'essid', "vlcexp") self.ec.set(self.iface2, 'ip', "10.0.0.49/24") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") - self.app2 = self.ec.register_resource("OMFApplication") + self.app2 = self.ec.register_resource("omf::Application") self.ec.set(self.app2, 'appid', 'Vlc#2') self.ec.register_connection(self.iface1, self.channel) diff --git a/test/resources/omf/omf6_vlc_wrong_non_critical.py b/test/resources/omf/omf6_vlc_wrong_non_critical.py index ef1d5c84..92ee58bc 100755 --- a/test/resources/omf/omf6_vlc_wrong_non_critical.py +++ b/test/resources/omf/omf6_vlc_wrong_non_critical.py @@ -19,7 +19,8 @@ # Author: Julien Tribino -from nepi.execution.resource import ResourceFactory, ResourceManager, ResourceAction, ResourceState +from nepi.execution.resource import ResourceFactory, ResourceManager, \ + ResourceAction, ResourceState from nepi.execution.ec import ExperimentController from nepi.resources.omf.node import OMFNode @@ -41,21 +42,21 @@ class OMFVLCWrongCaseWithNonCritical(unittest.TestCase): self.ec = ExperimentController(exp_id = str(OMFVLCWrongCaseWithNonCritical.id)) OMFVLCWrongCaseWithNonCritical.id += 1 - self.node1 = self.ec.register_resource("OMFNode") + self.node1 = self.ec.register_resource("omf::Node") self.ec.set(self.node1, 'hostname', 'wlab12') self.ec.set(self.node1, 'xmppUser', "nepi") self.ec.set(self.node1, 'xmppServer', "xmpp-plexus.onelab.eu") self.ec.set(self.node1, 'xmppPort', "5222") self.ec.set(self.node1, 'xmppPassword', "1234") - self.iface1 = self.ec.register_resource("OMFWifiInterface") + self.iface1 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface1, 'name', "wlan0") self.ec.set(self.iface1, 'mode', "adhoc") self.ec.set(self.iface1, 'hw_mode', "g") self.ec.set(self.iface1, 'essid', "vlcexp") self.ec.set(self.iface1, 'ip', "10.0.0.12/24") - self.app1 = self.ec.register_resource("OMFApplication") + self.app1 = self.ec.register_resource("omf::Application") self.ec.set(self.app1, 'appid', 'Kill#1') self.ec.set(self.app1, 'command', "/usr/bin/test -1") self.ec.set(self.app1, 'env', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority") @@ -64,17 +65,17 @@ class OMFVLCWrongCaseWithNonCritical(unittest.TestCase): self.ec.register_connection(self.node1, self.iface1) def test_deploy_with_node_nc(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, "critical", False) - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface2, 'name', "wlan0") self.ec.set(self.iface2, 'mode', "adhoc") self.ec.set(self.iface2, 'hw_mode', "g") self.ec.set(self.iface2, 'essid', "vlcexp") self.ec.set(self.iface2, 'ip', "10.0.0.49/24") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") self.ec.register_connection(self.iface1, self.channel) @@ -100,10 +101,10 @@ class OMFVLCWrongCaseWithNonCritical(unittest.TestCase): self.assertEquals(self.ec.get_resource(self.app1).state, ResourceState.RELEASED) def test_deploy_with_node_and_iface_nc(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, "critical", False) - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.node2, "critical", False) self.ec.set(self.iface2, 'name', "wlan0") self.ec.set(self.iface2, 'mode', "adhoc") @@ -111,7 +112,7 @@ class OMFVLCWrongCaseWithNonCritical(unittest.TestCase): self.ec.set(self.iface2, 'essid', "vlcexp") self.ec.set(self.iface2, 'ip', "10.0.0.49/24") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") self.ec.register_connection(self.iface1, self.channel) @@ -137,11 +138,11 @@ class OMFVLCWrongCaseWithNonCritical(unittest.TestCase): self.assertEquals(self.ec.get_resource(self.app1).state, ResourceState.RELEASED) def test_deploy_with_node_iface_channel_nc(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, "critical", False) self.ec.set(self.node2, 'hostname', 'wlab49') - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.node2, "critical", False) self.ec.set(self.iface2, 'name', "wlan0") self.ec.set(self.iface2, 'mode', "adhoc") @@ -149,7 +150,7 @@ class OMFVLCWrongCaseWithNonCritical(unittest.TestCase): self.ec.set(self.iface2, 'essid', "vlcexp") self.ec.set(self.iface2, 'ip', "10.0.0.49/24") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") self.ec.set(self.channel, "critical", False) @@ -176,24 +177,24 @@ class OMFVLCWrongCaseWithNonCritical(unittest.TestCase): self.assertEquals(self.ec.get_resource(self.app1).state, ResourceState.RELEASED) def test_deploy_with_app_nc(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, 'hostname', 'wlab49') self.ec.set(self.node2, 'xmppUser', "nepi") self.ec.set(self.node2, 'xmppServer', "xmpp-plexus.onelab.eu") self.ec.set(self.node2, 'xmppPort', "5222") self.ec.set(self.node2, 'xmppPassword', "1234") - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface2, 'name', "wlan0") self.ec.set(self.iface2, 'mode', "adhoc") self.ec.set(self.iface2, 'hw_mode', "g") self.ec.set(self.iface2, 'essid', "vlcexp") self.ec.set(self.iface2, 'ip', "10.0.0.49/24") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") - self.app2 = self.ec.register_resource("OMFApplication") + self.app2 = self.ec.register_resource("omf::Application") self.ec.set(self.app2, "critical", False) self.ec.set(self.app2, 'appid', 'Kill#22') @@ -223,18 +224,18 @@ class OMFVLCWrongCaseWithNonCritical(unittest.TestCase): self.assertEquals(self.ec.get_resource(self.app2).state, ResourceState.RELEASED) def test_deploy_with_all_nc_and_app_critical(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, "critical", False) self.ec.set(self.node2, 'hostname', 'wlab49') - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface2, "critical", False) - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, "critical", False) self.ec.set(self.channel, 'channel', "6") - self.app2 = self.ec.register_resource("OMFApplication") + self.app2 = self.ec.register_resource("omf::Application") self.ec.set(self.app2, 'appid', 'Kill#22') self.ec.register_connection(self.iface1, self.channel) @@ -270,21 +271,21 @@ class OMFVLCWrongCaseWithNonCriticalDep(unittest.TestCase): self.ec = ExperimentController(exp_id = str(OMFVLCWrongCaseWithNonCriticalDep.id)) OMFVLCWrongCaseWithNonCriticalDep.id += 1 - self.node1 = self.ec.register_resource("OMFNode") + self.node1 = self.ec.register_resource("omf::Node") self.ec.set(self.node1, 'hostname', 'wlab12') self.ec.set(self.node1, 'xmppUser', "nepi") self.ec.set(self.node1, 'xmppServer', "xmpp-plexus.onelab.eu") self.ec.set(self.node1, 'xmppPort', "5222") self.ec.set(self.node1, 'xmppPassword', "1234") - self.iface1 = self.ec.register_resource("OMFWifiInterface") + self.iface1 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface1, 'name', "wlan0") self.ec.set(self.iface1, 'mode', "adhoc") self.ec.set(self.iface1, 'hw_mode', "g") self.ec.set(self.iface1, 'essid', "vlcexp") self.ec.set(self.iface1, 'ip', "10.0.0.12/24") - self.app1 = self.ec.register_resource("OMFApplication") + self.app1 = self.ec.register_resource("omf::Application") self.ec.set(self.app1, 'appid', 'Kill#1') self.ec.set(self.app1, 'command', "/usr/bin/test -1") self.ec.set(self.app1, 'env', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority") @@ -293,28 +294,28 @@ class OMFVLCWrongCaseWithNonCriticalDep(unittest.TestCase): self.ec.register_connection(self.node1, self.iface1) def test_deploy_with_app_nc_and_critical_wrong(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, 'hostname', 'wlab49') self.ec.set(self.node2, 'xmppUser', "nepi") self.ec.set(self.node2, 'xmppServer', "xmpp-plexus.onelab.eu") self.ec.set(self.node2, 'xmppPort', "5222") self.ec.set(self.node2, 'xmppPassword', "1234") - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface2, 'name', "wlan0") self.ec.set(self.iface2, 'mode', "adhoc") self.ec.set(self.iface2, 'hw_mode', "g") self.ec.set(self.iface2, 'essid', "vlcexp") self.ec.set(self.iface2, 'ip', "10.0.0.49/24") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") - self.app2 = self.ec.register_resource("OMFApplication") + self.app2 = self.ec.register_resource("omf::Application") self.ec.set(self.app2, "critical", False) self.ec.set(self.app2, 'appid', 'Kill#32') - self.app3 = self.ec.register_resource("OMFApplication") + self.app3 = self.ec.register_resource("omf::Application") self.ec.set(self.app3, 'appid', 'Kill#33') self.ec.register_connection(self.iface1, self.channel) @@ -346,28 +347,28 @@ class OMFVLCWrongCaseWithNonCriticalDep(unittest.TestCase): self.assertEquals(self.ec.get_resource(self.app3).state, ResourceState.RELEASED) def test_deploy_with_app_nc_and_critical_right(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, 'hostname', 'wlab49') self.ec.set(self.node2, 'xmppUser', "nepi") self.ec.set(self.node2, 'xmppServer', "xmpp-plexus.onelab.eu") self.ec.set(self.node2, 'xmppPort', "5222") self.ec.set(self.node2, 'xmppPassword', "1234") - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface2, 'name', "wlan0") self.ec.set(self.iface2, 'mode', "adhoc") self.ec.set(self.iface2, 'hw_mode', "g") self.ec.set(self.iface2, 'essid', "vlcexp") self.ec.set(self.iface2, 'ip', "10.0.0.49/24") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") - self.app2 = self.ec.register_resource("OMFApplication") + self.app2 = self.ec.register_resource("omf::Application") self.ec.set(self.app2, "critical", False) self.ec.set(self.app2, 'appid', 'Kill#32') - self.app3 = self.ec.register_resource("OMFApplication") + self.app3 = self.ec.register_resource("omf::Application") self.ec.set(self.app3, 'appid', 'Kill#3') self.ec.set(self.app3, 'command', "/usr/bin/test -3") self.ec.set(self.app3, 'env', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority") @@ -402,43 +403,43 @@ class OMFVLCWrongCaseWithNonCriticalDep(unittest.TestCase): def test_deploy_with_many_app_nc_and_critical(self): - self.node2 = self.ec.register_resource("OMFNode") + self.node2 = self.ec.register_resource("omf::Node") self.ec.set(self.node2, 'hostname', 'wlab49') self.ec.set(self.node2, 'xmppUser', "nepi") self.ec.set(self.node2, 'xmppServer', "xmpp-plexus.onelab.eu") self.ec.set(self.node2, 'xmppPort', "5222") self.ec.set(self.node2, 'xmppPassword', "1234") - self.iface2 = self.ec.register_resource("OMFWifiInterface") + self.iface2 = self.ec.register_resource("omf::WifiInterface") self.ec.set(self.iface2, 'name', "wlan0") self.ec.set(self.iface2, 'mode', "adhoc") self.ec.set(self.iface2, 'hw_mode', "g") self.ec.set(self.iface2, 'essid', "vlcexp") self.ec.set(self.iface2, 'ip', "10.0.0.49/24") - self.channel = self.ec.register_resource("OMFChannel") + self.channel = self.ec.register_resource("omf::Channel") self.ec.set(self.channel, 'channel', "6") - self.app2 = self.ec.register_resource("OMFApplication") + self.app2 = self.ec.register_resource("omf::Application") self.ec.set(self.app2, "critical", False) self.ec.set(self.app2, 'appid', 'Kill#32') - self.app3 = self.ec.register_resource("OMFApplication") + self.app3 = self.ec.register_resource("omf::Application") self.ec.set(self.app3, "critical", False) self.ec.set(self.app3, 'appid', 'Kill#3') self.ec.set(self.app3, 'command', "/usr/bin/test -3") self.ec.set(self.app3, 'env', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority") - self.app4 = self.ec.register_resource("OMFApplication") + self.app4 = self.ec.register_resource("omf::Application") self.ec.set(self.app4, 'appid', 'Kill#4') self.ec.set(self.app4, 'command', "/usr/bin/test -4") self.ec.set(self.app4, 'env', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority") - self.app5 = self.ec.register_resource("OMFApplication") + self.app5 = self.ec.register_resource("omf::Application") self.ec.set(self.app5, "critical", False) self.ec.set(self.app5, 'appid', 'Kill#32') - self.app6 = self.ec.register_resource("OMFApplication") + self.app6 = self.ec.register_resource("omf::Application") self.ec.set(self.app6, 'appid', 'Kill#6') self.ec.set(self.app6, 'command', "/usr/bin/test -6") self.ec.set(self.app6, 'env', "DISPLAY=localhost:10.0 XAUTHORITY=/root/.Xauthority") diff --git a/test/resources/omf/set_hook.py b/test/resources/omf/set_hook.py index 08abb005..5aa77c77 100755 --- a/test/resources/omf/set_hook.py +++ b/test/resources/omf/set_hook.py @@ -35,8 +35,8 @@ class DummyEC(ExperimentController): pass @clsinit_copy -class DummyOMFApplication(OMFApplication): - _rtype = "DummyOMFApplication" +class OMFDummyApplication(OMFApplication): + _rtype = "omf::DummyApplication" @classmethod def _register_attributes(cls): @@ -55,16 +55,16 @@ class OMFTestSet(unittest.TestCase): def test_set_hook(self): self.ec = DummyEC(exp_id = "30") - ResourceFactory.register_type(DummyOMFApplication) + ResourceFactory.register_type(OMFDummyApplication) - self.node1 = self.ec.register_resource("OMFNode") + self.node1 = self.ec.register_resource("omf::Node") self.ec.set(self.node1, 'hostname', 'omf.plexus.wlab17') self.ec.set(self.node1, 'xmppSlice', "nepi") self.ec.set(self.node1, 'xmppHost', "xmpp-plexus.onelab.eu") self.ec.set(self.node1, 'xmppPort', "5222") self.ec.set(self.node1, 'xmppPassword', "1234") - self.app1 = self.ec.register_resource("DummyOMFApplication") + self.app1 = self.ec.register_resource("omf::DummyApplication") self.ec.set(self.app1, 'appid', 'Test#1') self.ec.set(self.app1, 'path', "/usr/bin/ping") self.ec.set(self.app1, 'args', "") diff --git a/test/resources/planetlab/gretunnel.py b/test/resources/planetlab/gretunnel.py index 98ad8030..460261f0 100755 --- a/test/resources/planetlab/gretunnel.py +++ b/test/resources/planetlab/gretunnel.py @@ -45,7 +45,7 @@ class PlanetLabGRETunnelTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "test-tap-gre-tunnel") - node1 = ec.register_resource("PlanetlabNode") + node1 = ec.register_resource("planetlab::Node") ec.set(node1, "hostname", host1) ec.set(node1, "username", user1) ec.set(node1, "identity", identity1) @@ -53,12 +53,12 @@ class PlanetLabGRETunnelTestCase(unittest.TestCase): ec.set(node1, "cleanExperiment", True) ec.set(node1, "cleanProcesses", True) - tap1 = ec.register_resource("PlanetlabTap") + tap1 = ec.register_resource("planetlab::Tap") ec.set(tap1, "endpoint_ip", "%s.1" % self.netblock) ec.set(tap1, "endpoint_prefix", 24) ec.register_connection(tap1, node1) - node2 = ec.register_resource("PlanetlabNode") + node2 = ec.register_resource("planetlab::Node") ec.set(node2, "hostname", host2) ec.set(node2, "username", user2) ec.set(node2, "identity", identity2) @@ -66,16 +66,16 @@ class PlanetLabGRETunnelTestCase(unittest.TestCase): ec.set(node2, "cleanExperiment", True) ec.set(node2, "cleanProcesses", True) - tap2 = ec.register_resource("PlanetlabTap") + tap2 = ec.register_resource("planetlab::Tap") ec.set(tap2, "endpoint_ip", "%s.2" % self.netblock) ec.set(tap2, "endpoint_prefix", 24) ec.register_connection(tap2, node2) - gretun = ec.register_resource("LinuxGRETunnel") + gretun = ec.register_resource("linux::GRETunnel") ec.register_connection(tap1, gretun) ec.register_connection(tap2, gretun) - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") cmd = "ping -c3 %s.2" % self.netblock ec.set(app, "command", cmd) ec.register_connection(app, node1) @@ -102,7 +102,7 @@ class PlanetLabGRETunnelTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "test-tun-gre-tunnel") - node1 = ec.register_resource("PlanetlabNode") + node1 = ec.register_resource("planetlab::Node") ec.set(node1, "hostname", host1) ec.set(node1, "username", user1) ec.set(node1, "identity", identity1) @@ -110,12 +110,12 @@ class PlanetLabGRETunnelTestCase(unittest.TestCase): ec.set(node1, "cleanExperiment", True) ec.set(node1, "cleanProcesses", True) - tun1 = ec.register_resource("PlanetlabTun") + tun1 = ec.register_resource("planetlab::Tun") ec.set(tun1, "endpoint_ip", "%s.1" % self.netblock) ec.set(tun1, "endpoint_prefix", 24) ec.register_connection(tun1, node1) - node2 = ec.register_resource("PlanetlabNode") + node2 = ec.register_resource("planetlab::Node") ec.set(node2, "hostname", host2) ec.set(node2, "username", user2) ec.set(node2, "identity", identity2) @@ -123,16 +123,16 @@ class PlanetLabGRETunnelTestCase(unittest.TestCase): ec.set(node2, "cleanExperiment", True) ec.set(node2, "cleanProcesses", True) - tun2 = ec.register_resource("PlanetlabTun") + tun2 = ec.register_resource("planetlab::Tun") ec.set(tun2, "endpoint_ip", "%s.2" % self.netblock) ec.set(tun2, "endpoint_prefix", 24) ec.register_connection(tun2, node2) - udptun = ec.register_resource("LinuxGRETunnel") + udptun = ec.register_resource("linux::GRETunnel") ec.register_connection(tun1, udptun) ec.register_connection(tun2, udptun) - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") cmd = "ping -c3 %s.2" % self.netblock ec.set(app, "command", cmd) ec.register_connection(app, node1) @@ -159,7 +159,7 @@ class PlanetLabGRETunnelTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "test-tap-hybrid-gre-tunnel") - node1 = ec.register_resource("PlanetlabNode") + node1 = ec.register_resource("planetlab::Node") ec.set(node1, "hostname", host1) ec.set(node1, "username", user1) ec.set(node1, "identity", identity1) @@ -167,12 +167,12 @@ class PlanetLabGRETunnelTestCase(unittest.TestCase): ec.set(node1, "cleanExperiment", True) ec.set(node1, "cleanProcesses", True) - tun1 = ec.register_resource("PlanetlabTun") + tun1 = ec.register_resource("planetlab::Tun") ec.set(tun1, "endpoint_ip", "%s.1" % self.netblock) ec.set(tun1, "endpoint_prefix", 24) ec.register_connection(tun1, node1) - node2 = ec.register_resource("LinuxNode") + node2 = ec.register_resource("linux::Node") ec.set(node2, "hostname", host2) ec.set(node2, "username", user2) ec.set(node2, "identity", identity2) @@ -180,16 +180,16 @@ class PlanetLabGRETunnelTestCase(unittest.TestCase): ec.set(node2, "cleanExperiment", True) ec.set(node2, "cleanProcesses", True) - tun2 = ec.register_resource("LinuxTun") + tun2 = ec.register_resource("linux::Tun") ec.set(tun2, "endpoint_ip", "%s.2" % self.netblock) ec.set(tun2, "endpoint_prefix", 24) ec.register_connection(tun2, node2) - gretun = ec.register_resource("LinuxGRETunnel") + gretun = ec.register_resource("linux::GRETunnel") ec.register_connection(tun1, gretun) ec.register_connection(tun2, gretun) - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") # It seems the hybrid tunnel takes some time to setup... we add a sleep 5 # XXX: Debug this to see if it can be fixed on the RMs cmd = "sleep 5; ping -c3 %s.2" % self.netblock diff --git a/test/resources/planetlab/node.py b/test/resources/planetlab/node.py index 6599a2b7..e58855a3 100755 --- a/test/resources/planetlab/node.py +++ b/test/resources/planetlab/node.py @@ -38,7 +38,7 @@ def create_node(ec, username, pl_user=None, pl_password=None, pl_url=None, minBandwidth=None, minCpu=None, architecture=None, city=None, ip=None): - node = ec.register_resource("PlanetlabNode") + node = ec.register_resource("planetlab::Node") if username: ec.set(node, "username", username) @@ -66,7 +66,7 @@ def create_node(ec, username, pl_user=None, pl_password=None, pl_url=None, if ip: ec.set(node, "ip", ip) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) return node @@ -74,7 +74,7 @@ def create_node(ec, username, pl_user=None, pl_password=None, pl_url=None, class PLNodeFactoryTestCase(unittest.TestCase): def test_creation_phase(self): - self.assertEquals(PlanetlabNode._rtype, "PlanetlabNode") + self.assertEquals(PlanetlabNode._rtype, "planetlab::Node") self.assertEquals(len(PlanetlabNode._attributes), 32) class PLNodeTestCase(unittest.TestCase): diff --git a/test/resources/planetlab/ovs.py b/test/resources/planetlab/ovs.py index e76a6e66..d8c7a730 100755 --- a/test/resources/planetlab/ovs.py +++ b/test/resources/planetlab/ovs.py @@ -46,90 +46,90 @@ class OvsTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "test-ovs") - node1 = ec.register_resource("PlanetlabNode") + node1 = ec.register_resource("planetlab::Node") ec.set(node1, "hostname", switch1) ec.set(node1, "username", user1) - ec.set(node1, "cleanHome", True) + ec.set(node1, "cleanExperiment", True) ec.set(node1, "cleanProcesses", True) - ovs1 = ec.register_resource("OVSSwitch") + ovs1 = ec.register_resource("planetlab::OVSSwitch") ec.set(ovs1, "bridge_name", "nepi_bridge") ec.set(ovs1, "virtual_ip_pref", "192.168.3.1/24") ec.set(ovs1, "controller_ip", "85.23.168.77") ec.set(ovs1, "controller_port", "6633") ec.register_connection(ovs1, node1) - port1 = ec.register_resource("OVSPort") + port1 = ec.register_resource("planetlab::OVSPort") ec.set(port1, "port_name", "port-1") ec.register_connection(port1, ovs1) - port2 = ec.register_resource("OVSPort") + port2 = ec.register_resource("planetlab::OVSPort") ec.set(port2, "port_name", "port-2") ec.register_connection(port2, ovs1) - node2 = ec.register_resource("PlanetlabNode") + node2 = ec.register_resource("planetlab::PlanetlabNode") ec.set(node2, "hostname", switch2) ec.set(node2, "username", user2) - ec.set(node2, "cleanHome", True) + ec.set(node2, "cleanExperiment", True) ec.set(node2, "cleanProcesses", True) - ovs2 = ec.register_resource("OVSSwitch") + ovs2 = ec.register_resource("planetlab::OVSSwitch") ec.set(ovs2, "bridge_name", "nepi_bridge") ec.set(ovs2, "virtual_ip_pref", "192.168.3.2/24") ec.set(ovs2, "controller_ip", "85.23.168.77") ec.set(ovs2, "controller_port", "6633") ec.register_connection(ovs2, node2) - port3 = ec.register_resource("OVSPort") + port3 = ec.register_resource("planetlab::OVSPort") ec.set(port3, "port_name", "port-3") ec.register_connection(port3, ovs2) - port4 = ec.register_resource("OVSPort") + port4 = ec.register_resource("planetlab::OVSPort") ec.set(port4, "port_name", "port-4") ec.register_connection(port4, ovs2) - node3 = ec.register_resource("PlanetlabNode") + node3 = ec.register_resource("planetlab::Node") ec.set(node3, "hostname", host1) ec.set(node3, "username", user3) - ec.set(node3, "cleanHome", True) + ec.set(node3, "cleanExperiment", True) ec.set(node3, "cleanProcesses", True) - tap1 = ec.register_resource("PlanetlabTap") + tap1 = ec.register_resource("planetlab::Tap") ec.set(tap1, "ip4", "192.168.3.3") ec.set(tap1, "pointopoint", "192.168.3.1") ec.set(tap1, "prefix4", 24) ec.register_connection(tap1, node3) - node4 = ec.register_resource("PlanetlabNode") + node4 = ec.register_resource("planetlab::Node") ec.set(node4, "hostname", host2) ec.set(node4, "username", user4) - ec.set(node4, "cleanHome", True) + ec.set(node4, "cleanExperiment", True) ec.set(node4, "cleanProcesses", True) - tap2 = ec.register_resource("PlanetlabTap") + tap2 = ec.register_resource("planetlab::Tap") ec.set(tap2, "ip4", "192.168.3.4") ec.set(tap2, "pointopoint", "192.168.3.2") ec.set(tap2, "prefix4", 24) ec.register_connection(tap2, node4) - ovstun1 = ec.register_resource("OVSTunnel") + ovstun1 = ec.register_resource("planetlab::OVSTunnel") ec.register_connection(port1, ovstun1) ec.register_connection(tap1, ovstun1) - ovstun2 = ec.register_resource("OVSTunnel") + ovstun2 = ec.register_resource("plantelab::OVSTunnel") ec.register_connection(port3, ovstun2) ec.register_connection(tap2, ovstun2) - ovstun3 = ec.register_resource("OVSTunnel") + ovstun3 = ec.register_resource("planetlab::OVSTunnel") ec.register_connection(port2, ovstun3) ec.register_connection(port4, ovstun3) - app1 = ec.register_resource("LinuxApplication") + app1 = ec.register_resource("linux::Application") cmd = "ping -c3 192.168.3.2" ec.set(app1, "command", cmd) ec.register_connection(app1, node1) - app2 = ec.register_resource("LinuxApplication") + app2 = ec.register_resource("linux::Application") cmd = "ping -c3 192.168.3.4" ec.set(app2, "command", cmd) ec.register_connection(app2, node2) diff --git a/test/resources/planetlab/sfa_node.py b/test/resources/planetlab/sfa_node.py index d42440b3..901865b5 100755 --- a/test/resources/planetlab/sfa_node.py +++ b/test/resources/planetlab/sfa_node.py @@ -37,7 +37,7 @@ class DummyEC(ExperimentController): class PLSfaNodeFactoryTestCase(unittest.TestCase): def test_creation_phase(self): - self.assertEquals(PlanetlabSfaNode._rtype, "PlanetlabSfaNode") + self.assertEquals(PlanetlabSfaNode._rtype, "planetlab::sfa::Node") self.assertEquals(len(PlanetlabSfaNode._attributes), 31) class PLSfaNodeTestCase(unittest.TestCase): @@ -61,7 +61,7 @@ class PLSfaNodeTestCase(unittest.TestCase): instanciated, and is an instance of SFAAPI. Check that using the same credentials, the same object of the api is used. """ - node1 = self.ec.register_resource("PlanetlabSfaNode") + node1 = self.ec.register_resource("planetlab::sfa::Node") self.ec.set(node1, "hostname", "planetlab2.ionio.gr") self.ec.set(node1, "username", self.username) self.ec.set(node1, "sfauser", self.sfauser) @@ -76,7 +76,7 @@ class PLSfaNodeTestCase(unittest.TestCase): self.assertEquals(len(api1._reserved), 0) self.assertEquals(len(api1._blacklist), 0) - node2 = self.ec.register_resource("PlanetlabSfaNode") + node2 = self.ec.register_resource("planetlab::sfa::Node") self.ec.set(node2, "hostname", "planetlab2.ionio.gr") self.ec.set(node2, "username", self.username) self.ec.set(node2, "sfauser", self.sfauser) @@ -91,7 +91,7 @@ class PLSfaNodeTestCase(unittest.TestCase): """ Check that the method do_discover reserve the right node. """ - node = self.ec.register_resource("PlanetlabSfaNode") + node = self.ec.register_resource("planetlab::sfa::Node") self.ec.set(node, "hostname", "roti.mimuw.edu.pl") self.ec.set(node, "username", self.username) self.ec.set(node, "sfauser", self.sfauser) @@ -117,7 +117,7 @@ class PLSfaNodeTestCase(unittest.TestCase): This test checks that the method do_provision add the node in the slice and check its well functioning. """ - node = self.ec.register_resource("PlanetlabSfaNode") + node = self.ec.register_resource("planetlab::sfa::Node") self.ec.set(node, "hostname", "planetlab2.ionio.gr") self.ec.set(node, "username", self.username) self.ec.set(node, "sfauser", self.sfauser) @@ -143,7 +143,7 @@ class PLSfaNodeTestCase(unittest.TestCase): """ Test deploy 1 node. """ - node = self.ec.register_resource("PlanetlabSfaNode") + node = self.ec.register_resource("planetlab::sfa::Node") self.ec.set(node, "hostname", "planetlab2.ionio.gr") self.ec.set(node, "username", self.username) self.ec.set(node, "sfauser", self.sfauser) @@ -164,13 +164,13 @@ class PLSfaNodeTestCase(unittest.TestCase): """ Test deploy 2 nodes. Empty slice. """ - node1 = self.ec.register_resource("PlanetlabSfaNode") + node1 = self.ec.register_resource("planetlab::sfa::Node") self.ec.set(node1, "hostname", "planetlab3.xeno.cl.cam.ac.uk") self.ec.set(node1, "username", self.username) self.ec.set(node1, "sfauser", self.sfauser) self.ec.set(node1, "sfaPrivateKey", self.sfaPrivateKey) - node2 = self.ec.register_resource("PlanetlabSfaNode") + node2 = self.ec.register_resource("planetlab::sfa::Node") self.ec.set(node2, "hostname", "planetlab1.cs.vu.nl") self.ec.set(node2, "username", self.username) self.ec.set(node2, "sfauser", self.sfauser) @@ -196,13 +196,13 @@ class PLSfaNodeTestCase(unittest.TestCase): """ Test deploy 2 nodes, already in the slice. """ - node1 = self.ec.register_resource("PlanetlabSfaNode") + node1 = self.ec.register_resource("planetlab::sfa::Node") self.ec.set(node1, "hostname", "planetlab3.xeno.cl.cam.ac.uk") self.ec.set(node1, "username", self.username) self.ec.set(node1, "sfauser", self.sfauser) self.ec.set(node1, "sfaPrivateKey", self.sfaPrivateKey) - node2 = self.ec.register_resource("PlanetlabSfaNode") + node2 = self.ec.register_resource("planetlab::sfa::Node") self.ec.set(node2, "hostname", "planetlab1.cs.vu.nl") self.ec.set(node2, "username", self.username) self.ec.set(node2, "sfauser", self.sfauser) diff --git a/test/resources/planetlab/tap.py b/test/resources/planetlab/tap.py index 3c465132..5b63fab5 100755 --- a/test/resources/planetlab/tap.py +++ b/test/resources/planetlab/tap.py @@ -42,19 +42,19 @@ class PlanetlabTapTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "test-tap-create") - node = ec.register_resource("PlanetlabNode") + node = ec.register_resource("planetlab::Node") ec.set(node, "hostname", host) ec.set(node, "username", user) ec.set(node, "identity", identity) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) - tap = ec.register_resource("PlanetlabTap") + tap = ec.register_resource("planetlab::Tap") ec.set(tap, "endpoint_ip", "%s.1" % self.netblock) ec.set(tap, "endpoint_prefix", 24) ec.register_connection(tap, node) - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") cmd = "ping -c3 %s.1" % self.netblock ec.set(app, "command", cmd) ec.register_connection(app, node) diff --git a/test/resources/planetlab/tun.py b/test/resources/planetlab/tun.py index aa0def27..6c727f1c 100755 --- a/test/resources/planetlab/tun.py +++ b/test/resources/planetlab/tun.py @@ -42,19 +42,19 @@ class PlanetlabTunTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "test-un-create") - node = ec.register_resource("PlanetlabNode") + node = ec.register_resource("planetlab::Node") ec.set(node, "hostname", host) ec.set(node, "username", user) ec.set(node, "identity", identity) - ec.set(node, "cleanHome", True) + ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) - tun = ec.register_resource("PlanetlabTun") + tun = ec.register_resource("planetlab::Tun") ec.set(tun, "endpoint_ip", "%s.1" % self.netblock) ec.set(tun, "endpoint_prefix", 24) ec.register_connection(tun, node) - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") cmd = "ping -c3 %s.1" % self.netblock ec.set(app, "command", cmd) ec.register_connection(app, node) diff --git a/test/resources/planetlab/udptunnel.py b/test/resources/planetlab/udptunnel.py index e54c3efe..bd87a756 100755 --- a/test/resources/planetlab/udptunnel.py +++ b/test/resources/planetlab/udptunnel.py @@ -45,37 +45,35 @@ class PlanetlabUdpTunnelTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "test-tap-udp-tunnel") - node1 = ec.register_resource("PlanetlabNode") + node1 = ec.register_resource("planetlab::Node") ec.set(node1, "hostname", host1) ec.set(node1, "username", user1) ec.set(node1, "identity", identity1) - #ec.set(node1, "cleanHome", True) ec.set(node1, "cleanExperiment", True) ec.set(node1, "cleanProcesses", True) - tap1 = ec.register_resource("PlanetlabTap") + tap1 = ec.register_resource("planetlab::Tap") ec.set(tap1, "endpoint_ip", "%s.1" % self.netblock) ec.set(tap1, "endpoint_prefix", 24) ec.register_connection(tap1, node1) - node2 = ec.register_resource("PlanetlabNode") + node2 = ec.register_resource("planetlab::Node") ec.set(node2, "hostname", host2) ec.set(node2, "username", user2) ec.set(node2, "identity", identity2) - #ec.set(node2, "cleanHome", True) ec.set(node2, "cleanExperiment", True) ec.set(node2, "cleanProcesses", True) - tap2 = ec.register_resource("PlanetlabTap") + tap2 = ec.register_resource("planetlab::Tap") ec.set(tap2, "endpoint_ip", "%s.2" % self.netblock) ec.set(tap2, "endpoint_prefix", 24) ec.register_connection(tap2, node2) - udptun = ec.register_resource("LinuxUdpTunnel") + udptun = ec.register_resource("linux::UdpTunnel") ec.register_connection(tap1, udptun) ec.register_connection(tap2, udptun) - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") cmd = "ping -c3 %s.2" % self.netblock ec.set(app, "command", cmd) ec.register_connection(app, node1) @@ -101,37 +99,35 @@ class PlanetlabUdpTunnelTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "test-tun-udp-tunnel") - node1 = ec.register_resource("PlanetlabNode") + node1 = ec.register_resource("planetlab::Node") ec.set(node1, "hostname", host1) ec.set(node1, "username", user1) ec.set(node1, "identity", identity1) - #ec.set(node1, "cleanHome", True) ec.set(node1, "cleanExperiment", True) ec.set(node1, "cleanProcesses", True) - tun1 = ec.register_resource("PlanetlabTun") + tun1 = ec.register_resource("planetlab::Tun") ec.set(tun1, "endpoint_ip", "%s.1" % self.netblock) ec.set(tun1, "endpoint_prefix", 24) ec.register_connection(tun1, node1) - node2 = ec.register_resource("PlanetlabNode") + node2 = ec.register_resource("planetlab::Node") ec.set(node2, "hostname", host2) ec.set(node2, "username", user2) ec.set(node2, "identity", identity2) - #ec.set(node2, "cleanHome", True) ec.set(node2, "cleanExperiment", True) ec.set(node2, "cleanProcesses", True) - tun2 = ec.register_resource("PlanetlabTun") + tun2 = ec.register_resource("planetlab::Tun") ec.set(tun2, "endpoint_ip", "%s.2" % self.netblock) ec.set(tun2, "endpoint_prefix", 24) ec.register_connection(tun2, node2) - udptun = ec.register_resource("LinuxUdpTunnel") + udptun = ec.register_resource("linux::UdpTunnel") ec.register_connection(tun1, udptun) ec.register_connection(tun2, udptun) - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") cmd = "ping -c3 %s.2" % self.netblock ec.set(app, "command", cmd) ec.register_connection(app, node1) -- 2.43.0