Replies: 4 comments 5 replies
-
Of course we can do it. For example, we could add Alternatively, we could document the weird settings one has to use to force VyOS or Mikrotik to behave like router or switch -- after all, you can change any device defaults in topology file. |
Beta Was this translation helpful? Give feedback.
-
In my view there are already far too many knobs with various interpretations of their meaning, especially in the new vlan module In my (simplistic) world, a VLAN interface is routed if it has an IP address assigned. If not, it is switched |
Beta Was this translation helpful? Give feedback.
-
After mulling this over for a while, and sleeping on it ;)
Ergo: the Python code has to create interface- and VLAN data models that are close enough to what devices expect that a platform implementer could use them without too much Jinja2 hassle. However, the current approach to figuring out what needs to be done is broken (thanks for pointing it out, albeit a bit indirectly). We should use an explicit device flag (example: I will rewrite the code in a week or two; can't do it before then. |
Beta Was this translation helpful? Give feedback.
-
Implemented in 35fbf70. Hope the documentation and the code is (slightly) easier to read now. |
Beta Was this translation helpful? Give feedback.
-
Reading at the VLAN module doc, it seems you define if the device is behaving like a router or a switch depending on the presence of vlan_subif_name or routed_subif_name.
However, some devices (i.e., VyOS and Mikrotik) can have both behaviours, depending on the use case (or user preferred config).
Could it make sense, in your opinion, to add an additional option (i.e.,
behaviour: <router|switch>
), that can be used to select the config mode when both the above parameters are specified?Beta Was this translation helpful? Give feedback.
All reactions