fix intergration tests
parent
ae4bfa421c
commit
e7d50b8ce6
|
@ -4,9 +4,6 @@
|
||||||
data_source:
|
data_source:
|
||||||
- data:
|
- data:
|
||||||
[
|
[
|
||||||
{ "name": "Loopback888" },
|
|
||||||
{ "name": "Loopback999" },
|
|
||||||
{ "name": "GigabitEthernet0/0" },
|
|
||||||
{ "name": "GigabitEthernet0/1" },
|
{ "name": "GigabitEthernet0/1" },
|
||||||
{ "name": "GigabitEthernet0/2" },
|
{ "name": "GigabitEthernet0/2" },
|
||||||
]
|
]
|
||||||
|
@ -14,22 +11,6 @@
|
||||||
prefix: acl_interfaces
|
prefix: acl_interfaces
|
||||||
- data:
|
- data:
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"description": "Configured by Ansible Team",
|
|
||||||
"enabled": False,
|
|
||||||
"name": "Loopback888",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "Configured by Ansible Team",
|
|
||||||
"enabled": False,
|
|
||||||
"name": "Loopback888",
|
|
||||||
},
|
|
||||||
{ "enabled": True, "name": "Loopback999" },
|
|
||||||
{
|
|
||||||
"description": "Configured and Managed By Ansible Team",
|
|
||||||
"enabled": True,
|
|
||||||
"name": "GigabitEthernet0/0",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "This is a user template",
|
"description": "This is a user template",
|
||||||
"enabled": True,
|
"enabled": True,
|
||||||
|
@ -43,89 +24,9 @@
|
||||||
]
|
]
|
||||||
match_key: name
|
match_key: name
|
||||||
prefix: interfaces
|
prefix: interfaces
|
||||||
- data:
|
|
||||||
[
|
|
||||||
{ "name": "GigabitEthernet0/0" },
|
|
||||||
{
|
|
||||||
"mode": "access",
|
|
||||||
"name": "GigabitEthernet0/1",
|
|
||||||
"trunk":
|
|
||||||
{
|
|
||||||
"allowed_vlans":
|
|
||||||
[
|
|
||||||
"11",
|
|
||||||
"12",
|
|
||||||
"59",
|
|
||||||
"67",
|
|
||||||
"75",
|
|
||||||
"77",
|
|
||||||
"81",
|
|
||||||
"100",
|
|
||||||
"400-408",
|
|
||||||
"411-413",
|
|
||||||
"415",
|
|
||||||
"418",
|
|
||||||
"982",
|
|
||||||
"986",
|
|
||||||
"988",
|
|
||||||
"993",
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"mode": "trunk",
|
|
||||||
"name": "GigabitEthernet0/2",
|
|
||||||
"trunk":
|
|
||||||
{
|
|
||||||
"allowed_vlans":
|
|
||||||
[
|
|
||||||
"11",
|
|
||||||
"12",
|
|
||||||
"59",
|
|
||||||
"67",
|
|
||||||
"75",
|
|
||||||
"77",
|
|
||||||
"81",
|
|
||||||
"100",
|
|
||||||
"400-408",
|
|
||||||
"411-413",
|
|
||||||
"415",
|
|
||||||
"418",
|
|
||||||
"982",
|
|
||||||
"986",
|
|
||||||
"988",
|
|
||||||
"993",
|
|
||||||
],
|
|
||||||
"encapsulation": "dot1q",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]
|
|
||||||
match_key: name
|
|
||||||
prefix: l2_interfaces
|
|
||||||
- data:
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"ipv4": [{ "address": "192.168.0.76/24" }],
|
|
||||||
"name": "GigabitEthernet0/0",
|
|
||||||
},
|
|
||||||
{ "name": "GigabitEthernet0/1" },
|
|
||||||
{ "name": "GigabitEthernet0/2" },
|
|
||||||
{ "name": "Loopback888" },
|
|
||||||
{ "name": "Loopback999" },
|
|
||||||
]
|
|
||||||
match_key: name
|
|
||||||
prefix: l3_interfaces
|
|
||||||
- data:
|
|
||||||
[
|
|
||||||
{ "no_name": True },
|
|
||||||
{ "name": "GigabitEthernet0/1" },
|
|
||||||
{ "name": "GigabitEthernet100/100" },
|
|
||||||
]
|
|
||||||
match_key: name
|
|
||||||
prefix: ospf_interfaces
|
|
||||||
|
|
||||||
- name: Combine all the dictionaries based on match_keys
|
- name: Combine all the dictionaries based on match_keys
|
||||||
set_fact:
|
ansible.builtin.set_fact:
|
||||||
combined: "{{ data_source|ansible.utils.consolidate(fail_missing_match_value=False) }}"
|
combined: "{{ data_source|ansible.utils.consolidate(fail_missing_match_value=False) }}"
|
||||||
|
|
||||||
- name: Assert result dicts
|
- name: Assert result dicts
|
||||||
|
|
|
@ -1,19 +1,5 @@
|
||||||
---
|
---
|
||||||
combined_facts:
|
combined_facts:
|
||||||
GigabitEthernet0/0:
|
|
||||||
acl_interfaces:
|
|
||||||
name: GigabitEthernet0/0
|
|
||||||
interfaces:
|
|
||||||
description: Configured and Managed By Ansible Team
|
|
||||||
enabled: true
|
|
||||||
name: GigabitEthernet0/0
|
|
||||||
l2_interfaces:
|
|
||||||
name: GigabitEthernet0/0
|
|
||||||
l3_interfaces:
|
|
||||||
ipv4:
|
|
||||||
- address: 10.8.38.76/24
|
|
||||||
name: GigabitEthernet0/0
|
|
||||||
ospf_interfaces: {}
|
|
||||||
GigabitEthernet0/1:
|
GigabitEthernet0/1:
|
||||||
acl_interfaces:
|
acl_interfaces:
|
||||||
name: GigabitEthernet0/1
|
name: GigabitEthernet0/1
|
||||||
|
@ -21,31 +7,6 @@ combined_facts:
|
||||||
description: This is a user template
|
description: This is a user template
|
||||||
enabled: true
|
enabled: true
|
||||||
name: GigabitEthernet0/1
|
name: GigabitEthernet0/1
|
||||||
l2_interfaces:
|
|
||||||
mode: access
|
|
||||||
name: GigabitEthernet0/1
|
|
||||||
trunk:
|
|
||||||
allowed_vlans:
|
|
||||||
- '11'
|
|
||||||
- '12'
|
|
||||||
- '59'
|
|
||||||
- '67'
|
|
||||||
- '75'
|
|
||||||
- '77'
|
|
||||||
- '81'
|
|
||||||
- '100'
|
|
||||||
- 400-408
|
|
||||||
- 411-413
|
|
||||||
- '415'
|
|
||||||
- '418'
|
|
||||||
- '982'
|
|
||||||
- '986'
|
|
||||||
- '988'
|
|
||||||
- '993'
|
|
||||||
l3_interfaces:
|
|
||||||
name: GigabitEthernet0/1
|
|
||||||
ospf_interfaces:
|
|
||||||
name: GigabitEthernet0/1
|
|
||||||
GigabitEthernet0/2:
|
GigabitEthernet0/2:
|
||||||
acl_interfaces:
|
acl_interfaces:
|
||||||
name: GigabitEthernet0/2
|
name: GigabitEthernet0/2
|
||||||
|
@ -53,56 +14,3 @@ combined_facts:
|
||||||
description: This is a user template
|
description: This is a user template
|
||||||
enabled: true
|
enabled: true
|
||||||
name: GigabitEthernet0/2
|
name: GigabitEthernet0/2
|
||||||
l2_interfaces:
|
|
||||||
mode: trunk
|
|
||||||
name: GigabitEthernet0/2
|
|
||||||
trunk:
|
|
||||||
allowed_vlans:
|
|
||||||
- '11'
|
|
||||||
- '12'
|
|
||||||
- '59'
|
|
||||||
- '67'
|
|
||||||
- '75'
|
|
||||||
- '77'
|
|
||||||
- '81'
|
|
||||||
- '100'
|
|
||||||
- 400-408
|
|
||||||
- 411-413
|
|
||||||
- '415'
|
|
||||||
- '418'
|
|
||||||
- '982'
|
|
||||||
- '986'
|
|
||||||
- '988'
|
|
||||||
- '993'
|
|
||||||
encapsulation: dot1q
|
|
||||||
l3_interfaces:
|
|
||||||
name: GigabitEthernet0/2
|
|
||||||
ospf_interfaces: {}
|
|
||||||
GigabitEthernet100/100:
|
|
||||||
acl_interfaces: {}
|
|
||||||
interfaces: {}
|
|
||||||
l2_interfaces: {}
|
|
||||||
l3_interfaces: {}
|
|
||||||
ospf_interfaces:
|
|
||||||
name: GigabitEthernet100/100
|
|
||||||
Loopback888:
|
|
||||||
acl_interfaces:
|
|
||||||
name: Loopback888
|
|
||||||
interfaces:
|
|
||||||
description: Configured by Ansible Team
|
|
||||||
enabled: false
|
|
||||||
name: Loopback888
|
|
||||||
l2_interfaces: {}
|
|
||||||
l3_interfaces:
|
|
||||||
name: Loopback888
|
|
||||||
ospf_interfaces: {}
|
|
||||||
Loopback999:
|
|
||||||
acl_interfaces:
|
|
||||||
name: Loopback999
|
|
||||||
interfaces:
|
|
||||||
enabled: true
|
|
||||||
name: Loopback999
|
|
||||||
l2_interfaces: {}
|
|
||||||
l3_interfaces:
|
|
||||||
name: Loopback999
|
|
||||||
ospf_interfaces: {}
|
|
||||||
|
|
Loading…
Reference in New Issue