Fixing GRE tunnel between localhost and remote host
[nepi.git] / src / nepi / resources / linux / application.py
index af6ae34..5e06dab 100644 (file)
@@ -196,7 +196,7 @@ class LinuxApplication(ResourceManager):
     def node(self):
         node = self.get_connected(LinuxNode.get_rtype())
         if node: return node[0]
-        return None
+        raise RuntimeError, "Application must be connected to Node"
 
     @property
     def app_home(self):
@@ -360,6 +360,13 @@ class LinuxApplication(ResourceManager):
 
     def execute_deploy_command(self, command, prefix="deploy"):
         if command:
+            # replace application specific paths in the command
+            command = self.replace_paths(command)
+            
+            # replace application specific paths in the environment
+            env = self.get("env")
+            env = env and self.replace_paths(env)
+
             # Upload the command to a bash script and run it
             # in background ( but wait until the command has
             # finished to continue )
@@ -704,6 +711,7 @@ class LinuxApplication(ResourceManager):
     def execute_command(self, command, 
             env = None,
             sudo = False,
+            tty = False,
             forward_x11 = False,
             blocking = False):
 
@@ -715,6 +723,7 @@ class LinuxApplication(ResourceManager):
 
         return self.node.execute(command,
                 sudo = sudo,
+                tty = tty,
                 forward_x11 = forward_x11,
                 blocking = blocking)