Replies: 1 comment 1 reply
-
Is there an API endpoint that can be created within the Version Control app that can control this rather than updating pynautobot? Pynautobot already has the ability to interact with API endpoints of apps. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
With default behavior, pynautobot does not fully work with querying Nautobot running the Version Control app because pynautobot, by default, will only query against the main/default/production branch.
With a simple mod, pynautobot can be made to query a specific, non-main/non-default Version Control branch. The mod in question involves adding a
dolt-branch
key, value to the pynautobot api header, as such:nautobot_api.http_session.headers['dolt-branch'] = "<non-default-branch-name>"
Take this example below, where pynautobot is configured to query the 'atl-leaf-augment' branch for a device that does not exist in the main/default branch:
Here is the output:
This is a fairly simple mod to make and it'd be quite easy to document.
Should pynautobot be made to accommodate the Version Control app more natively, or is this simple mod adequate?
Beta Was this translation helpful? Give feedback.
All reactions