Skip to content
Snippets Groups Projects
Commit 2d931e11 authored by Aleksandr Kurbatov's avatar Aleksandr Kurbatov
Browse files

Merge branch 'fix/sr2se-pe-fixes' into 'develop'

Bugfixes for SR2se/PE

See merge request !170
parents 70744748 b30bead7
No related branches found
No related tags found
1 merge request!170Bugfixes for SR2se/PE
Pipeline #89084 passed
...@@ -3,18 +3,37 @@ ...@@ -3,18 +3,37 @@
{% else %} {% else %}
{% set cards=nokia_cards.sr7 %} {% set cards=nokia_cards.sr7 %}
{% endif %} {% endif %}
{% for card in cards %} {% for card in cards %}
<card 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" alu:operation="replace"> <card 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" alu:operation="replace">
<slot-number>{{ card.slot }}</slot-number> <slot-number>{{ card.slot }}</slot-number>
<admin-state>enable</admin-state> <admin-state>enable</admin-state>
<card-type>{{ card.card_type }}</card-type> <card-type>{{ card.card_type }}</card-type>
{% for mda in card.mdas %} {% if card.xiom is defined %}
{#Xiom is the SR2se specific config#}
<xiom>
<xiom-slot>{{ card.xiom.slot }}</xiom-slot>
<level>{{ card.xiom.level }}</level>
<xiom-type>{{ card.xiom.type }}</xiom-type>
{% for mda in card.mdas %}
<mda>
<mda-slot>{{mda.mda_slot}}</mda-slot>
<admin-state>enable</admin-state>
<mda-type>{{ mda.mda_type }}</mda-type>
</mda>
{% endfor %}
</xiom>
{% else %}
{#The rest is for SR7#}
{% for mda in card.mdas %}
<mda> <mda>
<mda-slot>{{mda.mda_slot}}</mda-slot> <mda-slot>{{mda.mda_slot}}</mda-slot>
<admin-state>enable</admin-state> <admin-state>enable</admin-state>
<mda-type>{{ mda.mda_type }}</mda-type> <mda-type>{{ mda.mda_type }}</mda-type>
<level>{{ mda.mda_level }}</level> <level>{{ mda.mda_level }}</level>
</mda> </mda>
{% endfor %} {% endfor %}
{% endif %}
</card> </card>
{% endfor %} {% endfor %}
...@@ -10,7 +10,9 @@ ...@@ -10,7 +10,9 @@
<sample-profile> <sample-profile>
<profile-id>{{ profile.id }}</profile-id> <profile-id>{{ profile.id }}</profile-id>
<sample-rate>{{ profile.sample_rate }}</sample-rate> <sample-rate>{{ profile.sample_rate }}</sample-rate>
{% if profile.metering_process is defined %}
<metering-process>{{ profile.metering_process }}</metering-process> <metering-process>{{ profile.metering_process }}</metering-process>
{% endif %}
</sample-profile> </sample-profile>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
......
{#This template takes care of hostname, motd, location and other general settings#} {#This template takes care of hostname, motd, location and other general settings#}
{% set hostname_as_a_list= inventory_hostname.split('.')%} {% set hostname_as_a_list= inventory_hostname.split('.') %}
{% set short_hostname= hostname_as_a_list[:3] | join('.')%} {% set short_hostname= hostname_as_a_list[:3] | join('.') %}
<system 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"> <system 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">
<contact alu:operation="replace">{{ nokia_system_contact }}</contact> <contact alu:operation="replace">{{ nokia_system_contact }}</contact>
<name alu:operation="replace">{{ short_hostname}}</name> <name alu:operation="replace">{{ short_hostname }}</name>
<location alu:operation="replace">{{ nokia_snmp_location }}</location> <location alu:operation="replace">{{ nokia_snmp_location }}</location>
<load-balancing alu:operation="replace"> <load-balancing alu:operation="replace">
<l4-load-balancing>true</l4-load-balancing> <l4-load-balancing>true</l4-load-balancing>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment