-
Notifications
You must be signed in to change notification settings - Fork 153
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
Incompatibility with Ansible 4+ due to API change #589
Comments
There's also an issue in the same code path, where safe_eval is called (I noticed this in rpc.py). By roundtripping the list of dicts created by the task via string then attempting to convert it back to a list of dicts, safe_eval is used. safe_eval however, doesn't allow string inputs that contain the word 'import' - so trying to load a configuration via rpc calls that has route table imports fails. |
There's a further issue, that makes it impossible for some RPC's to be called.
It is not possible to generate this XML with the current code. |
@TheMysteriousX PyEZ and ansible support only RPCs which are updated in Junos XML explorer. Junos doesn't support the "validate" tag. Kindly validate and run the RPC which is supported by Junos. |
Thanks for your reply - the use of the validate RPC is not required to trigger these issues, just using an ansible version >4. i.e.
This task still throws the same stack trace. Validate is documented here - I'm not sure why it's missing from the xml explorer: |
Hi , Looks to be working fine ,Could you please verify once with latest Ansible collections.
Thanks |
Issue Type
Module Name
juniper.device.rpc
juniper.device collection and Python libraries version
OS / Environment
20.4R2, SRX4600
Summary
According to the ansible docs,
_check_type_dict()
has been removed.https://docs.ansible.com/ansible/devel/porting_guides/porting_guide_4.html
There is a call to the removed functions in
juniper/device/plugins/module_utils/juniper_junos_common.py
- this causes a stack trace when calling some RPC's.Steps to reproduce
Expected results
The task is a work in progress, but it shouldn't fail with a stack trace.
Actual results
The text was updated successfully, but these errors were encountered: