CiscoTestAutomation / rest

pyATS | Genie REST API Connector
10 stars 23 forks source link

Ability to disable query-target/rsp-subtree/rsp-prop-include in GET r… #102

Open vmatveyevGit opened 1 year ago

vmatveyevGit commented 1 year ago

In apic and nxos/aci connectors GET request has query-target/rsp-subtree/rsp-prop-include parameters always added to url. This does not work for some api requests - for example /mqapi2/deployment.query.json?mode=getvmmCapInfo - that api fails with addition of those parameters. Changed the code, to give calling function ability to disable those parameters in get, but providing empty values for them, like it is done for other parameters. Default values for those parameters are non-empty, so it does not change anything for existing scripts. Also made left stripping "/" in the dn, as that api also fails with "//" in the url - as one "/" is already provided by connect function and another "/" may be present in the dn. This makes apic and nxos connectors consistent with handling dn parameter with and without leading "/".

vmatveyevGit commented 1 year ago

Thanks for your submission! Could you please add in a changelog

Not sure how to add changelog - please see git log output below and let me know what else need to be done. Please see the change in the commit itself.

Thanks, Vladimir

[vmatveye@vmatveye-bld2 rest]$ git log commit 066807c9fc16dc712bb8884e6a11db1ccb9ed520 Author: Vladimir Matveyev vmatveye@insiemenetworks.com Date: Fri Feb 17 17:22:21 2023 -0800

Ability to disable query-target/rsp-subtree/rsp-prop-include in GET request

commit 29676493ade458822c9710613b605b8906377459

GerriorL commented 1 year ago

I've made a note of this and will add the changelog on our side. That's a clear enough commit message that it shouldn't be an issue