Merge pull request #58 from jpds/networks-xmit-hash-policy

networks.py: Added xmit_hash_policy to bonding option filters.
This commit is contained in:
Mark Goddard 2017-11-08 08:50:03 +00:00 committed by GitHub
commit 67375fe221
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 0 deletions

View File

@ -148,6 +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):
@ -277,6 +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]
@ -291,6 +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',

View File

@ -246,6 +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
------------