@@ -41,7 +41,6 @@ def to_intermediate(self):
4141 if addresses is not None :
4242 for address in addresses :
4343 new_address = {}
44- print address
4544 if iftype in ['ethernet' , 'bridge' , 'loopback' ]:
4645 if address .get ('proto' ) == 'static' :
4746 if address .get ('family' ) == 'ipv4' :
@@ -93,7 +92,7 @@ def to_intermediate(self):
9392 result = []
9493 interfaces = get_copy (self .netjson , self .netjson_key )
9594 for interface in interfaces :
96- if interface ['type' ] == 'wireless' and interface .get ('wireless' ).get ('mode' ) is not 'adhoc' :
95+ if interface ['type' ] == 'wireless' and interface .get ('wireless' ).get ('mode' ) is not 'adhoc' :
9796 new_interface = {
9897 'ifname' : interface .get ('name' ),
9998 'iftype' : interface .get ('type' ),
@@ -133,7 +132,7 @@ def _get_encryption(self, wireless):
133132 return {}
134133 disabled = encryption .get ('disabled' , False )
135134 new_encryption = {}
136- if encryption .get ('protocol' ) is not 'none' and encryption . get ( ' disabled' ) is not True :
135+ if encryption .get ('protocol' ) is not 'none' and disabled is not True :
137136 protocol , method = encryption .get ('protocol' ).split ("_" )
138137 if protocol in ['wpa' , 'wpa2' ]:
139138 auth_algs = '1'
@@ -151,6 +150,7 @@ def _get_encryption(self, wireless):
151150 new_encryption .update ({'wpa_pairwise' : wpa_pairwise })
152151 return new_encryption
153152
153+
154154class DnsServers (BaseConverter ):
155155 netjson_key = 'dns_servers'
156156
0 commit comments