diff options
author | Scott Moser <smoser@brickies.net> | 2017-05-24 21:10:50 -0400 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2017-06-08 18:34:06 -0400 |
commit | d00da2d5b0d45db5670622a66d833d2abb907388 (patch) | |
tree | ad084f88eb4de4c448959e4f3f8543550259a441 /tests/unittests/test_distros/test_netconfig.py | |
parent | 76d58265e34851b78e952a7f275340863c90a9f5 (diff) | |
download | vyos-cloud-init-d00da2d5b0d45db5670622a66d833d2abb907388.tar.gz vyos-cloud-init-d00da2d5b0d45db5670622a66d833d2abb907388.zip |
net: normalize data in network_state object
The network_state object's network and route keys would have different
information depending upon how the network_state object was populated.
This change cleans that up. Now:
* address will always contain an IP address.
* prefix will always include an integer value that is the
network_prefix for the address.
* netmask will be present only if the address is ipv4, and its
value will always correlate to the 'prefix'.
Diffstat (limited to 'tests/unittests/test_distros/test_netconfig.py')
-rw-r--r-- | tests/unittests/test_distros/test_netconfig.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/unittests/test_distros/test_netconfig.py b/tests/unittests/test_distros/test_netconfig.py index be9a8318..83580cc0 100644 --- a/tests/unittests/test_distros/test_netconfig.py +++ b/tests/unittests/test_distros/test_netconfig.py @@ -92,10 +92,9 @@ iface lo inet loopback auto eth0 iface eth0 inet static - address 192.168.1.5 + address 192.168.1.5/24 broadcast 192.168.1.0 gateway 192.168.1.254 - netmask 255.255.255.0 auto eth1 iface eth1 inet dhcp @@ -156,7 +155,7 @@ network: ethernets: eth7: addresses: - - 192.168.1.5/255.255.255.0 + - 192.168.1.5/24 gateway4: 192.168.1.254 eth9: dhcp4: true |