1- import re
2-
31from six import string_types
42
5- from .converters import *
3+ from .converters import Aaa , Bridge , Discovery , Dyndns , Ebtables , Gui , \
4+ Httpd , Igmpproxy , Iptables , Netconf , Netmode , Ntpclient , \
5+ Pwdog , Radio , Resolv , Route , Snmp , Sshd , Syslog , System , \
6+ Telnetd , Update , Users , Vlan , Wireless , Wpasupplicant
67from .renderers import AirOS
78from ..base .backend import BaseBackend
89from .schema import schema
910
11+
1012class AirOS (BaseBackend ):
1113 """
1214 AirOS backend
@@ -55,7 +57,8 @@ class AirOS(BaseBackend):
5557 def to_intermediate (self ):
5658 super (AirOS , self ).to_intermediate ()
5759 for k , v in self .intermediate_data .items ():
58- self .intermediate_data [k ] = [ x for x in flatten (intermediate_to_list (v )) if x != {}]
60+ self .intermediate_data [k ] = [x for x in flatten (intermediate_to_list (v )) if x != {}]
61+
5962
6063def flatten (xs ):
6164 """
@@ -64,7 +67,8 @@ def flatten(xs):
6467 if xs is not list :
6568 return xs
6669 else :
67- return reduce (lambda x ,y : x + flatten (y ), xs , [])
70+ return reduce (lambda x , y : x + flatten (y ), xs , [])
71+
6872
6973def intermediate_to_list (configuration ):
7074 """
@@ -153,7 +157,7 @@ def intermediate_to_list(configuration):
153157 nested_key = '{key}.{subkey}' .format (key = k , subkey = sk )
154158 temp [nested_key ] = sv
155159
156- # now it is atomic, append it to
160+ # now it is atomic, append it to
157161 result .append (temp )
158162
159163 else :
0 commit comments