From 136b41cb0e72c5832680299d2f7c4daddeb35a2d Mon Sep 17 00:00:00 2001 From: brent s Date: Tue, 12 May 2020 19:39:16 -0400 Subject: [PATCH] whoops --- utils/he_ipv6/config.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/utils/he_ipv6/config.py b/utils/he_ipv6/config.py index f021bb8..67a339c 100644 --- a/utils/he_ipv6/config.py +++ b/utils/he_ipv6/config.py @@ -89,6 +89,7 @@ class Tunnel(object): self.client = None self.server = None self.creds = None # This should be handled externally and map to a Cred obj + self.creds_id = None self.allocations = [] self.parse() @@ -104,6 +105,10 @@ class Tunnel(object): self.client = IP6(_ip_txt, _prefix_txt) return(None) + def _creds(self): + self.creds_id = self.xml.attrib['creds'].strip() + return(None) + def _id(self): self.id = int(self.xml.attrib['id'].strip()) return(None) @@ -116,6 +121,7 @@ class Tunnel(object): def parse(self): self._id() + self._creds() self._client() self._server() self._allocations() @@ -194,7 +200,7 @@ class Config(object): tunnels_xml = self.xml.find('tunnels') for tun_xml in tunnels_xml.findall('tunnel'): tun = Tunnel(tun_xml) - tun.creds = self.creds.get(tun.creds) + tun.creds = self.creds.get(tun.creds_id) self.tunnels[tun.id] = tun return(None)