exam questions

Exam 200-901 All Questions

View all questions & answers for the 200-901 exam

Exam 200-901 topic 1 question 139 discussion

Actual exam question from Cisco's 200-901
Question #: 139
Topic #: 1
[All 200-901 Questions]


Refer to the exhibit. A network engineer must change the configuration on devices daily. The Python script must collect CLI arguments from the user, organize data according to the Cisco-IOS-XE-native YANG model, and utilize Cisco REST APIs to make the configuration. Which workflow is being automated by the
Python script?

  • A. updating an existing route on the device
  • B. adding a new route to a device
  • C. including a route on the device and overwriting the current routes
  • D. deleting the route that is passed through the command-line variables
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

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
nospampls
Highly Voted 1 year, 4 months ago
Selected Answer: B
I tested this in GNS3. PUT - replaces the whole routing table PATCH - added the route to the existing - but if the route with ip mask and gw already exists, it does nothing (checked this with route options name, tag, distanceand multicast in the route before using the script) I think B should be correct, because PATCH would add the entered route. Updateing a existing route is not possible.
upvoted 7 times
nospampls
1 year, 4 months ago
Here my scipt for you own tests: from requests import request from requests.auth import HTTPBasicAuth from sys import argv url = "https://192.168.246.131:443/restconf/data/native/ip/route" auth = HTTPBasicAuth("cisco","cisco") payload = { "Cisco-IOS-XE-native:route": { "ip-route-interface-forwarding-list": [ {"prefix": "3.3.3.3", "mask": "255.255.255.255", "fwd-list": [{ "fwd": "GigabitEthernet2", "interface-next-hop": [ {"ip-address": "10.0.0.1"} ] }]} ] } } headers = { 'Content-Type': 'application/yang-data+json', 'Accept': 'application/yang-data+json', } response = request("PATCH",url, auth=auth, headers=headers, json = payload, verify=False) print(response.status_code)
upvoted 1 times
...
nospampls
1 year, 4 months ago
PATCH CSR1000v#show run | in route ip route 3.3.3.3 255.255.255.255 GigabitEthernet2 10.0.0.1 19 tag 1337 name test multicast CSR1000v# *Jan 6 14:36:32.761: %DMI-5-AUTH_PASSED: R0/0: dmiauthd: User 'cisco' authenticated successfully from 192.168.246.1:0 and was authorized for rest over http. External groups: PRIV15 CSR1000v#show run | in route ip route 3.3.3.3 255.255.255.255 GigabitEthernet2 10.0.0.1 19 tag 1337 name test multicast
upvoted 1 times
...
nospampls
1 year, 4 months ago
PUT CSR1000v#show run | in route ip route 0.0.0.0 0.0.0.0 192.16.1.1 ip route 1.1.1.1 255.255.255.255 GigabitEthernet2 10.0.0.1 ip route 3.3.3.3 255.255.255.255 GigabitEthernet2 10.0.0.1 name test CSR1000v# *Jan 6 14:30:19.710: %SYS-5-CONFIG_P: Configured programmatically by process iosp_vty_100001_dmi_nesd from console as NETCONF on vty32131 *Jan 6 14:30:19.560: %DMI-5-AUTH_PASSED: R0/0: dmiauthd: User 'cisco' authenticated successfully from 192.168.246.1:0 and was authorized for rest over http. External groups: PRIV15 *Jan 6 14:30:19.711: %DMI-5-CONFIG_I: R0/0: nesd: Configured from NETCONF/RESTCONF by cisco, transaction-id 106 CSR1000v#show run | in route ip route 3.3.3.3 255.255.255.255 GigabitEthernet2 10.0.0.1
upvoted 1 times
...
cerifyme85
1 year, 3 months ago
did you try with POST?
upvoted 3 times
...
...
ExamNinja1
Most Recent 2 months, 2 weeks ago
Selected Answer: A
it's modifying an existing route by specifying the ip-route with a prefix, mask, and adding or updating the fwd-list with a next-hop (ip-address). This indicates that the script is designed to update an existing route rather than adding a new one
upvoted 1 times
...
EAG
5 months, 1 week ago
Selected Answer: A
For the 'PATCH' method, A and B would be the only feasible answers. However, since the Network Engineer changes the configuration daily (accordingly the question), this indicates that there is already a configuration. This eliminates B as the answer.
upvoted 1 times
...
working_on_hcip
7 months, 2 weeks ago
A and B are correct since PATCH is used to Update a resource and also creates a resource if it doesn´t existe reference book Network Programmability and automation fundamentals
upvoted 1 times
...
working_on_hcip
7 months, 2 weeks ago
POST: Creates a resource, if it´s already created a "409 coflict" is returned PUT: Creates a resource, if it´s already created then it´s replaced and "204 not content" is returned PATCH: Updates de resource, it can also be used to create a resource it the resource doesn´t exist
upvoted 1 times
...
macxsz
1 year, 10 months ago
Selected Answer: A
Updating. PATCH is being used
upvoted 3 times
...
Mo_El
1 year, 12 months ago
A looks correct; key word is "PATCH"
upvoted 2 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