This repository holds code samples for DevNet Express DNA Track
ciscodevnet / devnet-express-code-samples Goto Github PK
View Code? Open in Web Editor NEWArchived: This repository holds code samples for DevNet Express DNA Track
Archived: This repository holds code samples for DevNet Express DNA Track
This repository holds code samples for DevNet Express DNA Track
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
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
The excap directory in the module is empty, so the lab doesn't work!
It should have the same contents as this repo:
https://github.com/dexterlabora/excap
An SE is preparing for a DNA event in Pittsburgh. The SE couldn't find the ChatOps bot that we refer to in the demo portion of the DNA Explained module.
We need to make the ChatOps bot available to the SEs hosting events, and explain to then how to access it.
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 ;-)
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.
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.