exam questions

Exam 350-401 All Questions

View all questions & answers for the 350-401 exam

Exam 350-401 topic 1 question 853 discussion

Actual exam question from Cisco's 350-401
Question #: 853
Topic #: 1
[All 350-401 Questions]



Refer to the exhibit. What is achieved by the XML code?

  • A. It displays the access list sequence numbers from the output of the show ip access-list extended flp command on the terminal screen
  • B. It displays the output of the show ip access-list extended flp command on the terminal screen
  • C. It reads the access list sequence numbers from the output of the show ip access-list extended flp command into a dictionary list
  • D. It reads the output of the show ip access-list extended flp command into a dictionary list
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
kldoyle97
Highly Voted 1 year, 3 months ago
A and B cannot be correct because the python code is not using the print function/ display information. based on the code, I believe the answer is C because the last line is reference Sequence numbers ["access-list-seq-rule"]
upvoted 10 times
...
d4doppelganger
Highly Voted 1 year, 1 month ago
Selected Answer: D
The output would look something like this. { '10': { 'sequence': '10', 'action': 'permit', 'source': '192.168.1.0 0.0.0.255', 'destination': 'any', 'protocol': 'ip', 'description': 'Allow traffic from 192.168.1.0/24 to any' }, '20': { 'sequence': '20', 'action': 'deny', 'source': 'any', 'destination': 'any', 'protocol': 'icmp', 'description': 'Deny all ICMP traffic' }, ... }
upvoted 7 times
...
Calinserban
Most Recent 2 months, 1 week ago
Selected Answer: D
I say D, the script return entire ACL
upvoted 1 times
...
AbdullahMohammad251
7 months, 1 week ago
Selected Answer: C
I will go with option 'C.' Towards the end of the exhibit, we see the command "['access-list-seq-rule']" which indicates that we're specifically accessing the value for the 'sequence-number' key. All rules will share the same parent keys, only the value for the 'access-list-seq-rule' key will be unique, therefore; it's the only item which was parsed into a python list.
upvoted 2 times
...
chiacche
7 months, 2 weeks ago
Selected Answer: C
It parses the returned XML result into a dictionary and extracts the access control list's serial number information from the command's output into a list of dictionaries.
upvoted 1 times
...
Shri_Fcb10
7 months, 4 weeks ago
Selected Answer: C
The XML configuration uses a <get-config> RPC call to retrieve the running configuration related to the specified access list (flp). The filter specifies that it only retrieves information related to the ip and access-list with the name flp. The Python code further processes the RPC reply by parsing it into a dictionary (d1) and specifically looks for the access list sequence rule numbers in the response ('access-list-seq-rule').
upvoted 2 times
...
Rfvaz
8 months, 2 weeks ago
Selected Answer: C
correct c
upvoted 1 times
...
Mohaned990_go
9 months, 2 weeks ago
Selected Answer: D
correct D
upvoted 1 times
...
a197cbf
10 months ago
Selected Answer: D
My vote is for D. The "access-list-seq-rule" is NOT just the value of the sequence number. The command would require the sub-tag <sequence> to pull the sequence number separately. Here's a sample XML format of an <access-list-seq-rule> block: <access-list-seq-rule> <sequence>10</sequence> <ace-rule> <action>permit</action> <protocol>tcp</protocol> <any/> <dst-any/> <dst-range1>5060</dst-range1> <dst-range2>5061</dst-range2> </ace-rule> </access-list-seq-rule> With that, if the most drilled-down block is the "access-list-seq-rule" then D makes sense since it's listing out each entire rule per sequence number, rather than just the sequence numbers themselves like option C specifies. If anyone disagrees, please correct me if I'm wrong.
upvoted 1 times
...
[Removed]
10 months, 3 weeks ago
Selected Answer: D
D is correct the code does parse the access list sequence rules into a dictionary, but it doesn't specify that only sequence numbers are extracted.
upvoted 1 times
...
[Removed]
11 months ago
Selected Answer: C
im going with C
upvoted 1 times
[Removed]
10 months, 3 weeks ago
after rereading the output, i think C is partially correct. the code does parse the access list sequence rules into a dictionary, but it doesn't specify that only sequence numbers are extracted. So D is more accurate
upvoted 1 times
...
[Removed]
10 months, 1 week ago
after rereading the output, i think C is partially correct. the code does parse the access list sequence rules into a dictionary, but it doesn't specify that only sequence numbers are extracted. So D is more accurate
upvoted 1 times
...
...
supershysherlock
1 year, 1 month ago
The correct answer will depend on the exact functionality of the NETCONF library and functions being used (like xmltodict.parse). If the functions xmltodict.parse and md.dispatch are being used as typically intended, they would parse the NETCONF response into a dictionary (D). So, based on the typical use of these functions, Option D is the most likely correct answer. It reads the output of the command into a dictionary list, allowing for structured access to the data within the application or script.
upvoted 1 times
...
slacker_at_work
1 year, 1 month ago
Selected Answer: C
• The Python code establishes a NETCONF session with a Cisco IOS XE device and sends a <get-config> RPC payload to retrieve the running configuration of an extended ACL named "fip". • It then parses the XML response received from the device and extracts the access list sequence numbers from the configuration data of the extended ACL rules. • This sequence numbers are then read into a dictionary list.
upvoted 3 times
...
slacker_at_work
1 year, 1 month ago
pl1 = [ <get-config xmlns="urn.ietf.params.xml.ns.netconf base:1.0"> <source> <running/> </source> <filter> <native xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native"> <ip> <access-list> <extended xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-acl"> <name>fip</name> </extended> </access-list> </ip> </native> </filter> </get-config> ] with manager.connect(host=10.1.1.1, port=830, username=cisco, password=cisco, timeout=90, hostkey_verify=False) as m for rpc in pl1. r1=m.dispatch(et.fromstring(rpc)) d1=xmitodict.parse(r1.xml)['rpc-reply']['data']['native']['ip']['access-list']['extended']['access-list-seq-rule']
upvoted 2 times
...
kivi_bg
1 year, 3 months ago
Answer C This is based on the line d1= xmltodict.parse(r1.xml)['rpc-reply']['data']['native']['ip']['access-list']['extended']['access-list-seq-rule'], which indicates that the XML response is parsed, and the specific information about access list sequence rules is extracted into a dictionary.
upvoted 2 times
...
Mizuchan
1 year, 3 months ago
Selected Answer: C
xmitodict that means C.
upvoted 3 times
...
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.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago