From 1fd2bd6046c476850286ab2c159c6cb2b669439c Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Tue, 9 Apr 2024 08:01:00 +0200 Subject: [PATCH] [PR #8154/39ef949f backport][stable-8] Update nmcli.py to support OVS commands (#8207) Update nmcli.py to support OVS commands (#8154) * Update nmcli.py to support OVS commands Adding Openvswitch command support and documentation to the nmcli module * Fixed versioning and documentation, added changelog fragment * Update changelogs/fragments/8154-add-ovs-commands-to-nmcli-module.yml Co-authored-by: Felix Fontein * Update plugins/modules/nmcli.py Co-authored-by: Felix Fontein --------- Co-authored-by: Felix Fontein (cherry picked from commit 39ef949f27d17922f93dd43c80bbeb8b0d6bbc82) Co-authored-by: Codey Schoettle <165081359+c-cschoettle@users.noreply.github.com> --- .../8154-add-ovs-commands-to-nmcli-module.yml | 2 + plugins/modules/nmcli.py | 47 +++++++++++++++++-- 2 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 changelogs/fragments/8154-add-ovs-commands-to-nmcli-module.yml diff --git a/changelogs/fragments/8154-add-ovs-commands-to-nmcli-module.yml b/changelogs/fragments/8154-add-ovs-commands-to-nmcli-module.yml new file mode 100644 index 0000000000..d1fb344ba5 --- /dev/null +++ b/changelogs/fragments/8154-add-ovs-commands-to-nmcli-module.yml @@ -0,0 +1,2 @@ +minor_changes: + - nmcli - adds OpenvSwitch support with new ``type`` values ``ovs-port``, ``ovs-interface``, and ``ovs-bridge``, and new ``slave_type`` value ``ovs-port`` (https://github.com/ansible-collections/community.general/pull/8154). \ No newline at end of file diff --git a/plugins/modules/nmcli.py b/plugins/modules/nmcli.py index 9360ce37d3..6f0884da92 100644 --- a/plugins/modules/nmcli.py +++ b/plugins/modules/nmcli.py @@ -64,13 +64,16 @@ options: - Type V(infiniband) is added in community.general 2.0.0. - Type V(loopback) is added in community.general 8.1.0. - Type V(macvlan) is added in community.general 6.6.0. + - Type V(ovs-bridge) is added in community.general 8.6.0. + - Type V(ovs-interface) is added in community.general 8.6.0. + - Type V(ovs-port) is added in community.general 8.6.0. - Type V(wireguard) is added in community.general 4.3.0. - Type V(vpn) is added in community.general 5.1.0. - Using V(bond-slave), V(bridge-slave), or V(team-slave) implies V(ethernet) connection type with corresponding O(slave_type) option. - If you want to control non-ethernet connection attached to V(bond), V(bridge), or V(team) consider using O(slave_type) option. type: str choices: [ bond, bond-slave, bridge, bridge-slave, dummy, ethernet, generic, gre, infiniband, ipip, macvlan, sit, team, team-slave, vlan, vxlan, - wifi, gsm, wireguard, vpn, loopback ] + wifi, gsm, wireguard, ovs-bridge, ovs-port, ovs-interface, vpn, loopback ] mode: description: - This is the type of device or network connection that you wish to create for a bond or bridge. @@ -86,12 +89,13 @@ options: slave_type: description: - Type of the device of this slave's master connection (for example V(bond)). + - Type V(ovs-port) is added in community.general 8.6.0. type: str - choices: [ 'bond', 'bridge', 'team' ] + choices: [ 'bond', 'bridge', 'team', 'ovs-port' ] version_added: 7.0.0 master: description: - - Master