Open ktbyers opened 3 years ago
I retrieve the config using:
cfg = connection.get_config() cfg = cfg["running"]
And the cfg looks as follows:
cfg
<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> <aaa xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-lib-cfg"> <usernames xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-locald-cfg"> <username> <ordering-index>0</ordering-index> <name>admin</name> <usergroup-under-usernames> <usergroup-under-username> <name>root-lr</name> </usergroup-under-username> <usergroup-under-username> <name>cisco-support</name> </usergroup-under-username> </usergroup-under-usernames> <secret> <type>type5</type> <secret5>$1$sOIq$M6ZvZBlxdY1B47PMeHyVi/</secret5> </secret> </username> <username> <ordering-index>1</ordering-index> <name>pyclass</name> <usergroup-under-usernames> <usergroup-under-username> <name>root-lr</name> </usergroup-under-username> </usergroup-under-usernames> <secret> <type>type5</type> <secret5>$1$qaMu$ulZN/jY.KPBp2A9L/m24r.</secret5> </secret> </username> </usernames> </aaa> <ntp xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ip-ntp-cfg"> <peer-vrfs> <peer-vrf> <vrf-name>default</vrf-name> <peer-ipv4s> <peer-ipv4> <address-ipv4>130.126.24.24</address-ipv4> <peer-type-ipv4> <peer-type>server</peer-type> </peer-type-ipv4> </peer-ipv4> <peer-ipv4> <address-ipv4>152.2.21.1</address-ipv4> <peer-type-ipv4> <peer-type>server</peer-type> </peer-type-ipv4> </peer-ipv4> </peer-ipv4s> </peer-vrf> </peer-vrfs> </ntp> <call-home xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-call-home-cfg"> <active/> <contact-smart-licensing>true</contact-smart-licensing> <profiles> <profile> <profile-name>CiscoTAC-1</profile-name> <active/> <methods> <method> <method>email</method> <enable>false</enable> </method> <method> <method>http</method> <enable>true</enable> </method> </methods> </profile> </profiles> </call-home> <interface-configurations xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg"> <interface-configuration> <active>act</active> <interface-name>MgmtEth0/RP0/CPU0/0</interface-name> <ipv4-network xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-io-cfg"> <addresses> <dhcp/> </addresses> </ipv4-network> </interface-configuration> </interface-configurations> <syslog xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-infra-syslog-cfg"> <buffered-logging> <buffer-size>4000010</buffer-size> <logging-level>notice</logging-level> </buffered-logging> </syslog> <bgp xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-bgp-cfg"> <instance> <instance-name>default</instance-name> <instance-as> <as>0</as> <four-byte-as> <as>65044</as> <bgp-running/> <default-vrf> <global> <router-id>10.0.2.15</router-id> <global-afs> <global-af> <af-name>ipv4-unicast</af-name> <enable/> </global-af> </global-afs> </global> <bgp-entity> <neighbors> <neighbor> <neighbor-address>10.0.2.99</neighbor-address> </neighbor> </neighbors> </bgp-entity> </default-vrf> </four-byte-as> </instance-as> </instance> </bgp> <ssh xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-ssh-cfg"> <server> <enable> <cipher> <aes-cbc>true</aes-cbc> </cipher> </enable> <server-algo> <key-exchanges> <key-exchange>diffie-hellman-group1-sha1</key-exchange> </key-exchanges> </server-algo> <v2/> <netconf-vrf-table> <vrf> <vrf-name>default</vrf-name> <enable/> </vrf> </netconf-vrf-table> </server> </ssh> <router-static xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ip-static-cfg"> <default-vrf> <address-family> <vrfipv4> <vrf-unicast> <vrf-prefixes> <vrf-prefix> <prefix>0.0.0.0</prefix> <prefix-length>0</prefix-length> <vrf-route> <vrf-next-hop-table> <vrf-next-hop-next-hop-address> <next-hop-address>10.0.2.2</next-hop-address> </vrf-next-hop-next-hop-address> </vrf-next-hop-table> </vrf-route> </vrf-prefix> </vrf-prefixes> </vrf-unicast> </vrfipv4> </address-family> </default-vrf> </router-static> <netconf-yang xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-man-netconf-cfg"> <agent> <ssh> <enable/> </ssh> </agent> </netconf-yang> <xr-xml xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-man-xml-ttyagent-cfg"> <agent> <tty> <enable/> <iteration-size>0</iteration-size> </tty> </agent> </xr-xml> <netconf xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-man-xml-ttyagent-cfg"> <agent> <tty> <enable/> </tty> </agent> </netconf> <routing-policy xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-policy-repository-cfg"> <route-policies> <route-policy> <route-policy-name>ALLOW</route-policy-name> <rpl-route-policy>route-policy ALLOW pass end-policy </rpl-route-policy> </route-policy> </route-policies> </routing-policy> <host-names xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-shellutil-cfg"> <host-name>iosxr3</host-name> </host-names> <aaa xmlns="http://tail-f.com/ns/aaa/1.1"> <authentication> <users> <user> <name>pyclass</name> <uid>9000</uid> <gid>100</gid> <password>$6$M4mLGKTg6MtoHH97$9LxOmfD7JKhO6EGtOpLT.JfbA7fJDne5WImykzbfbll5vdhJ4y8BGLWA.IroHserwQCIccHS7WrjaGFW7cz37/</password> <ssh_keydir>/var/confd/homes/pyclass/.ssh</ssh_keydir> <homedir>/var/confd/homes/pyclass</homedir> </user> </users> <groups> <group> <name>root-system</name> <gid>100</gid> <users>pyclass</users> </group> </groups> </authentication> <authorization> <cmdrules> <cmdrule> <index>1</index> <context>*</context> <command>*</command> <group>root-system</group> <ops>rx</ops> <action>accept</action> </cmdrule> </cmdrules> <datarules> <datarule> <index>1</index> <namespace>*</namespace> <context>*</context> <keypath>*</keypath> <group>root-system</group> <ops>rwx</ops> <action>accept</action> </datarule> </datarules> </authorization> <admin-accounting xmlns="http://www.cisco.com/ns/yang/Cisco-IOS-XR-sysadmin-aaa-command-accounting"> <enable>false</enable> </admin-accounting> </aaa> <SNMP-COMMUNITY-MIB xmlns="http://tail-f.com/ns/mibs/SNMP-COMMUNITY-MIB/200308060000Z"> <snmpCommunityTable> <snmpCommunityEntry> <snmpCommunityIndex>public</snmpCommunityIndex> <snmpCommunityName>public</snmpCommunityName> <snmpCommunitySecurityName>public</snmpCommunitySecurityName> <snmpCommunityContextEngineID>80:00:61:81:05:01</snmpCommunityContextEngineID> <snmpCommunityContextName/> <snmpCommunityTransportTag/> <snmpCommunityStorageType>permanent</snmpCommunityStorageType> </snmpCommunityEntry> </snmpCommunityTable> </SNMP-COMMUNITY-MIB> <SNMP-NOTIFICATION-MIB xmlns="http://tail-f.com/ns/mibs/SNMP-NOTIFICATION-MIB/200210140000Z"> <snmpNotifyTable> <snmpNotifyEntry> <snmpNotifyName>std_v1_trap</snmpNotifyName> <snmpNotifyTag>std_v1_trap</snmpNotifyTag> <snmpNotifyType>trap</snmpNotifyType> <snmpNotifyStorageType>nonVolatile</snmpNotifyStorageType> </snmpNotifyEntry> <snmpNotifyEntry> <snmpNotifyName>std_v2_inform</snmpNotifyName> <snmpNotifyTag>std_v2_inform</snmpNotifyTag> <snmpNotifyType>inform</snmpNotifyType> <snmpNotifyStorageType>nonVolatile</snmpNotifyStorageType> </snmpNotifyEntry> <snmpNotifyEntry> <snmpNotifyName>std_v2_trap</snmpNotifyName> <snmpNotifyTag>std_v2_trap</snmpNotifyTag> <snmpNotifyType>trap</snmpNotifyType> <snmpNotifyStorageType>nonVolatile</snmpNotifyStorageType> </snmpNotifyEntry> <snmpNotifyEntry> <snmpNotifyName>std_v3_inform</snmpNotifyName> <snmpNotifyTag>std_v3_inform</snmpNotifyTag> <snmpNotifyType>inform</snmpNotifyType> <snmpNotifyStorageType>nonVolatile</snmpNotifyStorageType> </snmpNotifyEntry> <snmpNotifyEntry> <snmpNotifyName>std_v3_trap</snmpNotifyName> <snmpNotifyTag>std_v3_trap</snmpNotifyTag> <snmpNotifyType>trap</snmpNotifyType> <snmpNotifyStorageType>nonVolatile</snmpNotifyStorageType> </snmpNotifyEntry> </snmpNotifyTable> </SNMP-NOTIFICATION-MIB> <SNMP-TARGET-MIB xmlns="http://tail-f.com/ns/mibs/SNMP-TARGET-MIB/200210140000Z"> <snmpTargetAddrTable> <snmpTargetAddrEntry> <snmpTargetAddrName>127.0.0.1 v1</snmpTargetAddrName> <snmpTargetAddrTDomain>1.3.6.1.6.1.1</snmpTargetAddrTDomain> <snmpTargetAddrTAddress>127.0.0.1.19.136</snmpTargetAddrTAddress> <snmpTargetAddrTimeout>1500</snmpTargetAddrTimeout> <snmpTargetAddrRetryCount>3</snmpTargetAddrRetryCount> <snmpTargetAddrTagList>std_v1_trap std_trap std_v1_inform std_inform</snmpTargetAddrTagList> <snmpTargetAddrParams>target_v1</snmpTargetAddrParams> <snmpTargetAddrStorageType>nonVolatile</snmpTargetAddrStorageType> <snmpTargetAddrEngineID/> <snmpTargetAddrTMask/> <snmpTargetAddrMMS>2048</snmpTargetAddrMMS> <enabled>true</enabled> </snmpTargetAddrEntry> <snmpTargetAddrEntry> <snmpTargetAddrName>127.0.0.1 v2</snmpTargetAddrName> <snmpTargetAddrTDomain>1.3.6.1.6.1.1</snmpTargetAddrTDomain> <snmpTargetAddrTAddress>127.0.0.1.23.112</snmpTargetAddrTAddress> <snmpTargetAddrTimeout>1500</snmpTargetAddrTimeout> <snmpTargetAddrRetryCount>3</snmpTargetAddrRetryCount> <snmpTargetAddrTagList>std_v2_trap std_trap std_v2_inform std_inform</snmpTargetAddrTagList> <snmpTargetAddrParams>target_v2</snmpTargetAddrParams> <snmpTargetAddrStorageType>nonVolatile</snmpTargetAddrStorageType> <snmpTargetAddrEngineID/> <snmpTargetAddrTMask/> <snmpTargetAddrMMS>2048</snmpTargetAddrMMS> <enabled>true</enabled> </snmpTargetAddrEntry> <snmpTargetAddrEntry> <snmpTargetAddrName>127.0.0.1 v3</snmpTargetAddrName> <snmpTargetAddrTDomain>1.3.6.1.6.1.1</snmpTargetAddrTDomain> <snmpTargetAddrTAddress>127.0.0.1.27.88</snmpTargetAddrTAddress> <snmpTargetAddrTimeout>1500</snmpTargetAddrTimeout> <snmpTargetAddrRetryCount>3</snmpTargetAddrRetryCount> <snmpTargetAddrTagList>std_v3_trap std_trap</snmpTargetAddrTagList> <snmpTargetAddrParams>trap_target_v3</snmpTargetAddrParams> <snmpTargetAddrStorageType>nonVolatile</snmpTargetAddrStorageType> <snmpTargetAddrEngineID/> <snmpTargetAddrTMask/> <snmpTargetAddrMMS>2048</snmpTargetAddrMMS> <enabled>true</enabled> </snmpTargetAddrEntry> <snmpTargetAddrEntry> <snmpTargetAddrName>127.0.0.1 v3.inform</snmpTargetAddrName> <snmpTargetAddrTDomain>1.3.6.1.6.1.1</snmpTargetAddrTDomain> <snmpTargetAddrTAddress>127.0.0.1.27.88</snmpTargetAddrTAddress> <snmpTargetAddrTimeout>1500</snmpTargetAddrTimeout> <snmpTargetAddrRetryCount>3</snmpTargetAddrRetryCount> <snmpTargetAddrTagList>std_v3_inform std_inform</snmpTargetAddrTagList> <snmpTargetAddrParams>inform_target_v3</snmpTargetAddrParams> <snmpTargetAddrStorageType>nonVolatile</snmpTargetAddrStorageType> <snmpTargetAddrEngineID>80:00:1f:88:04:74:65:73:74:69:6e:67</snmpTargetAddrEngineID> <snmpTargetAddrTMask/> <snmpTargetAddrMMS>2048</snmpTargetAddrMMS> <enabled>true</enabled> </snmpTargetAddrEntry> </snmpTargetAddrTable> <snmpTargetParamsTable> <snmpTargetParamsEntry> <snmpTargetParamsName>inform_target_v3</snmpTargetParamsName> <snmpTargetParamsMPModel>3</snmpTargetParamsMPModel> <snmpTargetParamsSecurityModel>3</snmpTargetParamsSecurityModel> <snmpTargetParamsSecurityName>remote</snmpTargetParamsSecurityName> <snmpTargetParamsSecurityLevel>noAuthNoPriv</snmpTargetParamsSecurityLevel> <snmpTargetParamsStorageType>nonVolatile</snmpTargetParamsStorageType> </snmpTargetParamsEntry> <snmpTargetParamsEntry> <snmpTargetParamsName>target_v1</snmpTargetParamsName> <snmpTargetParamsMPModel>0</snmpTargetParamsMPModel> <snmpTargetParamsSecurityModel>1</snmpTargetParamsSecurityModel> <snmpTargetParamsSecurityName>public</snmpTargetParamsSecurityName> <snmpTargetParamsSecurityLevel>noAuthNoPriv</snmpTargetParamsSecurityLevel> <snmpTargetParamsStorageType>nonVolatile</snmpTargetParamsStorageType> </snmpTargetParamsEntry> <snmpTargetParamsEntry> <snmpTargetParamsName>target_v2</snmpTargetParamsName> <snmpTargetParamsMPModel>1</snmpTargetParamsMPModel> <snmpTargetParamsSecurityModel>2</snmpTargetParamsSecurityModel> <snmpTargetParamsSecurityName>public</snmpTargetParamsSecurityName> <snmpTargetParamsSecurityLevel>noAuthNoPriv</snmpTargetParamsSecurityLevel> <snmpTargetParamsStorageType>nonVolatile</snmpTargetParamsStorageType> </snmpTargetParamsEntry> <snmpTargetParamsEntry> <snmpTargetParamsName>trap_target_v3</snmpTargetParamsName> <snmpTargetParamsMPModel>3</snmpTargetParamsMPModel> <snmpTargetParamsSecurityModel>3</snmpTargetParamsSecurityModel> <snmpTargetParamsSecurityName>public</snmpTargetParamsSecurityName> <snmpTargetParamsSecurityLevel>noAuthNoPriv</snmpTargetParamsSecurityLevel> <snmpTargetParamsStorageType>nonVolatile</snmpTargetParamsStorageType> </snmpTargetParamsEntry> </snmpTargetParamsTable> </SNMP-TARGET-MIB> <SNMP-USER-BASED-SM-MIB xmlns="http://tail-f.com/ns/mibs/SNMP-USER-BASED-SM-MIB/200210160000Z"> <usmUserTable> <usmUserEntry> <usmUserEngineID>80:00:61:81:05:01</usmUserEngineID> <usmUserName>initial</usmUserName> <usmUserSecurityName>initial</usmUserSecurityName> <usmUserAuthProtocol>1.3.6.1.6.3.10.1.1.1</usmUserAuthProtocol> <usmUserPrivProtocol>1.3.6.1.6.3.10.1.2.1</usmUserPrivProtocol> <usmUserStorageType>nonVolatile</usmUserStorageType> </usmUserEntry> <usmUserEntry> <usmUserEngineID>80:00:61:81:05:01</usmUserEngineID> <usmUserName>initial_auth</usmUserName> <usmUserSecurityName>initial_auth</usmUserSecurityName> <usmUserAuthProtocol>1.3.6.1.6.3.10.1.1.2</usmUserAuthProtocol> <usmUserPrivProtocol>1.3.6.1.6.3.10.1.2.1</usmUserPrivProtocol> <usmUserStorageType>nonVolatile</usmUserStorageType> <usmUserAuthKey>10:2c:bd:65:e3:eb:e2:16:0d:63:db:23:73:f3:17:b2</usmUserAuthKey> </usmUserEntry> <usmUserEntry> <usmUserEngineID>80:00:61:81:05:01</usmUserEngineID> <usmUserName>initial_authPriv</usmUserName> <usmUserSecurityName>initial_authPriv</usmUserSecurityName> <usmUserAuthProtocol>1.3.6.1.6.3.10.1.1.2</usmUserAuthProtocol> <usmUserPrivProtocol>1.3.6.1.6.3.10.1.2.2</usmUserPrivProtocol> <usmUserStorageType>nonVolatile</usmUserStorageType> <usmUserAuthKey>10:2c:bd:65:e3:eb:e2:16:0d:63:db:23:73:f3:17:b2</usmUserAuthKey> <usmUserPrivKey>10:2c:bd:65:e3:eb:e2:16:0d:63:db:23:73:f3:17:b2</usmUserPrivKey> </usmUserEntry> </usmUserTable> </SNMP-USER-BASED-SM-MIB> <SNMP-VIEW-BASED-ACM-MIB xmlns="http://tail-f.com/ns/mibs/SNMP-VIEW-BASED-ACM-MIB/200210160000Z"> <vacmSecurityToGroupTable> <vacmSecurityToGroupEntry> <vacmSecurityModel>1</vacmSecurityModel> <vacmSecurityName>public</vacmSecurityName> <vacmGroupName>all-rights</vacmGroupName> <vacmSecurityToGroupStorageType>nonVolatile</vacmSecurityToGroupStorageType> </vacmSecurityToGroupEntry> <vacmSecurityToGroupEntry> <vacmSecurityModel>2</vacmSecurityModel> <vacmSecurityName>public</vacmSecurityName> <vacmGroupName>all-rights</vacmGroupName> <vacmSecurityToGroupStorageType>nonVolatile</vacmSecurityToGroupStorageType> </vacmSecurityToGroupEntry> <vacmSecurityToGroupEntry> <vacmSecurityModel>3</vacmSecurityModel> <vacmSecurityName>initial</vacmSecurityName> <vacmGroupName>initial</vacmGroupName> <vacmSecurityToGroupStorageType>nonVolatile</vacmSecurityToGroupStorageType> </vacmSecurityToGroupEntry> <vacmSecurityToGroupEntry> <vacmSecurityModel>3</vacmSecurityModel> <vacmSecurityName>initial_auth</vacmSecurityName> <vacmGroupName>initial</vacmGroupName> <vacmSecurityToGroupStorageType>nonVolatile</vacmSecurityToGroupStorageType> </vacmSecurityToGroupEntry> <vacmSecurityToGroupEntry> <vacmSecurityModel>3</vacmSecurityModel> <vacmSecurityName>initial_authPriv</vacmSecurityName> <vacmGroupName>initial</vacmGroupName> <vacmSecurityToGroupStorageType>nonVolatile</vacmSecurityToGroupStorageType> </vacmSecurityToGroupEntry> </vacmSecurityToGroupTable> <vacmAccessTable> <vacmAccessEntry> <vacmGroupName>initial</vacmGroupName> <vacmAccessContextPrefix/> <vacmAccessSecurityModel>3</vacmAccessSecurityModel> <vacmAccessSecurityLevel>noAuthNoPriv</vacmAccessSecurityLevel> <vacmAccessContextMatch>exact</vacmAccessContextMatch> <vacmAccessReadViewName>internet</vacmAccessReadViewName> <vacmAccessWriteViewName>internet</vacmAccessWriteViewName> <vacmAccessNotifyViewName>internet</vacmAccessNotifyViewName> <vacmAccessStorageType>nonVolatile</vacmAccessStorageType> </vacmAccessEntry> <vacmAccessEntry> <vacmGroupName>initial</vacmGroupName> <vacmAccessContextPrefix/> <vacmAccessSecurityModel>3</vacmAccessSecurityModel> <vacmAccessSecurityLevel>authNoPriv</vacmAccessSecurityLevel> <vacmAccessContextMatch>exact</vacmAccessContextMatch> <vacmAccessReadViewName>internet</vacmAccessReadViewName> <vacmAccessWriteViewName>internet</vacmAccessWriteViewName> <vacmAccessNotifyViewName>internet</vacmAccessNotifyViewName> <vacmAccessStorageType>nonVolatile</vacmAccessStorageType> </vacmAccessEntry> <vacmAccessEntry> <vacmGroupName>initial</vacmGroupName> <vacmAccessContextPrefix/> <vacmAccessSecurityModel>3</vacmAccessSecurityModel> <vacmAccessSecurityLevel>authPriv</vacmAccessSecurityLevel> <vacmAccessContextMatch>exact</vacmAccessContextMatch> <vacmAccessReadViewName>internet</vacmAccessReadViewName> <vacmAccessWriteViewName>internet</vacmAccessWriteViewName> <vacmAccessNotifyViewName>internet</vacmAccessNotifyViewName> <vacmAccessStorageType>nonVolatile</vacmAccessStorageType> </vacmAccessEntry> <vacmAccessEntry> <vacmGroupName>all-rights</vacmGroupName> <vacmAccessContextPrefix/> <vacmAccessSecurityModel>0</vacmAccessSecurityModel> <vacmAccessSecurityLevel>noAuthNoPriv</vacmAccessSecurityLevel> <vacmAccessContextMatch>exact</vacmAccessContextMatch> <vacmAccessReadViewName>internet</vacmAccessReadViewName> <vacmAccessWriteViewName>internet</vacmAccessWriteViewName> <vacmAccessNotifyViewName>internet</vacmAccessNotifyViewName> <vacmAccessStorageType>nonVolatile</vacmAccessStorageType> </vacmAccessEntry> </vacmAccessTable> <vacmViewTreeFamilyTable> <vacmViewTreeFamilyEntry> <vacmViewTreeFamilyViewName>internet</vacmViewTreeFamilyViewName> <vacmViewTreeFamilySubtree>1.3.6.1</vacmViewTreeFamilySubtree> <vacmViewTreeFamilyMask/> <vacmViewTreeFamilyType>included</vacmViewTreeFamilyType> <vacmViewTreeFamilyStorageType>nonVolatile</vacmViewTreeFamilyStorageType> </vacmViewTreeFamilyEntry> </vacmViewTreeFamilyTable> </SNMP-VIEW-BASED-ACM-MIB> <SNMPv2-MIB xmlns="http://tail-f.com/ns/mibs/SNMPv2-MIB/200210160000Z"> <system> <sysContact/> <sysName/> <sysLocation/> </system> <snmp> <snmpEnableAuthenTraps>disabled</snmpEnableAuthenTraps> </snmp> </SNMPv2-MIB> <fpd xmlns="http://www.cisco.com/ns/yang/Cisco-IOS-XR-sysadmin-fpd-infra-cli-fpd"> <config> <auto-upgrade>disable</auto-upgrade> </config> </fpd> <sdr-config xmlns="http://www.cisco.com/ns/yang/Cisco-IOS-XR-sysadmin-sdr-mgr"> <sdr> <name>default-sdr</name> <resources> <card-type> <type>RP</type> <vm-memory>2</vm-memory> <vm-cpu>1</vm-cpu> </card-type> <card-type> <type>LC</type> <vm-memory>1</vm-memory> <vm-cpu>1</vm-cpu> </card-type> </resources> <location> <node-location>all</node-location> </location> </sdr> </sdr-config> <private-sdr xmlns="http://www.cisco.com/ns/yang/Cisco-IOS-XR-sysadmin-sdr-mgr"> <sdr-name> <name>default-sdr</name> <id>2</id> <lead_rack0>0</lead_rack0> <lead_rack1>0</lead_rack1> <pairing> <num>0</num> <second_exist>false</second_exist> <rp1_rack>0</rp1_rack> <rp1_slot>0</rp1_slot> </pairing> </sdr-name> </private-sdr> <service xmlns="http://www.cisco.com/ns/yang/Cisco-IOS-XR-sysadmin-services"> <cli> <interactive> <enabled>true</enabled> </interactive> </cli> </service> <vm xmlns="http://www.cisco.com/ns/yang/Cisco-IOS-XR-sysadmin-vm"> <config> <memory> <admin>1</admin> <rp>5</rp> <lc>7</lc> </memory> <cpu> <assign>0-1/2-3</assign> </cpu> </config> </vm> </data>
Trying to load this configuration yielded the following:
connection.load_replace_candidate(config=cfg)
*** napalm.base.exceptions.ReplaceConfigException: {'info': '<?xml version="1.0" encoding="UTF-8"?><error-info ' 'xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" ' 'xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">\n' ' <bad-element>config</bad-element>\n' ' </error-info>\n' ' ', 'message': None, 'path': None, 'severity': 'error', 'tag': 'unknown-element', 'type': 'protocol'}
Adding @neelimapp
I retrieve the config using:
And the
cfg
looks as follows:Trying to load this configuration yielded the following: