Hi Amit, I can show you this with a very basic python script. import meraki
# Defining your API key as a variable in source code is discouraged.
# This API key is for a read-only docs-specific environment.
# In your own code, use an environment variable as shown under the Usage section
# @ https://github.com/meraki/dashboard-api-python/
API_KEY = 'abcdasdasdsadasdasda12333333'
dashboard = meraki.DashboardAPI(API_KEY)
serial = 'Q2GW-XXXX-XXXX'
ports = dashboard.switch.getDeviceSwitchPorts(
serial
)
print(len(ports)) #This will return 30 if we run it against a 24-port switch
for port in ports:
print(port)
The port 29 and 30 information that fetched from above script is as simple as: {'portId': '30', 'name': None, 'tags': ['sp_all'], 'enabled': True, 'poeEnabled': False, 'type': 'trunk', 'vlan': 1, 'voiceVlan': None, 'allowedVlans': 'all', 'isolationEnabled': False, 'rstpEnabled': True, 'stpGuard': 'disabled', 'linkNegotiation': 'Auto negotiate', 'portScheduleId': None, 'udld': 'Alert only', 'linkNegotiationCapabilities': ['Auto negotiate'], 'accessPolicyType': 'Open', 'daiTrusted': False, 'profile': {'enabled': False, 'id': '', 'iname': None}, 'stormControlEnabled': True} Is there anything I can use if I want only ethernet and SFP ports? Thank you!
... View more