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

Add junos_l3_interfaces #59026

Merged
merged 1 commit into from
Jul 31, 2019
Merged

Conversation

danielmellado
Copy link
Contributor

SUMMARY

Add junos_l3_interface

This commit adds junos_l3_interface resource module, allowing operations such
as these for l3 interfaces configuration in junos

  • merge
  • delete
  • override
  • replace

The bootstrapping from this module has been done using resource module builder
[1]

[1] https://github.com/ansible-network/resource_module_builder

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

junos_l3_interface

ADDITIONAL INFORMATION

As this module uses netconf, it does require ncclient, as mentioned there.

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 core_review In order to be merged, this PR must follow the core review workflow. needs_triage Needs a first human triage before being processed. networking Network category new_plugin This PR includes a new plugin. support:community This issue/PR relates to code supported by the Ansible community. support:network This issue/PR relates to code supported by the Ansible Network Team. labels Jul 12, 2019

for config in want:
if config['name'] not in existing_l3_intfs:
continue
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

junos_l3_interfaces:
   state: deleted

Will this logic handle the ^ scenario that deletes all the l3 interface config is a key option (name in this case) within config is not mentioned?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, as in that case if you check I'm passing the same existing intf lists. What this would do is only skip it in case the interface is not a l3 one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, hold on, my bad, was thinking about another thing

loop_var: test_case_to_run

- name: run test case (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

connection=local is not supported. This task is not required.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will remove

Copy link
Member

@ganeshrn ganeshrn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

junos_facts module doc needs to be updated to reflect l3_interfaces facts gathering

@ansibot
Copy link
Contributor

ansibot commented Jul 12, 2019

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

lib/ansible/modules/network/junos/junos_facts.py:0:0: E326 Argument 'gather_network_resources' in argument_spec defines choices as ([['all'], ['interfaces'], ['l3_interfaces']]) but documentation defines choices as ([['all'], ['interfaces']])

click here for bot help

@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Jul 12, 2019
@danielmellado
Copy link
Contributor Author

Pull-request updated, HEAD is now 1fb2efe2b19e7550b92fd520a8b40d240d5f61be

@ansibot
Copy link
Contributor

ansibot commented Jul 12, 2019

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

lib/ansible/modules/network/junos/junos_facts.py:0:0: E326 Argument 'gather_network_resources' in argument_spec defines choices as ([['all'], ['interfaces'], ['l3_interfaces']]) but documentation defines choices as ([['all'], ['interfaces']])

click here for bot help

@ansible-zuul
Copy link

ansible-zuul bot commented Jul 12, 2019

Build failed (third-party-check pipeline) integration testing with
Ansible.

@danielmellado
Copy link
Contributor Author

Pull-request updated, HEAD is now ac20e10835fee87a0b8fd4de755e8aa8581e7f0c

@ansibot
Copy link
Contributor

ansibot commented Jul 12, 2019

@ansibot ansibot added module This issue/PR relates to a module. core_review In order to be merged, this PR must follow the core review workflow. and removed needs_triage Needs a first human triage before being processed. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jul 12, 2019
Copy link
Member

@ganeshrn ganeshrn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. Thanks!

@ansible-zuul
Copy link

ansible-zuul bot commented Jul 12, 2019

Build failed (third-party-check pipeline) integration testing with
Ansible.

@danielmellado
Copy link
Contributor Author

Pull-request updated, HEAD is now 49079333f6f0374c0fcfe86b4afca27c7cbf7c10

@ansibot ansibot added the new_module This PR includes a new module. label Jul 12, 2019
@ansibot
Copy link
Contributor

ansibot commented Jul 12, 2019

The test ansible-test sanity --test validate-modules [explain] failed with 5 errors:

lib/ansible/modules/network/junos/junos_l3_interfaces.py:0:0: E305 DOCUMENTATION.options.config.elements: extra keys not allowed @ data['options']['config']['elements']. Got 'dict'
lib/ansible/modules/network/junos/junos_l3_interfaces.py:0:0: E305 DOCUMENTATION.options.config.suboptions.ipv4.elements: extra keys not allowed @ data['options']['config']['suboptions']['ipv4']['elements']. Got 'dict'
lib/ansible/modules/network/junos/junos_l3_interfaces.py:0:0: E305 DOCUMENTATION.options.config.suboptions.ipv6.elements: extra keys not allowed @ data['options']['config']['suboptions']['ipv6']['elements']. Got 'dict'
lib/ansible/modules/network/junos/junos_l3_interfaces.py:0:0: E319 RETURN.after.type: required key not provided @ data['after']['type']. Got None
lib/ansible/modules/network/junos/junos_l3_interfaces.py:0:0: E319 RETURN.before.type: required key not provided @ data['before']['type']. Got None

click here for bot help

@ansibot ansibot added ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Jul 12, 2019
@ansible-zuul
Copy link

ansible-zuul bot commented Jul 12, 2019

Build failed (third-party-check pipeline) integration testing with
Ansible.

@pabelanger
Copy link
Contributor

recheck

@ansible-zuul
Copy link

ansible-zuul bot commented Jul 12, 2019

Build failed (third-party-check pipeline) integration testing with
Ansible.

@pabelanger
Copy link
Contributor

recheck

@ansible-zuul
Copy link

ansible-zuul bot commented Jul 16, 2019

Build failed (third-party-check pipeline) integration testing with
Ansible.

@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Jul 24, 2019
@danielmellado
Copy link
Contributor Author

Pull-request updated, HEAD is now aa4399688e1b3a1db6eaf6cbb7a1e61bb9710d2b

Copy link
Member

@ganeshrn ganeshrn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add deprecation for existing junos_l3_interface module. For example refer: https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/junos/_junos_interface.py#L25

@danielmellado
Copy link
Contributor Author

Pull-request updated, HEAD is now 8f8c0bb85646694770ad70b5b66cd7dd2eed9de5

@danielmellado
Copy link
Contributor Author

Pull-request updated, HEAD is now de736be4a71e73fd2d1b455f7ad9839a8a646301

@danielmellado
Copy link
Contributor Author

Pull-request updated, HEAD is now 84111d31f296dfa2f4ee5e14318fb957140ddb3c

@danielmellado
Copy link
Contributor Author

Pull-request updated, HEAD is now 2336dd39f8ee14feefb92655362e9d8d46eb1d83

@ansible-zuul
Copy link

ansible-zuul bot commented Jul 31, 2019

Build failed (third-party-check pipeline) integration testing with
Ansible.

@danielmellado
Copy link
Contributor Author

Pull-request updated, HEAD is now f6d9206

@ansible-zuul
Copy link

ansible-zuul bot commented Jul 31, 2019

Build succeeded (third-party-check pipeline).

@danielmellado danielmellado merged commit 58a53fe into ansible:devel Jul 31, 2019
@danielmellado danielmellado deleted the junos_l3_interfaces branch July 31, 2019 14:35
@ikhan2010 ikhan2010 added this to Module Completed in Ansible 2.9 Networking Feature Dev Aug 2, 2019
@ansible ansible locked and limited conversation to collaborators Aug 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 ci_verified Changes made in this PR are causing tests to fail. module This issue/PR relates to a module. needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. networking Network category new_module This PR includes a new module. new_plugin This PR includes a new plugin. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. support:community This issue/PR relates to code supported by the Ansible community. support:network This issue/PR relates to code supported by the Ansible Network Team.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants