1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

nmcli: Add 'slave-type bridge' to nmcli command if type is bridge-slave (#2409) (#2423)

(cherry picked from commit b5f8ae4320)

Co-authored-by: spike77453 <spike77453@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2021-05-03 08:16:19 +02:00 committed by GitHub
parent 007333dbfe
commit 5691e3aff3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 0 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- nmcli - if type is ``bridge-slave`` add ``slave-type bridge`` to ``nmcli`` command (https://github.com/ansible-collections/community.general/issues/2408).

View file

@ -780,6 +780,7 @@ class Nmcli(object):
})
elif self.type == 'bridge-slave':
options.update({
'connection.slave-type': 'bridge',
'bridge-port.path-cost': self.path_cost,
'bridge-port.hairpin-mode': self.hairpin,
'bridge-port.priority': self.slavepriority,

View file

@ -223,6 +223,7 @@ TESTCASE_BRIDGE_SLAVE_SHOW_OUTPUT = """\
connection.id: non_existent_nw_device
connection.interface-name: br0_non_existant
connection.autoconnect: yes
connection.slave-type: bridge
ipv4.never-default: no
bridge-port.path-cost: 100
bridge-port.hairpin-mode: yes