Skip to content

Commit

Permalink
playbook support for vlan trunk ranges (#149)
Browse files Browse the repository at this point in the history
* Provide playbook support for vlan trunk ranges in the SONiC l2_interfaces resource module:

- Change the argspec to use a string instead of an integer when specifying a vlan or
a vlan range.
- Add handling to support a "vlan" argument that specifies a vlan range in the form "X-Y".
- provide correct tracking of commands sent to the device after eliminating requested
configuration that is already present on the device.
- Fix bugs causing incorrect reporting of the original playbook command "invocation" and
the final set of commands sent to the device.
- Add regression test cases to cover the possible overlap conditions between trunk vlans
and ranges configured on the device and requested additions or deletions of trunk vlans
and ranges.

* Fix Ansible sanity errors for automatic string format field numbering.

* Fix remaining sanity errors.

* Updated the description of the trunk "vlan" argument to incorporate a vlan range

* Modified trunk vlan argument descriptions, added vlan trunk range examples

* Fix "trailing whitespace" sanity errors.
  • Loading branch information
kerry-meyer authored Jan 12, 2023
1 parent f98c88d commit 90d7e94
Show file tree
Hide file tree
Showing 5 changed files with 494 additions and 63 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __init__(self, **kwargs):
'allowed_vlans': {
'elements': 'dict',
'options': {
'vlan': {'type': 'int'}
'vlan': {'type': 'str'}
},
'type': 'list'
}
Expand Down
Loading

0 comments on commit 90d7e94

Please sign in to comment.