On 3/22/22 09:46, Abhiram Sangana wrote:


On 21 Mar 2022, at 19:49, Mark Michelson <[email protected]> wrote:

I'm a bit surprised that with this change, the hierarchy for specificity is TYPE < 
IP < GATEWAY_PORT . This makes it sound as though the primary use case would be to 
use the same IP for multiple NAT rules across different gateway ports. Wouldn't it be 
just as likely that the same gateway port would be used for multiple NAT rules all 
with different IPs?
Yes, that makes sense.


   ovn-nbctl lr-nat-del [TYPE [IP] [GATEWAY_PORT]]

I think you should leave it the way you have it since it is easiest to explain 
(deleting multiple rules == never raise an error, deleting a specific rule == 
raise an error if it doesn't exist). Otherwise, the nuances are difficult to 
explain and difficult to maintain.

This syntax looks good. So, with this syntax, we never expect to match a single 
NAT rule and hence, we would not need —if_exists, right? I will retain the arg 
but we might never hit that case.

No, that was not my intention. Basically, the following forms would never return an error:

ovn-nbctl lr-nat-del my_router dnat (type only)
ovn-nbctl lr-nat-del my_router dnat 172.16.0.1 (type and IP)
ovn-nbctl lr-nat-del my_router dnat my_router_gateway_port1 (type and gateway port)

But the following form could return an error

ovn-nbctl lr-nat-del my_router dnat 172.16.0.1 my_router_gateway_port1 (type, IP, and gateway port specified)


Thanks,
Abhiram Sangana


_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to