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

Open
wants to merge 1 commit into
base: devel
from

Conversation

Projects
None yet
4 participants
@danielmellado
Copy link
Contributor

commented Jul 12, 2019

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.


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

This comment has been minimized.

Copy link
@ganeshrn

ganeshrn Jul 12, 2019

Member
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?

This comment has been minimized.

Copy link
@danielmellado

danielmellado Jul 12, 2019

Author Contributor

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.

This comment has been minimized.

Copy link
@danielmellado

danielmellado Jul 12, 2019

Author Contributor

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"

This comment has been minimized.

Copy link
@ganeshrn

ganeshrn Jul 12, 2019

Member

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

This comment has been minimized.

Copy link
@danielmellado

danielmellado Jul 12, 2019

Author Contributor

will remove

@ganeshrn
Copy link
Member

left a comment

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

@ansibot

This comment has been minimized.

Copy link
Contributor

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 and removed core_review labels Jul 12, 2019

@danielmellado

This comment has been minimized.

Copy link
Contributor Author

commented Jul 12, 2019

Pull-request updated, HEAD is now 1fb2efe

@danielmellado danielmellado force-pushed the danielmellado:junos_l3_interfaces branch from c667e62 to 1fb2efe Jul 12, 2019

@ansibot

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link

commented Jul 12, 2019

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

@danielmellado

This comment has been minimized.

Copy link
Contributor Author

commented Jul 12, 2019

Pull-request updated, HEAD is now ac20e10

@danielmellado danielmellado force-pushed the danielmellado:junos_l3_interfaces branch from 1fb2efe to ac20e10 Jul 12, 2019

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Jul 12, 2019

@ganeshrn
Copy link
Member

left a comment

lgtm. Thanks!

@ansible-zuul

This comment has been minimized.

Copy link

commented Jul 12, 2019

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

@danielmellado

This comment has been minimized.

Copy link
Contributor Author

commented Jul 12, 2019

Pull-request updated, HEAD is now 4907933

@danielmellado danielmellado force-pushed the danielmellado:junos_l3_interfaces branch from ac20e10 to 4907933 Jul 12, 2019

@ansibot ansibot added the new_module label Jul 12, 2019

@ansibot

This comment has been minimized.

Copy link
Contributor

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

@ansible-zuul

This comment has been minimized.

Copy link

commented Jul 12, 2019

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

@pabelanger

This comment has been minimized.

Copy link
Contributor

commented Jul 12, 2019

recheck

@ansible-zuul

This comment has been minimized.

Copy link

commented Jul 12, 2019

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

@pabelanger

This comment has been minimized.

Copy link
Contributor

commented Jul 16, 2019

recheck

@ansible-zuul

This comment has been minimized.

Copy link

commented Jul 16, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.