Commit d1632bcd authored by Xavier Thompson's avatar Xavier Thompson

slapformat: WIP: Replace TAP with tap

parent b1a9fec6
...@@ -501,7 +501,7 @@ class Tap(object): ...@@ -501,7 +501,7 @@ class Tap(object):
def format(self, interface, user): def format(self, interface, user):
tap = self.name tap = self.name
conf = interface.conf conf = interface.conf
# Create/ensure TAP interface # Create/ensure tap interface
self.ensureTap(user, conf) self.ensureTap(user, conf)
# Create/ensure IPv4 routes # Create/ensure IPv4 routes
self.ensureIPv4Routes(conf) self.ensureIPv4Routes(conf)
...@@ -522,7 +522,7 @@ class Tap(object): ...@@ -522,7 +522,7 @@ class Tap(object):
user_id = pwd.getpwnam(user).pw_uid user_id = pwd.getpwnam(user).pw_uid
if owner_id != user_id: if owner_id != user_id:
conf.abort( conf.abort(
"Wrong owner of TAP %s, expected %s (%s) got %s", "Wrong owner of tap %s, expected %s (%s) got %s",
self.name, user_id, user, owner_id self.name, user_id, user, owner_id
) )
else: else:
...@@ -589,7 +589,7 @@ class Interface(object): ...@@ -589,7 +589,7 @@ class Interface(object):
ipv4_network = self.ipv4_network ipv4_network = self.ipv4_network
if ipv4_network and tap_network and ipv4_network.overlaps(tap_network): if ipv4_network and tap_network and ipv4_network.overlaps(tap_network):
self.conf.abort( self.conf.abort(
"IPv4 network %s and TAP IPv4 network %s overlap", "IPv4 network %s and tap IPv4 network %s overlap",
ipv4_network, tap_network ipv4_network, tap_network
) )
...@@ -599,7 +599,7 @@ class Interface(object): ...@@ -599,7 +599,7 @@ class Interface(object):
def checkTapIPv6Ranges(self): def checkTapIPv6Ranges(self):
if self.ipv6_network.prefixlen > 128 - 16 - 1: if self.ipv6_network.prefixlen > 128 - 16 - 1:
self.conf.abort("IPv6 network %s is too small for TAP ranges", network) self.conf.abort("IPv6 network %s is too small for tap ranges", network)
def getIPv4Network(self, cidr): def getIPv4Network(self, cidr):
if cidr: if cidr:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment