DevNet Associate DEVASC 200-901 Official Certification Guide by Adrian Iliesiu (z-lib.org)

(andrew) #1

Example 12-13 Output of the Python Script from
Example 12-12


Click here to view code image


***NETCONF Capabilities for device
10.10.10.10***
urn:ietf:params:netconf:base:1.0
urn:ietf:params:netconf:base:1.1
urn:ietf:params:netconf:capability:writable-
running:1.0
urn:ietf:params:netconf:capability:rollback-on-
error:1.0
urn:ietf:params:netconf:capability:candidate:1.0
urn:ietf:params:netconf:capability:validate:1.1
urn:ietf:params:netconf:capability:confirmed-
commit:1.1
http://cisco.com/ns/yang/cisco-nx-os-device?
revision=2019-02-17&module=Cisco-NX-OS-
device&deviations=Cisco-NX-OS-device-deviations

At this writing, Cisco NX-OS by default implements the
base NETCONF capabilities for version 1.0 and 1.1 as
well as the YANG models for writable running
configuration, rollback-on-error, candidate data store,
and others. Additional YANG models are supported and
can be installed manually.


In order to perform changes on the NETCONF server,
the edit_config method available with the manager
module can be used. In Example 12-14, a new loopback
interface is created, the administrative state is switched
to up, and an IP address is configured on the newly
created interface.


Example 12-14 Python Script to Create a New
Loopback Interface


Click here to view code image


#!/usr/bin/env python
""" Add a loopback interface to a device with
NETCONF """
Free download pdf