yanger: Adapt to new stricter pattern for publish

This commit is contained in:
Mattias Walström
2026-02-27 08:35:21 +01:00
committed by Joachim Wiberg
parent 19a0151f68
commit c4f24caa94
7 changed files with 102 additions and 55 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ def network(ps, inspect):
if port["host_ip"]:
addr = f"{port['host_ip']}:"
pub = f"{addr}{port['host_port']}->{port['container_port']}/{port['protocol']}"
pub = f"{addr}{port['host_port']}:{port['container_port']}/{port['protocol']}"
net["publish"].append(pub)
return net
@@ -1,12 +1,12 @@
 DESTINATION PREF NEXT-HOP PROTO UPTIME
>* 0.0.0.0/0 110/2 10.1.1.100 ospfv2 16:03:51
0.0.0.0/0 254/0 br0 static 16:04:31
10.1.1.0/24 110/1 e6 ospfv2 16:04:45
>* 10.1.1.0/24 0/0 e6 direct 16:04:45
* 10.1.1.1/32 0/0 e4.8 direct 16:04:46
>* 10.1.1.1/32 0/0 e3.8 direct 16:04:46
>* 10.1.2.0/24 110/2 10.1.1.100 ospfv2 16:03:51
>* 0.0.0.0/0 110/2 10.1.1.100 ospfv2 06:43:38
0.0.0.0/0 254/0 br0 static 06:44:18
10.1.1.0/24 110/1 e6 ospfv2 06:44:32
>* 10.1.1.0/24 0/0 e6 direct 06:44:32
* 10.1.1.1/32 0/0 e4.8 direct 06:44:33
>* 10.1.1.1/32 0/0 e3.8 direct 06:44:33
>* 10.1.2.0/24 110/2 10.1.1.100 ospfv2 06:43:38
* 10.1.2.1
>* 10.1.3.0/24 110/2 10.1.1.100 ospfv2 16:03:51
>* 10.1.3.0/24 110/2 10.1.1.100 ospfv2 06:43:38
* 10.1.3.1
>* 169.254.0.0/16 0/0 br0 direct 16:04:40
>* 169.254.0.0/16 0/0 br0 direct 06:44:27
@@ -1,7 +1,7 @@
 DESTINATION PREF NEXT-HOP PROTO UPTIME
* fe80::/64 0/0 e6 direct 16:04:44
* fe80::/64 0/0 br0 direct 16:04:45
* fe80::/64 0/0 e2 direct 16:04:47
* fe80::/64 0/0 e7 direct 16:05:37
* fe80::/64 0/0 e5 direct 16:05:37
>* fe80::/64 0/0 e1 direct 16:05:37
* fe80::/64 0/0 e6 direct 06:44:31
* fe80::/64 0/0 br0 direct 06:44:32
* fe80::/64 0/0 e2 direct 06:44:34
* fe80::/64 0/0 e7 direct 06:45:24
* fe80::/64 0/0 e5 direct 06:45:24
>* fe80::/64 0/0 e1 direct 06:45:24
+15 -15
View File
@@ -18,7 +18,7 @@
"active": [
null
],
"last-updated": "2025-02-11T19:56:09+00:00",
"last-updated": "2026-02-25T05:16:22+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -36,7 +36,7 @@
"ietf-ipv4-unicast-routing:destination-prefix": "0.0.0.0/0",
"source-protocol": "static",
"route-preference": 254,
"last-updated": "2025-02-11T19:55:29+00:00",
"last-updated": "2026-02-25T05:15:42+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -52,7 +52,7 @@
"source-protocol": "ietf-ospf:ospfv2",
"route-preference": 110,
"ietf-ospf:metric": 1,
"last-updated": "2025-02-11T19:55:15+00:00",
"last-updated": "2026-02-25T05:15:28+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -70,7 +70,7 @@
"active": [
null
],
"last-updated": "2025-02-11T19:55:15+00:00",
"last-updated": "2026-02-25T05:15:28+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -88,7 +88,7 @@
"ietf-ipv4-unicast-routing:destination-prefix": "10.1.1.1/32",
"source-protocol": "direct",
"route-preference": 0,
"last-updated": "2025-02-11T19:55:14+00:00",
"last-updated": "2026-02-25T05:15:27+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -109,7 +109,7 @@
"active": [
null
],
"last-updated": "2025-02-11T19:55:14+00:00",
"last-updated": "2026-02-25T05:15:27+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -131,7 +131,7 @@
"active": [
null
],
"last-updated": "2025-02-11T19:56:09+00:00",
"last-updated": "2026-02-25T05:16:22+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -159,7 +159,7 @@
"active": [
null
],
"last-updated": "2025-02-11T19:56:09+00:00",
"last-updated": "2026-02-25T05:16:22+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -186,7 +186,7 @@
"active": [
null
],
"last-updated": "2025-02-11T19:55:20+00:00",
"last-updated": "2026-02-25T05:15:33+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -212,7 +212,7 @@
"ietf-ipv6-unicast-routing:destination-prefix": "fe80::/64",
"source-protocol": "direct",
"route-preference": 0,
"last-updated": "2025-02-11T19:55:16+00:00",
"last-updated": "2026-02-25T05:15:29+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -230,7 +230,7 @@
"ietf-ipv6-unicast-routing:destination-prefix": "fe80::/64",
"source-protocol": "direct",
"route-preference": 0,
"last-updated": "2025-02-11T19:55:15+00:00",
"last-updated": "2026-02-25T05:15:28+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -248,7 +248,7 @@
"ietf-ipv6-unicast-routing:destination-prefix": "fe80::/64",
"source-protocol": "direct",
"route-preference": 0,
"last-updated": "2025-02-11T19:55:13+00:00",
"last-updated": "2026-02-25T05:15:26+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -266,7 +266,7 @@
"ietf-ipv6-unicast-routing:destination-prefix": "fe80::/64",
"source-protocol": "direct",
"route-preference": 0,
"last-updated": "2025-02-11T19:54:23+00:00",
"last-updated": "2026-02-25T05:14:36+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -284,7 +284,7 @@
"ietf-ipv6-unicast-routing:destination-prefix": "fe80::/64",
"source-protocol": "direct",
"route-preference": 0,
"last-updated": "2025-02-11T19:54:23+00:00",
"last-updated": "2026-02-25T05:14:36+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -305,7 +305,7 @@
"active": [
null
],
"last-updated": "2025-02-11T19:54:23+00:00",
"last-updated": "2026-02-25T05:14:36+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -39,7 +39,7 @@
}
],
"publish": [
"34515->91/tcp"
"34515:91/tcp"
]
}
},
+69 -22
View File
@@ -693,13 +693,21 @@
"ietf-ospf:interfaces": {
"ietf-ospf:interface": [
{
"cost": 1,
"dead-interval": 40,
"enabled": true,
"hello-interval": 10,
"hello-timer": 2,
"ietf-ospf:neighbors": {
"ietf-ospf:neighbor": [
{
"address": "10.1.2.1",
"dead-timer": 22506,
"dead-timer": 22,
"infix-routing:interface-name": "e3.8:10.1.1.1",
"infix-routing:role": "DROther",
"infix-routing:uptime": 57,
"neighbor-router-id": "10.1.2.1",
"priority": 1,
"state": "full"
}
]
@@ -707,16 +715,28 @@
"interface-type": "point-to-point",
"name": "e3.8",
"passive": false,
"state": "point-to-point"
"priority": 1,
"retransmit-interval": 5,
"state": "point-to-point",
"transmit-delay": 1,
"wait-timer": 40
},
{
"cost": 1,
"dead-interval": 40,
"enabled": true,
"hello-interval": 10,
"hello-timer": 2,
"ietf-ospf:neighbors": {
"ietf-ospf:neighbor": [
{
"address": "10.1.3.1",
"dead-timer": 22334,
"dead-timer": 22,
"infix-routing:interface-name": "e4.8:10.1.1.1",
"infix-routing:role": "DROther",
"infix-routing:uptime": 57,
"neighbor-router-id": "10.1.3.1",
"priority": 1,
"state": "full"
}
]
@@ -724,22 +744,34 @@
"interface-type": "point-to-point",
"name": "e4.8",
"passive": false,
"state": "point-to-point"
"priority": 1,
"retransmit-interval": 5,
"state": "point-to-point",
"transmit-delay": 1,
"wait-timer": 40
},
{
"bdr-ip-addr": "10.1.1.101",
"bdr-router-id": "10.1.1.1",
"cost": 1,
"dead-interval": 40,
"dr-ip-addr": "10.1.1.100",
"dr-router-id": "192.168.100.1",
"enabled": true,
"hello-interval": 10,
"hello-timer": 2,
"ietf-ospf:neighbors": {
"ietf-ospf:neighbor": [
{
"address": "10.1.1.100",
"bdr-router-id": "10.1.1.1",
"dead-timer": 31385,
"dead-timer": 31,
"dr-router-id": "192.168.100.1",
"infix-routing:interface-name": "e6:10.1.1.101",
"infix-routing:role": "DR",
"infix-routing:uptime": 23,
"neighbor-router-id": "192.168.100.1",
"priority": 1,
"state": "full"
}
]
@@ -747,7 +779,11 @@
"interface-type": "broadcast",
"name": "e6",
"passive": false,
"state": "bdr"
"priority": 1,
"retransmit-interval": 5,
"state": "bdr",
"transmit-delay": 1,
"wait-timer": 40
}
]
}
@@ -757,6 +793,8 @@
"ietf-ospf:local-rib": {
"ietf-ospf:route": [
{
"infix-routing:area-id": "0.0.0.1",
"metric": 2,
"next-hops": {
"next-hop": [
{
@@ -768,6 +806,8 @@
"route-type": "inter-area"
},
{
"infix-routing:area-id": "0.0.0.1",
"metric": 1,
"next-hops": {
"next-hop": [
{
@@ -779,6 +819,8 @@
"route-type": "intra-area"
},
{
"infix-routing:area-id": "0.0.0.1",
"metric": 2,
"next-hops": {
"next-hop": [
{
@@ -793,6 +835,8 @@
"route-type": "intra-area"
},
{
"infix-routing:area-id": "0.0.0.1",
"metric": 2,
"next-hops": {
"next-hop": [
{
@@ -815,6 +859,9 @@
}
]
},
"interfaces": {
"interface": []
},
"ribs": {
"rib": [
{
@@ -828,7 +875,7 @@
],
"ietf-ipv4-unicast-routing:destination-prefix": "0.0.0.0/0",
"ietf-ospf:metric": 2,
"last-updated": "2025-02-11T19:56:09+00:00",
"last-updated": "2026-02-25T05:16:22+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -846,7 +893,7 @@
},
{
"ietf-ipv4-unicast-routing:destination-prefix": "0.0.0.0/0",
"last-updated": "2025-02-11T19:55:29+00:00",
"last-updated": "2026-02-25T05:15:42+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -862,7 +909,7 @@
{
"ietf-ipv4-unicast-routing:destination-prefix": "10.1.1.0/24",
"ietf-ospf:metric": 1,
"last-updated": "2025-02-11T19:55:15+00:00",
"last-updated": "2026-02-25T05:15:28+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -880,7 +927,7 @@
null
],
"ietf-ipv4-unicast-routing:destination-prefix": "10.1.1.0/24",
"last-updated": "2025-02-11T19:55:15+00:00",
"last-updated": "2026-02-25T05:15:28+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -898,7 +945,7 @@
},
{
"ietf-ipv4-unicast-routing:destination-prefix": "10.1.1.1/32",
"last-updated": "2025-02-11T19:55:14+00:00",
"last-updated": "2026-02-25T05:15:27+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -919,7 +966,7 @@
null
],
"ietf-ipv4-unicast-routing:destination-prefix": "10.1.1.1/32",
"last-updated": "2025-02-11T19:55:14+00:00",
"last-updated": "2026-02-25T05:15:27+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -941,7 +988,7 @@
],
"ietf-ipv4-unicast-routing:destination-prefix": "10.1.2.0/24",
"ietf-ospf:metric": 2,
"last-updated": "2025-02-11T19:56:09+00:00",
"last-updated": "2026-02-25T05:16:22+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -969,7 +1016,7 @@
],
"ietf-ipv4-unicast-routing:destination-prefix": "10.1.3.0/24",
"ietf-ospf:metric": 2,
"last-updated": "2025-02-11T19:56:09+00:00",
"last-updated": "2026-02-25T05:16:22+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -996,7 +1043,7 @@
null
],
"ietf-ipv4-unicast-routing:destination-prefix": "169.254.0.0/16",
"last-updated": "2025-02-11T19:55:20+00:00",
"last-updated": "2026-02-25T05:15:33+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -1022,7 +1069,7 @@
"route": [
{
"ietf-ipv6-unicast-routing:destination-prefix": "fe80::/64",
"last-updated": "2025-02-11T19:55:16+00:00",
"last-updated": "2026-02-25T05:15:29+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -1040,7 +1087,7 @@
},
{
"ietf-ipv6-unicast-routing:destination-prefix": "fe80::/64",
"last-updated": "2025-02-11T19:55:15+00:00",
"last-updated": "2026-02-25T05:15:28+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -1058,7 +1105,7 @@
},
{
"ietf-ipv6-unicast-routing:destination-prefix": "fe80::/64",
"last-updated": "2025-02-11T19:55:13+00:00",
"last-updated": "2026-02-25T05:15:26+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -1076,7 +1123,7 @@
},
{
"ietf-ipv6-unicast-routing:destination-prefix": "fe80::/64",
"last-updated": "2025-02-11T19:54:23+00:00",
"last-updated": "2026-02-25T05:14:36+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -1094,7 +1141,7 @@
},
{
"ietf-ipv6-unicast-routing:destination-prefix": "fe80::/64",
"last-updated": "2025-02-11T19:54:23+00:00",
"last-updated": "2026-02-25T05:14:36+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -1115,7 +1162,7 @@
null
],
"ietf-ipv6-unicast-routing:destination-prefix": "fe80::/64",
"last-updated": "2025-02-11T19:54:23+00:00",
"last-updated": "2026-02-25T05:14:36+00:00",
"next-hop": {
"next-hop-list": {
"next-hop": [
@@ -1175,7 +1222,7 @@
}
],
"publish": [
"34515->91/tcp"
"34515:91/tcp"
]
},
"running": true,
+1 -1
View File
@@ -1,2 +1,2 @@
1739303782
1771996595