Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query parameters infra #67

Merged
merged 3 commits into from
Oct 29, 2020
Merged

Conversation

sachinholla
Copy link
Contributor

1) Enhanced REST server to parse URL query parameters and pass them to
translib APIs. Handles RESTCONF "depth" and a custom "deleteEmptyEntry"
query parameters. The deleteEmptyEntry parameter is valid only for
DELETE requests; takes a boolean value - "true" or "false". It will be
passed to translib via SetRequest.DeleteEmptyEntry property. App modules
and transofrmer changes to handle these parameters is pending.

2) Modified cli_client get() and head() python APIs to accept optional
depth parameter, which should be a +ve integer. By default no depth
value is passed to the server. Usage:
cl.get(path, depth=2)
cl.head(path, depth=1)

3) Modified cli_client.delete python API to accept an optional
deleteEmptyEntry parameter. Default value is False. When specified as
True, the DELETE request will include "deleteEmptyEntry=true" query
parameter. Usage:
cl.delete(path, deleteEmptyEntry=True)

1) Enhanced REST server to parse URL query parameters and pass them to
translib APIs. Handles RESTCONF "depth" and a custom "deleteEmptyEntry"
query parameters. The deleteEmptyEntry parameter is valid only for
DELETE requests; takes a boolean value - "true" or "false". It will be
passed to translib via SetRequest.DeleteEmptyEntry property. App modules
and transofrmer changes to handle these parameters is pending.

2) Modified cli_client get() and head() python APIs to accept optional
depth parameter, which should be a +ve integer. By default no depth
value is passed to the server. Usage:
    cl.get(path, depth=2)
    cl.head(path, depth=1)

3) Modified cli_client.delete python API to accept an optional
deleteEmptyEntry parameter. Default value is False. When specified as
True, the DELETE request will include "deleteEmptyEntry=true" query
parameter. Usage:
    cl.delete(path, deleteEmptyEntry=True)
@lgtm-com
Copy link

lgtm-com bot commented Oct 27, 2020

This pull request introduces 1 alert when merging 46d63ad into ae96693 - view on LGTM.com

new alerts:

  • 1 for Unused local variable

@renukamanavalan renukamanavalan merged commit addbf3d into sonic-net:master Oct 29, 2020
@sachinholla sachinholla deleted the query_params branch October 31, 2020 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants