Search API and UI in VMware NSX are not case sensitive
search cancel

Search API and UI in VMware NSX are not case sensitive

book

Article ID: 370501

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

When searching in VMware NSX, using the API or UI, the results are not case sensitive .

For example, it will not distinguish between: "BROADCOM" or "broadcom" or "Broadcom"

API's used to search are, if not using the UI, please refer to the API for further details on API usage:

  • GET /policy/api/v1/search/query
  • GET /api/v1/search/query

Environment

VMware NSX

Cause

The API search query is broken up into terms and operators.

A term is case insensitive such as "BROADCOM" or " broadcom" or "Broadcom"

The search API will not distingush this as three different names insted it will be treated as one name.

If we have tag name, as above example and try deleting firewall rules by attached tag name "Broadcom".

This will result in deleting all firewall rules with tag name "BROADCOM" and " broadcom" and "Broadcom" instead of just one firewall rule with tag name "Broadcom".

This occurs due to the search API being case insensitive andt will not distingush between upper case and lower case or combination of both, they will be treated as one name.

Note: The UI uses these API, which explains why the UI has the same result.

Resolution

Search API is by design case-insensitive.

Use different names, not differnet case, so that it it easy to distinguish while searching.