Popular Post tnp1807 Posted March 31, 2024 Popular Post Posted March 31, 2024 Hi all, i got ccie_restconf.py file which solution for task 3.2 from c4c team. I already verified in lab then it work fine. import requests import json import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) host = '10.3.11.1' port = '443' username = 'netadmin' password = 'CCIEInfr4' url = "https://{}:{}/restconf/data/Cisco-IOS-XE-interfaces-oper:interfaces/interface".format(host, port) headers = { 'Accept': 'application/yang-data+json', 'Content-Type': 'application/yang-data+json' } response = requests.get(url, auth=(username, password),headers=headers,verify=False) jsondata = response.json() print("-" * 100) print("{:<45} {:<30} {:<30}".format("Interface", "Ingress Octets", "Egress Octets")) print("-" * 100) for interface in jsondata['Cisco-IOS-XE-interfaces-oper:interface']: if interface['oper-status'] == "if-oper-state-ready" and interface['interface-type'] == "iana-iftype-ethernet-csmacd": interface_name = interface['name'] in_octets = interface['statistics']['in-octets'] out_octets = interface['statistics']['out-octets'] print("{:<45} {:<30} {:<30}".format(interface_name, in_octets, out_octets)) This is the hidden content, please Sign In or Sign Up 218 44 2 2
imhungry Posted March 31, 2024 Posted March 31, 2024 This is useful thank you. Where did you get this? Is this your solution based on the leaked dump or is this a solution that has been provided by C4C? It would have been even more useful for them to highlight the changes they have made to the ccie_restconf.py file that is provided in the exam. 1
invincible2k Posted September 30, 2024 Posted September 30, 2024 do we need to type this complete code in lab?
DMas Posted October 10, 2024 Posted October 10, 2024 Thanks! Does anyone have the "faulty" script that we're supposed to fix during the exam?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now