ERROR AL CREAR VLAN MEDIANTE SDK PYTHON

Alvaro_Andres
Comes here often

ERROR AL CREAR VLAN MEDIANTE SDK PYTHON

MUY BUENAS TARDES COMUNIDAD, ACTUALMENTE ESTOY INTENTANDO CREAR VLANS EN MI RED USANDO EL SDK DE PYTHON, SIN EMBARGO CUANDO PROCEDO A REALIZAR ESA CREACIÓN ME GENERA ESTE ERROR:

meraki.exceptions.APIError: appliance, getNetworkApplianceVlan - 400 Bad Request, {'errors': ['VLANs are not enabled for this network']}

 

import meraki
API_KEY = 'xxxxxxxxxxxxxxxxxxxxxxx'
dashboard = meraki.DashboardAPI(API_KEY)
print("\n")
ORG = dashboard.organizations.getOrganizations()
# Obteniendo el ID de al organización
for item in ORG:
if item['name'] == 'Pruebas':
ORG_ID = item['id']
print("Obtaining ORG_ID ....")
print("ORG_ID Obtained !!!!\n")


NTW2 = dashboard.organizations.getOrganizationNetworks(ORG_ID)
for item in NTW2:
if item['name'] == 'LAB':
NTW_ID = item['id']
print(NTW_ID)
print("\n")

#Creación de VLANs
network_id = 'xxxxxxxxxxxxx'
id_ = '1234'
name = 'My VLAN'

response = dashboard.appliance.createNetworkApplianceVlan(
network_id, id_, name,
subnet='192.168.1.0/24',
applianceIp='192.168.1.2',
groupPolicyId='101'
)

print(response)

 

alguna ayuda me gustaría saber que se puede hacer, gracias

2 Replies 2
Johnfnadez
Building a reputation

Hola!

 

Desde el dashboard puedes ver sí el MX está configurado para poder usar VLANs? Por defecto estos vienen con una sola subred sin usar dot1Q

Johnny Fernandez
Network & Security Engineer
CCNP | JNCIP-SEC | CMNA

Hola John actualmente no tengo un MX y estoy creando las vlans directamente, esto lo puedo hacer desde el dashboard, sin embargo al usar el sdk me sale ese error.

 

Gracias

Get notified when there are additional replies to this discussion.