Ns-3/linux tunnel experiments
[nepi.git] / src / nepi / resources / linux / tunnel.py
index 43c7f99..b2a6f0f 100644 (file)
@@ -64,6 +64,9 @@ class LinuxTunnel(LinuxApplication):
     def run_home(self, endpoint):
         return os.path.join(self.app_home(endpoint), self.ec.run_id)
 
+    def endpoint_mkdir(self, endpoint):
+        self.endpoint.node.mkdir(self.run_home(self.endpoint))
+
     def initiate_connection(self, endpoint, remote_endpoint):
         raise NotImplementedError
 
@@ -81,8 +84,8 @@ class LinuxTunnel(LinuxApplication):
 
     def do_provision(self):
         # create run dir for tunnel on each node 
-        self.endpoint1.node.mkdir(self.run_home(self.endpoint1))
-        self.endpoint2.node.mkdir(self.run_home(self.endpoint2))
+        self.endpoint_mkdir(self.endpoint1)
+        self.endpoint_mkdir(self.endpoint2)
 
         self.debug("Initiate the connection")
         # Start 2 step connection