Git Product home page Git Product logo

Comments (3)

TKIPisalegacycipher avatar TKIPisalegacycipher commented on July 20, 2024

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.

image

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.

pvvcom avatar pvvcom commented on July 20, 2024

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.

TKIPisalegacycipher avatar TKIPisalegacycipher commented on July 20, 2024

Thanks @pvvcom , I'm not able to reproduce this issue on my end, and all the CIDR policy objects were created successfully.

Console output:
image
Dashboard showing created objects:
image

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.