Skip to content

Commit a8c75a1

Browse files
authored
Merge pull request #105 from gregbo/patch-1
Update api_requests_example.py
2 parents e59fbc5 + 0f23d47 commit a8c75a1

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

programming_fundamentals/python_part_3/api_requests_example.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,15 @@
1515

1616
import requests
1717
from pprint import pprint
18+
import urllib3
19+
20+
# Disable SSL Warnings
21+
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
22+
1823
router = {"ip": "ios-xe-mgmt.cisco.com",
19-
"port": "9443",
24+
"port": "443",
2025
"user": "developer",
21-
"pass": "C1sco12345"}
26+
"pass": "lastorangerestoreball8876"}
2227

2328
headers = {"Accept": "application/yang-data+json"}
2429

programming_fundamentals/rest_part_1/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ This lesson leverages the [IOS XE on CSR Recommended Code Always On](https://dev
2424

2525
***Note: In the video, a different DevNet Sandbox is used***
2626

27-
When running the `curl` for the RESTCONF example, leverage `https://ios-xe-mgmt.cisco.com:9443` as the URL instead of `https://10.10.20.21`.
27+
When running the `curl` for the RESTCONF example, leverage `https://ios-xe-mgmt.cisco.com:443` as the URL instead of `https://10.10.20.21`.
2828

2929
## Download Slides
3030

3131
You can download the slides for this lesson [here](https://developer.cisco.com/fileMedia/download/c5942bff-3499-3e11-829a-fa90ebeb5fd1).
3232

33-
> *Suggestion: Right click, "Open in new tab"*
33+
> *Suggestion: Right click, "Open in new tab"*

programming_fundamentals/rest_part_1/curl_examples.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ curl https://api.icndb.com/jokes/random?limitTo=nerdy
1616

1717
# Example 3: Network Programmability with RESTCONF
1818
curl -vk \
19-
-u developer:C1sco12345 \
19+
-u developer:lastorangerestoreball8876 \
2020
-H 'accept: application/yang-data+json' \
21-
https://ios-xe-mgmt.cisco.com:9443/restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet2
21+
https://ios-xe-mgmt.cisco.com:443/restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet2

0 commit comments

Comments
 (0)