community.general icon indicating copy to clipboard operation
community.general copied to clipboard

Support for interfaces of type openvswitch (ovs-bridge / ovs-port / ovs-interface) using nmcli module

Open mvrk69 opened this issue 3 years ago • 2 comments

Summary

Currently there is no support for interfaces of type ovs-bridge / ovs-port / ovs-interface using the nmcli module.

In order to setup a simple openvswitch with NetworkManager i use this commands:

nmcli c add type ovs-bridge conn.interface br0 con-name ovs-br0 nmcli c add type ovs-port conn.interface br0 master ovs-br0 con-name ovs-port-br0 nmcli c add type ovs-interface slave-type ovs-port conn.interface br0 master ovs-port-br0 con-name br0 nmcli c add type ovs-port conn.interface enp1s0 master ovs-br0 con-name ovs-port-enp1s0 nmcli c add type ethernet conn.interface enp1s0 master ovs-port-enp1s0 con-name enp1s0

Would be great to be able to do it using the ansible nmcli module

Issue Type

Feature Idea

Component Name

nmcli

Additional Information


Code of Conduct

  • [X] I agree to follow the Ansible Code of Conduct

mvrk69 avatar Oct 05 '22 15:10 mvrk69

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot avatar Oct 05 '22 15:10 ansibullbot

cc @alcamie101 click here for bot help

ansibullbot avatar Oct 05 '22 15:10 ansibullbot

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot avatar Nov 06 '22 16:11 ansibullbot

Hello, would it be possible to extend the module to support setting up OpenvSwitch with bond & VLANs? Here is an example configuration with nmcli:

# BRIDGE
nmcli connection add type ovs-bridge conn.interface 10g-main con-name 10g-main

# LACP BOND
nmcli conn add type ovs-port conn.interface bond1 master 10g-main ovs-port.bond-mode balance-tcp ovs-port.lacp active
nmcli conn add type ovs-port conn.interface bond1 master 10g-main ovs-port.bond-mode "bond_mode=balance-tcp lacp=active other_config:lacp-fallback-ab=true other_config:lacp-time=fast"

# ADD BOND SLAVE
 nmcli conn add type ethernet conn.interface ens1f1np1 master bond1
 nmcli conn add type ethernet conn.interface ens3f1np1 master bond1

# ADD VLANS
nmcli c add type ovs-port conn.interface 10g-NET192 master 10g-main ovs-port.tag 192 con-name ovs-port-vlan192
nmcli c add type ovs-interface slave-type ovs-port conn.interface 10g-NET192 master ovs-port-vlan192 con-name 10g-NET192 ipv4.method disabled ipv6.method ignore

Thank you very much, Theo

theovich avatar Apr 18 '24 12:04 theovich