Package: merakiDataFetcher
Meraki Data FetcherThis module pulls the data using the Meraki sdk.For better processing of the data dataclasses was created.These are then used to create objects that have the data from the Meraki API.meraki_data_fetcherThe MerakiDataFetcher expects an apikey when instantiating.The object has the following methods.apikey_validation() -> booleanget_organizations() -> [MerakiOrganization]get_networks(organizationId: str) -> [MerakiNetwork]get_device(deviceSerial: str) -> MerakiDeviceget_network(networkId: str) -> MerakiNetworkget_network_devices(networkId: str, types='all': str) -> [MerakiDevice]apikey_validationWith the method "apikey_validation" a boolean is returned.True, if the apikey is valid. Otherwise, it returns False.get_organizationsThe method "get_organizations" returns all organizations available with the apikeyas an instance of the MerakiOrganizations dataclass.get_networksThe get_networks method takes an organizationId.Then all networks which are contained in the organization are returned as a list of MerakiNetwork instances.get_deviceThe get_device method takes a deviceSerial and returns the device data as MerakiDevice instance.get_networkThe get_network method takes a networkId and returns the network data as MerakiNetwork instance.get_network_devicesThe get_network_devices method takes the networkId as a required parameter.Optionally, the type of the devices can also be passed as parameter.
The default parameter is all.
The following types are available to pass'all''Firewall''Switch''Access Point''Sensor''Camera'The type must be passed as a string.DataclassesThere are eight dataclasses.meraki_organizationThe dataclass meraki_organization stores organizations with the valuesidnameurlapinetworksThe networks are optional.
On the one hand, so that organizations can be created without networks.On the other hand, because the networks get the OrganizationId.The value to attach the networks as a list is a feature that can be used, but does not have to be used.All other values must be set when instantiating.meraki_networkThe dataclass meraki_network stores networks with the valuesidorganizationIdnameproductTypestimeZonetagsurlnotesconfigTemplateIdisBoundToConfigTemplateAll these values must be set.meraki_deviceThe dataclass meraki_device is a parent class for all types of Meraki devices.This contains the valuesnamelatlngserialmacmodeladdressnotestagsnetworkIdfirmwarefloorPlanIdurlproductTypemeraki_device_applianceThe dataclass meraki_device_appliance is a child class for Meraki Firewalls.This contains the values from the meraki_device dataclass andwan1Ipwan2Ipmeraki_device_cameraThe dataclass meraki_device_camera is a child class for Meraki Cameras.This contains the values from the meraki_device dataclass andlanIpwirelessMacmeraki_device_sensorThe dataclass meraki_device_sensor is a child class for Meraki Sensors.This contains the values from the meraki_device dataclass andlanIpmeraki_device_switchThe dataclass meraki_device_switch is a child class for Meraki Switches.This contains the values from the meraki_device dataclass andlanIpswitchProfileIdmeraki_device_wirelessThe dataclass meraki_device_wireless is a child class for Meraki Access Points.This contains the values from the meraki_device dataclass andlanIpbeaconIdParamsmeraki_portThe dataclass meraki_port is a parent class for all types of ports from Meraki devices.This contains the valuesenabled: booltype: strvlan: intallowedVlans: strmeraki_port_applianceThe dataclass meraki_port_appliance is a child class for Meraki Port.This contains the values from the meraki_port dataclass andnumber: intdropUntaggedTraffic: boolaccessPolicy: strmeraki_port_switchThe dataclass meraki_port_switch is a child class for Meraki Port.This contains the values from the meraki_port dataclass andserial: strportId: strname: strtags: [str]poeEnabled: boolvoiceVlan: intisolationEnabled: boolrstpEnabled: boolstpGuard: strlinkNegotiation: strlinkNegotiationCapabilities: [str]portScheduleId: strudld: straccessPolicyType: straccessPolicyNumber: intmacAllowList: [str]stickyMacAllowList: [str]stickyMacAllowListLimit: intstormControlEnabled: booladaptivePolicyGroupId: strpeerSgtCapable: boolflexibleStackingEnabled: booldaiTrusted: boolprofile: MerakiPortSwitchProfile = Nonemeraki_port_switch_profileThe dataclass meraki_port_switch_profile contains the values for the profile in meraki_port_switch.