B `Q@sGdddeZdS)csTeZdZfddZedddZedddZedd d Zedd d ZZ S) SNMPSettingscstt|||_dS)N)superr__init___session)selfsession) __class__v/private/var/folders/7j/8686xlfs15q3tgljmghtvg0r0000gn/T/pip-target-isidps9b/lib/python/meraki_v0/api/snmp_settings.pyrszSNMPSettings.__init__) networkIdcCs&dgdd}d|d}|j||S)z **Return the SNMP settings for a network** https://developer.cisco.com/meraki/api/#!get-network-snmp-settings - networkId (string) z SNMP settingsgetNetworkSnmpSettings)tags operationz /networks/z /snmpSettings)rget)rr metadataresourcerrr r s  z#SNMPSettings.getNetworkSnmpSettingsc s|td|krBdddg}|d|ksBtd|dd|dgdd }d |d }dd dgfd d|D}|j|||S)a **Update the SNMP settings for a network** https://developer.cisco.com/meraki/api/#!update-network-snmp-settings - networkId (string) - access (string): The type of SNMP access. Can be one of 'none' (disabled), 'community' (V1/V2c), or 'users' (V3). - communityString (string): The SNMP community string. Only relevant if 'access' is set to 'community'. - users (array): The list of SNMP users. Only relevant if 'access' is set to 'users'. accessnoneZ communityZusersz"access" cannot be "z", & must be set to one of: z SNMP settingsupdateNetworkSnmpSettings)r r z /networks/z /snmpSettingsZcommunityStringcs&i|]\}}|kr||qSr)strip).0kv) body_paramsrr .sz:SNMPSettings.updateNetworkSnmpSettings..)updatelocalsAssertionErroritemsrput)rr kwargsoptionsrrpayloadr)rr rs  $  z&SNMPSettings.updateNetworkSnmpSettings)organizationIdcCs&dgdd}d|d}|j||S)z **Return the SNMP settings for an organization** https://developer.cisco.com/meraki/api/#!get-organization-snmp - organizationId (string) z SNMP settingsgetOrganizationSnmp)r r z/organizations/z/snmp)rr)rr"rrrrr r#2s  z SNMPSettings.getOrganizationSnmpc s|td|kr@ddg}|d|ks@td|dd|d|krtddg}|d|ksttd |dd|d gd d }d |d}dddddddgfdd|D}|j|||S)a **Update the SNMP settings for an organization** https://developer.cisco.com/meraki/api/#!update-organization-snmp - organizationId (string) - v2cEnabled (boolean): Boolean indicating whether SNMP version 2c is enabled for the organization. - v3Enabled (boolean): Boolean indicating whether SNMP version 3 is enabled for the organization. - v3AuthMode (string): The SNMP version 3 authentication mode. Can be either 'MD5' or 'SHA'. - v3AuthPass (string): The SNMP version 3 authentication password. Must be at least 8 characters if specified. - v3PrivMode (string): The SNMP version 3 privacy mode. Can be either 'DES' or 'AES128'. - v3PrivPass (string): The SNMP version 3 privacy password. Must be at least 8 characters if specified. - peerIps (string): The IPs that are allowed to access the SNMP server. This list should be IPv4 addresses separated by semi-colons (ie. "1.2.3.4;2.3.4.5"). Z v3AuthModeMD5SHAz"v3AuthMode" cannot be "z", & must be set to one of: Z v3PrivModeZDESZAES128z"v3PrivMode" cannot be "z SNMP settingsupdateOrganizationSnmp)r r z/organizations/z/snmpZ v2cEnabledZ v3EnabledZ v3AuthPassZ v3PrivPassZpeerIpscs&i|]\}}|kr||qSr)r)rrr)rrr rasz7SNMPSettings.updateOrganizationSnmp..)rrrrrr)rr"rr rrr!r)rr r&Bs $$ z#SNMPSettings.updateOrganizationSnmp) __name__ __module__ __qualname__rstrr rr#r& __classcell__rr)rr rs  rN)objectrrrrr