Skip to content

Python Part 3 tests #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,29 @@ jobs:
cd programming_fundamentals/python_part_2
pip install -r requirements.txt
python example1.py
- name: Test Programming Fundamentals Python Part 3 - ncclient
run: |
cd programming_fundamentals/python_part_3
pip install -r requirements.txt
python api_ncclient_example.py
- name: Test Programming Fundamentals Python Part 3 - netmiko
run: |
cd programming_fundamentals/python_part_3
pip install -r requirements.txt
python api_netmiko_example.py
- name: Test Programming Fundamentals Python Part 3 - pysnmp
run: |
cd programming_fundamentals/python_part_3
pip install -r requirements.txt
python api_pysnmp_example.py
- name: Test Programming Fundamentals Python Part 3 - requests
run: |
cd programming_fundamentals/python_part_3
pip install -r requirements.txt
python api_requests_example.py
- name: Test Programming Fundamentals Python Part 3 - data_library_exercises
run: |
cd programming_fundamentals/python_part_3
pip install -r requirements.txt
python data_library_exercises.py

Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

if errorIndication: # SNMP engine errors
print(errorIndication)
print("Check to be sure you're connected to the VPN for the DevNet Sandbox.")
else:
if errorStatus: # SNMP agent errors
print('%s at %s' % (errorStatus.prettyPrint(),
Expand Down
1 change: 1 addition & 0 deletions programming_fundamentals/python_part_3/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ netmiko>=3.3.2
pyyaml>=5.3.1
requests>=2.25.1
xmltodict>=0.12.0
pysnmp>=4.4.12
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hpreston I had to add pysnmp to the requirements.txt for the GitHub Actions check to pass and for it to run locally for me - can you make sure this is correct?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@annegentle yeah that's right. I left if off because that particular script/library isn't covered in the video. But as the script is in the repo worth including the requirement.