breakout tmpl from configgen; stage variations/platform feat
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
device:
|
||||
hostname: xyz1-ex-edge-r201
|
||||
hostname: xyz1-ex-core-r101
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
device:
|
||||
hostname: xyz1-ex-edge-r202
|
||||
hostname: xyz1-ex-core-r102
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
device:
|
||||
hostname: xyz2-ex-edge-r201
|
||||
hostname: xyz2-ex-core-r101
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
device:
|
||||
hostname: xyz2-ex-edge-r202
|
||||
hostname: xyz2-ex-core-r202
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
device:
|
||||
hostname: xyz1-ex-edge-r101
|
||||
live: true
|
||||
|
||||
29
demo/tmpl/ex-edge-r/policy-options.tera
Normal file
29
demo/tmpl/ex-edge-r/policy-options.tera
Normal 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 ];
|
||||
}
|
||||
@@ -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 %}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,3 +2,9 @@ files:
|
||||
- system
|
||||
- interfaces
|
||||
- protocols
|
||||
- policy-options
|
||||
platform: junos
|
||||
variations:
|
||||
- live
|
||||
- shifted
|
||||
- init
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user