@classmethod
def _register_attributes(cls):
- ip4 = Attribute("ip4", "IPv4 Address",
+ endpoint_ip = Attribute("endpoint_ip", "IP of the endpoint. This is the attribute "
+ "you should use to establish a tunnel or a remote "
+ "connection between endpoint",
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 of the endpoint",
type = Types.Integer,
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(prefix4)
+ cls._register_attribute(endpoint_prefix)
cls._register_attribute(mtu)
cls._register_attribute(devname)
cls._register_attribute(up)
cipher, cipher_key, bwlimit, txqueuelen):
# Set the remote endpoint
- self.set("pointopoint", remote_endpoint.get("ip4"))
+ self.set("pointopoint", remote_endpoint.get("endpoint_ip"))
remote_ip = remote_endpoint.node.get("ip")
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
command = ["sudo -S python ${SRC}/pl-vif-create.py"]
command.append("-t %s" % self.vif_type)
- command.append("-a %s" % self.get("ip4"))
- command.append("-n %d" % self.get("prefix4"))
+ command.append("-a %s" % self.get("endpoint_ip"))
+ command.append("-n %d" % self.get("endpoint_prefix"))
command.append("-f %s " % self.vif_name_file)
command.append("-S %s " % self.sock_name)
command.append("-u %s" % self.node.get("username"))
command.append("-N %s" % device_name)
command.append("-t %s" % self.vif_type)
- command.append("-a %s" % self.get("ip4"))
- command.append("-n %d" % self.get("prefix4"))
+ command.append("-a %s" % self.get("endpoint_ip"))
+ command.append("-n %d" % self.get("endpoint_prefix"))
if self.get("snat") == True:
command.append("-s")