breakout tmpl from configgen; stage variations/platform feat

This commit is contained in:
2026-02-17 03:00:17 -07:00
parent bd91fe5b15
commit a813c4cb53
13 changed files with 102 additions and 30 deletions

View File

@@ -1,2 +1,2 @@
device:
hostname: xyz1-ex-edge-r201
hostname: xyz1-ex-core-r101

View File

@@ -1,2 +1,2 @@
device:
hostname: xyz1-ex-edge-r202
hostname: xyz1-ex-core-r102

View File

@@ -1,2 +1,2 @@
device:
hostname: xyz2-ex-edge-r201
hostname: xyz2-ex-core-r101

View File

@@ -1,2 +1,2 @@
device:
hostname: xyz2-ex-edge-r202
hostname: xyz2-ex-core-r202

View File

@@ -1,2 +1,3 @@
device:
hostname: xyz1-ex-edge-r101
live: true

View File

@@ -0,0 +1,29 @@
policy-options {
policy-statement EXPORT-POLICY {
term ADVERTISE {
from protocol bgp;
then {
community add LOCAL-REGION;
accept;
}
}
}
policy-statement IMPORT-POLICY {
term ACCEPT-ALL {
then accept;
}
}
policy-statement SHIFTED {
term DEPRIORITIZE {
from {
protocol bgp;
}
then {
community add SHIFTED-OUT;
next policy;
}
}
}
community LOCAL-REGION members 64500:200;
community SHIFTED-OUT members [ 64500:200 64500:200 64500:200 ];
}

View File

@@ -1,3 +1,14 @@
protocols {
{{ protocol }};
bgp {
group UPSTREAM {
type external;
peer-as 64500;
import IMPORT-POLICY;
{%- if live %}
export EXPORT-POLICY;
{%- else %}
export [ SHIFTED EXPORT-POLICY ];
{%- endif %}
}
}
}

View File

@@ -2,3 +2,9 @@ files:
- system
- interfaces
- protocols
- policy-options
platform: junos
variations:
- live
- shifted
- init

View File

@@ -1,8 +1,18 @@
system {
hostname {{ hostname }};
location "{{ location }}";
zone {{ zone }};
users {
{{ username }};
/* location "{{ location }}" zone {{ zone }} */
host-name {{ hostname }};
system {
login {
{%- if init %}
user bootstrap {
uid 2000;
class super-user;
}
{%- endif %}
user {{ username }} {
uid 2001;
class super-user;
}
}
}
}