[ovs-discuss] Port Groups to add a port to a Port Group

Brendan Doyle brendan.doyle at oracle.com
Tue Sep 8 08:49:31 UTC 2020

I wonder would it be better if the ovn-nbctl Port Group commands are as 

pg-create group [ports]
      Create a port group named 'group' with a list of optional Logical 
Switch ports,
      "port1 port2.." where port1, port2 etc are Logical Switch port names.

pg-del group
      Delete the named port group 'group'

pg-add-ports group  [ports]
        Add the named Logical Switch ports to the 'group' Port Group, 
eg. "port1, port2"

pg-del-ports group [port]
       Remove the named Logical Switch ports to the 'group' Port Group, 
eg. "port1, port2"


On 07/09/2020 20:05, Brendan Doyle wrote:
> So the ovn-nbctl Port Group commands are:
> pg-add group [port]
> pg-set-ports
> pg-del
> But this is not great if I create a Port Group, and then later want 
> to  add a new Logical Switch Port to the Group.
> I have to find the uuid of the port then use Database commands to add 
> it. So If I create Port_Group pg_vcn2_net1_sl1
> with one port:
> #ovn-nbctl pg-add pg_vcn2_net1_sl1 ce78fd2b-4c68-428c-baf1-71718e7f3871
> To add a second port I think I have to do something like this:
> #ovn-nbctl lsp-list ls_vcn2 | grep 
> 06e85cca-867a-44fc-b2c1-be62f2fb06c0  | awk '{ print $1 }'
> 36e248df-077d-469a-8904-a5eb36d9b5ef
> #ovn-nbctl add Port_Group pg_vcn2_net1_sl1 ports 
> "36e248df-077d-469a-8904-a5eb36d9b5ef"
> #ovn-nbctl --if-exists get Port_Group pg_vcn2_net1_sl1 ports
> [36e248df-077d-469a-8904-a5eb36d9b5ef, 
> 9bb12b5d-8af5-444a-a885-410efe63143f]
> It would be really nice if either
> a) There were an 'ovn-nbctl pg-add-port group [port]' cmd to amend 
> ports to the Port Group
> OR
> b) The Database command could take port names not uuids
> Or am I missing something?
> Brendan
> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org
> https://urldefense.com/v3/__https://mail.openvswitch.org/mailman/listinfo/ovs-discuss__;!!GqivPVa7Brio!IZc1FymljHkj4jYDt-gb04R_DhPzmd2cwcf7_iTZ8W4_hMYM3wHSiumkkyvaAPXMadE$ 

More information about the discuss mailing list