containerlab icon indicating copy to clipboard operation
containerlab copied to clipboard

clab/config.go remove dependency on Kind Constants

Open steiler opened this issue 2 years ago • 1 comments

In clab/config.go we rely on the Kind consts for bridge ovs, host and srl type. These should be changed. The functionality should probably be added to the node implementations itself (when it comes to the srl related stuff) or should be indicated via a boolean flag on the Kind, like an "isBridge" flag for the bridge or ovs-bridge type of kind. which is then checked in this case: https://github.com/srl-labs/containerlab/blob/main/clab/config.go#L411-L421

steiler avatar Apr 06 '22 13:04 steiler

in #828 I would rather then from a central spot stating requirements of certain kinds introduce a MinCPURequired flag with anything above 0 being a valid requirement. And then loop through all the kinds of that certain topology and check perform the check... thats the better and more generic approach

steiler avatar Apr 07 '22 13:04 steiler

@steiler after the recent PRs do we still have this dependency?

hellt avatar Jan 27 '23 14:01 hellt

Yes, that is resolved. Just realized that there is some stuff remaining, that can be removed. see #1227

steiler avatar Jan 27 '23 14:01 steiler