QuestionQ54
Device-Level Network AutomationRefer to the exhibit.

Complete the ncclient request that captures operational interface data from a Cisco IOS XE device. Options may be used once, more than once, or not at all.
Drag & Drop
from ncclient import manager import xml.dom.minidom USERNAME = 'cisco' PASSWORD = 'cisco' HOST = '10.10.20.181' data = ''' < xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> <> <statistics></statistics> </> </> ''' with manager.connect(host=HOST, password=PASSWORD, port=830, username=USERNAME, hostkey_verify=False, device_params={'name':'iosxe'}) as m: c = m.get(filter=('', data)).data_xml xml = xml.dom.minidom.parseString(c) xml_pretty_str = xml.toprettyxml() print(xml_pretty_str)
Community Discussion