Open spolack opened 2 years ago
Can you give a specif example, how a config would look like, for a site? I do not understand exactly each line of the template code you wrote.
Just wanted to point out two usecases:
I just gave some different techniques to prepopulate the profiles a try and found a way to use loops in templates which doesnt feel too hackish. Not sure if they are better ways though.
Commit: https://github.com/freifunk-berlin/bbb-configs/commit/d2de94a4375b3e90aa1798456330912b24ce71fc
Resulting port_profiles variable for wilgu10 networks..
all:
native_vlan: false
poe_mode: af
vlans: [10, 11, 20, 42, 40, 41, 50]
all_24_passive:
mesh_sama: null
native_vlan: 10
poe_mode: af
vlans: [10, 11, 20, 42, 40, 41, 50]
dhcp_24_passive:
native_vlan: 40
poe_mode: 24_passive
vlans: [10, 11, 20, 42, 40, 41, 50]
dhcp_mgmt:
native_vlan: 40
poe_mode: af
vlans: [40, 42]
dhcp_mgmt_24_passive:
native_vlan: 41
poe_mode: af
prdhcp: null
vlans: [10, 11, 20, 42, 40, 41, 50]
mesh_east_2g_24_passive:
native_vlan: 20
poe_mode: 24_passive
vlans: [10, 11, 20, 42, 40, 41, 50]
mesh_east_2g_mgmt:
native_vlan: 20
poe_mode: af
vlans: [20, 42]
mesh_east_2g_mgmt_24_passive:
mgmt: null
native_vlan: 42
poe_mode: af
vlans: [10, 11, 20, 42, 40, 41, 50]
mesh_sama_24_passive:
native_vlan: 10
poe_mode: 24_passive
vlans: [10, 11, 20, 42, 40, 41, 50]
mesh_sama_mgmt:
native_vlan: 10
poe_mode: af
vlans: [10, 42]
mesh_sama_mgmt_24_passive:
mesh_zwingli: null
native_vlan: 11
poe_mode: af
vlans: [10, 11, 20, 42, 40, 41, 50]
mesh_zwingli_24_passive:
native_vlan: 11
poe_mode: 24_passive
vlans: [10, 11, 20, 42, 40, 41, 50]
mesh_zwingli_mgmt:
native_vlan: 11
poe_mode: af
vlans: [11, 42]
mesh_zwingli_mgmt_24_passive:
mesh_east_2g: null
native_vlan: 20
poe_mode: af
vlans: [10, 11, 20, 42, 40, 41, 50]
mgmt_24_passive:
native_vlan: 42
poe_mode: 24_passive
vlans: [10, 11, 20, 42, 40, 41, 50]
mgmt_mgmt:
native_vlan: 42
poe_mode: af
vlans: [42, 42]
mgmt_mgmt_24_passive:
dhcp: null
native_vlan: 40
poe_mode: af
vlans: [10, 11, 20, 42, 40, 41, 50]
prdhcp_24_passive:
native_vlan: 41
poe_mode: 24_passive
vlans: [10, 11, 20, 42, 40, 41, 50]
prdhcp_mgmt:
native_vlan: 41
poe_mode: af
vlans: [41, 42]
prdhcp_mgmt_24_passive:
native_vlan: 50
poe_mode: af
vlans: [10, 11, 20, 42, 40, 41, 50]
w10host: null
w10host_24_passive:
native_vlan: 50
poe_mode: 24_passive
vlans: [10, 11, 20, 42, 40, 41, 50]
w10host_mgmt:
native_vlan: 50
poe_mode: af
vlans: [50, 42]
w10host_mgmt_24_passive:
native_vlan: 50
poe_mode: 24_passive
vlans: [50, 42]
RFC
A switchport profile should be a hash of port config, which can be assigned to all or individual ports per device.
Following Profiles should be implicitly created. profile all is applied by default to every port