Commit c0a496d3 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

NBI component - IETF Slice:

- Added static routing table placeholder
parent d5dab8a0
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
@@ -370,6 +370,31 @@ class IETFSliceHandler:
                vlan_tag = int(match_type_item['value'][0])
                break

            update_config_rule_custom(
                slice_request.slice_config.config_rules,
                '/settings',
                {
                    'address_families': (['IPV4'], True),
                    'mtu'             : (1500, True),
                }
            )

            static_routing_table = {
                #'{:d}-{:s}/{:d}'.format(lan_tag, ip_range, ip_prefix_len): (
                #    {
                #        'vlan-id': lan_tag,
                #        'ip-network': '{:s}/{:d}'.format(ip_range, ip_prefix_len),
                #        'next-hop': next_hop
                #    },
                #    True
                #)
                #for (ip_range, ip_prefix_len, lan_tag), next_hop in static_routing.items()
            }
            update_config_rule_custom(
                slice_request.slice_config.config_rules,
                '/static_routing', static_routing_table
            )

            # Endpoint-specific config rule fields
            endpoint_config_rule_fields = {
                'address_ip': (sdp_ip_address, RAISE_IF_DIFFERS),