diff --git a/geant/gap_ansible/roles/bc_templates/routers/nokia/base_config.j2 b/geant/gap_ansible/roles/bc_templates/routers/nokia/base_config.j2 index a3fc0e26751b51c1a8a1464875375d97634df457..12bb30fdc06e97a93f49237cb045fc7cccdf4924 100644 --- a/geant/gap_ansible/roles/bc_templates/routers/nokia/base_config.j2 +++ b/geant/gap_ansible/roles/bc_templates/routers/nokia/base_config.j2 @@ -16,6 +16,7 @@ {% include 'filter_log.j2' %} {% include 'policy_options/policy_options.j2' %} {% include 'service_vprn.j2' %} + {% include 'router/routing_options.j2' %} {% endif %} {# This is because `ip_prefix_list` is related to what defined in VPRN apply_paths #} {% include 'ip_prefix_list.j2' %} diff --git a/geant/gap_ansible/roles/bc_templates/routers/nokia/cards.j2 b/geant/gap_ansible/roles/bc_templates/routers/nokia/cards.j2 index 7af88af95ce0c8f5e1e00b4ebc54184202e91ebc..578a0930c38975d64865902d87d2476f916a332b 100644 --- a/geant/gap_ansible/roles/bc_templates/routers/nokia/cards.j2 +++ b/geant/gap_ansible/roles/bc_templates/routers/nokia/cards.j2 @@ -34,6 +34,20 @@ </mda> {% endfor %} {% endif %} + {#Policy accounting config#} + {% if card.fps is defined %} + {% for fp in card.fps %} + <fp> + <fp-number>{{ fp.id }}</fp-number> + <ingress> + <policy-accounting> + <policers>{{ fp.ingress.policy_accounting.policers }}</policers> + <classes>{{ fp.ingress.policy_accounting.classes }}</classes> + </policy-accounting> + </ingress> + </fp> + {% endfor %} + {% endif %} </card> {% endfor %} diff --git a/geant/gap_ansible/roles/bc_templates/routers/nokia/pe_promotion_base_config.j2 b/geant/gap_ansible/roles/bc_templates/routers/nokia/pe_promotion_base_config.j2 index 363651932f9b214250456758f08c6269a8130f00..ce52b1dd21070f63b8e12f0377ff52cbc50d7c45 100644 --- a/geant/gap_ansible/roles/bc_templates/routers/nokia/pe_promotion_base_config.j2 +++ b/geant/gap_ansible/roles/bc_templates/routers/nokia/pe_promotion_base_config.j2 @@ -8,5 +8,6 @@ {% include 'system/security/security.j2' %} {% include 'router/router_base.j2' %} {% include 'sdp_mesh.j2' %} + {% include 'router/routing_options.j2' %} </configure> </config> diff --git a/geant/gap_ansible/roles/bc_templates/routers/nokia/router/bgp_group.j2 b/geant/gap_ansible/roles/bc_templates/routers/nokia/router/bgp_group.j2 index 78e3216af26cd17110785252e70d8940dd213eca..3f1162e3b164b1c1f5e14ee0a1b84958a5ed8065 100644 --- a/geant/gap_ansible/roles/bc_templates/routers/nokia/router/bgp_group.j2 +++ b/geant/gap_ansible/roles/bc_templates/routers/nokia/router/bgp_group.j2 @@ -5,6 +5,9 @@ {% if group.auth_key is defined %} <authentication-key>{{ group.auth_key }}</authentication-key> {% endif %} + {% if group.vpn_apply_import is defined %} + <vpn-apply-import>{{ group.vpn_apply_import|quote }}</vpn-apply-import> + {% endif %} {% if group.nhs is defined %} <next-hop-self>{{ group.nhs }}</next-hop-self> {% endif %} @@ -31,7 +34,7 @@ </local-as> {% endif %} {% if group.capability_neg is defined %} - <capability-negotiation>{{ group.capability_neg }}</capability-negotiation> + <capability-negotiation>{{ group.capability_neg|quote }}</capability-negotiation> {% endif %} {% if bgp_group_context != 'vprn' %} {% if (group.local_address is defined) and group.local_address == 'ipv4' %} diff --git a/geant/gap_ansible/roles/bc_templates/routers/nokia/router/routing_options.j2 b/geant/gap_ansible/roles/bc_templates/routers/nokia/router/routing_options.j2 new file mode 100644 index 0000000000000000000000000000000000000000..542814550bf1d8fcad835ce00f535ba6186e7d5f --- /dev/null +++ b/geant/gap_ansible/roles/bc_templates/routers/nokia/router/routing_options.j2 @@ -0,0 +1,20 @@ + +<routing-options xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes"> + <policy-accounting> + {% if nokia_pe_policy_acct_templates is defined %} + <policy-acct-template alu:operation="replace"> + {% for template in nokia_pe_policy_acct_templates %} + <name>{{ template.name }}</name> + {% if template.destination_classes is defined %} + {% for dst_class in template.destination_classes %} + <destination-class> + <index>{{ dst_class }}</index> + </destination-class> + {% endfor %} + {% endif %} + {% endfor %} + </policy-acct-template> + {% endif %} + </policy-accounting> +</routing-options> +