Commit e351d0e3 authored by Waleed Akbar's avatar Waleed Akbar
Browse files

feat: Changes in Service L3VPN handler for Pluggable demo

- Update connection hop validation to require a minimum of 2 hops (Direct router-to-router link doesn't work with condition of 4
parent d49eb848
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ class StaticRouteGenerator:

        num_connection_hops = len(connection_hop_list)
        if num_connection_hops % 2 != 0: raise Exception('Number of connection hops must be even')
        if num_connection_hops < 4: raise Exception('Number of connection hops must be >= 4')
        if num_connection_hops < 2: raise Exception('Number of connection hops must be >= 2')

        it_connection_hops = iter(connection_hop_list)
        return list(zip(it_connection_hops, it_connection_hops))
+1 −1
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ class VlanIdPropagator:

        num_connection_hops = len(connection_hop_list)
        if num_connection_hops % 2 != 0: raise Exception('Number of connection hops must be even')
        if num_connection_hops < 4: raise Exception('Number of connection hops must be >= 4')
        if num_connection_hops < 2: raise Exception('Number of connection hops must be >= 2')

        it_connection_hops = iter(connection_hop_list)
        return list(zip(it_connection_hops, it_connection_hops))