Refer to the exhibit. A Python script is used to configure a Cisco IOS XE device. The script must be updated to print the IP addresses of all the loopback interfaces. Which statement should be added before the loop?
A.
interfaces = response.json()[ג€ietf-interfaces:interfacesג€]
B.
interface = response.json()[ג€ietf-interfaces:interfacesג€]
C.
interface = response.json()[ג€ietf-interfaces:interfacesג€][ג€interfaceג€]
D.
interfaces = response.json()[ג€ietf-interfaces:interfacesג€][ג€interfaceג€]
D
['ietf-interfaces:interfaces']['interface'] - will return a list of individual interfaces
The question indicated confusion on “interfaces” vs “interface” in the URL. The fact that “interface” appears 3 times in the path can make it confusing. But there is a reason for each of them:
ietf-interfaces – the module name
:interfaces – a container called “interfaces” (Note: containers in YANG are used to group and organize other attributes)
interface – a list of individual network interfaces. Each interface in the list is uniquely identified by its name.
module: ietf-interfaces
+--rw interfaces
| +--rw interface* [name]
| +--rw name string
| +--rw description? string
| +--rw type identityref
| +--rw enabled? boolean
| +--rw link-up-down-trap-enable? enumeration {if-mib}?
Ans is D
https://blog.wimwauters.com/networkprogrammability/2020-04-04_restconf_python/
upvoted 4 times
...
This section is not available anymore. Please use the main Exam Page.300-435 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
fuhgeddaboudit
10 months agocj_kuo
1 year, 4 months agot567
2 years, 4 months ago