Till Maas
d76ac65581
Do not require profiles to be specified for 'up'
...
This allows to up profiles that are only available on disk.
2018-08-15 10:04:47 +02:00
Till Maas
382c34197b
Modularize role
...
Splitting the role in smaller parts helps to keep the overview and to
develop separate tests.
2018-08-15 10:04:47 +02:00
Till Maas
d866422d9d
Merge pull request #74 from tyll/autodetect_provider
...
Use network manager only when it is running
2018-08-01 23:43:59 +02:00
Till Maas
c279f0afc5
Run integration tests with other provider, too
...
- Amend and add files to run integration tests against the provider that
was not autodetected, too.
- Add check to ensure that all integration tests run against both
providers
- Run black check for all python scripts
2018-08-01 23:13:30 +02:00
Till Maas
4b9c91763b
Use nm provider by default only when NetworkManager is running
...
- Use initscripts as provider except when NetworkManager is running
- Rename network_provider_default to network_provider_os_default, since
it contains the default based on the OS
2018-08-01 18:32:01 +02:00
Till Maas
441667560e
Update limitations of initscripts and nm provider
2018-08-01 18:13:58 +02:00
Till Maas
22539bdc18
Merge pull request #75 from tyll/interface_name
...
Use profile name for interface name by default
2018-08-01 09:41:28 +02:00
Till Maas
3c826ad355
More README clarifications on the variables and behavior
2018-07-30 19:12:44 +02:00
Till Maas
6bf70bcf60
Use profile name for interface name by default
...
* by default ```name``` is used as ```interface_name```
* if ```interface_name``` is set to the empty string, it will not be set
* if ```mac``` is specified, ```interface_name``` defaults to not being set
This fixes #41
2018-07-25 21:56:43 +02:00
Till Maas
64879e74d9
Merge pull request #73 from tyll/black-squash
...
Use black as formatter and enable flake8/pylint
2018-07-20 13:16:20 +02:00
Till Maas
2f6605cf79
Merge pull request #72 from tyll/test_bridge1
...
Working tests from #53
2018-07-18 17:29:54 +02:00
Till Maas
e32033f995
Use black as formatter and enable flake8/pylint
2018-07-18 17:23:18 +02:00
Till Maas
35f2dcf8f7
Install bridge-utils if necessary for initscripts
...
Fixes #68
2018-07-16 08:26:50 +02:00
Till Maas
9b3d2d3ad8
Add simple test for bridges
2018-07-16 08:26:50 +02:00
pcahyna
7d44710f44
Merge pull request #69 from tyll/fixes
...
Fix typo in tox.ini
2018-07-11 15:32:02 +02:00
Till Maas
7c5dce7a1d
Fix typo in tox.ini
2018-07-11 12:35:35 +02:00
Till Maas
fdcd0f8ea7
Merge pull request #52 from tyll/test_connection_down
...
Taking a connection down does not work
2018-07-11 12:34:16 +02:00
Till Maas
459601c8e7
Fail when trying to down a non-existing NM profile
2018-07-11 10:06:45 +02:00
Till Maas
756be9a8de
Allow to take down connections if not in config
...
Allow to take down connections regardless of whether they are defined in
the configuration. It should be enough that the connection is defined on
the system.
2018-07-09 14:39:40 +02:00
Till Maas
d370966ee2
Add test to take interface down
2018-07-09 14:39:40 +02:00
Till Maas
44a9d70981
Merge pull request #65 from tyll/no_vars_symlinks
...
Use set_facts to set default provider
2018-07-09 13:37:19 +02:00
Till Maas
5f30c5b5e3
Use set_facts to set default provider
...
This avoids symlinks that do not work on Windows:
https://github.com/linux-system-roles/network/pull/64#issuecomment-401740870
2018-07-09 11:56:01 +02:00
Till Maas
61557e05e6
Merge pull request #67 from tyll/package_facts
...
Work around slow package manager
2018-07-09 11:20:49 +02:00
Till Maas
3e8cb619b8
Work around slow package manager
2018-07-06 21:16:33 +02:00
Till Maas
b52193984f
Update .gitignore
2018-07-03 12:55:27 +02:00
Till Maas
775b7648fe
Merge pull request #63 from tyll/initscripts
...
tests_ethernet: run with initscripts provider, too
2018-06-29 16:35:56 +02:00
Till Maas
053dd62720
tests_ethernet: run with initscripts provider, too
2018-06-29 16:06:43 +02:00
Till Maas
f2e493cd75
Merge pull request #62 from tyll/fixes
...
Various minor fixes
2018-06-28 18:04:03 +02:00
Till Maas
488c59a5f5
Rename/symlink accidentally checked-in files
2018-06-28 16:55:37 +02:00
Till Maas
8cf13dbc22
tox.ini: Fix PYTHONPATH
2018-06-28 16:31:35 +02:00
Till Maas
fce335d79e
tests_ethernet: Use correct test IP range
2018-06-28 16:31:35 +02:00
Thomas Haller
5b9e1331f8
library: fix try-count handling in SysUtil.link_infos()
...
https://github.com/linux-system-roles/network/issues/61
2018-06-18 21:56:37 +02:00
Till Maas
ed1d30a53d
Merge pull request #60 from linux-system-roles/th/main-function
...
th/main-function
2018-06-11 20:15:29 +02:00
Till Maas
ec65f5c78e
Merge pull request #59 from tyll/fix_global_connections
...
Use proper connections attribute
2018-06-11 15:36:37 +02:00
Till Maas
70d3e9e96c
Merge pull request #58 from smasc/fix_autoconnect
...
Fix handling of autoconnect parameter
2018-06-11 15:36:15 +02:00
Thomas Haller
cf8522e5cc
library: move main code to explicit main() function
...
Without it, we unintentionally declared 3 global variables
(connections, cmd, run_env_ansible). This was not intended,
and results in possibly wrong behavior by accidentally using
the global variables.
2018-06-11 08:49:35 +02:00
Till Maas
63314aeb92
Use proper connections attribute
2018-06-08 21:35:31 +02:00
Shannon Mascarenhas
70e69226c1
Add test for disabling autoconnect
2018-05-30 08:25:25 -05:00
Shannon Mascarenhas
5b45f9bc46
Fix handling of autoconnect parameter
...
This fixes a bug in the `network_connections` module when using the
`initscripts` provider and encountering a connection with `autoconnect`
set to false. It fails to write any `ONBOOT=` line to the interface's
`ifcfg-*` file, which RHEL treats as equivalent to `ONBOOT=yes`.
This explicitly sets `ONBOOT` for all interfaces defined, instead of
relying on what RHEL considers its default value.
2018-05-29 12:52:02 -05:00
Till Maas
fd110a4deb
Merge pull request #51 from tyll/type_keyerror
...
Detect and fix keyerror
2018-05-25 20:36:02 +02:00
Till Maas
dd24f020a9
Handle undefined type attribute
...
This fixes this exception (issue #40 ):
[WARNING]: exception: Traceback (most recent call last): File
"/tmp/ansible_FfjjGk/ansible_module_network_connections.py", line 2812, in <module> cmd.run() File
"/tmp/ansible_FfjjGk/ansible_module_network_connections.py", line 2398, in run self.run_prepare() File
"/tmp/ansible_FfjjGk/ansible_module_network_connections.py", line 2653, in run_prepare if connection['type'] in [
'macvlan' ]: KeyError: 'type'
2018-05-25 19:52:10 +02:00
Till Maas
0fc1b5bbb5
Add test to remove Ethernet profile
2018-05-25 19:52:10 +02:00
Till Maas
598e487971
Only run tests with python2 or python3 binary
...
Also fail, when the tests did not run with at least one of them.
2018-05-25 19:51:09 +02:00
Till Maas
47c7b638f0
Test whether python commands can be executed
...
This changes the test to rely on whether the binaries are available
regardless of how they were installed or from which package.
2018-05-25 19:50:07 +02:00
Till Maas
baae5ab9f9
Merge pull request #50 from tyll/more_integration_tests
...
More integration tests
2018-05-25 13:17:09 +02:00
Till Maas
05ae9bbc1e
Remove .image-cache from .gitignore
...
It was used by an old version of the test harness
2018-05-24 15:15:38 +02:00
Till Maas
75784ea5ed
Install python{,3}-gobject-base if required
2018-05-24 15:14:04 +02:00
Till Maas
b01ab7fd50
Add integration test for Ethernet device
2018-05-24 15:14:04 +02:00
Till Maas
910f399665
Add helper scripts to get coverage data
2018-05-24 15:14:04 +02:00
Till Maas
640e11001e
Add examples to remove or take down a profile
2018-05-23 18:55:21 +02:00