Skip to content
This repository was archived by the owner on Mar 6, 2024. It is now read-only.

Add support to escape special characters in query filter for api v35.0+#711

Merged
rocknes merged 2 commits into
vmware-archive:masterfrom
rocknes:escape_qfilter
Oct 1, 2020
Merged

Add support to escape special characters in query filter for api v35.0+#711
rocknes merged 2 commits into
vmware-archive:masterfrom
rocknes:escape_qfilter

Conversation

@rocknes
Copy link
Copy Markdown
Contributor

@rocknes rocknes commented Sep 30, 2020

For api v35.0+, vCD requires special characters viz. ( ) ; , to be escaped if used as value in query filter.
In _AbstractQuery, we escape the special characters in encoded filter value.

Additional changes,

  1. Replaced usage of quote_plus to quote, since quote_plus will replace spaces with + and thus can cause the filter value to distort.
  2. Encoded all usage of qfilter in get_typed_query, since this field should be encoded by caller.

Testing done:
Ran all vcd-cli commands that invoke the affected methods at api v35.0 and made sure that all these commands returned expected result.


This change is Reviewable

…0 and above

Signed-off-by: rocknes <aritra.iitkgp@gmail.com>
Copy link
Copy Markdown
Contributor

@shashim22 shashim22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 9 of 9 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

Signed-off-by: rocknes <aritra.iitkgp@gmail.com>
@rocknes rocknes merged commit 17914bc into vmware-archive:master Oct 1, 2020
@rocknes rocknes deleted the escape_qfilter branch October 1, 2020 08:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants