Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map platforms to kinds with parameterized templates #16

Merged
merged 36 commits into from
Nov 25, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
fad4905
platform_map for platform to kind mapping
bortok Aug 27, 2023
ac66078
maps.kinds
bortok Aug 27, 2023
e243381
reworked the map
bortok Sep 2, 2023
7ebfb03
parameterized clab kind templates
bortok Sep 3, 2023
27db7fb
removed clab kind symlinks
bortok Sep 3, 2023
77e1b81
removed cml kind symlinks
bortok Sep 3, 2023
08dd414
removed default kind params from map for clab
bortok Sep 3, 2023
da82feb
Revert "removed default kind params from map for clab"
bortok Sep 3, 2023
9066e83
moved custom params to map for clab linux kind
bortok Sep 3, 2023
314b8ed
fixed clab linux kind len function
bortok Sep 3, 2023
ab50b7c
parameterized clab default.j2
bortok Sep 3, 2023
0df9907
introduced clab/node_params.j2 for includes
bortok Sep 5, 2023
a96a7c1
moved startup-config to node_params.j2
bortok Sep 5, 2023
8efa4d8
unset startup_config in default.j2
bortok Sep 5, 2023
ec66ebb
removed default image tags
bortok Sep 10, 2023
7aebea2
covered non-node specific params
bortok Sep 10, 2023
477a7df
Merge branch 'dev' into maps
bortok Sep 24, 2023
d459d73
renamed kinds folders to nodes
bortok Nov 4, 2023
37e7f53
nodes_template and interface_names_template
bortok Nov 4, 2023
1098d04
nodes and interface_names subkeys
bortok Nov 5, 2023
95e8e3f
ceos interface_maps in platform_map
bortok Nov 5, 2023
143b7c6
default interface_names for graphite and d2
bortok Nov 5, 2023
ecbe5f7
cml interface_names
bortok Nov 5, 2023
e6caa06
renamed platform_map.yml to .yaml
bortok Nov 7, 2023
106c27a
updated readme sonic example with platform_map
bortok Nov 7, 2023
39d7016
readme updates
bortok Nov 7, 2023
33b61c6
separate docs/interface_maps.md
bortok Nov 7, 2023
7c28c1d
moved sonic image path explanation
bortok Nov 7, 2023
cd6e3a6
separate docs/output_format.md
bortok Nov 7, 2023
eec22a0
sonic-vs node template section update
bortok Nov 7, 2023
abbb7b8
nodes section updates
bortok Nov 7, 2023
3d2c29e
full set of clab artifacts
bortok Nov 23, 2023
fdfd5a4
link to clab/nodes folder
bortok Nov 23, 2023
2054484
fixed the link
bortok Nov 23, 2023
c5b62ec
finalized clab artifacts links
bortok Nov 23, 2023
52ed173
interface_names readme fixes
bortok Nov 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
introduced clab/node_params.j2 for includes
  • Loading branch information
bortok committed Sep 5, 2023
commit 0df990778dde1c1feb565883cc4cadbc71e6cb28
7 changes: 3 additions & 4 deletions clab/kinds/ceos.j2
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{{ name }}:
kind: ceos
{% if image is defined %}
image: {{ image }}
{% else %}
image: ceos:latest
{% if image is not defined %}
{% set image = "ceos:latest" %}
{% endif %}
{% if configuration_file is defined %}
startup-config: {{ configuration_file }}
Expand All @@ -12,4 +10,5 @@
binds:
- {{ interface_map }}:/mnt/flash/EosIntfMapping.json:ro
{% endif %}
{% include 'clab/node_params.j2' %}
{% include 'clab/labels.j2' %}
16 changes: 3 additions & 13 deletions clab/kinds/default.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,8 @@
{% else %}
kind: linux
{% endif %}
{% if image is defined %}
image: {{ image }}
{% else %}
image: alpine:latest
{% endif %}
{% if cmd is defined %}
cmd: {{ cmd }}
{% endif %}
{% if exec is defined and exec|length > 0 %}
exec:
{% for e in exec %}
- {{ e }}
{% endfor %}
{% if image is not defined %}
{% set image = "alpine:latest" %}
{% endif %}
{% include 'clab/node_params.j2' %}
{% include 'clab/labels.j2' %}
26 changes: 0 additions & 26 deletions clab/kinds/linux.j2

This file was deleted.

7 changes: 3 additions & 4 deletions clab/kinds/rare.j2
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{{ name }}:
kind: rare
{% if image is defined %}
image: {{ image }}
{% else %}
image: ghcr.io/rare-freertr/freertr-containerlab:latest
{% if image is not defined %}
{% set image = "ghcr.io/rare-freertr/freertr-containerlab:latest" %}
{% endif %}
{% include 'clab/node_params.j2' %}
{% include 'clab/labels.j2' %}
7 changes: 3 additions & 4 deletions clab/kinds/sonic-vs.j2
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{{ name }}:
kind: sonic-vs
{% if image is defined %}
image: {{ image }}
{% else %}
image: netreplica/docker-sonic-vs:latest
{% if image is not defined %}
{% set image = "netreplica/docker-sonic-vs:latest" %}
{% endif %}
{% include 'clab/node_params.j2' %}
{% include 'clab/labels.j2' %}
7 changes: 3 additions & 4 deletions clab/kinds/srl.j2
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{{ name }}:
kind: nokia_srlinux
{% if image is defined %}
image: {{ image }}
{% else %}
image: ghcr.io/nokia/srlinux:latest
{% if image is not defined %}
{% set image = "ghcr.io/nokia/srlinux:latest" %}
{% endif %}
{% if type is defined %}
type: {{ type }}
Expand All @@ -13,4 +11,5 @@
{% if configuration_file is defined %}
startup-config: {{ configuration_file }}
{% endif %}
{% include 'clab/node_params.j2' %}
{% include 'clab/labels.j2' %}
7 changes: 3 additions & 4 deletions clab/kinds/vr-cisco_csr1000v.j2
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{{ name }}:
kind: vr-cisco_csr1000v
{% if image is defined %}
image: {{ image }}
{% else %}
image: csr1000v:latest
{% if image is not defined %}
{% set image = "csr1000v:latest" %}
{% endif %}
{% if configuration_file is defined %}
startup-config: {{ configuration_file }}
{% endif %}
{% include 'clab/node_params.j2' %}
{% include 'clab/labels.j2' %}
12 changes: 12 additions & 0 deletions clab/node_params.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% if image is defined %}
image: {{ image }}
{% endif %}
{% if cmd is defined %}
cmd: {{ cmd }}
{% endif %}
{% if exec is defined and exec|length > 0 %}
exec:
{% for e in exec %}
- {{ e }}
{% endfor %}
{% endif %}
4 changes: 2 additions & 2 deletions platform_map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ platforms:
eos:
kinds:
clab: ceos
cisco_ios:
cisco-ios:
kinds:
clab: vr-cisco_csr1000v
cml: iosv
Expand Down Expand Up @@ -42,7 +42,7 @@ kinds:
kind: linux
image: frrouting/frr:latest
linux:
template: clab/kinds/linux.j2
template: clab/kinds/default.j2
image: netreplica/ubuntu-host:latest
cmd: /start.sh -sS
exec:
Expand Down