summaryrefslogtreecommitdiff
path: root/tests/integration/targets/vyos_bgp_global
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/targets/vyos_bgp_global')
-rw-r--r--tests/integration/targets/vyos_bgp_global/tests/cli/deleted.yaml7
-rw-r--r--tests/integration/targets/vyos_bgp_global/tests/cli/deleted_af.yaml5
-rw-r--r--tests/integration/targets/vyos_bgp_global/tests/cli/empty_config.yaml6
-rw-r--r--tests/integration/targets/vyos_bgp_global/tests/cli/gathered.yaml3
-rw-r--r--tests/integration/targets/vyos_bgp_global/tests/cli/merged.yaml27
-rw-r--r--tests/integration/targets/vyos_bgp_global/tests/cli/parsed.yaml4
-rw-r--r--tests/integration/targets/vyos_bgp_global/tests/cli/purged.yaml5
-rw-r--r--tests/integration/targets/vyos_bgp_global/tests/cli/rendered.yaml25
-rw-r--r--tests/integration/targets/vyos_bgp_global/tests/cli/replaced.yaml21
-rw-r--r--tests/integration/targets/vyos_bgp_global/tests/cli/replaced_af.yaml19
-rw-r--r--tests/integration/targets/vyos_bgp_global/vars/main.yaml52
11 files changed, 78 insertions, 96 deletions
diff --git a/tests/integration/targets/vyos_bgp_global/tests/cli/deleted.yaml b/tests/integration/targets/vyos_bgp_global/tests/cli/deleted.yaml
index 00a799e..5920c8f 100644
--- a/tests/integration/targets/vyos_bgp_global/tests/cli/deleted.yaml
+++ b/tests/integration/targets/vyos_bgp_global/tests/cli/deleted.yaml
@@ -1,7 +1,6 @@
---
- debug:
- msg: START vyos_bgp_global deleted integration tests on connection={{
- ansible_connection }}
+ msg: START vyos_bgp_global deleted integration tests on connection={{ ansible_connection }}
- include_tasks: _populate.yaml
@@ -23,9 +22,7 @@
- result.commands|symmetric_difference(deleted.commands) == []
- result.after == ansible_facts['network_resources']['bgp_global']
- - name:
- Delete the existing configuration with the provided running configuration
- (IDEMPOTENT)
+ - name: Delete the existing configuration with the provided running configuration (IDEMPOTENT)
register: result
vyos.vyos.vyos_bgp_global: *id001
diff --git a/tests/integration/targets/vyos_bgp_global/tests/cli/deleted_af.yaml b/tests/integration/targets/vyos_bgp_global/tests/cli/deleted_af.yaml
index edee16b..88e6be0 100644
--- a/tests/integration/targets/vyos_bgp_global/tests/cli/deleted_af.yaml
+++ b/tests/integration/targets/vyos_bgp_global/tests/cli/deleted_af.yaml
@@ -1,7 +1,6 @@
---
- debug:
- msg: START vyos_bgp_global replaced integration tests on connection={{
- ansible_connection }}
+ msg: START vyos_bgp_global replaced integration tests on connection={{ ansible_connection }}
- include_tasks: _remove_config.yaml
@@ -11,7 +10,7 @@
- name: Delete the existing configuration, in presence of an af under neighbor.
register: result
ignore_errors: true
- vyos.vyos.vyos_bgp_global: &id001
+ vyos.vyos.vyos_bgp_global:
config:
as_number: "65536"
state: deleted
diff --git a/tests/integration/targets/vyos_bgp_global/tests/cli/empty_config.yaml b/tests/integration/targets/vyos_bgp_global/tests/cli/empty_config.yaml
index 7e52d1c..7be1f69 100644
--- a/tests/integration/targets/vyos_bgp_global/tests/cli/empty_config.yaml
+++ b/tests/integration/targets/vyos_bgp_global/tests/cli/empty_config.yaml
@@ -1,7 +1,6 @@
---
- debug:
- msg: START vyos_bgp_global empty_config integration tests on connection={{
- ansible_connection }}
+ msg: START vyos_bgp_global empty_config integration tests on connection={{ ansible_connection }}
- name: Merged with empty config should give appropriate error message
register: result
@@ -34,8 +33,7 @@
- assert:
that:
- - result.msg == 'value of running_config parameter must not be empty for state
- parsed'
+ - result.msg == 'value of running_config parameter must not be empty for state parsed'
- name: Rendered with empty config should give appropriate error message
register: result
diff --git a/tests/integration/targets/vyos_bgp_global/tests/cli/gathered.yaml b/tests/integration/targets/vyos_bgp_global/tests/cli/gathered.yaml
index e5eca7a..82fead7 100644
--- a/tests/integration/targets/vyos_bgp_global/tests/cli/gathered.yaml
+++ b/tests/integration/targets/vyos_bgp_global/tests/cli/gathered.yaml
@@ -1,7 +1,6 @@
---
- debug:
- msg: START vyos_bgp_global gathered integration tests on connection={{
- ansible_connection }}
+ msg: START vyos_bgp_global gathered integration tests on connection={{ ansible_connection }}
- include_tasks: _populate.yaml
diff --git a/tests/integration/targets/vyos_bgp_global/tests/cli/merged.yaml b/tests/integration/targets/vyos_bgp_global/tests/cli/merged.yaml
index ce332a0..388bbcc 100644
--- a/tests/integration/targets/vyos_bgp_global/tests/cli/merged.yaml
+++ b/tests/integration/targets/vyos_bgp_global/tests/cli/merged.yaml
@@ -1,7 +1,6 @@
---
- debug:
- msg: START vyos_bgp_global merged integration tests on connection={{
- ansible_connection }}
+ msg: START vyos_bgp_global merged integration tests on connection={{ ansible_connection }}
- include_tasks: _remove_config.yaml
@@ -14,32 +13,32 @@
config:
as_number: "65536"
aggregate_address:
- - prefix: "203.0.113.0/24"
+ - prefix: 203.0.113.0/24
as_set: true
- - prefix: "192.0.2.0/24"
+ - prefix: 192.0.2.0/24
summary_only: true
network:
- - address: "192.1.13.0/24"
+ - address: 192.1.13.0/24
backdoor: true
redistribute:
- - protocol: "kernel"
+ - protocol: kernel
metric: 45
- - protocol: "connected"
- route_map: "map01"
+ - protocol: connected
+ route_map: map01
maximum_paths:
- - path: "ebgp"
+ - path: ebgp
count: 20
- - path: "ibgp"
+ - path: ibgp
count: 55
timers:
keepalive: 35
bgp_params:
bestpath:
- as_path: "confed"
+ as_path: confed
compare_routerid: true
default:
no_ipv4_unicast: true
- router_id: "192.1.2.9"
+ router_id: 192.1.2.9
state: merged
- vyos.vyos.vyos_facts:
@@ -54,9 +53,7 @@
- result.before == {}
- result.after == merged.after
- - name:
- Merge the provided configuration with the existing running configuration
- (IDEMPOTENT)
+ - name: Merge the provided configuration with the existing running configuration (IDEMPOTENT)
register: result
vyos.vyos.vyos_bgp_global: *id001
diff --git a/tests/integration/targets/vyos_bgp_global/tests/cli/parsed.yaml b/tests/integration/targets/vyos_bgp_global/tests/cli/parsed.yaml
index ef8856d..eca85ce 100644
--- a/tests/integration/targets/vyos_bgp_global/tests/cli/parsed.yaml
+++ b/tests/integration/targets/vyos_bgp_global/tests/cli/parsed.yaml
@@ -1,8 +1,6 @@
---
- debug:
- msg:
- START vyos_bgp_global parsed integration tests on connection={{ ansible_connection
- }}
+ msg: START vyos_bgp_global parsed integration tests on connection={{ ansible_connection }}
- name: Provide the running configuration for parsing (config to be parsed)
register: result
diff --git a/tests/integration/targets/vyos_bgp_global/tests/cli/purged.yaml b/tests/integration/targets/vyos_bgp_global/tests/cli/purged.yaml
index 239f748..71748f5 100644
--- a/tests/integration/targets/vyos_bgp_global/tests/cli/purged.yaml
+++ b/tests/integration/targets/vyos_bgp_global/tests/cli/purged.yaml
@@ -1,14 +1,13 @@
---
- debug:
- msg: START vyos_bgp_global purged integration tests on connection={{
- ansible_connection }}
+ msg: START vyos_bgp_global purged integration tests on connection={{ ansible_connection }}
- include_tasks: _populate.yaml
- block:
- name: Purge the provided configuration
register: result
- vyos.vyos.vyos_bgp_global: &id001
+ vyos.vyos.vyos_bgp_global:
config:
as_number: "65536"
state: purged
diff --git a/tests/integration/targets/vyos_bgp_global/tests/cli/rendered.yaml b/tests/integration/targets/vyos_bgp_global/tests/cli/rendered.yaml
index 534227f..f37ef88 100644
--- a/tests/integration/targets/vyos_bgp_global/tests/cli/rendered.yaml
+++ b/tests/integration/targets/vyos_bgp_global/tests/cli/rendered.yaml
@@ -1,41 +1,40 @@
---
- debug:
- msg: START vyos_bgp_global merged integration tests on connection={{
- ansible_connection }}
+ msg: START vyos_bgp_global merged integration tests on connection={{ ansible_connection }}
- block:
- name: Render given bgp_global configuration
register: result
- vyos.vyos.vyos_bgp_global: &id001
+ vyos.vyos.vyos_bgp_global:
config:
as_number: "65536"
aggregate_address:
- - prefix: "203.0.113.0/24"
+ - prefix: 203.0.113.0/24
as_set: true
- - prefix: "192.0.2.0/24"
+ - prefix: 192.0.2.0/24
summary_only: true
network:
- - address: "192.1.13.0/24"
+ - address: 192.1.13.0/24
backdoor: true
redistribute:
- - protocol: "kernel"
+ - protocol: kernel
metric: 45
- - protocol: "connected"
- route_map: "map01"
+ - protocol: connected
+ route_map: map01
maximum_paths:
- - path: "ebgp"
+ - path: ebgp
count: 20
- - path: "ibgp"
+ - path: ibgp
count: 55
timers:
keepalive: 35
bgp_params:
bestpath:
- as_path: "confed"
+ as_path: confed
compare_routerid: true
default:
no_ipv4_unicast: true
- router_id: "192.1.2.9"
+ router_id: 192.1.2.9
state: rendered
- assert:
diff --git a/tests/integration/targets/vyos_bgp_global/tests/cli/replaced.yaml b/tests/integration/targets/vyos_bgp_global/tests/cli/replaced.yaml
index 99ea04d..ae2c5c7 100644
--- a/tests/integration/targets/vyos_bgp_global/tests/cli/replaced.yaml
+++ b/tests/integration/targets/vyos_bgp_global/tests/cli/replaced.yaml
@@ -1,7 +1,6 @@
---
- debug:
- msg: START vyos_bgp_global replaced integration tests on connection={{
- ansible_connection }}
+ msg: START vyos_bgp_global replaced integration tests on connection={{ ansible_connection }}
- include_tasks: _populate.yaml
@@ -12,11 +11,11 @@
config:
as_number: "65536"
network:
- - address: "203.0.113.0/24"
+ - address: 203.0.113.0/24
route_map: map01
redistribute:
- - protocol: "static"
- route_map: "map01"
+ - protocol: static
+ route_map: map01
bgp_params:
always_compare_med: true
dampening:
@@ -25,12 +24,12 @@
half_life: 33
re_use: 60
bestpath:
- as_path: "confed"
+ as_path: confed
compare_routerid: true
default:
no_ipv4_unicast: true
neighbor:
- - address: "192.0.2.43"
+ - address: 192.0.2.43
disable_connected_check: true
advertisement_interval: 72
capability:
@@ -38,9 +37,9 @@
timers:
holdtime: 30
keepalive: 10
- - address: "203.0.113.0"
+ - address: 203.0.113.0
capability:
- orf: "receive"
+ orf: receive
state: replaced
- vyos.vyos.vyos_facts:
@@ -53,9 +52,7 @@
- result.commands|symmetric_difference(replaced.commands) == []
- result.after == ansible_facts['network_resources']['bgp_global']
- - name:
- Replace the existing configuration with the provided running configuration
- (IDEMPOTENT)
+ - name: Replace the existing configuration with the provided running configuration (IDEMPOTENT)
register: result
vyos.vyos.vyos_bgp_global: *id001
diff --git a/tests/integration/targets/vyos_bgp_global/tests/cli/replaced_af.yaml b/tests/integration/targets/vyos_bgp_global/tests/cli/replaced_af.yaml
index e66aae7..c9b2319 100644
--- a/tests/integration/targets/vyos_bgp_global/tests/cli/replaced_af.yaml
+++ b/tests/integration/targets/vyos_bgp_global/tests/cli/replaced_af.yaml
@@ -1,7 +1,6 @@
---
- debug:
- msg: START vyos_bgp_global replaced integration tests on connection={{
- ansible_connection }}
+ msg: START vyos_bgp_global replaced integration tests on connection={{ ansible_connection }}
- include_tasks: _remove_config.yaml
@@ -11,15 +10,15 @@
- name: Replace the existing af configuration with the provided running configuration
register: result
ignore_errors: true
- vyos.vyos.vyos_bgp_global: &id001
+ vyos.vyos.vyos_bgp_global:
config:
as_number: "65536"
network:
- - address: "203.0.113.0/24"
+ - address: 203.0.113.0/24
route_map: map01
redistribute:
- - protocol: "static"
- route_map: "map01"
+ - protocol: static
+ route_map: map01
bgp_params:
always_compare_med: true
dampening:
@@ -28,12 +27,12 @@
half_life: 33
re_use: 60
bestpath:
- as_path: "confed"
+ as_path: confed
compare_routerid: true
default:
no_ipv4_unicast: true
neighbor:
- - address: "192.0.2.43"
+ - address: 192.0.2.43
disable_connected_check: true
advertisement_interval: 72
capability:
@@ -41,9 +40,9 @@
timers:
holdtime: 30
keepalive: 10
- - address: "203.0.113.0"
+ - address: 203.0.113.0
capability:
- orf: "receive"
+ orf: receive
state: replaced
- assert:
diff --git a/tests/integration/targets/vyos_bgp_global/vars/main.yaml b/tests/integration/targets/vyos_bgp_global/vars/main.yaml
index fec5e43..e195c2d 100644
--- a/tests/integration/targets/vyos_bgp_global/vars/main.yaml
+++ b/tests/integration/targets/vyos_bgp_global/vars/main.yaml
@@ -15,31 +15,31 @@ merged:
- set protocols bgp 65536 timers keepalive 35
after:
aggregate_address:
- - prefix: "192.0.2.0/24"
+ - prefix: 192.0.2.0/24
summary_only: true
- - prefix: "203.0.113.0/24"
+ - prefix: 203.0.113.0/24
as_set: true
as_number: 65536
bgp_params:
bestpath:
- as_path: "confed"
+ as_path: confed
compare_routerid: true
default:
no_ipv4_unicast: true
- router_id: "192.1.2.9"
+ router_id: 192.1.2.9
maximum_paths:
- count: 20
- path: "ebgp"
+ path: ebgp
- count: 55
- path: "ibgp"
+ path: ibgp
network:
- - address: "192.1.13.0/24"
+ - address: 192.1.13.0/24
backdoor: true
redistribute:
- - protocol: "connected"
- route_map: "map01"
+ - protocol: connected
+ route_map: map01
- metric: 45
- protocol: "kernel"
+ protocol: kernel
timers:
keepalive: 35
@@ -96,14 +96,14 @@ rendered:
populate:
global:
aggregate_address:
- - prefix: "192.0.2.0/24"
+ - prefix: 192.0.2.0/24
summary_only: true
- - prefix: "203.0.113.0/24"
+ - prefix: 203.0.113.0/24
as_set: true
as_number: 65536
bgp_params:
bestpath:
- as_path: "confed"
+ as_path: confed
compare_routerid: true
confederation:
- identifier: 66
@@ -111,40 +111,40 @@ populate:
- peers: 55
default:
no_ipv4_unicast: true
- router_id: "192.1.2.9"
+ router_id: 192.1.2.9
maximum_paths:
- count: 20
- path: "ebgp"
+ path: ebgp
- count: 55
- path: "ibgp"
+ path: ibgp
neighbor:
- - address: "192.0.2.25"
+ - address: 192.0.2.25
disable_connected_check: true
timers:
holdtime: 30
keepalive: 10
- - address: "203.0.113.5"
+ - address: 203.0.113.5
attribute_unchanged:
as_path: true
med: true
next_hop: true
ebgp_multihop: 2
remote_as: 101
- update_source: "192.0.2.25"
- - address: "5001::64"
+ update_source: 192.0.2.25
+ - address: 5001::64
distribute_list:
- acl: 20
- action: "export"
+ action: export
- acl: 40
- action: "import"
+ action: import
maximum_prefix: 34
network:
- - address: "192.1.13.0/24"
+ - address: 192.1.13.0/24
backdoor: true
redistribute:
- - protocol: "connected"
- route_map: "map01"
+ - protocol: connected
+ route_map: map01
- metric: 45
- protocol: "kernel"
+ protocol: kernel
timers:
keepalive: 35