exam questions

Exam 300-535 All Questions

View all questions & answers for the 300-535 exam

Exam 300-535 topic 1 question 34 discussion

Actual exam question from Cisco's 300-535
Question #: 34
Topic #: 1
[All 300-535 Questions]

How does using the Python with statement in conjunction with ncclient manager improve an existing NETCONF automation script?

  • A. It allows the NETCONF connection to the device to be gracefully closed without having to explicitly code this action.
  • B. It manages the running configuration of the device by comparing it to the new configuration applied using NETCONF.
  • C. The with statement tries to connect to the device using TCP port 830 first but also tries to connect via TCP port 22.
  • D. Use of the with statement catches any exceptions when trying to connect to a device using NETCONF.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

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
all4Luv
Highly Voted 3 years, 1 month ago
The correct answer is: A https://www.geeksforgeeks.org/with-statement-in-python/
upvoted 8 times
SbudaGQ
3 years, 1 month ago
Agree. In normal file operations, with statement only handles exceptions that occur AFTER the file has been opened. so it follows that even with NETCONF, with statement will handle exceptions AFTER the connection has been established.
upvoted 1 times
...
[Removed]
1 year, 4 months ago
Agreed with you. Just check what is context manager in python.
upvoted 1 times
...
...
working_on_hcip
Most Recent 7 months, 3 weeks ago
Selected Answer: A
A: Correct answer
upvoted 1 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 ...