summaryrefslogtreecommitdiff
path: root/PR408_README.md
diff options
context:
space:
mode:
authoromnom62 <75066712+omnom62@users.noreply.github.com>2026-03-04 19:51:16 +1000
committerGitHub <noreply@github.com>2026-03-04 09:51:16 +0000
commita8e5dac21090e9b0ddf876214a9a1522079ecde1 (patch)
tree9865a8b7ad796f8b201b8fea9e93f3c395a5e71f /PR408_README.md
parente539028c2f9d062e7684abda5dd32affd92e9f08 (diff)
downloadvyos.vyos-a8e5dac21090e9b0ddf876214a9a1522079ecde1.tar.gz
vyos.vyos-a8e5dac21090e9b0ddf876214a9a1522079ecde1.zip
T6836 VRF module (#408)
* t6836 vfr module init * argspec facts module for VRF * T6834 static_route module to support interface_route (#398) * t6834 init * facts fixes, WIP * T6834 - facts updates * static_routes 1.3- config, facts, args and sanit and unit tests * changelog * changelog updates * static_routes 1.4+ * static_routes v1.4 unit tests * comment removed * T6829 (area interfaces in OSPFv3 1.3-1.5) re-init (#399) * T6829 re-init * re-init T6829 ospfv3 area interface for 1.3- * changelog * changelog fix * Doc is updated * adding 1.4+ support * ospfv3 area interfaces for 1.4+ * fixed ospfv3 facts and added area interface unit test for 1.4 * ospfv3 clean-up * doc updates * Resolve merge conflicts * vrf parsers set_table * more vrf paresers added * vrf facts main code * vrf data structures * simple vrf config push * simple vrf config push * some work on vrf * basic facts done * vrf instance parsers wif * ongoing parser testing * vrf dev work * testing with paresers * all basic settings * merged for vrf * more states for VRF * vrf deleted, overriden * overriden * sanity * rst for vrf * changelog * fix changelog * doc fix * vrf delete idempotent * deleted and overridden for VFR * overriden * overriden vrf idempotency * asdvanced vrf settings * afi for VRF facts * VRF AFI config * VRF AFI tests * vrf dev work * afi dev work * afi and deep_merge fixes for VRF * afi basic provisioning * changelog * vrf sanity fixes * VRF AFI protocols and route-maps * vrf parsed, gathered, rendered fixes * docstrings VRF * docstrings VRF * docstring VRF * module doc update * vrf module examples * VRF doc examples * linter * VRF unit tests init * VRF unit tests init * VRF unit tests updates * fixed VRF overridden and deleted unit test cases * VRF integration tests init * VRF int tests rtt, merged, replaced * VRF int testt gathered, rendered * VRF int tests deleted, rendered, overridden and empty_config * linter * VRF int test misc fixes * VRF global idepmotency * fixing py3.13 runner deps * fixing lint * fixing sanity * reverting previous fixes * VRF protocols load_module and provisioning flow * fixes to bgp VRF protocol methods * VRF protocol facts init * VRF protocol load_module works * reworked VRF load_module routine * vrf protocl static fixed * Fixed static and ospf VRF protocol provisioning * Fixed static and ospf VRF protocol provisioning * VRF doc update * VRF docs update * VRF doc updates * unit tests for VRF protocols * VRF BGP protcol sanity check * VRF protocol fixed sanity checks (DOCUMENTATION) * sanity and doc for VRF fixed * VRF unit tests mock * VRF protocol integration parsed, rtt and merged init * VRF protocols - rendered, overridden * VRF protocols replaced * fix accidental changes to test_vyos_config.py * PR description * fix image * README fix * Fixing linter * Mid-result UAT overriden VRF * Mid-result for VRF UAT * VRF uat * VRF obsolete features removed
Diffstat (limited to 'PR408_README.md')
-rw-r--r--PR408_README.md163
1 files changed, 163 insertions, 0 deletions
diff --git a/PR408_README.md b/PR408_README.md
new file mode 100644
index 00000000..0423b56f
--- /dev/null
+++ b/PR408_README.md
@@ -0,0 +1,163 @@
+# ๐Ÿ“ฆ Pull Request Documentation
+
+## ๐Ÿงพ Summary
+
+<!-- Brief explanation of what this PR does and why. -->
+
+This is a new Ansible module to manage VyOS VRF configuration as requested by https://vyos.dev/T6836
+
+---
+
+## ๐Ÿ” Implementation
+
+<!-- Link to related issues or tasks -->
+
+The module implements a set of VyOS 1.4.2 and 1.5.x commands related to VRF configuration, described in https://docs.vyos.io/en/1.4/configuration/vrf/index.html
+The module allows to configure a global attribute (bind-all), as well as, VRF instance configuration.
+
+The structure of the parameters is depicted below
+![Diagram](pr408-diagram.png)
+
+The module supports the following states:
+
+- "deleted"
+- "merged"
+- "replaced"
+- "overridden"
+- "gathered"
+- "rendered"
+- "parsed"
+
+---
+
+## ๐Ÿ“ Examples
+
+### Replaced (to demo individual attribute processing)
+
+Initial coonfiguration
+
+```
+ - set vrf bind-to-all
+ - set vrf name vrf-blue description 'blue-vrf'
+ - set vrf name vrf-blue table '100'
+ - set vrf name vrf-blue vni '1000'
+ - set vrf name vrf-red description 'red-vrf'
+ - set vrf name vrf-red disable
+ - set vrf name vrf-red ip disable-forwarding
+ - set vrf name vrf-red ip protocol kernel route-map 'rm1'
+ - set vrf name vrf-red ip protocol rip route-map 'rm1'
+ - set vrf name vrf-red ipv6 nht no-resolve-via-default
+ - set vrf name vrf-red table '101'
+ - set vrf name vrf-red vni '1001'
+ - set vrf name vrf-pink table 111
+ - set vrf name vrf-pink vni 1111
+ - set vrf name vrf-pink description pink-vrf
+ - set vrf name vrf-pink protocols bgp system-as 65000
+ - set vrf name vrf-pink protocols bgp neighbor 192.0.2.1 remote-as 65002
+ - set vrf name vrf-pink protocols bgp neighbor 1.1.1.3 passive
+ - set vrf name vrf-pink protocols bgp neighbor 1.1.1.3 remote-as 400
+ - set vrf name vrf-pink protocols ospf log-adjacency-changes 'detail'
+ - set vrf name vrf-pink protocols ospf max-metric router-lsa administrative
+ - set vrf name vrf-pink protocols ospf max-metric router-lsa on-shutdown 10
+ - set vrf name vrf-pink protocols ospf max-metric router-lsa on-startup 10
+ - set vrf name vrf-pink protocols ospf default-information originate always
+ - set vrf name vrf-pink protocols ospf default-information originate metric 10
+ - set vrf name vrf-pink protocols ospf default-information originate metric-type 2
+ - set vrf name vrf-pink protocols ospf mpls-te router-address '192.0.11.12'
+ - set vrf name vrf-pink protocols ospf auto-cost reference-bandwidth '2'
+ - set vrf name vrf-pink protocols ospf neighbor 192.0.11.12
+ - set vrf name vrf-pink protocols ospf neighbor 192.0.11.12 poll-interval 10
+ - set vrf name vrf-pink protocols ospf neighbor 192.0.11.12 priority 2
+ - set vrf name vrf-pink protocols ospf redistribute bgp
+ - set vrf name vrf-pink protocols ospf redistribute bgp metric 10
+ - set vrf name vrf-pink protocols ospf redistribute bgp metric-type 2
+ - set vrf name vrf-pink protocols ospf parameters router-id '192.0.1.1'
+ - set vrf name vrf-pink protocols ospf parameters rfc1583-compatibility
+ - set vrf name vrf-pink protocols ospf parameters abr-type 'cisco'
+ - set vrf name vrf-pink protocols ospf area '2'
+ - set vrf name vrf-pink protocols ospf area 2 area-type normal
+ - set vrf name vrf-pink protocols ospf area 2 authentication plaintext-password
+ - set vrf name vrf-pink protocols ospf area 2 shortcut enable
+ - set vrf name vrf-pink protocols ospf area '3'
+ - set vrf name vrf-pink protocols ospf area 3 area-type nssa
+ - set vrf name vrf-pink protocols ospf area '4'
+ - set vrf name vrf-pink protocols ospf area 4 area-type stub default-cost 20
+ - set vrf name vrf-pink protocols ospf area 4 network 192.0.2.0/24
+ - set vrf name vrf-pink protocols ospf area 4 range 192.0.3.0/24
+ - set vrf name vrf-pink protocols ospf area 4 range 192.0.3.0/24 cost 10
+ - set vrf name vrf-pink protocols ospf area 4 range 192.0.4.0/24
+ - set vrf name vrf-pink protocols ospf area 4 range 192.0.4.0/24 cost 12
+ - set vrf name vrf-pink protocols ospfv3 area '2'
+ - set vrf name vrf-pink protocols ospfv3 area 2 export-list export1
+ - set vrf name vrf-pink protocols ospfv3 area 2 import-list import1
+ - set vrf name vrf-pink protocols ospfv3 area 2 range 2001:db10::/32
+ - set vrf name vrf-pink protocols ospfv3 area 2 range 2001:db20::/32
+ - set vrf name vrf-pink protocols ospfv3 area 2 range 2001:db30::/32
+ - set vrf name vrf-pink protocols ospfv3 area '3'
+ - set vrf name vrf-pink protocols ospfv3 area 3 range 2001:db40::/32
+ - set vrf name vrf-pink protocols ospfv3 parameters router-id '192.0.2.10'
+ - set vrf name vrf-pink protocols ospfv3 redistribute bgp
+ - set vrf name vrf-pink protocols static route 192.0.2.0/24
+ - set vrf name vrf-pink protocols static route 192.0.2.0/24 blackhole distance '10'
+ - set vrf name vrf-pink protocols static route 192.0.2.0/24 next-hop '203.0.113.1'
+ - set vrf name vrf-pink protocols static route 192.0.2.0/24 next-hop '203.0.113.2'
+ - set vrf name vrf-pink protocols static route6 2001:db8::/32
+ - set vrf name vrf-pink protocols static route6 2001:db8::/32 blackhole distance '20'
+ - set vrf name vrf-pink protocols static route6 2001:db8::/32 next-hop '2001:db8::1'
+```
+
+Module configuration
+
+```yaml
+vyos.vyos.vyos_vrf:
+ config:
+ instances:
+ - name: "vrf-blue"
+ description: "blue-vrf"
+ disable: true
+ table_id: 100
+ vni: 1000
+ - name: "vrf-red"
+ description: "Vermillion_VRF"
+ disable: false
+ table_id: 101
+ vni: 1011
+ address_family:
+ - afi: "ipv6"
+ nht_no_resolve_via_default: false
+ - name: "vrf-pink"
+ table_id: 111
+ protocols:
+ ospf:
+ default_information:
+ originate:
+ always: true
+ metric: 20
+ metric_type: 1
+ state: replaced
+```
+
+Will result in
+
+````
+- delete vrf bind-to-all
+- set vrf name vrf-blue disable
+- set vrf name vrf-red vni 1011
+- set vrf name vrf-red description Vermillion_VRF
+- delete vrf name vrf-red disable
+- delete vrf name vrf-red ipv6 nht no-resolve-via-default
+- delete vrf name vrf-pink vni 1111
+- delete vrf name vrf-pink description pink-vrf
+- delete vrf name vrf-pink protocols ospf log-adjacency-changes 'detail'
+- delete vrf name vrf-pink protocols ospf auto-cost
+- delete vrf name vrf-pink protocols ospf max-metric
+- delete vrf name vrf-pink protocols ospf mpls-te
+- delete vrf name vrf-pink protocols ospf area
+- delete vrf name vrf-pink protocols ospf parameters
+- delete vrf name vrf-pink protocols ospf neighbor
+- delete vrf name vrf-pink protocols ospf redistribute
+- set vrf name vrf-pink protocols ospf default-information originate metric 20
+- set vrf name vrf-pink protocols ospf default-information originate metric-type 1
+```
+---
+````