summaryrefslogtreecommitdiff
path: root/extensions/molecule/bgp_unnumbered
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/molecule/bgp_unnumbered')
-rw-r--r--extensions/molecule/bgp_unnumbered/converge.yml6
-rw-r--r--extensions/molecule/bgp_unnumbered/inventory.yml23
-rw-r--r--extensions/molecule/bgp_unnumbered/molecule.yml28
-rw-r--r--extensions/molecule/bgp_unnumbered/topology.clab.yml14
-rw-r--r--extensions/molecule/bgp_unnumbered/verify.yml20
5 files changed, 91 insertions, 0 deletions
diff --git a/extensions/molecule/bgp_unnumbered/converge.yml b/extensions/molecule/bgp_unnumbered/converge.yml
new file mode 100644
index 0000000..3b3260a
--- /dev/null
+++ b/extensions/molecule/bgp_unnumbered/converge.yml
@@ -0,0 +1,6 @@
+---
+- name: Converge
+ hosts: fabric
+ gather_facts: false
+ roles:
+ - vyos.blueprints.bgp_unnumbered
diff --git a/extensions/molecule/bgp_unnumbered/inventory.yml b/extensions/molecule/bgp_unnumbered/inventory.yml
new file mode 100644
index 0000000..1785087
--- /dev/null
+++ b/extensions/molecule/bgp_unnumbered/inventory.yml
@@ -0,0 +1,23 @@
+---
+all:
+ children:
+ vyos:
+ children:
+ fabric:
+ hosts:
+ r1:
+ ansible_host: clab-bp-bgp-r1
+ bgp_unnumbered_asn: 64496
+ bgp_unnumbered_router_id: 192.168.0.1
+ r2:
+ ansible_host: clab-bp-bgp-r2
+ bgp_unnumbered_asn: 64499
+ bgp_unnumbered_router_id: 192.168.0.2
+ vars:
+ bgp_unnumbered_interfaces: [eth1, eth2]
+ bgp_unnumbered_group: fabric
+ vars:
+ ansible_network_os: vyos.vyos.vyos
+ ansible_connection: ansible.netcommon.network_cli
+ ansible_user: admin
+ ansible_password: admin
diff --git a/extensions/molecule/bgp_unnumbered/molecule.yml b/extensions/molecule/bgp_unnumbered/molecule.yml
new file mode 100644
index 0000000..9fa905c
--- /dev/null
+++ b/extensions/molecule/bgp_unnumbered/molecule.yml
@@ -0,0 +1,28 @@
+---
+# VyOS runs as a container (containerlab kind vyosnetworks_vyos);
+# the lab is deployed in prepare and destroyed in cleanup.
+dependency:
+ name: galaxy
+ enabled: false
+driver:
+ name: default
+ options:
+ managed: false
+platforms:
+ - name: r1
+ - name: r2
+provisioner:
+ name: ansible
+ config_options:
+ defaults:
+ host_key_checking: false
+ persistent_connection:
+ command_timeout: 60
+ inventory:
+ links:
+ hosts: inventory.yml
+ playbooks:
+ prepare: ../_shared/lab_up.yml
+ cleanup: ../_shared/lab_down.yml
+verifier:
+ name: ansible
diff --git a/extensions/molecule/bgp_unnumbered/topology.clab.yml b/extensions/molecule/bgp_unnumbered/topology.clab.yml
new file mode 100644
index 0000000..a370c2f
--- /dev/null
+++ b/extensions/molecule/bgp_unnumbered/topology.clab.yml
@@ -0,0 +1,14 @@
+name: bp-bgp
+topology:
+ kinds:
+ vyosnetworks_vyos:
+ image: ${VYOS_IMAGE:=vyos:blueprints-ci}
+ nodes:
+ r1:
+ kind: vyosnetworks_vyos
+ r2:
+ kind: vyosnetworks_vyos
+ links:
+ # two parallel links without IP addresses; BGP peers over IPv6 link-local
+ - endpoints: ["r1:eth1", "r2:eth1"]
+ - endpoints: ["r1:eth2", "r2:eth2"]
diff --git a/extensions/molecule/bgp_unnumbered/verify.yml b/extensions/molecule/bgp_unnumbered/verify.yml
new file mode 100644
index 0000000..3f251af
--- /dev/null
+++ b/extensions/molecule/bgp_unnumbered/verify.yml
@@ -0,0 +1,20 @@
+---
+- name: Verify
+ hosts: fabric
+ gather_facts: false
+ tasks:
+ - name: Wait for BGP sessions and routes
+ ansible.builtin.pause:
+ seconds: 45
+ run_once: true
+
+ - name: Run role checks
+ ansible.builtin.include_role:
+ name: vyos.blueprints.bgp_unnumbered
+ tasks_from: verify
+
+ - name: Ping the other router's loopback from this loopback, as on the docs page
+ vyos.vyos.vyos_ping:
+ dest: "{{ '192.168.0.2' if inventory_hostname == 'r1' else '192.168.0.1' }}"
+ source: "{{ bgp_unnumbered_router_id }}"
+ count: 3