Open networkop opened 3 years ago
Custom kinds are not something you can create in the clab file I wonder what would be the use case? To have a special set of variables scoped for this kind specifically?
yes. so instead of listing all those kind params for every node, you define them once and then just reference that custom kind from the nodes section
we will take it as a feature enhancement, and add it in the subsequent release.
This would be very useful as it will allow each custom kind to have a specific version or interface mapping (to emulate different hardware) in the case of cEOS. I.e.:
topology:
kinds:
ceos-7050SX3-48YC8:
startup-config: ../../ceos_lab_template/ceos.cfg.tpl
image: ceosimage:4.28.1F
binds:
- 7050SX3-48YC8.json:/mnt/flash/EosIntfMapping.json:ro
ceos-7050CX3-32S:
startup-config: ../../ceos_lab_template/ceos.cfg.tpl
image: ceosimage:4.28.0F
binds:
- 7050CX3-32S.json:/mnt/flash/EosIntfMapping.json:ro
linux:
image: alpine-host
In the example above the custom kind is denoted by not using a reserved name. Otherwise a "template" could be used.
@perimore do you need a custom kind for that though?
looks like your example can be written as
topology:
nodes:
ceos:
startup-config: ../../ceos_lab_template/ceos.cfg.tpl
image: ceosimage:4.28.1F
binds:
- 7050SX3-48YC8.json:/mnt/flash/EosIntfMapping.json:ro
ceos:
startup-config: ../../ceos_lab_template/ceos.cfg.tpl
image: ceosimage:4.28.0F
binds:
- 7050CX3-32S.json:/mnt/flash/EosIntfMapping.json:ro
Yes, it can be "unfolded" and written explicitly for each node. But the idea is to define custom node types with predefined options and not to repeat them. Some sort of inheritance.
Is this possible? as in take some base kind, e.g. linux and define my custom kind over it. I thought this was what
topology.kind
is supposed to do, but looks like it's not?e.g. this is what i want to do