This article talks about the following.
1:Exporting a sample XML file of Static Host list.
2: Use this sample file to create a new XML file from a CSV file.
3: Import this file to CPPM and add endpoints.
Environment: This Article is written for CPPM 6.2.0 and greater.
Navigate to Configuration -> Identity ->Static Host list and add a test host MAC address.
Once saved, Export the same in XML format.
This little exercise will give us an idea about the sample XML code which can be used by us.
Open this file in any text editor. We may prefer to use Notepad++ which can be downloaded from "http://notepad-plus-plus.org/"
Below is the sample XML file.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TipsContents xmlns="http://www.avendasys.com/tipsapiDefs/1.0">
<TipsHeader exportTime="Fri Nov 08 00:27:39 IST 2013" version="6.2"/>
<StaticHostLists>
<StaticHostList description="" name="Test MAC" memberType="MACAddress" memberFormat="list" members="aa:bb:cc:dd:ee:ff"/>
</StaticHostLists>
</TipsContents>
The string in bold contains the following information
<StaticHostList description=""
- This contains the description of the host. ( we can leave this blank or input the required description.
name="Test MAC"
- This is the Name of the Host.
memberType="MACAddress"
- This specifies the input type, it may be IP or MAC. We would use MAC in this example.
members="aa:bb:cc:dd:ee:ff"
- This specifies the MAC of the host.
We can create a new XML file by simple adding multiple instances of the highlighted line with a different MAC address as shown below.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TipsContents xmlns="http://www.avendasys.com/tipsapiDefs/1.0">
<TipsHeader exportTime="Fri Nov 08 00:48:20 IST 2013" version="6.2"/>
<StaticHostLists>
<StaticHostList description="" name="test" memberType="MACAddress" memberFormat="list" members="aa:bb:cc:dd:ee:f0, aa:bb:cc:dd:ee:f1, aa:bb:cc:dd:ee:f2,aa:bb:cc:dd:ee:f3,aa:bb:cc:dd:ee:f4"/>
</StaticHostLists>
</TipsContents>
We can then import the file to CPPM as shown below.
Once the Import is done, we would be able to see the values on CPPM.