meraki / dashboard-api-python

Official Dashboard API library (SDK) for Python
MIT License
289 stars 151 forks source link

function not passing 'type' variable #208

Closed pvvcom closed 1 year ago

pvvcom commented 1 year ago

Hi @TKIPisalegacycipher , you're right I was using the wrapper you linked. I have setup python and am testing it directly from example you linked but still getting an error on type.

Re-opening as this is the results from testing the python library directly.

import meraki
import os
import json

API_KEY = os.environ.get('MERAKI_DASHBOARD_API_KEY')
dashboard = meraki.DashboardAPI(
    API_KEY,
    #output_log=False,
    #print_console=False
)

organization_id = 'ommited'
name = 'testapi'
category = 'network'
type = 'cidr'
cidr = '10.1.10.20/24'

response = meraki.Organizations.createOrganizationPolicyObject(
    organization_id, name, category, type
)

2023-03-29 20:21:55 meraki: INFO > Meraki dashboard API session initialized with these parameters: {'version': '1.30.0', 'api_key': '****', 'base_url': 'https://api.meraki.com/api/v1', 'single_request_timeout': 60, 'certificate_path': '', 'requests_proxy': '', 'wait_on_rate_limit': True, 'nginx_429_retry_wait_time': 60, 'action_batch_retry_wait_time': 60, 'retry_4xx_error': False, 'retry_4xx_error_wait_time': 60, 'maximum_retries': 2, 'simulate': False, 'be_geo_id': None, 'caller': None, 'use_iterator_for_get_pages': False} Traceback (most recent call last): File "/home/pvickers/test.py", line 19, in response = meraki.Organizations.createOrganizationPolicyObject( TypeError: Organizations.createOrganizationPolicyObject() missing 1 required positional argument: 'type'

Originally posted by @pvvcom in https://github.com/meraki/dashboard-api-python/issues/207#issuecomment-1489515613

TKIPisalegacycipher commented 1 year ago

Hi @pvvcom I replied on the original issue #207--let's keep the conversation consolidated there.