Skip to content

Commit 4f77d94

Browse files
committed
[airos] added split_cidr function to interface module
1 parent 2eaa3a2 commit 4f77d94

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

netjsonconfig/backends/airos/interface.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,12 @@ def radio(interface):
5353
return interface['wireless']['radio']
5454

5555

56+
def split_cidr(address):
5657
"""
58+
Return the address in dict format
5759
"""
60+
network = ip_interface('{addr}/{mask}'.format(addr=address['address'], mask=address['mask']))
61+
return {'ip': network.ip, 'netmask': network.netmask}
5862

5963

6064
def ssid(interface):

0 commit comments

Comments
 (0)