Giter Club home page Giter Club logo

devnet-express-code-samples's Introduction

devnet-express-code-samples's People

Contributors

annegentle avatar armartirosyan avatar aroach avatar austinmarcos avatar brtiller1 avatar cmlccie avatar dstaudt avatar hpreston avatar robertcsapo avatar rschmied avatar yawming avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

devnet-express-code-samples's Issues

Verify Status Code on apic-em module

LM4502 doesn't have response.raise_for_status() to indicate if there's issues with the API call

code

response = requests.post(url, data=json.dumps(payload), headers=headers, verify=False)
response.raise_for_status()
response = response.json()

output

Traceback (most recent call last):
  File "apic_em_code_1.py", line 86, in <module>
    auth_token = get_token(apic_em_ip)
  File "apic_em_code_1.py", line 28, in get_token
    response.raise_for_status()
  File "/usr/local/lib/python3.6/site-packages/requests/models.py", line 909, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://sandboxapic.cisco.com/api/v1/ticket

DNA mention

I suggest we rename this repo devnet-express-dna-code-samples to better drive participants to the contents,
as DevnetExpress is an event brand, and does not relate to DNA only ;-)

Needs Spark rename updates

Spark renamed to Webex Teams, and use ACCESS_TOKEN instead of SPARK_TOKEN - plus look for sparkbot.io renamed to webex.bot, and developer.ciscospark.com redirecting to developer.webex.com.

Sandbox gives error on apic_em_code_1&2

The sample code does not search for specific enough devices, so if the first access device found is a Unified AP, the script fails. Will submit a PR with a fix.

Please add #!/usr/bin/env python to top of every python file

Hi,

I'm working through these on Ubuntu. It's a bit painful to have to add this to the top of every file. Can the repo be updated to include this? Perhaps could be included as part of #21?

Otherwise, I don't mind putting in a pull request myself.

Regards,
Jonathan

Standardize Python Indentation - Tabs or Spaces

Several students are experiencing 'inconsistent indentation' errors when editing and then executing the sample files.

Current Formating: The sample files (today) are using tabs for indentation.

Problem: The default settings of the Notepad++ editor that many of them are using defaults to converting tabs-to-spaces. When they add new lines to the sample files, their editor is replacing their 'tabs' to spaces and causing the execution errors.

Recommendation: PEP 8 recommends using spaces as the 'leading practice', and recommends that "Tabs should be used solely to remain consistent with code that is already indented with tabs."

Either way (whether we go with tabs or spaces), I recommend that the sample-code files and the IDE settings (at least those in the dCloud environment) be set to use the same formatting. Additionally, with spaces being the 'leading practice', defaulting to this would likely provide greater 'compatibility' with IDEs on users' laptops.

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.