Comments (3)
Hello @pvvcom -- when you say Meraki CLI, are you talking about this repo?
This is the repo for the Python library, so you might try making the call via the example Python library call on the interactive docs page.
If you're able to reproduce an issue with the library (e.g. sans Meraki CLI) then please let us know! For now it seems like the Meraki CLI repo would be the better place to raise this question.
from dashboard-api-python.
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.
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'
from dashboard-api-python.
Thanks @pvvcom , I'm not able to reproduce this issue on my end, and all the CIDR policy objects were created successfully.
Console output:
Dashboard showing created objects:
Here's a sample script you can reference:
import meraki
org = 'id-here'
d = meraki.DashboardAPI(suppress_logging=True)
type = 'cidr'
po_category = 'network'
po_name = 'new name'
cidr = '1.1.1.1/24'
response = d.organizations.createOrganizationPolicyObject(org, po_name, po_category, type, cidr=cidr)
I'm not seeing any sign that there is an issue with the library. You might try checking your library version, though, to make sure it's up to date.
from dashboard-api-python.
Related Issues (20)
- function not passing 'type' variable HOT 1
- Early Access Supported Calls HOT 1
- Incorrect kwarg is not logged or rejected HOT 4
- Identity PSKs always return null for expiresAt field HOT 1
- 204-No Content error HOT 1
- Logging level HOT 2
- This library requires Python 3.7 at minimum and your interpreter version is 3.10.0 HOT 1
- aiomeraki.organizations.getOrganizationApiRequests failing after upgrading the SDK from 1.34.0 to 1.36.0 HOT 5
- aio/rest_session.py crashing on 400 errors with a UnboundLocalError HOT 6
- 'Wireless' object has no attribute 'getOrganizationWirelessDevicesEthernetStatuses' HOT 1
- Async operations gets a certificate error (while sync operation works fine) HOT 10
- Library crashes with AttributeError when API returns 404 with no body HOT 1
- meraki 1.39 shows support for python 3.7 HOT 1
- installation fails on Windows HOT 1
- batch.networks.removeNetworkDevices has the incorrect operation HOT 2
- passing pagination (total_pages) params to getOrganizationApplianceTrafficShapingVpnExclusionsByNetwork results in error HOT 4
- Minor Documentation Spelling Error HOT 2
- API Endpoint /organizations/{organizationId}/wireless/radio/autoRf/byNetwork Missing HOT 1
- Generator does not add the required query parameters to methods if the query parameters are arrays of objects HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dashboard-api-python.