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

Use aply-groups inheritance on get-configuration RPC calls #1363

Merged
merged 2 commits into from
Feb 10, 2021

Conversation

mirceaulinic
Copy link
Member

The behaviour for get-configuration RPC calls has been changed in
2af90cc, in order to ensure we're gathering from the right database.

The way junos-eznc works is that if there aren't any specific options
passed in, it uses apply-groups by default. But when there are options
passed in, as we do starting with 2af90cc, it doesn't default the
values of inherit and groups, and therefore when gathering the
config it won't expand the apply-groups, see
https://github.com/Juniper/py-junos-eznc/blob/ab0e8603eac56fa1d049695c7ef86eb64582ab8f/lib/jnpr/junos/factory/cfgtable.py#L517-L520.

Changing this now, by adding a few new optional arguments, which allow
the user to select the desired behaviour.

The behaviour for get-configuration RPC calls has been changed in
2af90cc, in order to ensure we're gathering from the right database.

The way junos-eznc works is that if there aren't any specific options
passed in, it uses apply-groups by default. But when there are options
passed in, as we do starting with 2af90cc, it doesn't default the
values of `inherit` and `groups`, and therefore when gathering the
config it won't expand the apply-groups, see
https://github.com/Juniper/py-junos-eznc/blob/ab0e8603eac56fa1d049695c7ef86eb64582ab8f/lib/jnpr/junos/factory/cfgtable.py#L517-L520.

Changing this now, by adding a few new optional arguments, which allow
the user to select the desired behaviour.
@coveralls
Copy link

coveralls commented Jan 19, 2021

Coverage Status

Coverage decreased (-81.1%) to 0.0% when pulling cf58cee on config-inheritance into 036ddc3 on develop.

@lucasalvatore
Copy link

@mirceaulinic tested this against our devices which had the issue reported in #1359 and they now work as expected!

@mirceaulinic mirceaulinic merged commit 27180c9 into develop Feb 10, 2021
@mirceaulinic mirceaulinic deleted the config-inheritance branch February 10, 2021 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants