"Peer host public IP used in network connection for this FIB entry. ",
flags = Flags.Design)
+ home = Attribute("home", "Sets HOME environmental variable. ",
+ default = "/root",
+ flags = Flags.Design)
+
cls._register_attribute(uri)
cls._register_attribute(protocol)
cls._register_attribute(host)
cls._register_attribute(port)
cls._register_attribute(ip)
+ cls._register_attribute(home)
def _instantiate_object(self):
if not self.get("binary"):
if not self.get("arguments"):
self.set("arguments", self._arguments)
+ if not self.get("environment"):
+ self.set("environment", self._environment)
+
super(LinuxNS3DceFIBEntry, self)._instantiate_object()
+ @property
+ def _environment(self):
+ envs = dict({
+ "home": "HOME",
+ })
+
+ env = ";".join(map(lambda k: "%s=%s" % (envs.get(k), str(self.get(k))),
+ [k for k in envs.keys() if self.get(k)]))
+
+ return env
+
@property
def _arguments(self):
args = ["-v", "add"]