On 8/1/25 11:43 PM, Ilya Maximets wrote:
> On 7/31/25 3:59 PM, Alexandra Rukomoinikova wrote:
>> The new --filter option accepts comma-separated rules to display
>> only matching chassis, ports or encapsulation types.
>>
>> Includes test cases and man page updates.
> 
> Thanks for the update!  See some comments below.
> 
>>
>> Signed-off-by: Alexandra Rukomoinikova <arukomoinikova@k2.cloud>
>> ---

Hi, Alexandra.

With the branching scheduled tomorrow (EoD likely), will you be able
to send a new version of this patch set?

While it's mostly tests and the documentation, it would be better to
get it accepted before branching.

Best regards, Ilya Maximets.

>>  tests/ovn-sbctl.at        | 47 +++++++++++++++++++++++++++++++++++++++
>>  utilities/ovn-sbctl.8.xml | 16 +++++++++++--
>>  2 files changed, 61 insertions(+), 2 deletions(-)
> 
> We need a NEWS entry as well.
> 
>>
>> diff --git a/tests/ovn-sbctl.at b/tests/ovn-sbctl.at
>> index cb2fd2d0a..c9b8b04a4 100644
>> --- a/tests/ovn-sbctl.at
>> +++ b/tests/ovn-sbctl.at
>> @@ -181,6 +181,53 @@ options             : {vtep_logical_switch=l0, 
>> vtep_physical_switch=p0}
>>  ])
>>  ])
>>  
>> +dnl ---------------------------------------------------------------------
>> +OVN_SBCTL_TEST([ovn_sbctl_show_filter_option], [ovn-sbctl show filter 
>> option], [
>> +
>> +AT_CHECK([ovn-nbctl ls-add br-test])
>> +AT_CHECK([ovn-nbctl lsp-add br-test vif0])
>> +AT_CHECK([ovn-nbctl lsp-set-addresses vif0 f0:ab:cd:ef:01:02])
>> +AT_CHECK([ovn-sbctl chassis-add ch0 geneve 1.2.3.1])
>> +AT_CHECK([ovn-nbctl --wait=sb sync])
>> +AT_CHECK([ovn-sbctl lsp-bind vif0 ch0])
>> +
>> +AT_CHECK([ovn-sbctl show], [0], [dnl
>> +Chassis ch0
>> +    Encap geneve
>> +        ip: "1.2.3.1"
>> +        options: {csum="true"}
>> +    Port_Binding vif0
>> +])
>> +
>> +AT_CHECK([ovn-sbctl chassis-add ch2 geneve 1.2.3.2])
>> +AT_CHECK([ovn-sbctl chassis-add ch3 geneve 1.2.3.3])
>> +AT_CHECK([ovn-sbctl chassis-add ch4 vxlan 1.2.3.4])
>> +
>> +AT_CHECK([ovn-sbctl --filter='ch2,ch3' show | grep Chassis | sort], [0], 
>> [dnl
>> +Chassis ch2
>> +Chassis ch3
>> +])
>> +
>> +AT_CHECK([ovn-sbctl --filter='1.2.3.4,1.2.3.3' show | grep Chassis | sort], 
>> [0], [dnl
>> +Chassis ch3
>> +Chassis ch4
>> +])
>> +
>> +AT_CHECK([ovn-sbctl --filter='Encap(vxlan)' show | grep -E 
>> '(Chassis|Encap)' | sort], [0], [dnl
>> +    Encap vxlan
>> +Chassis ch0
>> +Chassis ch2
>> +Chassis ch3
>> +Chassis ch4
>> +])
>> +
>> +AT_CHECK([ovn-sbctl --filter='Encap(vxlan),ch4' show | grep -E 
>> '(Chassis|Encap)' | sort], [0], [dnl
>> +    Encap vxlan
>> +Chassis ch4
>> +])
>> +
>> +])
>> +
>>  dnl ---------------------------------------------------------------------
>>  
>>  OVN_SBCTL_TEST([ovn_sbctl_connection], [ovn-sbctl - connection], [
>> diff --git a/utilities/ovn-sbctl.8.xml b/utilities/ovn-sbctl.8.xml
>> index 69ae62115..ccd5d4901 100644
>> --- a/utilities/ovn-sbctl.8.xml
>> +++ b/utilities/ovn-sbctl.8.xml
>> @@ -279,9 +279,21 @@
>>          been initialized, this command has no effect.
>>        </dd>
>>  
>> -      <dt><code>show</code></dt>
>> +      <dt>
>> +      
>> <code>[--filter=<var>filter-rule</var>[,<var>filter-rule</var>...]</code>
> 
> The opening bracket should be before the <code> tag, and there is also a 
> missing
> closing bracket before the '...'.
> 
>> +      <code>show</code>
>> +      </dt>
>> +
>>        <dd>
>> -        Prints a brief overview of the database contents.
>> +        Prints a brief overview of the database contents. If
> 
> Double spaces between sentences here and below.
> 
>> +        <code>--filter</code> is specified, output is filtered
>> +        according to the rules. Each <var>filter-rule</var> has
>> +        the form <code>table-name(filter[|filter]...)</code>. If
> 
> The 'table-name' and both 'filter's need to be individually wrapped into 
> <var></var>
> as they are referenced as variables below.
> 
>> +        <var>table-name</var> is omitted, filtering is applied to
>> +        the <code>Chassis</code> table by default. A row is shown
>> +        only if its printed representation (including all referenced
>> +        rows) contains at least one of the specified <var>filter</var>
>> +        substrings.
> 
> nit: In general, some of the text above can be written with longer lines.  
> Text
> that looks like a right trapezoid feels a little awkward most of the time. :)
> 
>>        </dd>
>>      </dl>
>>  
> 
> Best regards, Ilya Maximets.

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to