_help = "Constructs a tunnel between two Linux endpoints using a UDP connection "
_backend = "linux"
-
@classmethod
def _register_attributes(cls):
cipher = Attribute("cipher",
default = None,
allowed = ["PLAIN", "AES", "Blowfish", "DES", "DES3"],
type = Types.Enumerate,
- flags = Flags.ExecReadOnly)
+ flags = Flags.Design)
cipher_key = Attribute("cipherKey",
"Specify a symmetric encryption key with which to protect "
"packets across the tunnel. python-crypto must be installed "
"on the system." ,
- flags = Flags.ExecReadOnly)
+ flags = Flags.Design)
txqueuelen = Attribute("txQueueLen",
"Specifies the interface's transmission queue length. "
"Defaults to 1000. ",
type = Types.Integer,
- flags = Flags.ExecReadOnly)
+ flags = Flags.Design)
bwlimit = Attribute("bwLimit",
"Specifies the interface's emulated bandwidth in bytes "
"per second.",
type = Types.Integer,
- flags = Flags.ExecReadOnly)
+ flags = Flags.Design)
cls._register_attribute(cipher)
cls._register_attribute(cipher_key)
self.do_discover()
self.do_provision()
- self.debug("----- READY ---- ")
self.set_ready()
def do_start(self):
(out2, err2), proc2 = self.endpoint2.node.kill(self._pid2,
self._ppid2, sudo = True)
- if err1 or err2 or proc1.poll() or proc2.poll():
+ if (proc1.poll() and err1) or (proc2.poll() and err2):
# check if execution errors occurred
msg = " Failed to STOP tunnel"
self.error(msg, err1, err2)