Skip to content

Commit

Permalink
Python Part 3 tests (#53)
Browse files Browse the repository at this point in the history
* Python Part 3 tests

* Adds pysnmp to requriements.txt and extra error message
  • Loading branch information
agentlecisco authored Jan 15, 2021
1 parent d07ce63 commit 72fe318
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
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

1 comment on commit 72fe318

@Willifarrow89
Copy link

Choose a reason for hiding this comment

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

Great example and will be a great help from Cisco and thanks Cisco .

Please sign in to comment.