removed parameter conversion for creating GreTap commands
This commit is contained in:
parent
2bfd050880
commit
82bdbd776b
2 changed files with 6 additions and 12 deletions
|
@ -456,12 +456,12 @@ class GreTap(CoreInterface):
|
|||
:param core.nodes.base.CoreNode node: related core node
|
||||
:param str name: interface name
|
||||
:param core.emulator.session.Session session: core session instance
|
||||
:param mtu: interface mtu
|
||||
:param int mtu: interface mtu
|
||||
:param str remoteip: remote address
|
||||
:param int _id: object id
|
||||
:param str localip: local address
|
||||
:param ttl: ttl value
|
||||
:param key: gre tap key
|
||||
:param int ttl: ttl value
|
||||
:param int key: gre tap key
|
||||
:param bool start: start flag
|
||||
:param fabric.connection.Connection server: remote server node will run on,
|
||||
default is None for localhost
|
||||
|
@ -484,13 +484,7 @@ class GreTap(CoreInterface):
|
|||
if remoteip is None:
|
||||
raise ValueError("missing remote IP required for GRE TAP device")
|
||||
|
||||
if localip is not None:
|
||||
localip = str(localip)
|
||||
if ttl is not None:
|
||||
ttl = str(ttl)
|
||||
if key is not None:
|
||||
key = str(key)
|
||||
self.net_client.create_gretap(self.localname, str(remoteip), localip, ttl, key)
|
||||
self.net_client.create_gretap(self.localname, remoteip, localip, ttl, key)
|
||||
self.net_client.device_up(self.localname)
|
||||
self.up = True
|
||||
|
||||
|
|
|
@ -177,8 +177,8 @@ class LinuxNetClient(object):
|
|||
:param str device: device to add tap to
|
||||
:param str address: address to add tap for
|
||||
:param str local: local address to tie to
|
||||
:param str ttl: time to live value
|
||||
:param str key: key for tap
|
||||
:param int ttl: time to live value
|
||||
:param int key: key for tap
|
||||
:return: nothing
|
||||
"""
|
||||
cmd = "%s link add %s type gretap remote %s" % (IP_BIN, device, address)
|
||||
|
|
Loading…
Add table
Reference in a new issue