From a2b75046b9ba4fbebe92f788ffecc313fc317599 Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Fri, 3 Nov 2017 10:09:20 +0000 Subject: [PATCH 1/4] networks.py: Added xmit_hash_policy to bonding option filters. --- ansible/filter_plugins/networks.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ansible/filter_plugins/networks.py b/ansible/filter_plugins/networks.py index e48ee432e..804e94baf 100644 --- a/ansible/filter_plugins/networks.py +++ b/ansible/filter_plugins/networks.py @@ -148,6 +148,7 @@ def net_bridge_ports(context, name, inventory_hostname=None): net_bond_mode = _make_attr_filter('bond_mode') net_bond_slaves = _make_attr_filter('bond_slaves') net_bond_miimon = _make_attr_filter('bond_miimon') +net_bond_xmit_hash_policy = _make_attr_filter('bond_xmit_hash_policy') def _route_obj(route): @@ -277,6 +278,7 @@ def net_bond_obj(context, name, inventory_hostname=None): mode = net_bond_mode(context, name, inventory_hostname) slaves = net_bond_slaves(context, name, inventory_hostname) miimon = net_bond_miimon(context, name, inventory_hostname) + xmit_hash_policy = net_bond_xmit_hash_policy(context, name, inventory_hostname) routes = net_routes(context, name, inventory_hostname) if routes: routes = [_route_obj(route) for route in routes] @@ -291,6 +293,7 @@ def net_bond_obj(context, name, inventory_hostname=None): 'bond_slaves': slaves, 'bond_mode': mode, 'bond_miimon': miimon, + 'bond_xmit_hash_policy': xmit_hash_policy, 'route': routes, 'rules': rules, 'bootproto': 'static', From ac905ef91498cf45e378433e70c159f0e38a36cf Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Fri, 3 Nov 2017 11:13:11 +0000 Subject: [PATCH 2/4] network.rst: Document xmit_hash_policy option. --- doc/source/configuration/network.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/source/configuration/network.rst b/doc/source/configuration/network.rst index 1f7c490c9..f9139cfe9 100644 --- a/doc/source/configuration/network.rst +++ b/doc/source/configuration/network.rst @@ -246,6 +246,8 @@ The following attributes are supported: for the bond. ``bond_miimon`` For bond interfaces, the time in milliseconds between MII link monitoring. +``bond_xmit_hash_policy`` + For bond interfaces, the xmit_hash_policy to use for the bond. IP Addresses ------------ From 99b93ad9c76e9570c195aa00114a2166e6b9b34b Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Fri, 3 Nov 2017 17:01:41 +0000 Subject: [PATCH 3/4] networks.py: Added up/down-delay and lacp rate options. --- ansible/filter_plugins/networks.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ansible/filter_plugins/networks.py b/ansible/filter_plugins/networks.py index 804e94baf..b2f2f3019 100644 --- a/ansible/filter_plugins/networks.py +++ b/ansible/filter_plugins/networks.py @@ -148,7 +148,10 @@ def net_bridge_ports(context, name, inventory_hostname=None): net_bond_mode = _make_attr_filter('bond_mode') net_bond_slaves = _make_attr_filter('bond_slaves') net_bond_miimon = _make_attr_filter('bond_miimon') +net_bond_updelay = _make_attr_filter('bond_updelay') +net_bond_downdelay = _make_attr_filter('bond_downdelay') net_bond_xmit_hash_policy = _make_attr_filter('bond_xmit_hash_policy') +net_bond_lacp_rate = _make_attr_filter('bond_lacp_rate') def _route_obj(route): @@ -278,7 +281,10 @@ def net_bond_obj(context, name, inventory_hostname=None): mode = net_bond_mode(context, name, inventory_hostname) slaves = net_bond_slaves(context, name, inventory_hostname) miimon = net_bond_miimon(context, name, inventory_hostname) + updelay = net_bond_updelay(context, name, inventory_hostname) + downdelay = net_bond_downdelay(context, name, inventory_hostname) xmit_hash_policy = net_bond_xmit_hash_policy(context, name, inventory_hostname) + lacp_rate = net_bond_lacp_rate(context, name, inventory_hostname) routes = net_routes(context, name, inventory_hostname) if routes: routes = [_route_obj(route) for route in routes] @@ -293,7 +299,10 @@ def net_bond_obj(context, name, inventory_hostname=None): 'bond_slaves': slaves, 'bond_mode': mode, 'bond_miimon': miimon, + 'bond_updelay': updelay, + 'bond_downdelay': downdelay, 'bond_xmit_hash_policy': xmit_hash_policy, + 'bond_lacp_rate': lacp_rate, 'route': routes, 'rules': rules, 'bootproto': 'static', From 4c9a2435c11f7784cc5782d68bf2d8ca58375f03 Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Fri, 3 Nov 2017 17:04:49 +0000 Subject: [PATCH 4/4] network.rst: Document delay and lacp_rate options. --- doc/source/configuration/network.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/source/configuration/network.rst b/doc/source/configuration/network.rst index f9139cfe9..8e9c85165 100644 --- a/doc/source/configuration/network.rst +++ b/doc/source/configuration/network.rst @@ -246,8 +246,16 @@ The following attributes are supported: for the bond. ``bond_miimon`` For bond interfaces, the time in milliseconds between MII link monitoring. +``bond_updelay`` + For bond interfaces, the time in milliseconds to wait before declaring an + interface up (should be multiple of ``bond_miimon``). +``bond_downdelay`` + For bond interfaces, the time in milliseconds to wait before declaring an + interface down (should be multiple of ``bond_miimon``). ``bond_xmit_hash_policy`` For bond interfaces, the xmit_hash_policy to use for the bond. +``bond_lacp_rate`` + For bond interfaces, the lacp_rate to use for the bond. IP Addresses ------------