Commit graph

6 commits

Author SHA1 Message Date
Jocelyn Jaubert
4352a4e54d interfaces_file: Add test for pre-up/post-up with inet/inet6 2018-10-22 20:51:59 +02:00
Jocelyn Jaubert
bd7001cdb6 interfaces_file: Add test for changing ipv4 or ipv6 address through address_family 2018-10-22 20:51:59 +02:00
Jocelyn Jaubert
a4916e848d interfaces_file: Add test for multiple address_family for same iface 2018-10-22 20:51:59 +02:00
Olivier Bourdon
a3f2e99864 Fix for changing method only on specified interface (#39015)
Test added for interface method change
2018-04-27 05:18:19 -04:00
Olivier Bourdon
612d0d6634 Fix interfaces_file for proper file contents (#37818)
The generated file was completely unusable by the system
therefore the fix which ensures that diffing the file
prior to changes and after only shows diffs

Furthermore the code did not work for Python 3.6
>       f.writelines(to_bytes(lines, errors='surrogate_or_strict'))
E       TypeError: a bytes-like object is required, not 'int'

The other modifications (lambda variable renaming) is to
comply with default flake8 rules
2018-03-28 10:21:43 +01:00
Roman Belyakovsky
42039cd436 New module: manage debian network interfaces file /etc/network/interfaces (system/interfaces_file) (#25295)
* Added new module interfaces_file

* interfaces_file: added unit tests

* interfaces_file: added golden files for unit tests

* interfaces_file: moved to system modules

* interfaces_file: fixed code formatting and convention issues
2017-08-01 12:11:43 -06:00