diff --git a/geant/gap_ansible/roles/edge_port/templates/nokia/edge_port_create.j2 b/geant/gap_ansible/roles/edge_port/templates/nokia/edge_port_create.j2 index 2bce5e39c5ef5ae6d8a1bd63f382cb49edb921ef..6249f0504b671c830c2c3df6032bb57a17ec43f1 100644 --- a/geant/gap_ansible/roles/edge_port/templates/nokia/edge_port_create.j2 +++ b/geant/gap_ansible/roles/edge_port/templates/nokia/edge_port_create.j2 @@ -11,13 +11,19 @@ <ethernet> <mode>access</mode> <encap-type>{{ ep.encapsulation }}</encap-type> - <mtu>{{ mtu_phy | default(9192) }}</mtu> + <mtu>{{ mtu_phy[ep.edge_port_type] | default(9192) }}</mtu> {% if edge_ports_hold_time[ep.ga_id] is defined and edge_ports_hold_time[ep.ga_id] | length > 0 %} <hold-time> <units>{{ edge_ports_hold_time[ep.ga_id].units }}</units> <up>{{ edge_ports_hold_time[ep.ga_id].up }}</up> <down>{{ edge_ports_hold_time[ep.ga_id].down }}</down> </hold-time> + {% elif phy_hold_time[ep.edge_port_type] is defined %} + <hold-time> + <units>{{ phy_hold_time[ep.edge_port_type][units] }}</units> + <up>{{ phy_hold_time[ep.edge_port_type][up] }}</up> + <down>{{ phy_hold_time[ep.edge_port_type][down] }}</down> + </hold-time> {% endif %} {% if edge_port_lldp_enable_map[ep.edge_port_type] is true %} <lldp> @@ -49,8 +55,14 @@ <admin-state>enable</admin-state> <encap-type>{{ ep.encapsulation }}</encap-type> <description>LAG {{ ep.edge_port_type }} {{ partner_name }}{{ ' | '+gaid_prefix+ep.ga_id if ep.ga_id is string }}{{ ' | '+csn_prefix+(ep.custom_service_name | replace("#","")) if ep.custom_service_name is string }}{{ ' | '+ep.edge_port_description if ep.edge_port_description is string }}</description> + {% if ep.mac_address is not none %} + <mac-address>{{ ep.mac_address }}</mac-address> + {% endif %} <mode>access</mode> - {% if ep.enable_lacp is true %} + {% if ep.lacp_xmit_interval_slow %} + <lacp-xmit-interval>slow</lacp-xmit-interval> + {% endif %} + {% if ep.enable_lacp is true %} <lacp> <mode>active</mode> <administrative-key>{{ (ep.edge_port_name|split("-"))[1] }}</administrative-key> diff --git a/geant/gap_ansible/roles/edge_port/vars/main.yml b/geant/gap_ansible/roles/edge_port/vars/main.yml index 362f8c584546901dd367118198e44f2d699e3e0a..b8e9821a43602cf44dc081f952bd35b527174a6d 100644 --- a/geant/gap_ansible/roles/edge_port/vars/main.yml +++ b/geant/gap_ansible/roles/edge_port/vars/main.yml @@ -17,3 +17,13 @@ edge_port_lldp_enable_map: PUBLIC: false RE_INTERCONNECT: false PRIVATE: false + +mtu_phy: + PUBLIC: 1518 + CUSTOMER: 9192 + +phy_hold_time: + PUBLIC: + units: seconds + up: 1 + down: 1