]> git.proxmox.com Git - mirror_frr.git/commitdiff
tests: add isis_sr_flex_algo_topo1 for flex-algo
authorHiroki Shirokura <hiroki.shirokura@linecorp.com>
Sun, 21 Nov 2021 10:07:27 +0000 (10:07 +0000)
committerLouis Scalbert <louis.scalbert@6wind.com>
Tue, 18 Apr 2023 09:33:15 +0000 (11:33 +0200)
Add a topotest to check some Flex-Algo configuration changes.

Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
73 files changed:
tests/topotests/isis_sr_flex_algo_topo1/rt1/isisd.conf [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt1/step1/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt1/step1/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt1/step10/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt1/step10/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt1/step11/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt1/step11/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt1/step2/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt1/step2/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt1/step3/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt1/step3/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt1/step4/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt1/step4/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt1/step5/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt1/step5/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt1/step6/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt1/step6/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt1/step7/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt1/step7/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt1/step8/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt1/step8/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt1/step9/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt1/step9/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt1/zebra.conf [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt2/isisd.conf [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt2/step1/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt2/step1/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt2/step10/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt2/step10/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt2/step11/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt2/step11/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt2/step2/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt2/step2/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt2/step3/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt2/step3/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt2/step4/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt2/step4/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt2/step5/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt2/step5/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt2/step6/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt2/step6/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt2/step7/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt2/step7/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt2/step8/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt2/step8/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt2/step9/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt2/step9/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt2/zebra.conf [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt3/isisd.conf [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt3/step1/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt3/step1/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt3/step10/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt3/step10/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt3/step11/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt3/step11/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt3/step2/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt3/step2/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt3/step3/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt3/step3/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt3/step4/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt3/step4/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt3/step5/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt3/step5/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt3/step6/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt3/step6/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt3/step7/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt3/step7/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt3/step8/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt3/step8/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt3/step9/show_isis_flex_algo.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt3/step9/show_mpls_table.ref [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/rt3/zebra.conf [new file with mode: 0644]
tests/topotests/isis_sr_flex_algo_topo1/test_isis_sr_flex_algo_topo1.py [new file with mode: 0755]

diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt1/isisd.conf b/tests/topotests/isis_sr_flex_algo_topo1/rt1/isisd.conf
new file mode 100644 (file)
index 0000000..5503baa
--- /dev/null
@@ -0,0 +1,96 @@
+password 1
+hostname rt1
+log file isisd.log
+!
+!debug northbound
+!debug isis events
+!debug isis spf-events
+!debug isis route-events
+!debug isis sr-events
+!debug isis lsp-gen
+!
+affinity-map red bit-position 0
+affinity-map blue bit-position 1
+affinity-map green bit-position 2
+affinity-map yellow bit-position 3
+affinity-map orange bit-position 4
+!
+interface lo
+ ip router isis 1
+ ipv6 router isis 1
+ isis passive
+!
+interface eth-rt2
+ ip router isis 1
+ ipv6 router isis 1
+ isis hello-multiplier 3
+ isis network point-to-point
+!
+interface eth-rt3
+ ip router isis 1
+ ipv6 router isis 1
+ isis hello-multiplier 3
+ isis network point-to-point
+!
+router isis 1
+ lsp-gen-interval 2
+ net 49.0000.0000.0000.0001.00
+ is-type level-1
+ topology ipv6-unicast
+ mpls-te on
+ !
+ flex-algo 201
+  dataplane sr-mpls
+  advertise-definition
+  affinity exclude-any red
+ !
+ flex-algo 202
+  dataplane sr-mpls
+  advertise-definition
+  affinity exclude-any blue
+ !
+ flex-algo 203
+  dataplane sr-mpls
+  advertise-definition
+  affinity exclude-any green
+ !
+ flex-algo 204
+  dataplane sr-mpls
+  advertise-definition
+  affinity include-any blue green
+ !
+ flex-algo 205
+  dataplane sr-mpls
+  advertise-definition
+  affinity include-any red green
+ !
+ flex-algo 206
+  dataplane sr-mpls
+  advertise-definition
+  affinity include-any red blue
+ !
+ flex-algo 207
+  dataplane sr-mpls
+  advertise-definition
+  affinity include-all yellow orange
+ !
+ segment-routing on
+ segment-routing global-block 20000 23999
+ segment-routing node-msd 8
+ segment-routing prefix 1.1.1.1/32 index 1
+ segment-routing prefix 1.1.1.1/32 algorithm 201 index 101
+ segment-routing prefix 1.1.1.1/32 algorithm 202 index 201
+ segment-routing prefix 1.1.1.1/32 algorithm 203 index 301
+ segment-routing prefix 1.1.1.1/32 algorithm 204 index 401
+ segment-routing prefix 1.1.1.1/32 algorithm 205 index 501
+ segment-routing prefix 1.1.1.1/32 algorithm 206 index 601
+ segment-routing prefix 1.1.1.1/32 algorithm 207 index 701
+ segment-routing prefix 2001:db8:1000::1/128 index 1001
+ segment-routing prefix 2001:db8:1000::1/128 algorithm 201 index 1101
+ segment-routing prefix 2001:db8:1000::1/128 algorithm 202 index 1201
+ segment-routing prefix 2001:db8:1000::1/128 algorithm 203 index 1301
+ segment-routing prefix 2001:db8:1000::1/128 algorithm 204 index 1401
+ segment-routing prefix 2001:db8:1000::1/128 algorithm 205 index 1501
+ segment-routing prefix 2001:db8:1000::1/128 algorithm 206 index 1601
+ segment-routing prefix 2001:db8:1000::1/128 algorithm 207 index 1701
+!
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt1/step1/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt1/step1/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..750abc1
--- /dev/null
@@ -0,0 +1,125 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000004
+            Bit positions: 2
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
\ No newline at end of file
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt1/step1/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt1/step1/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..2b16c53
--- /dev/null
@@ -0,0 +1,514 @@
+{
+  "20002":{
+    "inLabel":20002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20003":{
+    "inLabel":20003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20102":{
+    "inLabel":20102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20102,
+        "outLabelStack":[
+          20102
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20103":{
+    "inLabel":20103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20202":{
+    "inLabel":20202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20203":{
+    "inLabel":20203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20302":{
+    "inLabel":20302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20303":{
+    "inLabel":20303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20303,
+        "outLabelStack":[
+          20303
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20402":{
+    "inLabel":20402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20402,
+        "outLabelStack":[
+          20402
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20403":{
+    "inLabel":20403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20502":{
+    "inLabel":20502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20503":{
+    "inLabel":20503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20602":{
+    "inLabel":20602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20603":{
+    "inLabel":20603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20603,
+        "outLabelStack":[
+          20603
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20702":{
+    "inLabel":20702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20702,
+        "outLabelStack":[
+          20702
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20703":{
+    "inLabel":20703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "21002":{
+    "inLabel":21002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21003":{
+    "inLabel":21003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21102":{
+    "inLabel":21102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21102,
+        "outLabelStack":[
+          21102
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21103":{
+    "inLabel":21103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21202":{
+    "inLabel":21202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21203":{
+    "inLabel":21203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21302":{
+    "inLabel":21302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21303":{
+    "inLabel":21303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21303,
+        "outLabelStack":[
+          21303
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21402":{
+    "inLabel":21402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21402,
+        "outLabelStack":[
+          21402
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21403":{
+    "inLabel":21403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21502":{
+    "inLabel":21502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21503":{
+    "inLabel":21503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21602":{
+    "inLabel":21602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21603":{
+    "inLabel":21603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21603,
+        "outLabelStack":[
+          21603
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21702":{
+    "inLabel":21702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21702,
+        "outLabelStack":[
+          21702
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21703":{
+    "inLabel":21703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt1/step10/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt1/step10/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..9421990
--- /dev/null
@@ -0,0 +1,126 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000004
+            Bit positions: 2
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
+
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt1/step10/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt1/step10/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..2b16c53
--- /dev/null
@@ -0,0 +1,514 @@
+{
+  "20002":{
+    "inLabel":20002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20003":{
+    "inLabel":20003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20102":{
+    "inLabel":20102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20102,
+        "outLabelStack":[
+          20102
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20103":{
+    "inLabel":20103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20202":{
+    "inLabel":20202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20203":{
+    "inLabel":20203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20302":{
+    "inLabel":20302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20303":{
+    "inLabel":20303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20303,
+        "outLabelStack":[
+          20303
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20402":{
+    "inLabel":20402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20402,
+        "outLabelStack":[
+          20402
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20403":{
+    "inLabel":20403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20502":{
+    "inLabel":20502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20503":{
+    "inLabel":20503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20602":{
+    "inLabel":20602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20603":{
+    "inLabel":20603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20603,
+        "outLabelStack":[
+          20603
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20702":{
+    "inLabel":20702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20702,
+        "outLabelStack":[
+          20702
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20703":{
+    "inLabel":20703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "21002":{
+    "inLabel":21002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21003":{
+    "inLabel":21003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21102":{
+    "inLabel":21102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21102,
+        "outLabelStack":[
+          21102
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21103":{
+    "inLabel":21103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21202":{
+    "inLabel":21202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21203":{
+    "inLabel":21203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21302":{
+    "inLabel":21302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21303":{
+    "inLabel":21303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21303,
+        "outLabelStack":[
+          21303
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21402":{
+    "inLabel":21402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21402,
+        "outLabelStack":[
+          21402
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21403":{
+    "inLabel":21403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21502":{
+    "inLabel":21502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21503":{
+    "inLabel":21503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21602":{
+    "inLabel":21602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21603":{
+    "inLabel":21603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21603,
+        "outLabelStack":[
+          21603
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21702":{
+    "inLabel":21702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21702,
+        "outLabelStack":[
+          21702
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21703":{
+    "inLabel":21703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt1/step11/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt1/step11/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..9421990
--- /dev/null
@@ -0,0 +1,126 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000004
+            Bit positions: 2
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
+
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt1/step11/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt1/step11/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..2b16c53
--- /dev/null
@@ -0,0 +1,514 @@
+{
+  "20002":{
+    "inLabel":20002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20003":{
+    "inLabel":20003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20102":{
+    "inLabel":20102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20102,
+        "outLabelStack":[
+          20102
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20103":{
+    "inLabel":20103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20202":{
+    "inLabel":20202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20203":{
+    "inLabel":20203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20302":{
+    "inLabel":20302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20303":{
+    "inLabel":20303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20303,
+        "outLabelStack":[
+          20303
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20402":{
+    "inLabel":20402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20402,
+        "outLabelStack":[
+          20402
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20403":{
+    "inLabel":20403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20502":{
+    "inLabel":20502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20503":{
+    "inLabel":20503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20602":{
+    "inLabel":20602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20603":{
+    "inLabel":20603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20603,
+        "outLabelStack":[
+          20603
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20702":{
+    "inLabel":20702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20702,
+        "outLabelStack":[
+          20702
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20703":{
+    "inLabel":20703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "21002":{
+    "inLabel":21002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21003":{
+    "inLabel":21003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21102":{
+    "inLabel":21102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21102,
+        "outLabelStack":[
+          21102
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21103":{
+    "inLabel":21103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21202":{
+    "inLabel":21202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21203":{
+    "inLabel":21203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21302":{
+    "inLabel":21302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21303":{
+    "inLabel":21303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21303,
+        "outLabelStack":[
+          21303
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21402":{
+    "inLabel":21402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21402,
+        "outLabelStack":[
+          21402
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21403":{
+    "inLabel":21403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21502":{
+    "inLabel":21502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21503":{
+    "inLabel":21503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21602":{
+    "inLabel":21602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21603":{
+    "inLabel":21603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21603,
+        "outLabelStack":[
+          21603
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21702":{
+    "inLabel":21702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21702,
+        "outLabelStack":[
+          21702
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21703":{
+    "inLabel":21703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt1/step2/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt1/step2/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..9421990
--- /dev/null
@@ -0,0 +1,126 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000004
+            Bit positions: 2
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
+
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt1/step2/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt1/step2/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..2b16c53
--- /dev/null
@@ -0,0 +1,514 @@
+{
+  "20002":{
+    "inLabel":20002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20003":{
+    "inLabel":20003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20102":{
+    "inLabel":20102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20102,
+        "outLabelStack":[
+          20102
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20103":{
+    "inLabel":20103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20202":{
+    "inLabel":20202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20203":{
+    "inLabel":20203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20302":{
+    "inLabel":20302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20303":{
+    "inLabel":20303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20303,
+        "outLabelStack":[
+          20303
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20402":{
+    "inLabel":20402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20402,
+        "outLabelStack":[
+          20402
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20403":{
+    "inLabel":20403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20502":{
+    "inLabel":20502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20503":{
+    "inLabel":20503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20602":{
+    "inLabel":20602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20603":{
+    "inLabel":20603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20603,
+        "outLabelStack":[
+          20603
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20702":{
+    "inLabel":20702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20702,
+        "outLabelStack":[
+          20702
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20703":{
+    "inLabel":20703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "21002":{
+    "inLabel":21002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21003":{
+    "inLabel":21003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21102":{
+    "inLabel":21102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21102,
+        "outLabelStack":[
+          21102
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21103":{
+    "inLabel":21103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21202":{
+    "inLabel":21202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21203":{
+    "inLabel":21203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21302":{
+    "inLabel":21302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21303":{
+    "inLabel":21303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21303,
+        "outLabelStack":[
+          21303
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21402":{
+    "inLabel":21402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21402,
+        "outLabelStack":[
+          21402
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21403":{
+    "inLabel":21403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21502":{
+    "inLabel":21502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21503":{
+    "inLabel":21503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21602":{
+    "inLabel":21602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21603":{
+    "inLabel":21603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21603,
+        "outLabelStack":[
+          21603
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21702":{
+    "inLabel":21702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21702,
+        "outLabelStack":[
+          21702
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21703":{
+    "inLabel":21703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt1/step3/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt1/step3/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..13a9616
--- /dev/null
@@ -0,0 +1,115 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: Not found
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
+
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt1/step3/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt1/step3/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..d311e92
--- /dev/null
@@ -0,0 +1,450 @@
+{
+  "20002":{
+    "inLabel":20002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20003":{
+    "inLabel":20003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20102":{
+    "inLabel":20102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20102,
+        "outLabelStack":[
+          20102
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20103":{
+    "inLabel":20103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20202":{
+    "inLabel":20202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20203":{
+    "inLabel":20203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20402":{
+    "inLabel":20402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20402,
+        "outLabelStack":[
+          20402
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20403":{
+    "inLabel":20403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20502":{
+    "inLabel":20502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20503":{
+    "inLabel":20503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20602":{
+    "inLabel":20602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20603":{
+    "inLabel":20603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20603,
+        "outLabelStack":[
+          20603
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20702":{
+    "inLabel":20702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20702,
+        "outLabelStack":[
+          20702
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20703":{
+    "inLabel":20703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "21002":{
+    "inLabel":21002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21003":{
+    "inLabel":21003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21102":{
+    "inLabel":21102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21102,
+        "outLabelStack":[
+          21102
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21103":{
+    "inLabel":21103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21202":{
+    "inLabel":21202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21203":{
+    "inLabel":21203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21402":{
+    "inLabel":21402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21402,
+        "outLabelStack":[
+          21402
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21403":{
+    "inLabel":21403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21502":{
+    "inLabel":21502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21503":{
+    "inLabel":21503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21602":{
+    "inLabel":21602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21603":{
+    "inLabel":21603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21603,
+        "outLabelStack":[
+          21603
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21702":{
+    "inLabel":21702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21702,
+        "outLabelStack":[
+          21702
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21703":{
+    "inLabel":21703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt1/step4/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt1/step4/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..9421990
--- /dev/null
@@ -0,0 +1,126 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000004
+            Bit positions: 2
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
+
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt1/step4/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt1/step4/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..2b16c53
--- /dev/null
@@ -0,0 +1,514 @@
+{
+  "20002":{
+    "inLabel":20002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20003":{
+    "inLabel":20003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20102":{
+    "inLabel":20102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20102,
+        "outLabelStack":[
+          20102
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20103":{
+    "inLabel":20103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20202":{
+    "inLabel":20202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20203":{
+    "inLabel":20203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20302":{
+    "inLabel":20302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20303":{
+    "inLabel":20303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20303,
+        "outLabelStack":[
+          20303
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20402":{
+    "inLabel":20402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20402,
+        "outLabelStack":[
+          20402
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20403":{
+    "inLabel":20403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20502":{
+    "inLabel":20502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20503":{
+    "inLabel":20503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20602":{
+    "inLabel":20602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20603":{
+    "inLabel":20603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20603,
+        "outLabelStack":[
+          20603
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20702":{
+    "inLabel":20702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20702,
+        "outLabelStack":[
+          20702
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20703":{
+    "inLabel":20703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "21002":{
+    "inLabel":21002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21003":{
+    "inLabel":21003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21102":{
+    "inLabel":21102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21102,
+        "outLabelStack":[
+          21102
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21103":{
+    "inLabel":21103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21202":{
+    "inLabel":21202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21203":{
+    "inLabel":21203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21302":{
+    "inLabel":21302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21303":{
+    "inLabel":21303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21303,
+        "outLabelStack":[
+          21303
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21402":{
+    "inLabel":21402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21402,
+        "outLabelStack":[
+          21402
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21403":{
+    "inLabel":21403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21502":{
+    "inLabel":21502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21503":{
+    "inLabel":21503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21602":{
+    "inLabel":21602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21603":{
+    "inLabel":21603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21603,
+        "outLabelStack":[
+          21603
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21702":{
+    "inLabel":21702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21702,
+        "outLabelStack":[
+          21702
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21703":{
+    "inLabel":21703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt1/step5/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt1/step5/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..9421990
--- /dev/null
@@ -0,0 +1,126 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000004
+            Bit positions: 2
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
+
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt1/step5/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt1/step5/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..2b16c53
--- /dev/null
@@ -0,0 +1,514 @@
+{
+  "20002":{
+    "inLabel":20002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20003":{
+    "inLabel":20003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20102":{
+    "inLabel":20102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20102,
+        "outLabelStack":[
+          20102
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20103":{
+    "inLabel":20103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20202":{
+    "inLabel":20202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20203":{
+    "inLabel":20203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20302":{
+    "inLabel":20302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20303":{
+    "inLabel":20303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20303,
+        "outLabelStack":[
+          20303
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20402":{
+    "inLabel":20402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20402,
+        "outLabelStack":[
+          20402
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20403":{
+    "inLabel":20403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20502":{
+    "inLabel":20502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20503":{
+    "inLabel":20503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20602":{
+    "inLabel":20602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20603":{
+    "inLabel":20603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20603,
+        "outLabelStack":[
+          20603
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20702":{
+    "inLabel":20702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20702,
+        "outLabelStack":[
+          20702
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20703":{
+    "inLabel":20703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "21002":{
+    "inLabel":21002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21003":{
+    "inLabel":21003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21102":{
+    "inLabel":21102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21102,
+        "outLabelStack":[
+          21102
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21103":{
+    "inLabel":21103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21202":{
+    "inLabel":21202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21203":{
+    "inLabel":21203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21302":{
+    "inLabel":21302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21303":{
+    "inLabel":21303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21303,
+        "outLabelStack":[
+          21303
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21402":{
+    "inLabel":21402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21402,
+        "outLabelStack":[
+          21402
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21403":{
+    "inLabel":21403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21502":{
+    "inLabel":21502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21503":{
+    "inLabel":21503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21602":{
+    "inLabel":21602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21603":{
+    "inLabel":21603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21603,
+        "outLabelStack":[
+          21603
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21702":{
+    "inLabel":21702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21702,
+        "outLabelStack":[
+          21702
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21703":{
+    "inLabel":21703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt1/step6/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt1/step6/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..ce31766
--- /dev/null
@@ -0,0 +1,112 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: None
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
+
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt1/step6/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt1/step6/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..d311e92
--- /dev/null
@@ -0,0 +1,450 @@
+{
+  "20002":{
+    "inLabel":20002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20003":{
+    "inLabel":20003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20102":{
+    "inLabel":20102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20102,
+        "outLabelStack":[
+          20102
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20103":{
+    "inLabel":20103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20202":{
+    "inLabel":20202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20203":{
+    "inLabel":20203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20402":{
+    "inLabel":20402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20402,
+        "outLabelStack":[
+          20402
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20403":{
+    "inLabel":20403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20502":{
+    "inLabel":20502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20503":{
+    "inLabel":20503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20602":{
+    "inLabel":20602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20603":{
+    "inLabel":20603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20603,
+        "outLabelStack":[
+          20603
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20702":{
+    "inLabel":20702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20702,
+        "outLabelStack":[
+          20702
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20703":{
+    "inLabel":20703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "21002":{
+    "inLabel":21002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21003":{
+    "inLabel":21003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21102":{
+    "inLabel":21102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21102,
+        "outLabelStack":[
+          21102
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21103":{
+    "inLabel":21103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21202":{
+    "inLabel":21202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21203":{
+    "inLabel":21203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21402":{
+    "inLabel":21402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21402,
+        "outLabelStack":[
+          21402
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21403":{
+    "inLabel":21403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21502":{
+    "inLabel":21502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21503":{
+    "inLabel":21503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21602":{
+    "inLabel":21602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21603":{
+    "inLabel":21603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21603,
+        "outLabelStack":[
+          21603
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21702":{
+    "inLabel":21702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21702,
+        "outLabelStack":[
+          21702
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21703":{
+    "inLabel":21703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt1/step7/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt1/step7/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..e56e5af
--- /dev/null
@@ -0,0 +1,108 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
+
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt1/step7/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt1/step7/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..d311e92
--- /dev/null
@@ -0,0 +1,450 @@
+{
+  "20002":{
+    "inLabel":20002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20003":{
+    "inLabel":20003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20102":{
+    "inLabel":20102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20102,
+        "outLabelStack":[
+          20102
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20103":{
+    "inLabel":20103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20202":{
+    "inLabel":20202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20203":{
+    "inLabel":20203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20402":{
+    "inLabel":20402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20402,
+        "outLabelStack":[
+          20402
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20403":{
+    "inLabel":20403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20502":{
+    "inLabel":20502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20503":{
+    "inLabel":20503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20602":{
+    "inLabel":20602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20603":{
+    "inLabel":20603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20603,
+        "outLabelStack":[
+          20603
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20702":{
+    "inLabel":20702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20702,
+        "outLabelStack":[
+          20702
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20703":{
+    "inLabel":20703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "21002":{
+    "inLabel":21002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21003":{
+    "inLabel":21003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21102":{
+    "inLabel":21102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21102,
+        "outLabelStack":[
+          21102
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21103":{
+    "inLabel":21103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21202":{
+    "inLabel":21202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21203":{
+    "inLabel":21203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21402":{
+    "inLabel":21402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21402,
+        "outLabelStack":[
+          21402
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21403":{
+    "inLabel":21403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21502":{
+    "inLabel":21502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21503":{
+    "inLabel":21503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21602":{
+    "inLabel":21602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21603":{
+    "inLabel":21603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21603,
+        "outLabelStack":[
+          21603
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21702":{
+    "inLabel":21702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21702,
+        "outLabelStack":[
+          21702
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21703":{
+    "inLabel":21703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt1/step8/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt1/step8/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..9421990
--- /dev/null
@@ -0,0 +1,126 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000004
+            Bit positions: 2
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
+
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt1/step8/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt1/step8/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..2b16c53
--- /dev/null
@@ -0,0 +1,514 @@
+{
+  "20002":{
+    "inLabel":20002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20003":{
+    "inLabel":20003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20102":{
+    "inLabel":20102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20102,
+        "outLabelStack":[
+          20102
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20103":{
+    "inLabel":20103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20202":{
+    "inLabel":20202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20203":{
+    "inLabel":20203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20302":{
+    "inLabel":20302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20303":{
+    "inLabel":20303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20303,
+        "outLabelStack":[
+          20303
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20402":{
+    "inLabel":20402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20402,
+        "outLabelStack":[
+          20402
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20403":{
+    "inLabel":20403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20502":{
+    "inLabel":20502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20503":{
+    "inLabel":20503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20602":{
+    "inLabel":20602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20603":{
+    "inLabel":20603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20603,
+        "outLabelStack":[
+          20603
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20702":{
+    "inLabel":20702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20702,
+        "outLabelStack":[
+          20702
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20703":{
+    "inLabel":20703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "21002":{
+    "inLabel":21002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21003":{
+    "inLabel":21003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21102":{
+    "inLabel":21102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21102,
+        "outLabelStack":[
+          21102
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21103":{
+    "inLabel":21103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21202":{
+    "inLabel":21202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21203":{
+    "inLabel":21203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21302":{
+    "inLabel":21302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21303":{
+    "inLabel":21303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21303,
+        "outLabelStack":[
+          21303
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21402":{
+    "inLabel":21402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21402,
+        "outLabelStack":[
+          21402
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21403":{
+    "inLabel":21403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21502":{
+    "inLabel":21502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21503":{
+    "inLabel":21503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21602":{
+    "inLabel":21602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21603":{
+    "inLabel":21603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21603,
+        "outLabelStack":[
+          21603
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21702":{
+    "inLabel":21702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21702,
+        "outLabelStack":[
+          21702
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21703":{
+    "inLabel":21703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt1/step9/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt1/step9/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..9421990
--- /dev/null
@@ -0,0 +1,126 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000004
+            Bit positions: 2
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
+
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt1/step9/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt1/step9/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..2b16c53
--- /dev/null
@@ -0,0 +1,514 @@
+{
+  "20002":{
+    "inLabel":20002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20003":{
+    "inLabel":20003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20102":{
+    "inLabel":20102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20102,
+        "outLabelStack":[
+          20102
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20103":{
+    "inLabel":20103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20202":{
+    "inLabel":20202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20203":{
+    "inLabel":20203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20302":{
+    "inLabel":20302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20303":{
+    "inLabel":20303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20303,
+        "outLabelStack":[
+          20303
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20402":{
+    "inLabel":20402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20402,
+        "outLabelStack":[
+          20402
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20403":{
+    "inLabel":20403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20502":{
+    "inLabel":20502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20503":{
+    "inLabel":20503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20602":{
+    "inLabel":20602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20603":{
+    "inLabel":20603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20603,
+        "outLabelStack":[
+          20603
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.2"
+      }
+    ]
+  },
+  "20702":{
+    "inLabel":20702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20702,
+        "outLabelStack":[
+          20702
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "20703":{
+    "inLabel":20703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.3"
+      }
+    ]
+  },
+  "21002":{
+    "inLabel":21002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21003":{
+    "inLabel":21003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21102":{
+    "inLabel":21102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21102,
+        "outLabelStack":[
+          21102
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21103":{
+    "inLabel":21103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21202":{
+    "inLabel":21202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21203":{
+    "inLabel":21203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21302":{
+    "inLabel":21302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21303":{
+    "inLabel":21303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21303,
+        "outLabelStack":[
+          21303
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21402":{
+    "inLabel":21402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21402,
+        "outLabelStack":[
+          21402
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21403":{
+    "inLabel":21403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21502":{
+    "inLabel":21502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21503":{
+    "inLabel":21503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21602":{
+    "inLabel":21602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21603":{
+    "inLabel":21603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21603,
+        "outLabelStack":[
+          21603
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21702":{
+    "inLabel":21702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21702,
+        "outLabelStack":[
+          21702
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21703":{
+    "inLabel":21703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt1/zebra.conf b/tests/topotests/isis_sr_flex_algo_topo1/rt1/zebra.conf
new file mode 100644 (file)
index 0000000..5140eda
--- /dev/null
@@ -0,0 +1,39 @@
+log file zebra.log
+!
+hostname rt1
+!
+log stdout notifications
+log monitor notifications
+log commands
+!
+!debug zebra packet
+!debug zebra dplane
+!debug zebra kernel
+!
+affinity-map red bit-position 0
+affinity-map blue bit-position 1
+affinity-map green bit-position 2
+affinity-map yellow bit-position 3
+affinity-map orange bit-position 4
+!
+interface lo
+ ip address 1.1.1.1/32
+ ipv6 address 2001:db8:1000::1/128
+!
+interface eth-rt2
+ ip address 10.12.0.1/24
+ link-params
+  affinity red
+ exit-link-params
+!
+interface eth-rt3
+ ip address 10.13.0.1/24
+ link-params
+  affinity green yellow orange
+ exit-link-params
+!
+ip forwarding
+ipv6 forwarding
+!
+line vty
+!
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt2/isisd.conf b/tests/topotests/isis_sr_flex_algo_topo1/rt2/isisd.conf
new file mode 100644 (file)
index 0000000..8655e74
--- /dev/null
@@ -0,0 +1,96 @@
+password 1
+hostname rt2
+log file isisd.log
+!
+!debug northbound
+!debug isis events
+!debug isis route-events
+!debug isis spf-events
+!debug isis sr-events
+!debug isis lsp-gen
+!
+affinity-map red bit-position 0
+affinity-map blue bit-position 1
+affinity-map green bit-position 2
+affinity-map yellow bit-position 3
+affinity-map orange bit-position 4
+!
+interface lo
+ ip router isis 1
+ ipv6 router isis 1
+ isis passive
+!
+interface eth-rt1
+ ip router isis 1
+ ipv6 router isis 1
+ isis hello-multiplier 3
+ isis network point-to-point
+!
+interface eth-rt3
+ ip router isis 1
+ ipv6 router isis 1
+ isis hello-multiplier 3
+ isis network point-to-point
+!
+router isis 1
+ lsp-gen-interval 2
+ net 49.0000.0000.0000.0002.00
+ is-type level-1
+ topology ipv6-unicast
+ mpls-te on
+ !
+ flex-algo 201
+  dataplane sr-mpls
+  advertise-definition
+  affinity exclude-any red
+ !
+ flex-algo 202
+  dataplane sr-mpls
+  advertise-definition
+  affinity exclude-any blue
+ !
+ flex-algo 203
+  dataplane sr-mpls
+  advertise-definition
+  affinity exclude-any green
+ !
+ flex-algo 204
+  dataplane sr-mpls
+  advertise-definition
+  affinity include-any blue green
+ !
+ flex-algo 205
+  dataplane sr-mpls
+  advertise-definition
+  affinity include-any red green
+ !
+ flex-algo 206
+  dataplane sr-mpls
+  advertise-definition
+  affinity include-any red blue
+ !
+ flex-algo 207
+  dataplane sr-mpls
+  advertise-definition
+  affinity include-all yellow orange
+ !
+ segment-routing on
+ segment-routing global-block 20000 23999
+ segment-routing node-msd 8
+ segment-routing prefix 2.2.2.2/32 index 2
+ segment-routing prefix 2.2.2.2/32 algorithm 201 index 102
+ segment-routing prefix 2.2.2.2/32 algorithm 202 index 202
+ segment-routing prefix 2.2.2.2/32 algorithm 203 index 302
+ segment-routing prefix 2.2.2.2/32 algorithm 204 index 402
+ segment-routing prefix 2.2.2.2/32 algorithm 205 index 502
+ segment-routing prefix 2.2.2.2/32 algorithm 206 index 602
+ segment-routing prefix 2.2.2.2/32 algorithm 207 index 702
+ segment-routing prefix 2001:db8:1000::2/128 index 1002
+ segment-routing prefix 2001:db8:1000::2/128 algorithm 201 index 1102
+ segment-routing prefix 2001:db8:1000::2/128 algorithm 202 index 1202
+ segment-routing prefix 2001:db8:1000::2/128 algorithm 203 index 1302
+ segment-routing prefix 2001:db8:1000::2/128 algorithm 204 index 1402
+ segment-routing prefix 2001:db8:1000::2/128 algorithm 205 index 1502
+ segment-routing prefix 2001:db8:1000::2/128 algorithm 206 index 1602
+ segment-routing prefix 2001:db8:1000::2/128 algorithm 207 index 1702
+!
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt2/step1/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt2/step1/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..defa3ef
--- /dev/null
@@ -0,0 +1,125 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000004
+            Bit positions: 2
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt2/step1/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt2/step1/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..099045a
--- /dev/null
@@ -0,0 +1,514 @@
+{
+  "20001":{
+    "inLabel":20001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20003":{
+    "inLabel":20003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20101":{
+    "inLabel":20101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20101,
+        "outLabelStack":[
+          20101
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20103":{
+    "inLabel":20103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20201":{
+    "inLabel":20201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20203":{
+    "inLabel":20203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20203,
+        "outLabelStack":[
+          20203
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20301":{
+    "inLabel":20301,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20303":{
+    "inLabel":20303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20401":{
+    "inLabel":20401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20401,
+        "outLabelStack":[
+          20401
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20403":{
+    "inLabel":20403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20501":{
+    "inLabel":20501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20503":{
+    "inLabel":20503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20503,
+        "outLabelStack":[
+          20503
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20601":{
+    "inLabel":20601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20603":{
+    "inLabel":20603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20701":{
+    "inLabel":20701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20701,
+        "outLabelStack":[
+          20701
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20703":{
+    "inLabel":20703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "21001":{
+    "inLabel":21001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21003":{
+    "inLabel":21003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21101":{
+    "inLabel":21101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21101,
+        "outLabelStack":[
+          21101
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21103":{
+    "inLabel":21103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21201":{
+    "inLabel":21201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21203":{
+    "inLabel":21203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21203,
+        "outLabelStack":[
+          21203
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21301":{
+    "inLabel":21301,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21303":{
+    "inLabel":21303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21401":{
+    "inLabel":21401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21401,
+        "outLabelStack":[
+          21401
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21403":{
+    "inLabel":21403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21501":{
+    "inLabel":21501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21503":{
+    "inLabel":21503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21503,
+        "outLabelStack":[
+          21503
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21601":{
+    "inLabel":21601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21603":{
+    "inLabel":21603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21701":{
+    "inLabel":21701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21701,
+        "outLabelStack":[
+          21701
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21703":{
+    "inLabel":21703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt2/step10/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt2/step10/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..defa3ef
--- /dev/null
@@ -0,0 +1,125 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000004
+            Bit positions: 2
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt2/step10/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt2/step10/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..099045a
--- /dev/null
@@ -0,0 +1,514 @@
+{
+  "20001":{
+    "inLabel":20001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20003":{
+    "inLabel":20003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20101":{
+    "inLabel":20101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20101,
+        "outLabelStack":[
+          20101
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20103":{
+    "inLabel":20103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20201":{
+    "inLabel":20201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20203":{
+    "inLabel":20203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20203,
+        "outLabelStack":[
+          20203
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20301":{
+    "inLabel":20301,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20303":{
+    "inLabel":20303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20401":{
+    "inLabel":20401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20401,
+        "outLabelStack":[
+          20401
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20403":{
+    "inLabel":20403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20501":{
+    "inLabel":20501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20503":{
+    "inLabel":20503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20503,
+        "outLabelStack":[
+          20503
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20601":{
+    "inLabel":20601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20603":{
+    "inLabel":20603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20701":{
+    "inLabel":20701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20701,
+        "outLabelStack":[
+          20701
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20703":{
+    "inLabel":20703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "21001":{
+    "inLabel":21001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21003":{
+    "inLabel":21003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21101":{
+    "inLabel":21101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21101,
+        "outLabelStack":[
+          21101
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21103":{
+    "inLabel":21103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21201":{
+    "inLabel":21201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21203":{
+    "inLabel":21203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21203,
+        "outLabelStack":[
+          21203
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21301":{
+    "inLabel":21301,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21303":{
+    "inLabel":21303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21401":{
+    "inLabel":21401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21401,
+        "outLabelStack":[
+          21401
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21403":{
+    "inLabel":21403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21501":{
+    "inLabel":21501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21503":{
+    "inLabel":21503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21503,
+        "outLabelStack":[
+          21503
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21601":{
+    "inLabel":21601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21603":{
+    "inLabel":21603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21701":{
+    "inLabel":21701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21701,
+        "outLabelStack":[
+          21701
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21703":{
+    "inLabel":21703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt2/step11/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt2/step11/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..defa3ef
--- /dev/null
@@ -0,0 +1,125 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000004
+            Bit positions: 2
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt2/step11/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt2/step11/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..0ed0eb3
--- /dev/null
@@ -0,0 +1,514 @@
+{
+  "20001":{
+    "inLabel":20001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20003":{
+    "inLabel":20003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20101":{
+    "inLabel":20101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20101,
+        "outLabelStack":[
+          20101
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20103":{
+    "inLabel":20103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20201":{
+    "inLabel":20201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20203":{
+    "inLabel":20203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20203,
+        "outLabelStack":[
+          20203
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20303":{
+    "inLabel":20303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20311":{
+    "inLabel":20311,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20401":{
+    "inLabel":20401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20401,
+        "outLabelStack":[
+          20401
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20403":{
+    "inLabel":20403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20501":{
+    "inLabel":20501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20503":{
+    "inLabel":20503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20503,
+        "outLabelStack":[
+          20503
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20601":{
+    "inLabel":20601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20603":{
+    "inLabel":20603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20701":{
+    "inLabel":20701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20701,
+        "outLabelStack":[
+          20701
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20703":{
+    "inLabel":20703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "21001":{
+    "inLabel":21001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21003":{
+    "inLabel":21003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21101":{
+    "inLabel":21101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21101,
+        "outLabelStack":[
+          21101
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21103":{
+    "inLabel":21103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21201":{
+    "inLabel":21201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21203":{
+    "inLabel":21203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21203,
+        "outLabelStack":[
+          21203
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21303":{
+    "inLabel":21303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21311":{
+    "inLabel":21311,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21401":{
+    "inLabel":21401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21401,
+        "outLabelStack":[
+          21401
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21403":{
+    "inLabel":21403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21501":{
+    "inLabel":21501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21503":{
+    "inLabel":21503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21503,
+        "outLabelStack":[
+          21503
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21601":{
+    "inLabel":21601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21603":{
+    "inLabel":21603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21701":{
+    "inLabel":21701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21701,
+        "outLabelStack":[
+          21701
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21703":{
+    "inLabel":21703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt2/step2/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt2/step2/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..defa3ef
--- /dev/null
@@ -0,0 +1,125 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000004
+            Bit positions: 2
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt2/step2/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt2/step2/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..099045a
--- /dev/null
@@ -0,0 +1,514 @@
+{
+  "20001":{
+    "inLabel":20001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20003":{
+    "inLabel":20003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20101":{
+    "inLabel":20101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20101,
+        "outLabelStack":[
+          20101
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20103":{
+    "inLabel":20103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20201":{
+    "inLabel":20201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20203":{
+    "inLabel":20203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20203,
+        "outLabelStack":[
+          20203
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20301":{
+    "inLabel":20301,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20303":{
+    "inLabel":20303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20401":{
+    "inLabel":20401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20401,
+        "outLabelStack":[
+          20401
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20403":{
+    "inLabel":20403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20501":{
+    "inLabel":20501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20503":{
+    "inLabel":20503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20503,
+        "outLabelStack":[
+          20503
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20601":{
+    "inLabel":20601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20603":{
+    "inLabel":20603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20701":{
+    "inLabel":20701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20701,
+        "outLabelStack":[
+          20701
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20703":{
+    "inLabel":20703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "21001":{
+    "inLabel":21001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21003":{
+    "inLabel":21003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21101":{
+    "inLabel":21101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21101,
+        "outLabelStack":[
+          21101
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21103":{
+    "inLabel":21103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21201":{
+    "inLabel":21201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21203":{
+    "inLabel":21203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21203,
+        "outLabelStack":[
+          21203
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21301":{
+    "inLabel":21301,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21303":{
+    "inLabel":21303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21401":{
+    "inLabel":21401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21401,
+        "outLabelStack":[
+          21401
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21403":{
+    "inLabel":21403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21501":{
+    "inLabel":21501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21503":{
+    "inLabel":21503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21503,
+        "outLabelStack":[
+          21503
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21601":{
+    "inLabel":21601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21603":{
+    "inLabel":21603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21701":{
+    "inLabel":21701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21701,
+        "outLabelStack":[
+          21701
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21703":{
+    "inLabel":21703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt2/step3/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt2/step3/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..b10cb70
--- /dev/null
@@ -0,0 +1,114 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: Not found
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt2/step3/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt2/step3/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..8b40738
--- /dev/null
@@ -0,0 +1,450 @@
+{
+  "20001":{
+    "inLabel":20001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20003":{
+    "inLabel":20003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20101":{
+    "inLabel":20101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20101,
+        "outLabelStack":[
+          20101
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20103":{
+    "inLabel":20103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20201":{
+    "inLabel":20201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20203":{
+    "inLabel":20203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20203,
+        "outLabelStack":[
+          20203
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20401":{
+    "inLabel":20401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20401,
+        "outLabelStack":[
+          20401
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20403":{
+    "inLabel":20403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20501":{
+    "inLabel":20501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20503":{
+    "inLabel":20503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20503,
+        "outLabelStack":[
+          20503
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20601":{
+    "inLabel":20601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20603":{
+    "inLabel":20603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20701":{
+    "inLabel":20701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20701,
+        "outLabelStack":[
+          20701
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20703":{
+    "inLabel":20703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "21001":{
+    "inLabel":21001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21003":{
+    "inLabel":21003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21101":{
+    "inLabel":21101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21101,
+        "outLabelStack":[
+          21101
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21103":{
+    "inLabel":21103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21201":{
+    "inLabel":21201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21203":{
+    "inLabel":21203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21203,
+        "outLabelStack":[
+          21203
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21401":{
+    "inLabel":21401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21401,
+        "outLabelStack":[
+          21401
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21403":{
+    "inLabel":21403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21501":{
+    "inLabel":21501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21503":{
+    "inLabel":21503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21503,
+        "outLabelStack":[
+          21503
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21601":{
+    "inLabel":21601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21603":{
+    "inLabel":21603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21701":{
+    "inLabel":21701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21701,
+        "outLabelStack":[
+          21701
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21703":{
+    "inLabel":21703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt2/step4/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt2/step4/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..defa3ef
--- /dev/null
@@ -0,0 +1,125 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000004
+            Bit positions: 2
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt2/step4/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt2/step4/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..099045a
--- /dev/null
@@ -0,0 +1,514 @@
+{
+  "20001":{
+    "inLabel":20001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20003":{
+    "inLabel":20003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20101":{
+    "inLabel":20101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20101,
+        "outLabelStack":[
+          20101
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20103":{
+    "inLabel":20103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20201":{
+    "inLabel":20201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20203":{
+    "inLabel":20203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20203,
+        "outLabelStack":[
+          20203
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20301":{
+    "inLabel":20301,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20303":{
+    "inLabel":20303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20401":{
+    "inLabel":20401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20401,
+        "outLabelStack":[
+          20401
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20403":{
+    "inLabel":20403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20501":{
+    "inLabel":20501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20503":{
+    "inLabel":20503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20503,
+        "outLabelStack":[
+          20503
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20601":{
+    "inLabel":20601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20603":{
+    "inLabel":20603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20701":{
+    "inLabel":20701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20701,
+        "outLabelStack":[
+          20701
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20703":{
+    "inLabel":20703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "21001":{
+    "inLabel":21001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21003":{
+    "inLabel":21003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21101":{
+    "inLabel":21101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21101,
+        "outLabelStack":[
+          21101
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21103":{
+    "inLabel":21103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21201":{
+    "inLabel":21201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21203":{
+    "inLabel":21203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21203,
+        "outLabelStack":[
+          21203
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21301":{
+    "inLabel":21301,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21303":{
+    "inLabel":21303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21401":{
+    "inLabel":21401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21401,
+        "outLabelStack":[
+          21401
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21403":{
+    "inLabel":21403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21501":{
+    "inLabel":21501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21503":{
+    "inLabel":21503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21503,
+        "outLabelStack":[
+          21503
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21601":{
+    "inLabel":21601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21603":{
+    "inLabel":21603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21701":{
+    "inLabel":21701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21701,
+        "outLabelStack":[
+          21701
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21703":{
+    "inLabel":21703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt2/step5/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt2/step5/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..defa3ef
--- /dev/null
@@ -0,0 +1,125 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000004
+            Bit positions: 2
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt2/step5/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt2/step5/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..099045a
--- /dev/null
@@ -0,0 +1,514 @@
+{
+  "20001":{
+    "inLabel":20001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20003":{
+    "inLabel":20003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20101":{
+    "inLabel":20101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20101,
+        "outLabelStack":[
+          20101
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20103":{
+    "inLabel":20103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20201":{
+    "inLabel":20201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20203":{
+    "inLabel":20203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20203,
+        "outLabelStack":[
+          20203
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20301":{
+    "inLabel":20301,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20303":{
+    "inLabel":20303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20401":{
+    "inLabel":20401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20401,
+        "outLabelStack":[
+          20401
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20403":{
+    "inLabel":20403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20501":{
+    "inLabel":20501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20503":{
+    "inLabel":20503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20503,
+        "outLabelStack":[
+          20503
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20601":{
+    "inLabel":20601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20603":{
+    "inLabel":20603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20701":{
+    "inLabel":20701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20701,
+        "outLabelStack":[
+          20701
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20703":{
+    "inLabel":20703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "21001":{
+    "inLabel":21001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21003":{
+    "inLabel":21003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21101":{
+    "inLabel":21101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21101,
+        "outLabelStack":[
+          21101
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21103":{
+    "inLabel":21103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21201":{
+    "inLabel":21201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21203":{
+    "inLabel":21203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21203,
+        "outLabelStack":[
+          21203
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21301":{
+    "inLabel":21301,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21303":{
+    "inLabel":21303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21401":{
+    "inLabel":21401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21401,
+        "outLabelStack":[
+          21401
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21403":{
+    "inLabel":21403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21501":{
+    "inLabel":21501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21503":{
+    "inLabel":21503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21503,
+        "outLabelStack":[
+          21503
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21601":{
+    "inLabel":21601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21603":{
+    "inLabel":21603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21701":{
+    "inLabel":21701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21701,
+        "outLabelStack":[
+          21701
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21703":{
+    "inLabel":21703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt2/step6/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt2/step6/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..358c431
--- /dev/null
@@ -0,0 +1,111 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: None
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt2/step6/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt2/step6/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..8b40738
--- /dev/null
@@ -0,0 +1,450 @@
+{
+  "20001":{
+    "inLabel":20001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20003":{
+    "inLabel":20003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20101":{
+    "inLabel":20101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20101,
+        "outLabelStack":[
+          20101
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20103":{
+    "inLabel":20103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20201":{
+    "inLabel":20201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20203":{
+    "inLabel":20203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20203,
+        "outLabelStack":[
+          20203
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20401":{
+    "inLabel":20401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20401,
+        "outLabelStack":[
+          20401
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20403":{
+    "inLabel":20403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20501":{
+    "inLabel":20501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20503":{
+    "inLabel":20503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20503,
+        "outLabelStack":[
+          20503
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20601":{
+    "inLabel":20601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20603":{
+    "inLabel":20603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20701":{
+    "inLabel":20701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20701,
+        "outLabelStack":[
+          20701
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20703":{
+    "inLabel":20703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "21001":{
+    "inLabel":21001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21003":{
+    "inLabel":21003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21101":{
+    "inLabel":21101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21101,
+        "outLabelStack":[
+          21101
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21103":{
+    "inLabel":21103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21201":{
+    "inLabel":21201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21203":{
+    "inLabel":21203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21203,
+        "outLabelStack":[
+          21203
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21401":{
+    "inLabel":21401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21401,
+        "outLabelStack":[
+          21401
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21403":{
+    "inLabel":21403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21501":{
+    "inLabel":21501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21503":{
+    "inLabel":21503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21503,
+        "outLabelStack":[
+          21503
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21601":{
+    "inLabel":21601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21603":{
+    "inLabel":21603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21701":{
+    "inLabel":21701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21701,
+        "outLabelStack":[
+          21701
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21703":{
+    "inLabel":21703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt2/step7/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt2/step7/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..04d07e6
--- /dev/null
@@ -0,0 +1,107 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt2/step7/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt2/step7/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..8b40738
--- /dev/null
@@ -0,0 +1,450 @@
+{
+  "20001":{
+    "inLabel":20001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20003":{
+    "inLabel":20003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20101":{
+    "inLabel":20101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20101,
+        "outLabelStack":[
+          20101
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20103":{
+    "inLabel":20103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20201":{
+    "inLabel":20201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20203":{
+    "inLabel":20203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20203,
+        "outLabelStack":[
+          20203
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20401":{
+    "inLabel":20401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20401,
+        "outLabelStack":[
+          20401
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20403":{
+    "inLabel":20403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20501":{
+    "inLabel":20501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20503":{
+    "inLabel":20503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20503,
+        "outLabelStack":[
+          20503
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20601":{
+    "inLabel":20601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20603":{
+    "inLabel":20603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20701":{
+    "inLabel":20701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20701,
+        "outLabelStack":[
+          20701
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20703":{
+    "inLabel":20703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "21001":{
+    "inLabel":21001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21003":{
+    "inLabel":21003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21101":{
+    "inLabel":21101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21101,
+        "outLabelStack":[
+          21101
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21103":{
+    "inLabel":21103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21201":{
+    "inLabel":21201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21203":{
+    "inLabel":21203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21203,
+        "outLabelStack":[
+          21203
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21401":{
+    "inLabel":21401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21401,
+        "outLabelStack":[
+          21401
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21403":{
+    "inLabel":21403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21501":{
+    "inLabel":21501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21503":{
+    "inLabel":21503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21503,
+        "outLabelStack":[
+          21503
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21601":{
+    "inLabel":21601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21603":{
+    "inLabel":21603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21701":{
+    "inLabel":21701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21701,
+        "outLabelStack":[
+          21701
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21703":{
+    "inLabel":21703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt2/step8/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt2/step8/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..defa3ef
--- /dev/null
@@ -0,0 +1,125 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000004
+            Bit positions: 2
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt2/step8/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt2/step8/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..099045a
--- /dev/null
@@ -0,0 +1,514 @@
+{
+  "20001":{
+    "inLabel":20001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20003":{
+    "inLabel":20003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20101":{
+    "inLabel":20101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20101,
+        "outLabelStack":[
+          20101
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20103":{
+    "inLabel":20103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20201":{
+    "inLabel":20201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20203":{
+    "inLabel":20203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20203,
+        "outLabelStack":[
+          20203
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20301":{
+    "inLabel":20301,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20303":{
+    "inLabel":20303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20401":{
+    "inLabel":20401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20401,
+        "outLabelStack":[
+          20401
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20403":{
+    "inLabel":20403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20501":{
+    "inLabel":20501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20503":{
+    "inLabel":20503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20503,
+        "outLabelStack":[
+          20503
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20601":{
+    "inLabel":20601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20603":{
+    "inLabel":20603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20701":{
+    "inLabel":20701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20701,
+        "outLabelStack":[
+          20701
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20703":{
+    "inLabel":20703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "21001":{
+    "inLabel":21001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21003":{
+    "inLabel":21003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21101":{
+    "inLabel":21101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21101,
+        "outLabelStack":[
+          21101
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21103":{
+    "inLabel":21103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21201":{
+    "inLabel":21201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21203":{
+    "inLabel":21203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21203,
+        "outLabelStack":[
+          21203
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21301":{
+    "inLabel":21301,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21303":{
+    "inLabel":21303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21401":{
+    "inLabel":21401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21401,
+        "outLabelStack":[
+          21401
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21403":{
+    "inLabel":21403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21501":{
+    "inLabel":21501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21503":{
+    "inLabel":21503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21503,
+        "outLabelStack":[
+          21503
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21601":{
+    "inLabel":21601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21603":{
+    "inLabel":21603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21701":{
+    "inLabel":21701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21701,
+        "outLabelStack":[
+          21701
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21703":{
+    "inLabel":21703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt2/step9/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt2/step9/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..defa3ef
--- /dev/null
@@ -0,0 +1,125 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000004
+            Bit positions: 2
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: yes
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt2/step9/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt2/step9/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..3db0ebf
--- /dev/null
@@ -0,0 +1,482 @@
+{
+  "20001":{
+    "inLabel":20001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20003":{
+    "inLabel":20003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20101":{
+    "inLabel":20101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20101,
+        "outLabelStack":[
+          20101
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20103":{
+    "inLabel":20103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20201":{
+    "inLabel":20201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20203":{
+    "inLabel":20203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20203,
+        "outLabelStack":[
+          20203
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20303":{
+    "inLabel":20303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20401":{
+    "inLabel":20401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20401,
+        "outLabelStack":[
+          20401
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20403":{
+    "inLabel":20403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20501":{
+    "inLabel":20501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20503":{
+    "inLabel":20503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20503,
+        "outLabelStack":[
+          20503
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20601":{
+    "inLabel":20601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.12.0.1"
+      }
+    ]
+  },
+  "20603":{
+    "inLabel":20603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20701":{
+    "inLabel":20701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20701,
+        "outLabelStack":[
+          20701
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "20703":{
+    "inLabel":20703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.3"
+      }
+    ]
+  },
+  "21001":{
+    "inLabel":21001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21003":{
+    "inLabel":21003,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21101":{
+    "inLabel":21101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21101,
+        "outLabelStack":[
+          21101
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21103":{
+    "inLabel":21103,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21201":{
+    "inLabel":21201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21203":{
+    "inLabel":21203,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21203,
+        "outLabelStack":[
+          21203
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21303":{
+    "inLabel":21303,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21401":{
+    "inLabel":21401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21401,
+        "outLabelStack":[
+          21401
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21403":{
+    "inLabel":21403,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21501":{
+    "inLabel":21501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21503":{
+    "inLabel":21503,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21503,
+        "outLabelStack":[
+          21503
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21601":{
+    "inLabel":21601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21603":{
+    "inLabel":21603,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21701":{
+    "inLabel":21701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21701,
+        "outLabelStack":[
+          21701
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  },
+  "21703":{
+    "inLabel":21703,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt3"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt2/zebra.conf b/tests/topotests/isis_sr_flex_algo_topo1/rt2/zebra.conf
new file mode 100644 (file)
index 0000000..388348f
--- /dev/null
@@ -0,0 +1,39 @@
+log file zebra.log
+!
+hostname rt2
+!
+log stdout notifications
+log monitor notifications
+log commands
+!
+!debug zebra packet
+!debug zebra dplane
+!debug zebra kernel
+!
+affinity-map red bit-position 0
+affinity-map blue bit-position 1
+affinity-map green bit-position 2
+affinity-map yellow bit-position 3
+affinity-map orange bit-position 4
+!
+interface lo
+ ip address 2.2.2.2/32
+ ipv6 address 2001:db8:1000::2/128
+!
+interface eth-rt1
+ ip address 10.12.0.2/24
+ link-params
+  affinity red
+ exit-link-params
+!
+interface eth-rt3
+ ip address 10.23.0.2/24
+ link-params
+  affinity blue yellow orange
+ exit-link-params
+!
+ip forwarding
+ipv6 forwarding
+!
+line vty
+!
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt3/isisd.conf b/tests/topotests/isis_sr_flex_algo_topo1/rt3/isisd.conf
new file mode 100644 (file)
index 0000000..d77af81
--- /dev/null
@@ -0,0 +1,76 @@
+password 1
+hostname rt3
+log file isisd.log
+!
+!debug northbound
+!debug isis events
+!debug isis route-events
+!debug isis spf-events
+!debug isis sr-events
+!debug isis lsp-gen
+!
+affinity-map red bit-position 0
+affinity-map blue bit-position 1
+affinity-map green bit-position 2
+affinity-map yellow bit-position 3
+affinity-map orange bit-position 4
+!
+interface lo
+ ip router isis 1
+ ipv6 router isis 1
+ isis passive
+!
+interface eth-rt1
+ ip router isis 1
+ ipv6 router isis 1
+ isis hello-multiplier 3
+ isis network point-to-point
+!
+interface eth-rt2
+ ip router isis 1
+ ipv6 router isis 1
+ isis hello-multiplier 3
+ isis network point-to-point
+!
+router isis 1
+ lsp-gen-interval 2
+ net 49.0000.0000.0000.0003.00
+ is-type level-1
+ topology ipv6-unicast
+ mpls-te on
+ !
+ flex-algo 201
+  dataplane sr-mpls
+ flex-algo 202
+  dataplane sr-mpls
+ flex-algo 203
+  dataplane sr-mpls
+ flex-algo 204
+  dataplane sr-mpls
+ flex-algo 205
+  dataplane sr-mpls
+ flex-algo 206
+  dataplane sr-mpls
+ flex-algo 207
+  dataplane sr-mpls
+ !
+ segment-routing on
+ segment-routing global-block 20000 23999
+ segment-routing node-msd 8
+ segment-routing prefix 3.3.3.3/32 index 3
+ segment-routing prefix 3.3.3.3/32 algorithm 201 index 103
+ segment-routing prefix 3.3.3.3/32 algorithm 202 index 203
+ segment-routing prefix 3.3.3.3/32 algorithm 203 index 303
+ segment-routing prefix 3.3.3.3/32 algorithm 204 index 403
+ segment-routing prefix 3.3.3.3/32 algorithm 205 index 503
+ segment-routing prefix 3.3.3.3/32 algorithm 206 index 603
+ segment-routing prefix 3.3.3.3/32 algorithm 207 index 703
+ segment-routing prefix 2001:db8:1000::3/128 index 1003
+ segment-routing prefix 2001:db8:1000::3/128 algorithm 201 index 1103
+ segment-routing prefix 2001:db8:1000::3/128 algorithm 202 index 1203
+ segment-routing prefix 2001:db8:1000::3/128 algorithm 203 index 1303
+ segment-routing prefix 2001:db8:1000::3/128 algorithm 204 index 1403
+ segment-routing prefix 2001:db8:1000::3/128 algorithm 205 index 1503
+ segment-routing prefix 2001:db8:1000::3/128 algorithm 206 index 1603
+ segment-routing prefix 2001:db8:1000::3/128 algorithm 207 index 1703
+!
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt3/step1/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt3/step1/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..7954734
--- /dev/null
@@ -0,0 +1,125 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000004
+            Bit positions: 2
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
\ No newline at end of file
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt3/step1/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt3/step1/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..9ab0c74
--- /dev/null
@@ -0,0 +1,514 @@
+{
+  "20001":{
+    "inLabel":20001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20002":{
+    "inLabel":20002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20101":{
+    "inLabel":20101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20102":{
+    "inLabel":20102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20201":{
+    "inLabel":20201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20202":{
+    "inLabel":20202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20202,
+        "outLabelStack":[
+          20202
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20301":{
+    "inLabel":20301,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20301,
+        "outLabelStack":[
+          20301
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20302":{
+    "inLabel":20302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20401":{
+    "inLabel":20401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20402":{
+    "inLabel":20402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20501":{
+    "inLabel":20501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20502":{
+    "inLabel":20502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20502,
+        "outLabelStack":[
+          20502
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20601":{
+    "inLabel":20601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20601,
+        "outLabelStack":[
+          20601
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20602":{
+    "inLabel":20602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20701":{
+    "inLabel":20701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20702":{
+    "inLabel":20702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "21001":{
+    "inLabel":21001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21002":{
+    "inLabel":21002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21101":{
+    "inLabel":21101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21102":{
+    "inLabel":21102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21201":{
+    "inLabel":21201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21202":{
+    "inLabel":21202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21202,
+        "outLabelStack":[
+          21202
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21301":{
+    "inLabel":21301,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21301,
+        "outLabelStack":[
+          21301
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21302":{
+    "inLabel":21302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21401":{
+    "inLabel":21401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21402":{
+    "inLabel":21402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21501":{
+    "inLabel":21501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21502":{
+    "inLabel":21502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21502,
+        "outLabelStack":[
+          21502
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21601":{
+    "inLabel":21601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21601,
+        "outLabelStack":[
+          21601
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21602":{
+    "inLabel":21602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21701":{
+    "inLabel":21701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21702":{
+    "inLabel":21702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt3/step10/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt3/step10/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..85182db
--- /dev/null
@@ -0,0 +1,125 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000004
+            Bit positions: 2
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt3/step10/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt3/step10/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..9ab0c74
--- /dev/null
@@ -0,0 +1,514 @@
+{
+  "20001":{
+    "inLabel":20001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20002":{
+    "inLabel":20002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20101":{
+    "inLabel":20101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20102":{
+    "inLabel":20102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20201":{
+    "inLabel":20201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20202":{
+    "inLabel":20202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20202,
+        "outLabelStack":[
+          20202
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20301":{
+    "inLabel":20301,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20301,
+        "outLabelStack":[
+          20301
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20302":{
+    "inLabel":20302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20401":{
+    "inLabel":20401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20402":{
+    "inLabel":20402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20501":{
+    "inLabel":20501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20502":{
+    "inLabel":20502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20502,
+        "outLabelStack":[
+          20502
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20601":{
+    "inLabel":20601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20601,
+        "outLabelStack":[
+          20601
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20602":{
+    "inLabel":20602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20701":{
+    "inLabel":20701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20702":{
+    "inLabel":20702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "21001":{
+    "inLabel":21001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21002":{
+    "inLabel":21002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21101":{
+    "inLabel":21101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21102":{
+    "inLabel":21102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21201":{
+    "inLabel":21201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21202":{
+    "inLabel":21202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21202,
+        "outLabelStack":[
+          21202
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21301":{
+    "inLabel":21301,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21301,
+        "outLabelStack":[
+          21301
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21302":{
+    "inLabel":21302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21401":{
+    "inLabel":21401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21402":{
+    "inLabel":21402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21501":{
+    "inLabel":21501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21502":{
+    "inLabel":21502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21502,
+        "outLabelStack":[
+          21502
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21601":{
+    "inLabel":21601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21601,
+        "outLabelStack":[
+          21601
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21602":{
+    "inLabel":21602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21701":{
+    "inLabel":21701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21702":{
+    "inLabel":21702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt3/step11/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt3/step11/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..85182db
--- /dev/null
@@ -0,0 +1,125 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000004
+            Bit positions: 2
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt3/step11/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt3/step11/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..57755b0
--- /dev/null
@@ -0,0 +1,514 @@
+{
+  "20001":{
+    "inLabel":20001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20002":{
+    "inLabel":20002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20101":{
+    "inLabel":20101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20102":{
+    "inLabel":20102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20201":{
+    "inLabel":20201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20202":{
+    "inLabel":20202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20202,
+        "outLabelStack":[
+          20202
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20302":{
+    "inLabel":20302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20311":{
+    "inLabel":20311,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20311,
+        "outLabelStack":[
+          20311
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20401":{
+    "inLabel":20401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20402":{
+    "inLabel":20402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20501":{
+    "inLabel":20501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20502":{
+    "inLabel":20502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20502,
+        "outLabelStack":[
+          20502
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20601":{
+    "inLabel":20601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20601,
+        "outLabelStack":[
+          20601
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20602":{
+    "inLabel":20602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20701":{
+    "inLabel":20701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20702":{
+    "inLabel":20702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "21001":{
+    "inLabel":21001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21002":{
+    "inLabel":21002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21101":{
+    "inLabel":21101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21102":{
+    "inLabel":21102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21201":{
+    "inLabel":21201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21202":{
+    "inLabel":21202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21202,
+        "outLabelStack":[
+          21202
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21302":{
+    "inLabel":21302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21311":{
+    "inLabel":21311,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21311,
+        "outLabelStack":[
+          21311
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21401":{
+    "inLabel":21401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21402":{
+    "inLabel":21402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21501":{
+    "inLabel":21501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21502":{
+    "inLabel":21502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21502,
+        "outLabelStack":[
+          21502
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21601":{
+    "inLabel":21601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21601,
+        "outLabelStack":[
+          21601
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21602":{
+    "inLabel":21602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21701":{
+    "inLabel":21701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21702":{
+    "inLabel":21702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt3/step2/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt3/step2/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..85182db
--- /dev/null
@@ -0,0 +1,125 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000004
+            Bit positions: 2
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt3/step2/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt3/step2/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..9ab0c74
--- /dev/null
@@ -0,0 +1,514 @@
+{
+  "20001":{
+    "inLabel":20001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20002":{
+    "inLabel":20002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20101":{
+    "inLabel":20101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20102":{
+    "inLabel":20102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20201":{
+    "inLabel":20201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20202":{
+    "inLabel":20202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20202,
+        "outLabelStack":[
+          20202
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20301":{
+    "inLabel":20301,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20301,
+        "outLabelStack":[
+          20301
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20302":{
+    "inLabel":20302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20401":{
+    "inLabel":20401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20402":{
+    "inLabel":20402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20501":{
+    "inLabel":20501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20502":{
+    "inLabel":20502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20502,
+        "outLabelStack":[
+          20502
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20601":{
+    "inLabel":20601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20601,
+        "outLabelStack":[
+          20601
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20602":{
+    "inLabel":20602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20701":{
+    "inLabel":20701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20702":{
+    "inLabel":20702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "21001":{
+    "inLabel":21001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21002":{
+    "inLabel":21002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21101":{
+    "inLabel":21101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21102":{
+    "inLabel":21102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21201":{
+    "inLabel":21201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21202":{
+    "inLabel":21202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21202,
+        "outLabelStack":[
+          21202
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21301":{
+    "inLabel":21301,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21301,
+        "outLabelStack":[
+          21301
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21302":{
+    "inLabel":21302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21401":{
+    "inLabel":21401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21402":{
+    "inLabel":21402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21501":{
+    "inLabel":21501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21502":{
+    "inLabel":21502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21502,
+        "outLabelStack":[
+          21502
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21601":{
+    "inLabel":21601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21601,
+        "outLabelStack":[
+          21601
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21602":{
+    "inLabel":21602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21701":{
+    "inLabel":21701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21702":{
+    "inLabel":21702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt3/step3/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt3/step3/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..2ccc4f1
--- /dev/null
@@ -0,0 +1,114 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: Not found
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt3/step3/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt3/step3/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..1b57f57
--- /dev/null
@@ -0,0 +1,450 @@
+{
+  "20001":{
+    "inLabel":20001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20002":{
+    "inLabel":20002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20101":{
+    "inLabel":20101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20102":{
+    "inLabel":20102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20201":{
+    "inLabel":20201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20202":{
+    "inLabel":20202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20202,
+        "outLabelStack":[
+          20202
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20401":{
+    "inLabel":20401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20402":{
+    "inLabel":20402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20501":{
+    "inLabel":20501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20502":{
+    "inLabel":20502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20502,
+        "outLabelStack":[
+          20502
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20601":{
+    "inLabel":20601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20601,
+        "outLabelStack":[
+          20601
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20602":{
+    "inLabel":20602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20701":{
+    "inLabel":20701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20702":{
+    "inLabel":20702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "21001":{
+    "inLabel":21001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21002":{
+    "inLabel":21002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21101":{
+    "inLabel":21101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21102":{
+    "inLabel":21102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21201":{
+    "inLabel":21201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21202":{
+    "inLabel":21202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21202,
+        "outLabelStack":[
+          21202
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21401":{
+    "inLabel":21401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21402":{
+    "inLabel":21402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21501":{
+    "inLabel":21501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21502":{
+    "inLabel":21502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21502,
+        "outLabelStack":[
+          21502
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21601":{
+    "inLabel":21601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21601,
+        "outLabelStack":[
+          21601
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21602":{
+    "inLabel":21602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21701":{
+    "inLabel":21701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21702":{
+    "inLabel":21702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt3/step4/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt3/step4/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..85182db
--- /dev/null
@@ -0,0 +1,125 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000004
+            Bit positions: 2
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt3/step4/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt3/step4/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..9ab0c74
--- /dev/null
@@ -0,0 +1,514 @@
+{
+  "20001":{
+    "inLabel":20001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20002":{
+    "inLabel":20002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20101":{
+    "inLabel":20101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20102":{
+    "inLabel":20102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20201":{
+    "inLabel":20201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20202":{
+    "inLabel":20202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20202,
+        "outLabelStack":[
+          20202
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20301":{
+    "inLabel":20301,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20301,
+        "outLabelStack":[
+          20301
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20302":{
+    "inLabel":20302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20401":{
+    "inLabel":20401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20402":{
+    "inLabel":20402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20501":{
+    "inLabel":20501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20502":{
+    "inLabel":20502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20502,
+        "outLabelStack":[
+          20502
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20601":{
+    "inLabel":20601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20601,
+        "outLabelStack":[
+          20601
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20602":{
+    "inLabel":20602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20701":{
+    "inLabel":20701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20702":{
+    "inLabel":20702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "21001":{
+    "inLabel":21001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21002":{
+    "inLabel":21002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21101":{
+    "inLabel":21101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21102":{
+    "inLabel":21102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21201":{
+    "inLabel":21201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21202":{
+    "inLabel":21202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21202,
+        "outLabelStack":[
+          21202
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21301":{
+    "inLabel":21301,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21301,
+        "outLabelStack":[
+          21301
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21302":{
+    "inLabel":21302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21401":{
+    "inLabel":21401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21402":{
+    "inLabel":21402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21501":{
+    "inLabel":21501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21502":{
+    "inLabel":21502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21502,
+        "outLabelStack":[
+          21502
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21601":{
+    "inLabel":21601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21601,
+        "outLabelStack":[
+          21601
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21602":{
+    "inLabel":21602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21701":{
+    "inLabel":21701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21702":{
+    "inLabel":21702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt3/step5/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt3/step5/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..85182db
--- /dev/null
@@ -0,0 +1,125 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000004
+            Bit positions: 2
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt3/step5/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt3/step5/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..9ab0c74
--- /dev/null
@@ -0,0 +1,514 @@
+{
+  "20001":{
+    "inLabel":20001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20002":{
+    "inLabel":20002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20101":{
+    "inLabel":20101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20102":{
+    "inLabel":20102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20201":{
+    "inLabel":20201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20202":{
+    "inLabel":20202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20202,
+        "outLabelStack":[
+          20202
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20301":{
+    "inLabel":20301,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20301,
+        "outLabelStack":[
+          20301
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20302":{
+    "inLabel":20302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20401":{
+    "inLabel":20401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20402":{
+    "inLabel":20402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20501":{
+    "inLabel":20501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20502":{
+    "inLabel":20502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20502,
+        "outLabelStack":[
+          20502
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20601":{
+    "inLabel":20601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20601,
+        "outLabelStack":[
+          20601
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20602":{
+    "inLabel":20602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20701":{
+    "inLabel":20701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20702":{
+    "inLabel":20702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "21001":{
+    "inLabel":21001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21002":{
+    "inLabel":21002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21101":{
+    "inLabel":21101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21102":{
+    "inLabel":21102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21201":{
+    "inLabel":21201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21202":{
+    "inLabel":21202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21202,
+        "outLabelStack":[
+          21202
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21301":{
+    "inLabel":21301,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21301,
+        "outLabelStack":[
+          21301
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21302":{
+    "inLabel":21302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21401":{
+    "inLabel":21401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21402":{
+    "inLabel":21402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21501":{
+    "inLabel":21501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21502":{
+    "inLabel":21502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21502,
+        "outLabelStack":[
+          21502
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21601":{
+    "inLabel":21601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21601,
+        "outLabelStack":[
+          21601
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21602":{
+    "inLabel":21602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21701":{
+    "inLabel":21701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21702":{
+    "inLabel":21702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt3/step6/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt3/step6/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..903c0f2
--- /dev/null
@@ -0,0 +1,111 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: None
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt3/step6/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt3/step6/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..1b57f57
--- /dev/null
@@ -0,0 +1,450 @@
+{
+  "20001":{
+    "inLabel":20001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20002":{
+    "inLabel":20002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20101":{
+    "inLabel":20101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20102":{
+    "inLabel":20102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20201":{
+    "inLabel":20201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20202":{
+    "inLabel":20202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20202,
+        "outLabelStack":[
+          20202
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20401":{
+    "inLabel":20401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20402":{
+    "inLabel":20402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20501":{
+    "inLabel":20501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20502":{
+    "inLabel":20502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20502,
+        "outLabelStack":[
+          20502
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20601":{
+    "inLabel":20601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20601,
+        "outLabelStack":[
+          20601
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20602":{
+    "inLabel":20602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20701":{
+    "inLabel":20701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20702":{
+    "inLabel":20702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "21001":{
+    "inLabel":21001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21002":{
+    "inLabel":21002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21101":{
+    "inLabel":21101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21102":{
+    "inLabel":21102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21201":{
+    "inLabel":21201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21202":{
+    "inLabel":21202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21202,
+        "outLabelStack":[
+          21202
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21401":{
+    "inLabel":21401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21402":{
+    "inLabel":21402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21501":{
+    "inLabel":21501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21502":{
+    "inLabel":21502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21502,
+        "outLabelStack":[
+          21502
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21601":{
+    "inLabel":21601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21601,
+        "outLabelStack":[
+          21601
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21602":{
+    "inLabel":21602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21701":{
+    "inLabel":21701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21702":{
+    "inLabel":21702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt3/step7/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt3/step7/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..f36d965
--- /dev/null
@@ -0,0 +1,107 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt3/step7/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt3/step7/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..1b57f57
--- /dev/null
@@ -0,0 +1,450 @@
+{
+  "20001":{
+    "inLabel":20001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20002":{
+    "inLabel":20002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20101":{
+    "inLabel":20101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20102":{
+    "inLabel":20102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20201":{
+    "inLabel":20201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20202":{
+    "inLabel":20202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20202,
+        "outLabelStack":[
+          20202
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20401":{
+    "inLabel":20401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20402":{
+    "inLabel":20402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20501":{
+    "inLabel":20501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20502":{
+    "inLabel":20502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20502,
+        "outLabelStack":[
+          20502
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20601":{
+    "inLabel":20601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20601,
+        "outLabelStack":[
+          20601
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20602":{
+    "inLabel":20602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20701":{
+    "inLabel":20701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20702":{
+    "inLabel":20702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "21001":{
+    "inLabel":21001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21002":{
+    "inLabel":21002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21101":{
+    "inLabel":21101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21102":{
+    "inLabel":21102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21201":{
+    "inLabel":21201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21202":{
+    "inLabel":21202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21202,
+        "outLabelStack":[
+          21202
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21401":{
+    "inLabel":21401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21402":{
+    "inLabel":21402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21501":{
+    "inLabel":21501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21502":{
+    "inLabel":21502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21502,
+        "outLabelStack":[
+          21502
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21601":{
+    "inLabel":21601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21601,
+        "outLabelStack":[
+          21601
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21602":{
+    "inLabel":21602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21701":{
+    "inLabel":21701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21702":{
+    "inLabel":21702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt3/step8/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt3/step8/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..85182db
--- /dev/null
@@ -0,0 +1,125 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000004
+            Bit positions: 2
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt3/step8/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt3/step8/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..9ab0c74
--- /dev/null
@@ -0,0 +1,514 @@
+{
+  "20001":{
+    "inLabel":20001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20002":{
+    "inLabel":20002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20101":{
+    "inLabel":20101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20102":{
+    "inLabel":20102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20201":{
+    "inLabel":20201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20202":{
+    "inLabel":20202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20202,
+        "outLabelStack":[
+          20202
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20301":{
+    "inLabel":20301,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20301,
+        "outLabelStack":[
+          20301
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20302":{
+    "inLabel":20302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20401":{
+    "inLabel":20401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20402":{
+    "inLabel":20402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20501":{
+    "inLabel":20501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20502":{
+    "inLabel":20502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20502,
+        "outLabelStack":[
+          20502
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20601":{
+    "inLabel":20601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20601,
+        "outLabelStack":[
+          20601
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20602":{
+    "inLabel":20602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20701":{
+    "inLabel":20701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20702":{
+    "inLabel":20702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "21001":{
+    "inLabel":21001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21002":{
+    "inLabel":21002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21101":{
+    "inLabel":21101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21102":{
+    "inLabel":21102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21201":{
+    "inLabel":21201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21202":{
+    "inLabel":21202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21202,
+        "outLabelStack":[
+          21202
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21301":{
+    "inLabel":21301,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21301,
+        "outLabelStack":[
+          21301
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21302":{
+    "inLabel":21302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21401":{
+    "inLabel":21401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21402":{
+    "inLabel":21402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21501":{
+    "inLabel":21501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21502":{
+    "inLabel":21502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21502,
+        "outLabelStack":[
+          21502
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21601":{
+    "inLabel":21601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21601,
+        "outLabelStack":[
+          21601
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21602":{
+    "inLabel":21602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21701":{
+    "inLabel":21701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21702":{
+    "inLabel":21702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt3/step9/show_isis_flex_algo.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt3/step9/show_isis_flex_algo.ref
new file mode 100644 (file)
index 0000000..85182db
--- /dev/null
@@ -0,0 +1,125 @@
+Area 1: Algorithm 201
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000001
+            Bit positions: 0
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 202
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000002
+            Bit positions: 1
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 203
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: 0x00000004
+            Bit positions: 2
+  Include-all admin-group: not-set
+  Include-any admin-group: not-set
+
+Area 1: Algorithm 204
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000006
+            Bit positions: 1, 2
+
+Area 1: Algorithm 205
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000005
+            Bit positions: 0, 2
+
+Area 1: Algorithm 206
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: not-set
+  Include-any admin-group: 0x00000003
+            Bit positions: 0, 1
+
+Area 1: Algorithm 207
+
+ Enabled Data-Planes: SR-MPLS
+
+ Elected and running Flexible-Algorithm Definition:
+  Source: 0000.0000.0002
+  Priority: 128
+  Equal to local: no
+  Local state: enabled
+  Calculation type: spf
+  Metric type: igp
+  Prefix-metric: disabled
+  Exclude SRLG: disabled
+  Exclude-any admin-group: not-set
+  Include-all admin-group: 0x00000018
+            Bit positions: 3, 4
+  Include-any admin-group: not-set
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt3/step9/show_mpls_table.ref b/tests/topotests/isis_sr_flex_algo_topo1/rt3/step9/show_mpls_table.ref
new file mode 100644 (file)
index 0000000..8ae983a
--- /dev/null
@@ -0,0 +1,482 @@
+{
+  "20001":{
+    "inLabel":20001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20002":{
+    "inLabel":20002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20101":{
+    "inLabel":20101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20102":{
+    "inLabel":20102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20201":{
+    "inLabel":20201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20202":{
+    "inLabel":20202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20202,
+        "outLabelStack":[
+          20202
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20302":{
+    "inLabel":20302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20401":{
+    "inLabel":20401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20402":{
+    "inLabel":20402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20501":{
+    "inLabel":20501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20502":{
+    "inLabel":20502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20502,
+        "outLabelStack":[
+          20502
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20601":{
+    "inLabel":20601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":20601,
+        "outLabelStack":[
+          20601
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20602":{
+    "inLabel":20602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "20701":{
+    "inLabel":20701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.13.0.1"
+      }
+    ]
+  },
+  "20702":{
+    "inLabel":20702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "nexthop":"10.23.0.2"
+      }
+    ]
+  },
+  "21001":{
+    "inLabel":21001,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21002":{
+    "inLabel":21002,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21101":{
+    "inLabel":21101,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21102":{
+    "inLabel":21102,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21201":{
+    "inLabel":21201,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21202":{
+    "inLabel":21202,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21202,
+        "outLabelStack":[
+          21202
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21302":{
+    "inLabel":21302,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21401":{
+    "inLabel":21401,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21402":{
+    "inLabel":21402,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21501":{
+    "inLabel":21501,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21502":{
+    "inLabel":21502,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21502,
+        "outLabelStack":[
+          21502
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21601":{
+    "inLabel":21601,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":21601,
+        "outLabelStack":[
+          21601
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21602":{
+    "inLabel":21602,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  },
+  "21701":{
+    "inLabel":21701,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt1"
+      }
+    ]
+  },
+  "21702":{
+    "inLabel":21702,
+    "installed":true,
+    "nexthops":[
+      {
+        "type":"SR (IS-IS)",
+        "outLabel":3,
+        "outLabelStack":[
+          3
+        ],
+        "distance":150,
+        "installed":true,
+        "interface":"eth-rt2"
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/rt3/zebra.conf b/tests/topotests/isis_sr_flex_algo_topo1/rt3/zebra.conf
new file mode 100644 (file)
index 0000000..fb45ee1
--- /dev/null
@@ -0,0 +1,39 @@
+log file zebra.log
+!
+hostname rt3
+!
+log stdout notifications
+log monitor notifications
+log commands
+!
+!debug zebra packet
+!debug zebra dplane
+!debug zebra kernel
+!
+affinity-map red bit-position 0
+affinity-map blue bit-position 1
+affinity-map green bit-position 2
+affinity-map yellow bit-position 3
+affinity-map orange bit-position 4
+!
+interface lo
+ ip address 3.3.3.3/32
+ ipv6 address 2001:db8:1000::3/128
+!
+interface eth-rt1
+ ip address 10.13.0.3/24
+ link-params
+  affinity green yellow orange
+ exit-link-params
+!
+interface eth-rt2
+ ip address 10.23.0.3/24
+ link-params
+  affinity blue yellow orange
+ exit-link-params
+!
+ip forwarding
+ipv6 forwarding
+!
+line vty
+!
diff --git a/tests/topotests/isis_sr_flex_algo_topo1/test_isis_sr_flex_algo_topo1.py b/tests/topotests/isis_sr_flex_algo_topo1/test_isis_sr_flex_algo_topo1.py
new file mode 100755 (executable)
index 0000000..85600be
--- /dev/null
@@ -0,0 +1,583 @@
+#!/usr/bin/env python
+# SPDX-License-Identifier: ISC
+
+#
+# Part of NetDEF Topology Tests
+#
+# Copyright 2021 by LINE Corporation, Hiroki Shirokura <hiroki.shirokura@linecorp.com>
+# Copyright 2023 6WIND S.A.
+
+"""
+test_isis_sr_flex_algo_topo1.py:
+
+[+] Flex-Algos 201 exclude red
+[+] Flex-Algos 202 exclude blue
+[+] Flex-Algos 203 exclude green
+[+] Flex-Algos 204 include-any blue green
+[+] Flex-Algos 205 include-any red green
+[+] Flex-Algos 206 include-any red blue
+[+] Flex-Algos 207 include-all yellow orange
+
+     +--------+  10.12.0.0/24  +--------+
+     |        |       red      |        |
+     |   RT1  |----------------|   RT2  |
+     |        |                |        |
+     +--------+                +--------+
+  10.13.0.0/24 \\             / 10.23.0.0/24
+          green \\           / blue
+         yellow  \\         / yellow
+          orange  +--------+ orange
+                  |        |
+                  |   RT3  |
+                  |        |
+                  +--------+
+"""
+
+import os
+import sys
+import pytest
+import json
+import tempfile
+from functools import partial
+
+# Save the Current Working Directory to find configuration files.
+CWD = os.path.dirname(os.path.realpath(__file__))
+sys.path.append(os.path.join(CWD, "../"))
+
+# pylint: disable=C0413
+# Import topogen and topotest helpers
+from lib import topotest
+from lib.topogen import Topogen, TopoRouter, get_topogen
+from lib.topolog import logger
+
+
+pytestmark = [pytest.mark.isisd]
+
+# Global multi-dimensional dictionary containing all expected outputs
+outputs = {}
+
+
+def build_topo(tgen):
+    "Build function"
+
+    def connect_routers(tgen, left_idx, right_idx):
+        left = "rt{}".format(left_idx)
+        right = "rt{}".format(right_idx)
+        switch = tgen.add_switch("s-{}-{}".format(left, right))
+        switch.add_link(tgen.gears[left], nodeif="eth-{}".format(right))
+        switch.add_link(tgen.gears[right], nodeif="eth-{}".format(left))
+        l_addr = "52:54:00:{}:{}:{}".format(left_idx, right_idx, left_idx)
+        tgen.gears[left].run("ip link set eth-{} down".format(right))
+        tgen.gears[left].run("ip link set eth-{} address {}".format(right, l_addr))
+        tgen.gears[left].run("ip link set eth-{} up".format(right))
+        r_addr = "52:54:00:{}:{}:{}".format(left_idx, right_idx, right_idx)
+        tgen.gears[right].run("ip link set eth-{} down".format(left))
+        tgen.gears[right].run("ip link set eth-{} address {}".format(left, r_addr))
+        tgen.gears[right].run("ip link set eth-{} up".format(left))
+
+    tgen.add_router("rt1")
+    tgen.add_router("rt2")
+    tgen.add_router("rt3")
+    connect_routers(tgen, 1, 2)
+    connect_routers(tgen, 2, 3)
+    connect_routers(tgen, 3, 1)
+
+    #
+    # Populate multi-dimensional dictionary containing all expected outputs
+    #
+    number_of_steps = 11
+    filenames = [
+        "show_mpls_table.ref",
+        "show_isis_flex_algo.ref",
+    ]
+    for rname in ["rt1", "rt2", "rt3"]:
+        outputs[rname] = {}
+        for step in range(1, number_of_steps + 1):
+            outputs[rname][step] = {}
+            for filename in filenames:
+                # Get snapshots relative to the expected network convergence
+                filename_pullpath = "{}/{}/step{}/{}".format(CWD, rname, step, filename)
+                outputs[rname][step][filename] = open(filename_pullpath).read()
+
+
+def setup_module(mod):
+    "Sets up the pytest environment"
+    tgen = Topogen(build_topo, mod.__name__)
+    frrdir = tgen.config.get(tgen.CONFIG_SECTION, "frrdir")
+    if not os.path.isfile(os.path.join(frrdir, "pathd")):
+        pytest.skip("pathd daemon wasn't built")
+    tgen.start_topology()
+    router_list = tgen.routers()
+
+    # For all registered routers, load the zebra configuration file
+    for rname, router in router_list.items():
+        router.load_config( TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname)))
+        router.load_config( TopoRouter.RD_ISIS, os.path.join(CWD, "{}/isisd.conf".format(rname)))
+    tgen.start_router()
+
+
+def teardown_module(mod):
+    "Teardown the pytest environment"
+    tgen = get_topogen()
+    tgen.stop_topology()
+
+
+def setup_testcase(msg):
+    logger.info(msg)
+    tgen = get_topogen()
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+    return tgen
+
+
+def router_compare_json_output(rname, command, reference):
+    "Compare router JSON output"
+
+    logger.info('Comparing router "%s" "%s" output', rname, command)
+
+    tgen = get_topogen()
+    expected = json.loads(reference)
+
+    # Run test function until we get an result. Wait at most 60 seconds.
+    test_func = partial(topotest.router_json_cmp, tgen.gears[rname], command, expected)
+    _, diff = topotest.run_and_expect(test_func, None, count=120, wait=0.5)
+    assertmsg = '"{}" JSON output mismatches the expected result'.format(rname)
+    assert diff is None, assertmsg
+
+
+def router_compare_output(rname, command, reference):
+    "Compare router output"
+
+    logger.info('Comparing router "%s" "%s" output', rname, command)
+
+    tgen = get_topogen()
+
+    # Run test function until we get an result. Wait at most 60 seconds.
+    test_func = partial(topotest.router_output_cmp, tgen.gears[rname], command, reference)
+    result, diff = topotest.run_and_expect(test_func, "", count=120, wait=0.5)
+    assertmsg = '{} command "{}" output mismatches the expected result:\n{}'.format(rname, command, diff)
+    assert result, assertmsg
+
+
+#
+# Step 1
+#
+# Test initial network convergenece
+#
+# All flex-algo are defined and its fib entries are installed
+#
+def test_step1_mpls_lfib():
+    logger.info("Test (step 1)")
+    tgen = get_topogen()
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    # For Developers
+    # tgen.mininet_cli()
+    for rname in ["rt1", "rt2", "rt3"]:
+        router_compare_output(
+            rname, "show isis flex-algo",
+            outputs[rname][1]["show_isis_flex_algo.ref"])
+        router_compare_json_output(
+            rname, "show mpls table json",
+            outputs[rname][1]["show_mpls_table.ref"])
+
+
+#
+# Step 2
+#
+# Action(s):
+# - Disable flex-algo-203 definition advertisement on rt1
+#
+# Expected change(s):
+# - Nothing
+#
+# Description:
+#   No change occurs because it refers to the FAD set in rt2.
+#
+def test_step2_mpls_lfib():
+    logger.info("Test (step 2)")
+    tgen = get_topogen()
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    tgen.gears["rt1"].vtysh_cmd(
+        """
+        configure terminal
+         router isis 1
+          flex-algo 203
+           no advertise-definition
+        """)
+
+    # For Developers
+    # tgen.mininet_cli()
+    for rname in ["rt1", "rt2", "rt3"]:
+        router_compare_output(
+            rname, "show isis flex-algo",
+            outputs[rname][2]["show_isis_flex_algo.ref"])
+        router_compare_json_output(
+            rname, "show mpls table json",
+            outputs[rname][2]["show_mpls_table.ref"])
+
+
+#
+# Step 3
+#
+# Action(s):
+# - Disable flex-algo-203 definition advertisement on rt2
+#
+# Expected change(s):
+# - rt1,rt2,rt3 should uninstall all Prefix-SIDs of flex-algo-203
+#
+# Description:
+#   When all FADs are disappeared, all their prefix sid routes are withdrawn.
+#
+def test_step3_mpls_lfib():
+    logger.info("Test (step 3)")
+    tgen = get_topogen()
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    tgen.gears["rt2"].vtysh_cmd(
+        """
+        configure terminal
+         router isis 1
+          flex-algo 203
+           no advertise-definition
+        """)
+
+    # For Developers
+    # tgen.mininet_cli()
+    for rname in ["rt1", "rt2", "rt3"]:
+        router_compare_output(
+            rname, "show isis flex-algo",
+            outputs[rname][3]["show_isis_flex_algo.ref"])
+        router_compare_json_output(
+            rname, "show mpls table json",
+            outputs[rname][3]["show_mpls_table.ref"])
+
+
+#
+# Step 4
+#
+# Action(s):
+# - Enable flex-algo-203 definition advertisement on rt2
+#
+# Expected change(s):
+# - rt1,rt2,rt3 should install all Prefix-SIDs of flex-algo-203
+#
+# Description:
+#   Since the FAD is restored, the reachability to the Prefix-SID is restored.
+#
+def test_step4_mpls_lfib():
+    logger.info("Test (step 4)")
+    tgen = get_topogen()
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    tgen.gears["rt2"].vtysh_cmd(
+        """
+        configure terminal
+         router isis 1
+          flex-algo 203
+           advertise-definition
+        """)
+
+    # For Developers
+    # tgen.mininet_cli()
+    for rname in ["rt1", "rt2", "rt3"]:
+        router_compare_output(
+            rname, "show isis flex-algo",
+            outputs[rname][4]["show_isis_flex_algo.ref"])
+        router_compare_json_output(
+            rname, "show mpls table json",
+            outputs[rname][4]["show_mpls_table.ref"])
+
+
+#
+# Step 5
+#
+# Action(s):
+# - Enable flex-algo-203 definition advertisement on rt1
+#
+# Expected change(s):
+# - Nothing
+#
+# Description:
+#   This does not affect the FIB, since there is already a FAD for rt2.
+#   However, the FAD owner will be changed from rt2 to rt1.
+#
+def test_step5_mpls_lfib():
+    logger.info("Test (step 5)")
+    tgen = get_topogen()
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    tgen.gears["rt1"].vtysh_cmd(
+        """
+        configure terminal
+         router isis 1
+          flex-algo 203
+           advertise-definition
+        """)
+
+    # For Developers
+    # tgen.mininet_cli()
+    for rname in ["rt1", "rt2", "rt3"]:
+        router_compare_output(
+            rname, "show isis flex-algo",
+            outputs[rname][5]["show_isis_flex_algo.ref"])
+        router_compare_json_output(
+            rname, "show mpls table json",
+            outputs[rname][5]["show_mpls_table.ref"])
+
+
+#
+# Step 6
+#
+# Action(s):
+# - Disable flex-algo-203 SR-MPLS dataplane on rt1
+# - Disable flex-algo-203 SR-MPLS dataplane on rt2
+# - Disable flex-algo-203 SR-MPLS dataplane on rt3
+#
+# Expected change(s):
+# - rt1,rt2,rt3 should uninstall all Prefix-SIDs of flex-algo-203
+#
+# Description:
+#   Clear the Flex-Algo 203 whole settings on each routers. All routes related
+#   to it will be withdrawn.
+#
+def test_step6_mpls_lfib():
+    logger.info("Test (step 6)")
+    tgen = get_topogen()
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    for rname in ["rt1", "rt2", "rt3"]:
+        tgen.gears[rname].vtysh_cmd(
+            """
+            configure terminal
+             router isis 1
+              flex-algo 203
+               no dataplane sr-mpls
+            """)
+
+    # For Developers
+    # tgen.mininet_cli()
+    for rname in ["rt1", "rt2", "rt3"]:
+        router_compare_output(
+            rname, "show isis flex-algo",
+            outputs[rname][6]["show_isis_flex_algo.ref"])
+        router_compare_json_output(
+            rname, "show mpls table json",
+            outputs[rname][6]["show_mpls_table.ref"])
+
+
+#
+# Step 7
+#
+# Action(s):
+# - Disable flex-algo-203 all configuration on rt1
+# - Disable flex-algo-203 all configuration on rt2
+# - Disable flex-algo-203 all configuration on rt3
+#
+# Expected change(s):
+# - rt1,rt2,rt3 should uninstall all Prefix-SIDs of flex-algo-203
+#
+# Description:
+#   Clear the Flex-Algo 203 whole settings on each routers. All routes related
+#   to it will be withdrawn.
+#
+def test_step7_mpls_lfib():
+    logger.info("Test (step 7)")
+    tgen = get_topogen()
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    for rname in ["rt1", "rt2", "rt3"]:
+        tgen.gears[rname].vtysh_cmd(
+            """
+            configure terminal
+             router isis 1
+              no flex-algo 203
+            """)
+
+    # For Developers
+    # tgen.mininet_cli()
+    for rname in ["rt1", "rt2", "rt3"]:
+        router_compare_output(
+            rname, "show isis flex-algo",
+            outputs[rname][7]["show_isis_flex_algo.ref"])
+        router_compare_json_output(
+            rname, "show mpls table json",
+            outputs[rname][7]["show_mpls_table.ref"])
+
+#
+# Step 8
+#
+# Action(s):
+# - Enable flex-algo-203 all configuration on rt1
+# - Enable flex-algo-203 all configuration on rt2
+# - Enable flex-algo-203 all configuration on rt3
+#
+# Expected change(s):
+# - rt1,rt2,rt3 should install all Prefix-SIDs of flex-algo-203
+#
+# Description:
+#   All configurations were backed.
+#
+def test_step8_mpls_lfib():
+    logger.info("Test (step 8)")
+    tgen = get_topogen()
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    tgen.gears["rt1"].vtysh_cmd(
+        """
+        configure terminal
+         router isis 1
+          flex-algo 203
+           advertise-definition
+           affinity exclude-any green
+           dataplane sr-mpls
+        """)
+
+    tgen.gears["rt2"].vtysh_cmd(
+        """
+        configure terminal
+         router isis 1
+          flex-algo 203
+           advertise-definition
+           affinity exclude-any green
+           dataplane sr-mpls
+        """)
+
+    tgen.gears["rt3"].vtysh_cmd(
+        """
+        configure terminal
+         router isis 1
+          flex-algo 203
+          dataplane sr-mpls
+        """)
+
+    # For Developers
+    # tgen.mininet_cli()
+    for rname in ["rt1", "rt2", "rt3"]:
+        router_compare_output(
+            rname, "show isis flex-algo",
+            outputs[rname][8]["show_isis_flex_algo.ref"])
+        router_compare_json_output(
+            rname, "show mpls table json",
+            outputs[rname][8]["show_mpls_table.ref"])
+
+
+#
+# Step 9
+#
+# Action(s):
+# - Disable algorithm prefix-sid of algo-203 on rt1
+#
+# Expected change(s):
+# - rt1 should uninstall all Prefix-SIDs of flex-algo-203
+# - rt2 should uninstall Prefix-SIDs of rt1's flex-algo-203
+# - rt3 should uninstall Prefix-SIDs of rt1's flex-algo-203
+#
+def test_step9_mpls_lfib():
+    logger.info("Test (step 9)")
+    tgen = get_topogen()
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    tgen.gears["rt1"].vtysh_cmd(
+        """
+        configure terminal
+         router isis 1
+          no segment-routing prefix 1.1.1.1/32 algorithm 203 index 301
+          no segment-routing prefix 2001:db8:1000::1/128 algorithm 203 index 1301
+        """)
+
+    # For Developers
+    # tgen.mininet_cli()
+    for rname in ["rt1", "rt2", "rt3"]:
+        router_compare_output(
+            rname, "show isis flex-algo",
+            outputs[rname][9]["show_isis_flex_algo.ref"])
+        router_compare_json_output(
+            rname, "show mpls table json",
+            outputs[rname][9]["show_mpls_table.ref"])
+
+
+#
+# Step 10
+#
+# Action(s):
+# - Enable algorithm prefix-sid of algo-203 on rt1
+#
+# Expected change(s):
+# - rt1 should install all Prefix-SIDs of flex-algo-203
+# - rt2 should install Prefix-SIDs of rt1's flex-algo-203
+# - rt3 should install Prefix-SIDs of rt1's flex-algo-203
+#
+def test_step10_mpls_lfib():
+    logger.info("Test (step 10)")
+    tgen = get_topogen()
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    tgen.gears["rt1"].vtysh_cmd(
+        """
+        configure terminal
+         router isis 1
+          segment-routing prefix 1.1.1.1/32 algorithm 203 index 301
+          segment-routing prefix 2001:db8:1000::1/128 algorithm 203 index 1301
+        """)
+
+    # For Developers
+    # tgen.mininet_cli()
+    for rname in ["rt1", "rt2", "rt3"]:
+        router_compare_output(
+            rname, "show isis flex-algo",
+            outputs[rname][10]["show_isis_flex_algo.ref"])
+        router_compare_json_output(
+            rname, "show mpls table json",
+            outputs[rname][10]["show_mpls_table.ref"])
+
+
+#
+# Step 11
+#
+# Action(s):
+# - Update algorithm prefix-sid of algo-203 on rt1 from 301 to 311
+#
+# Expected change(s):
+# - rt2 should update Prefix-SIDs of rt1's flex-algo-203 from 301 to 311
+# - rt3 should update Prefix-SIDs of rt1's flex-algo-203 from 301 to 311
+#
+def test_step11_mpls_lfib():
+    logger.info("Test (step 11)")
+    tgen = get_topogen()
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    tgen.gears["rt1"].vtysh_cmd(
+        """
+        configure terminal
+         router isis 1
+          segment-routing prefix 1.1.1.1/32 algorithm 203 index 311
+          segment-routing prefix 2001:db8:1000::1/128 algorithm 203 index 1311
+        """)
+
+    # For Developers
+    # tgen.mininet_cli()
+    for rname in ["rt1", "rt2", "rt3"]:
+        router_compare_output(
+            rname, "show isis flex-algo",
+            outputs[rname][11]["show_isis_flex_algo.ref"])
+        router_compare_json_output(
+            rname, "show mpls table json",
+            outputs[rname][11]["show_mpls_table.ref"])
+
+
+if __name__ == "__main__":
+    args = ["-s"] + sys.argv[1:]
+    sys.exit(pytest.main(args))