mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Refactor junos modules to Use netconf and cliconf plugins (#32621)
* Fix junos integration test fixes as per connection refactor (#33050) Refactor netconf connection plugin to work with netconf plugin * Fix junos integration test fixes as per connection refactor (#33050) Refactor netconf connection plugin to work with netconf plugin Fix CI failure Fix unit test failure Fix review comments
This commit is contained in:
parent
0c75f00248
commit
3d63ecb6f3
37 changed files with 543 additions and 320 deletions
|
@ -9,17 +9,22 @@
|
|||
|
||||
- name: Define interface name for vSRX
|
||||
set_fact:
|
||||
name: pp0
|
||||
intf_name: pp0
|
||||
when: result['ansible_facts']['ansible_net_model'] | search("vSRX*")
|
||||
|
||||
- name: Define interface name for vsrx
|
||||
set_fact:
|
||||
intf_name: pp0
|
||||
when: result['ansible_facts']['ansible_net_model'] | search("vsrx")
|
||||
|
||||
- name: Define interface name for vQFX
|
||||
set_fact:
|
||||
name: gr-0/0/0
|
||||
intf_name: gr-0/0/0
|
||||
when: result['ansible_facts']['ansible_net_model'] | search("vqfx*")
|
||||
|
||||
- name: Check intent arguments
|
||||
junos_interface:
|
||||
name: "{{ name }}"
|
||||
name: "{{ intf_name }}"
|
||||
state: up
|
||||
tx_rate: ge(0)
|
||||
rx_rate: le(0)
|
||||
|
@ -32,7 +37,7 @@
|
|||
|
||||
- name: Check intent arguments (failed condition)
|
||||
junos_interface:
|
||||
name: "{{ name }}"
|
||||
name: "{{ intf_name }}"
|
||||
state: down
|
||||
tx_rate: gt(0)
|
||||
rx_rate: lt(0)
|
||||
|
@ -49,7 +54,7 @@
|
|||
|
||||
- name: Config + intent
|
||||
junos_interface:
|
||||
name: "{{ name }}"
|
||||
name: "{{ intf_name }}"
|
||||
enabled: False
|
||||
state: down
|
||||
provider: "{{ netconf }}"
|
||||
|
@ -62,7 +67,7 @@
|
|||
|
||||
- name: Config + intent (fail)
|
||||
junos_interface:
|
||||
name: "{{ name }}"
|
||||
name: "{{ intf_name }}"
|
||||
enabled: False
|
||||
state: up
|
||||
provider: "{{ netconf }}"
|
||||
|
@ -77,7 +82,7 @@
|
|||
- name: Aggregate config + intent (pass)
|
||||
junos_interface:
|
||||
aggregate:
|
||||
- name: "{{ name }}"
|
||||
- name: "{{ intf_name }}"
|
||||
enabled: True
|
||||
state: up
|
||||
provider: "{{ netconf }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue