I think what you need to do is to first add them to the default VLAN Profile. Afterwards you can create your own VLAN Profile "StandardVlan" with the VLANs.
That is.
- Update default VLAN Profile
- Create "StandardVlan".
#!/usr/bin/env python3
import meraki
def main():
dashboard = meraki.DashboardAPI()
network_id = "..."
# Update Defalt
iname = 'Default'
name = 'Default Profile'
vlan_names = [
{
'name': 'CORP',
'vlanId': '17'
},
{
'name': 'AV',
'vlanId': '11'
},
{
'name': 'MGMNT',
'vlanId': '10'
}
]
vlan_groups = [
{
'name': 'WW-TRUNK',
'vlanIds': '10,11,17'
}
]
response = dashboard.networks.updateNetworkVlanProfile(
network_id, iname, name, vlan_names, vlan_groups
)
print(response)
# Create custom VLAN Profile
iname = 'StandardVlan'
name = 'My Standard Vlan'
vlan_names = [
{
'name': 'CORP',
'vlanId': '17'
},
{
'name': 'AV',
'vlanId': '11'
},
{
'name': 'MGMNT',
'vlanId': '10'
}
]
vlan_groups = [
{
'name': 'WW-TRUNK',
'vlanIds': '10,11,17'
}
]
response = dashboard.networks.createNetworkVlanProfile(
network_id, name, vlan_names, vlan_groups, iname
)
if __name__ == "__main__":
main()
LinkedIn :::
https://blog.rhbirkelund.dk/Like what you see? - Give a Kudo ## Did it answer your question? - Mark it as a Solution
🙂All code examples are provided as is. Responsibility for Code execution lies solely your own.