File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
netjsonconfig/backends/airos Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 11from copy import deepcopy
22from ipaddress import ip_interface
33
4+ import six
5+
46from ...utils import get_copy
57from ..base .converter import BaseConverter
68from .aaa import bridge_devname , profile_from_interface , status_from_interface
@@ -479,7 +481,7 @@ def to_intermediate(self):
479481 routes = self .default_routes ()
480482 original = get_copy (self .netjson , self .netjson_key , [])
481483 for r in original :
482- network = ip_interface (r ['destination' ])
484+ network = ip_interface (six . text_type ( r ['destination' ]) )
483485 temp = {}
484486 temp ['ip' ] = str (network .ip )
485487 temp ['netmask' ] = str (network .netmask )
Original file line number Diff line number Diff line change 11from ipaddress import ip_interface
22
3+ from six import text_type
4+
35
46def autonegotiation (interface ):
57 """
@@ -92,7 +94,7 @@ def split_cidr(address):
9294 """
9395 Return the address in dict format
9496 """
95- network = ip_interface ('{addr}/{mask}' .format (addr = address ['address' ], mask = address ['mask' ]))
97+ network = ip_interface (text_type ( '{addr}/{mask}' .format (addr = address ['address' ], mask = address ['mask' ]) ))
9698 return {'ip' : str (network .ip ), 'netmask' : str (network .netmask )}
9799
98100
You can’t perform that action at this time.
0 commit comments