git://git.onelab.eu
/
nepi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change the name of ip4 and prefix4 into endpoint_ip and endpoint_prefix
[nepi.git]
/
src
/
nepi
/
resources
/
linux
/
tap.py
diff --git
a/src/nepi/resources/linux/tap.py
b/src/nepi/resources/linux/tap.py
index
6b3dce6
..
91640df
100644
(file)
--- a/
src/nepi/resources/linux/tap.py
+++ b/
src/nepi/resources/linux/tap.py
@@
-37,13
+37,13
@@
class LinuxTap(LinuxApplication):
@classmethod
def _register_attributes(cls):
@classmethod
def _register_attributes(cls):
-
ip4 = Attribute("ip4
", "IPv4 Address",
+
endpoint_ip = Attribute("endpoint_ip
", "IPv4 Address",
flags = Flags.Design)
mac = Attribute("mac", "MAC Address",
flags = Flags.Design)
flags = Flags.Design)
mac = Attribute("mac", "MAC Address",
flags = Flags.Design)
-
prefix4 = Attribute("prefix4
", "IPv4 network prefix",
+
endpoint_prefix = Attribute("endpoint_prefix
", "IPv4 network prefix",
type = Types.Integer,
flags = Flags.Design)
type = Types.Integer,
flags = Flags.Design)
@@
-83,9
+83,9
@@
class LinuxTap(LinuxApplication):
"Bash script to be executed before releasing the resource",
flags = Flags.Design)
"Bash script to be executed before releasing the resource",
flags = Flags.Design)
- cls._register_attribute(
ip4
)
+ cls._register_attribute(
endpoint_ip
)
cls._register_attribute(mac)
cls._register_attribute(mac)
- cls._register_attribute(
prefix4
)
+ cls._register_attribute(
endpoint_prefix
)
cls._register_attribute(mtu)
cls._register_attribute(devname)
cls._register_attribute(up)
cls._register_attribute(mtu)
cls._register_attribute(devname)
cls._register_attribute(up)
@@
-326,7
+326,7
@@
class LinuxTap(LinuxApplication):
cipher, cipher_key, bwlimit, txqueuelen):
# Set the remote endpoint
cipher, cipher_key, bwlimit, txqueuelen):
# Set the remote endpoint
- self.set("pointopoint", remote_endpoint.get("
ip4
"))
+ self.set("pointopoint", remote_endpoint.get("
endpoint_ip
"))
# Planetlab TAPs always use PI headers
from nepi.resources.planetlab.tap import PlanetlabTap
# Planetlab TAPs always use PI headers
from nepi.resources.planetlab.tap import PlanetlabTap
@@
-382,7
+382,7
@@
class LinuxTap(LinuxApplication):
def _gre_connect_command(self, remote_endpoint, connection_run_home):
# Set the remote endpoint
def _gre_connect_command(self, remote_endpoint, connection_run_home):
# Set the remote endpoint
- self.set("pointopoint", remote_endpoint.get("
ip4
"))
+ self.set("pointopoint", remote_endpoint.get("
endpoint_ip
"))
self.set("greRemote", remote_endpoint.node.get("ip"))
# Generate GRE connect command
self.set("greRemote", remote_endpoint.node.get("ip"))
# Generate GRE connect command
@@
-411,8
+411,8
@@
class LinuxTap(LinuxApplication):
"pi" if self.get("pi") else ""))
start_command.append("sudo -S ip link set %s up" % self.get("deviceName"))
start_command.append("sudo -S ip addr add %s/%d dev %s" % (
"pi" if self.get("pi") else ""))
start_command.append("sudo -S ip link set %s up" % self.get("deviceName"))
start_command.append("sudo -S ip addr add %s/%d dev %s" % (
- self.get("
ip4
"),
- self.get("
prefix4
"),
+ self.get("
endpoint_ip
"),
+ self.get("
endpoint_prefix
"),
self.get("deviceName"),
))
self.get("deviceName"),
))
@@
-445,10
+445,10
@@
class LinuxTap(LinuxApplication):
self.get("greKey")
))
command.append("sudo -S ip addr add %s/%d peer %s/%d dev %s" % (
self.get("greKey")
))
command.append("sudo -S ip addr add %s/%d peer %s/%d dev %s" % (
- self.get("
ip4
"),
- self.get("
prefix4
"),
+ self.get("
endpoint_ip
"),
+ self.get("
endpoint_prefix
"),
self.get("pointopoint"),
self.get("pointopoint"),
- self.get("
prefix4
"),
+ self.get("
endpoint_prefix
"),
self.get("deviceName"),
))
command.append("sudo -S ip link set %s up " % self.get("deviceName"))
self.get("deviceName"),
))
command.append("sudo -S ip link set %s up " % self.get("deviceName"))