From f1bfb21a1c6efdf69687ece83e209afcf75fed62 Mon Sep 17 00:00:00 2001 From: Thomas Liske Date: Fri, 15 Nov 2024 23:14:51 +0100 Subject: [PATCH] peers: allow RADB:: prefix for AS-SETs --- roles/com_peers/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/com_peers/tasks/main.yml b/roles/com_peers/tasks/main.yml index 348ca24..6fd9b18 100644 --- a/roles/com_peers/tasks/main.yml +++ b/roles/com_peers/tasks/main.yml @@ -32,11 +32,11 @@ - peer.ipv4address|ansible.utils.ipv4('address') == peer.ipv4address - peer.ipv4bgpmd5secret is match('^[a-zA-Z0-9]*$') - peer.ipv4hostname is match('^(((?!-))(xn--|_)?[a-z0-9-]{0,61}[a-z0-9]{1,1}\.)*(xn--)?([a-z0-9][a-z0-9\-]{0,60}|[a-z0-9-]{1,30}\.[a-z]{2,})$') - - peer.ipv4peeringmacro == None or peer.ipv4peeringmacro is match('^(AS' + peer.asn|string + ':)?[A-Z0-9-]+$') + - peer.ipv4peeringmacro == None or peer.ipv4peeringmacro is match('^(AS' + peer.asn|string + ':|RADB::)?[A-Z0-9-]+$') - peer.ipv6address|ansible.utils.ipv6('address') == peer.ipv6address - peer.ipv6bgpmd5secret is match('^[a-zA-Z0-9]*$') - peer.ipv6hostname is match('^(((?!-))(xn--|_)?[a-z0-9-]{0,61}[a-z0-9]{1,1}\.)*(xn--)?([a-z0-9][a-z0-9\-]{0,60}|[a-z0-9-]{1,30}\.[a-z]{2,})$') - - peer.ipv6peeringmacro == None or peer.ipv6peeringmacro is match('(AS' + peer.asn|string + ':)?[A-Z0-9-]+$') + - peer.ipv6peeringmacro == None or peer.ipv6peeringmacro is match('(AS' + peer.asn|string + ':|RADB::)?[A-Z0-9-]+$') - peer.switchport is match('^Ethernet\d{1,2}$') - peer.switchname in pop_switches - peer.vlanid|type_debug == 'int'