Skip to content

Commit 4a7bae9

Browse files
committed
commit with tag nightly-24.10.21a
1 parent dd190ba commit 4a7bae9

10 files changed

+256
-46
lines changed

dist/dist.zip

-135 Bytes
Binary file not shown.

dist/entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# Trigger an error if non-zero exit code is encountered
44
set -e
55

6-
/opt/topoviewer/topoviewer clab -H 149.204.21.68 -p 8080 -u suuser -j local-bind/topo-file.yaml
6+
/opt/topoviewer/topoviewer clab --allowed-hostnames $ALLOWED_HOSTNAME --clab-user $CLAB_USER --clab-pass $CLAB_PASS --server-port $SERVER_PORT --topology-file-json local-bind/topo-file.json &

dist/topoviewer

0 Bytes
Binary file not shown.

go_cloudshellwrapper/constants.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package cloudshellwrapper
22

3-
var VersionInfo string = "nightly-24.10.21"
3+
var VersionInfo string = "nightly-24.10.21a"
44

55
// create html-public files
66
var HtmlPublicPrefixPath string = "./html-public/"

go_cloudshellwrapper/constants.go.bak

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package cloudshellwrapper
22

3-
var VersionInfo string = "nightly-24.10.20g"
3+
var VersionInfo string = "nightly-24.10.21"
44

55
// create html-public files
66
var HtmlPublicPrefixPath string = "./html-public/"

rawTopoFile/.topo-clab-demo.yaml.bak

+153
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
name: demo
2+
3+
topology:
4+
nodes:
5+
6+
7+
topoviewer:
8+
kind: linux
9+
image: ghcr.io/asadarafat/topoviewer:local
10+
ports:
11+
- 8088:8088
12+
startup-delay: 5
13+
exec:
14+
- '/opt/topoviewer/entrypoint.sh'
15+
### This is the entrypoint script of topoviewer container
16+
17+
env:
18+
ALLOWED_HOSTNAME: "nsp-clab1.nice.nokia.net"
19+
CLAB_USER: "asad"
20+
CLAB_PASS: "password"
21+
SERVER_PORT: "8088"
22+
### These are the environment variables for topoviewer container
23+
24+
binds:
25+
- /var/run/docker.sock:/var/run/docker.sock:ro
26+
### This is to access docker.sock from topoviewer container
27+
28+
- __clabDir__/topology-data.json:/opt/topoviewer/local-bind/topo-file.json:ro
29+
### __clabDir__/topology-data.json is path to clab's json file which generated by "clab --export-template" and /opt/topoviewer/local-bind/topo-file.json is the mount path of topoviever's topology file.
30+
labels:
31+
topoviewer-role: controller
32+
33+
34+
Spine-01:
35+
kind: srl
36+
image: ghcr.io/nokia/srlinux
37+
group: "Data Center Spine"
38+
labels:
39+
topoViewer-role: spine
40+
41+
42+
Spine-02:
43+
kind: srl
44+
image: ghcr.io/nokia/srlinux
45+
group: "Data Center Spine"
46+
labels:
47+
topoViewer-role: spine
48+
49+
Borderl-Leaf-01:
50+
kind: srl
51+
image: ghcr.io/nokia/srlinux
52+
group: "Data Center Leaf"
53+
labels:
54+
topoViewer-role: leaf
55+
56+
Borderl-Leaf-02:
57+
kind: srl
58+
image: ghcr.io/nokia/srlinux
59+
group: "Data Center Leaf"
60+
labels:
61+
topoViewer-role: leaf
62+
63+
Leaf-01:
64+
kind: srl
65+
image: ghcr.io/nokia/srlinux
66+
group: "Data Center Leaf"
67+
labels:
68+
topoViewer-role: leaf
69+
70+
Leaf-02:
71+
kind: srl
72+
image: ghcr.io/nokia/srlinux
73+
group: "Data Center Leaf"
74+
labels:
75+
topoViewer-role: leaf
76+
77+
Leaf-03:
78+
kind: srl
79+
image: ghcr.io/nokia/srlinux
80+
group: "Data Center Leaf"
81+
labels:
82+
topoViewer-role: leaf
83+
84+
Leaf-04:
85+
kind: srl
86+
image: ghcr.io/nokia/srlinux
87+
group: "Data Center Leaf"
88+
labels:
89+
topoViewer-role: leaf
90+
91+
# PE-01:
92+
# kind: vr-sros
93+
# image: registry.srlinux.dev/pub/vr-sros:22.7.R1
94+
# type: "cp: cpu=2 ram=6 chassis=SR-2s slot=A card=cpm-2s ___ lc: cpu=2 ram=4 max_nics=10 chassis=SR-2s slot=1 card=xcm-2s mda/1=s18-100gb-qsfp28"
95+
# license: license.txt
96+
# group: "Back Bone"
97+
# labels:
98+
# topoViewer-role: pe
99+
100+
# PE-02:
101+
# kind: vr-sros
102+
# image: registry.srlinux.dev/pub/vr-sros:22.7.R1
103+
# type: "cp: cpu=2 ram=6 chassis=SR-2s slot=A card=cpm-2s ___ lc: cpu=2 ram=4 max_nics=10 chassis=SR-2s slot=1 card=xcm-2s mda/1=s18-100gb-qsfp28"
104+
# license: license.txt
105+
# group: "Back Bone"
106+
# labels:
107+
# topoViewer-role: pe
108+
109+
# DCGW-03:
110+
# kind: vr-sros
111+
# image: registry.srlinux.dev/pub/vr-sros:22.7.R1
112+
# type: "cp: cpu=2 ram=6 chassis=SR-2s slot=A card=cpm-2s ___ lc: cpu=2 ram=4 max_nics=10 chassis=SR-2s slot=1 card=xcm-2s mda/1=s18-100gb-qsfp28"
113+
# license: license.txt
114+
# group: "Data Center - DCGW"
115+
# labels:
116+
# topoViewer-role: dcgw
117+
118+
# DCGW-04:
119+
# kind: vr-sros
120+
# image: registry.srlinux.dev/pub/vr-sros:22.7.R1
121+
# type: "cp: cpu=2 ram=6 chassis=SR-2s slot=A card=cpm-2s ___ lc: cpu=2 ram=4 max_nics=10 chassis=SR-2s slot=1 card=xcm-2s mda/1=s18-100gb-qsfp28"
122+
# license: license.txt
123+
# group: "Data Center - DCGW"
124+
# labels:
125+
# topoViewer-role: dcgw
126+
127+
links:
128+
129+
# - endpoints: ["PE-01:eth2", "PE-02:eth2"]
130+
# - endpoints: ["PE-01:eth3", "DCGW-03:eth3"]
131+
132+
# - endpoints: ["PE-02:eth4", "DCGW-03:eth4"]
133+
# - endpoints: ["PE-02:eth5", "DCGW-04:eth5"]
134+
135+
# - endpoints: ["PE-01:eth4", "DCGW-04:eth4"]
136+
137+
# - endpoints: ["DCGW-03:eth1", "Borderl-Leaf-01:e1-1"]
138+
# - endpoints: ["DCGW-04:eth1", "Borderl-Leaf-02:e1-1"]
139+
140+
- endpoints: ["Spine-01:e1-5", "Borderl-Leaf-01:e1-5"]
141+
- endpoints: ["Spine-02:e1-5", "Borderl-Leaf-02:e1-5"]
142+
143+
- endpoints: ["Spine-01:e1-1", "Leaf-01:e1-1"]
144+
- endpoints: ["Spine-01:e1-2", "Leaf-02:e1-1"]
145+
- endpoints: ["Spine-01:e1-3", "Leaf-03:e1-3"]
146+
- endpoints: ["Spine-01:e1-4", "Leaf-04:e1-3"]
147+
148+
- endpoints: ["Spine-02:e1-1", "Leaf-01:e1-2"]
149+
- endpoints: ["Spine-02:e1-2", "Leaf-02:e1-2"]
150+
- endpoints: ["Spine-02:e1-3", "Leaf-03:e1-4"]
151+
- endpoints: ["Spine-02:e1-4", "Leaf-04:e1-4"]
152+
153+

rawTopoFile/containerlab

81.2 MB
Binary file not shown.

rawTopoFile/topo-clab-demo.yaml

+42-42
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ topology:
66

77
topoviewer:
88
kind: linux
9-
image: ghcr.io/asadarafat/topoviewer:local
9+
image: ghcr.io/asadarafat/topoviewer:latest
1010
ports:
1111
- 8088:8088
1212
startup-delay: 5
@@ -88,54 +88,54 @@ topology:
8888
labels:
8989
topoViewer-role: leaf
9090

91-
PE-01:
92-
kind: vr-sros
93-
image: registry.srlinux.dev/pub/vr-sros:22.7.R1
94-
type: "cp: cpu=2 ram=6 chassis=SR-2s slot=A card=cpm-2s ___ lc: cpu=2 ram=4 max_nics=10 chassis=SR-2s slot=1 card=xcm-2s mda/1=s18-100gb-qsfp28"
95-
license: license.txt
96-
group: "Back Bone"
97-
labels:
98-
topoViewer-role: pe
99-
100-
PE-02:
101-
kind: vr-sros
102-
image: registry.srlinux.dev/pub/vr-sros:22.7.R1
103-
type: "cp: cpu=2 ram=6 chassis=SR-2s slot=A card=cpm-2s ___ lc: cpu=2 ram=4 max_nics=10 chassis=SR-2s slot=1 card=xcm-2s mda/1=s18-100gb-qsfp28"
104-
license: license.txt
105-
group: "Back Bone"
106-
labels:
107-
topoViewer-role: pe
108-
109-
DCGW-03:
110-
kind: vr-sros
111-
image: registry.srlinux.dev/pub/vr-sros:22.7.R1
112-
type: "cp: cpu=2 ram=6 chassis=SR-2s slot=A card=cpm-2s ___ lc: cpu=2 ram=4 max_nics=10 chassis=SR-2s slot=1 card=xcm-2s mda/1=s18-100gb-qsfp28"
113-
license: license.txt
114-
group: "Data Center - DCGW"
115-
labels:
116-
topoViewer-role: dcgw
91+
# PE-01:
92+
# kind: vr-sros
93+
# image: registry.srlinux.dev/pub/vr-sros:22.7.R1
94+
# type: "cp: cpu=2 ram=6 chassis=SR-2s slot=A card=cpm-2s ___ lc: cpu=2 ram=4 max_nics=10 chassis=SR-2s slot=1 card=xcm-2s mda/1=s18-100gb-qsfp28"
95+
# license: license.txt
96+
# group: "Back Bone"
97+
# labels:
98+
# topoViewer-role: pe
99+
100+
# PE-02:
101+
# kind: vr-sros
102+
# image: registry.srlinux.dev/pub/vr-sros:22.7.R1
103+
# type: "cp: cpu=2 ram=6 chassis=SR-2s slot=A card=cpm-2s ___ lc: cpu=2 ram=4 max_nics=10 chassis=SR-2s slot=1 card=xcm-2s mda/1=s18-100gb-qsfp28"
104+
# license: license.txt
105+
# group: "Back Bone"
106+
# labels:
107+
# topoViewer-role: pe
108+
109+
# DCGW-03:
110+
# kind: vr-sros
111+
# image: registry.srlinux.dev/pub/vr-sros:22.7.R1
112+
# type: "cp: cpu=2 ram=6 chassis=SR-2s slot=A card=cpm-2s ___ lc: cpu=2 ram=4 max_nics=10 chassis=SR-2s slot=1 card=xcm-2s mda/1=s18-100gb-qsfp28"
113+
# license: license.txt
114+
# group: "Data Center - DCGW"
115+
# labels:
116+
# topoViewer-role: dcgw
117117

118-
DCGW-04:
119-
kind: vr-sros
120-
image: registry.srlinux.dev/pub/vr-sros:22.7.R1
121-
type: "cp: cpu=2 ram=6 chassis=SR-2s slot=A card=cpm-2s ___ lc: cpu=2 ram=4 max_nics=10 chassis=SR-2s slot=1 card=xcm-2s mda/1=s18-100gb-qsfp28"
122-
license: license.txt
123-
group: "Data Center - DCGW"
124-
labels:
125-
topoViewer-role: dcgw
118+
# DCGW-04:
119+
# kind: vr-sros
120+
# image: registry.srlinux.dev/pub/vr-sros:22.7.R1
121+
# type: "cp: cpu=2 ram=6 chassis=SR-2s slot=A card=cpm-2s ___ lc: cpu=2 ram=4 max_nics=10 chassis=SR-2s slot=1 card=xcm-2s mda/1=s18-100gb-qsfp28"
122+
# license: license.txt
123+
# group: "Data Center - DCGW"
124+
# labels:
125+
# topoViewer-role: dcgw
126126

127127
links:
128128

129-
- endpoints: ["PE-01:eth2", "PE-02:eth2"]
130-
- endpoints: ["PE-01:eth3", "DCGW-03:eth3"]
129+
# - endpoints: ["PE-01:eth2", "PE-02:eth2"]
130+
# - endpoints: ["PE-01:eth3", "DCGW-03:eth3"]
131131

132-
- endpoints: ["PE-02:eth4", "DCGW-03:eth4"]
133-
- endpoints: ["PE-02:eth5", "DCGW-04:eth5"]
132+
# - endpoints: ["PE-02:eth4", "DCGW-03:eth4"]
133+
# - endpoints: ["PE-02:eth5", "DCGW-04:eth5"]
134134

135-
- endpoints: ["PE-01:eth4", "DCGW-04:eth4"]
135+
# - endpoints: ["PE-01:eth4", "DCGW-04:eth4"]
136136

137-
- endpoints: ["DCGW-03:eth1", "Borderl-Leaf-01:e1-1"]
138-
- endpoints: ["DCGW-04:eth1", "Borderl-Leaf-02:e1-1"]
137+
# - endpoints: ["DCGW-03:eth1", "Borderl-Leaf-01:e1-1"]
138+
# - endpoints: ["DCGW-04:eth1", "Borderl-Leaf-02:e1-1"]
139139

140140
- endpoints: ["Spine-01:e1-5", "Borderl-Leaf-01:e1-5"]
141141
- endpoints: ["Spine-02:e1-5", "Borderl-Leaf-02:e1-5"]

rawTopoFile/topoviewer.tmpl

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{{/* This template support containerlab version: 0.44.3 */}}
2+
{
3+
"name": "{{ .Name }}",
4+
"type": "{{ .Type }}",
5+
{{ $labName := .Name }}
6+
{{ $type := .Type }}
7+
"clab": {
8+
"config": {
9+
"prefix": "{{ .Clab.Config.Prefix }}",
10+
"mgmt": {{ ToJSONPretty .Clab.Config.Mgmt " " " "}}
11+
}
12+
},
13+
"nodes": [
14+
{{- $i:=0 }}{{range $n, $c := .NodeConfigs}}{{if $i}},{{end}}
15+
{
16+
"id": "{{$n}}",
17+
"index": "{{$c.Index}}",
18+
"shortname": "{{$c.ShortName}}",
19+
"longname": "{{$c.LongName}}",
20+
"fqdn": "{{$c.Fqdn}}",
21+
"group": "{{$c.Group}}",
22+
"labdir": "{{$c.LabDir}}",
23+
"kind": "{{$c.Kind}}",
24+
"image": "{{$c.Image}}",
25+
"mgmt-net": "{{$c.MgmtNet}}",
26+
"mgmt-intf": "{{$c.MgmtIntf}}",
27+
"mgmt-ipv4-address": "{{$c.MgmtIPv4Address}}",
28+
"mgmt-ipv4-prefix-length": {{$c.MgmtIPv4PrefixLength}},
29+
"mgmt-ipv6-address": "{{$c.MgmtIPv6Address}}",
30+
"mgmt-ipv6-prefix-length": {{$c.MgmtIPv6PrefixLength}},
31+
"mac-address": "{{$c.MacAddress}}",
32+
"labels": {{ToJSONPretty $c.Labels " " " "}}
33+
{{$i = add $i 1}}}{{end}}
34+
],
35+
"links": [{{range $i, $l := .Clab.Links}}{{if $i}},{{end}}{{ $endpointA := index $l.Endpoints 0 }}{{ $endpointB := index $l.Endpoints 1 }}{{ $endpointAList := split (printf "%s"
36+
$endpointA) ":" }}{{ $endpointBList := split (printf "%s" $endpointB) ":" }}
37+
{{- $eps := $l.GetEndpoints }}
38+
{{- $ep := index $eps 0 }}
39+
{
40+
"a": {
41+
"node": "{{ index $endpointAList 0 }}",
42+
"nodeLongName": "{{ $type }}-{{ $labName}}-{{ index $endpointAList 0 }}",
43+
"interface": "{{ $ep.GetIfaceName }}",
44+
"mac": "{{ $ep.GetMac }}",
45+
"peer": "z"
46+
},
47+
{{- $ep := index $eps 1 }}
48+
"z": {
49+
"node": "{{ index $endpointBList 0 }}",
50+
"nodeLongName": "{{ $type }}-{{ $labName}}-{{ index $endpointBList 0 }}",
51+
"interface": "{{ $ep.GetIfaceName }}",
52+
"mac": "{{ $ep.GetMac }}",
53+
"peer": "a"
54+
}
55+
}{{end}}
56+
]
57+
}

tools/entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# Trigger an error if non-zero exit code is encountered
44
set -e
55

6-
/opt/topoviewer/topoviewer clab -H 149.204.21.68 -p 8080 -u suuser -j local-bind/topo-file.yaml
6+
/opt/topoviewer/topoviewer clab --allowed-hostnames $ALLOWED_HOSTNAME --clab-user $CLAB_USER --clab-pass $CLAB_PASS --server-port $SERVER_PORT --topology-file-json local-bind/topo-file.json &

0 commit comments

Comments
 (0)