Security

Reply
Occasional Contributor II

Import NAD's via XML

Hi all,

 

I've been trying to add (a lot of) new switches into the CPPM. Whatever I try to do, I keep receiving:

 

File contains invalid XML tags. Try export to see the valid XML tags.

I've found the how to and other topics here, but a proper functioning example does not seem to exist. I've exported some NAD's from CPPM and changed the values which resulted in errors, I simplified the xml as much as I could, but no luck neither.

 

Has somebody done this successfully and willing to share his xml file, or correct mine?

 

The simplified version:

<xml version="1.0" encoding="UTF-8" standalone="true">
<TipsContents xmlns="http://www.avendasys.com/tipsapiDefs/1.0">
<NadClients>
<NadClient ipAddress="10.10.10.10" tacacsSecret="thisisaverystrongpassword:)" vendorName="Cisco" coaCapable="true" radsecEnabled="false" coaPort="3799" name="Switchname" description="Location">
</NadClient>
</NadClients>
</TipsContents>

The adapted export:

<?xml version="1.0" encoding="UTF-8" standalone="true"?>
<TipsContents xmlns="http://www.avendasys.com/tipsapiDefs/1.0">
<TipsHeader version="6.8" exportTime="Thu Nov 21 10:54:43 CET 2019"/>
<NadClients>
<NadClient ipAddress="10.10.10.11" radiusSecret="" tacacsSecret="thisisaverystrongpassword:)" vendorName="Cisco" coaCapable="true" radsecEnabled="false" coaPort="3799" name="Switchname" description="Location">
<SnmpConfig readArpInfo="false" onConnectEnforcement="false" zone="default" onConnectPorts="">
<SnmpRead snmpVersion="V2C" communityString="Public"/>
</SnmpConfig>
<NadClientTags tagValue="160" tagName="Data_Vlan"/>
<NadClientTags tagValue="161" tagName="Restricted_Vlan"/>
<NadClientTags tagValue="162" tagName="Mgmt_Vlan"/>
<NadClientTags tagValue="163" tagName="Infra_Srv_Vlan"/>
<NadClientTags tagValue="164" tagName="Infra_Camera_Vlan"/>
<NadClientTags tagValue="165" tagName="Infra_IoT_Vlan"/>
</NadClient>
<NadClient ipAddress="10.10.10.12" radiusSecret="" tacacsSecret="thisisaverystrongpassword:)" vendorName="Cisco" coaCapable="true" radsecEnabled="false" coaPort="3799" name="Switchname" description="Location">
<SnmpConfig readArpInfo="false" onConnectEnforcement="false" zone="default" onConnectPorts="">
<SnmpRead snmpVersion="V2C" communityString="Public"/>
</SnmpConfig>
<NadClientTags tagValue="160" tagName="Data_Vlan"/>
<NadClientTags tagValue="161" tagName="Restricted_Vlan"/>
<NadClientTags tagValue="162" tagName="Mgmt_Vlan"/>
<NadClientTags tagValue="163" tagName="Infra_Srv_Vlan"/>
<NadClientTags tagValue="164" tagName="Infra_Camera_Vlan"/>
<NadClientTags tagValue="165" tagName="Infra_IoT_Vlan"/>
</NadClient>
</NadClients>
<TagDictionaries>
<TagDictionary entityName="Device" attributeName="Data_Vlan" dataType="String" mandatory="false" allowMultiple="true"/>
<TagDictionary entityName="Device" attributeName="Restricted_Vlan" dataType="String" mandatory="false" allowMultiple="true"/>
<TagDictionary entityName="Device" attributeName="Mgmt_Vlan" dataType="String" mandatory="false" allowMultiple="true"/>
<TagDictionary entityName="Device" attributeName="Infra_Srv_Vlan" dataType="String" mandatory="false" allowMultiple="true"/>
<TagDictionary entityName="Device" attributeName="Infra_Camera_Vlan" dataType="String" mandatory="false" allowMultiple="true"/>
<TagDictionary entityName="Device" attributeName="Infra_IoT_Vlan" dataType="String" mandatory="false" allowMultiple="true"/>
</TagDictionaries>
</TipsContents>

Thanks

 

 

Occasional Contributor II

Re: Import NAD's via XML

Found the issue!

 

<?xml version="1.0" encoding="UTF-8" standalone="true"?>

This is found in the export  and won't work if you want to import.

Whenever importing your xml use:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

Also, my "verysecretpassword" contained an "&" which caused some issues. So instead of "&" we had to use "&amp;"

 

Conclussion: a working example looks like this:

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TipsContents xmlns="http://www.avendasys.com/tipsapiDefs/1.0">
<TipsHeader version="6.8" exportTime="Wed Nov 27 10:07:44 CET 2019"/>

<NadClients>
<NadClient ipAddress="10.233.43.200" radiusSecret="verysecretpassword" tacacsSecret="" vendorName="Cisco" coaCapable="true" radsecEnabled="false" coaPort="3799" name="TEST" description="MOR"> <SnmpConfig readArpInfo="false" onConnectEnforcement="false" zone="default" onConnectPorts=""> <SnmpRead snmpVersion="V2C" communityString="Public"/> </SnmpConfig> <NadClientTags tagValue="160" tagName="Data_Vlan"/> <NadClientTags tagValue="160" tagName="Restricted_Vlan"/> </NadClient> <NadClient ipAddress="10.233.43.201" radiusSecret="verysecretpassword" tacacsSecret="" vendorName="Cisco" coaCapable="true" radsecEnabled="false" coaPort="3799" name="TEST2" description="MOR"> <SnmpConfig readArpInfo="false" onConnectEnforcement="false" zone="default" onConnectPorts=""> <SnmpRead snmpVersion="V2C" communityString="Public"/> </SnmpConfig> <NadClientTags tagValue="160" tagName="Data_Vlan"/> <NadClientTags tagValue="160" tagName="Restricted_Vlan"/> </NadClient>
</NadClients> <TagDictionaries> <TagDictionary entityName="Device" attributeName="Data_Vlan" dataType="String" mandatory="false" allowMultiple="true"/> <TagDictionary entityName="Device" attributeName="Restricted_Vlan" dataType="String" mandatory="false" allowMultiple="true"/> </TagDictionaries> </TipsContents>
Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: