Mapping for the CSV format
The import task maps the comma-separated value (CSV) formatted file. You can export the CSV file from Microsoft Excel.
The CSV format supports importing the auxiliary interface data.
Mapping of GUI fields to CSV file columns
The following table shows the fields on the TrueSight Network Automation GUI and the corresponding columns in the CSV file.
Device field | Column label | Required (Y/N) | Comments |
---|---|---|---|
Name | name | Y | Required on all imports (new or update). Must be a unique name. Up to 100 characters in length. |
Hostname/IP Address 1 | address | Y | Required for new devices. |
Realm | realm | Y | Required for new devices if more than one realm is defined in the system. The value must be specified from one of the following:
|
External ID | externalId | N | A unique identifier for the device obtained from an external system; used to sync the Network Automation database with BMC CMDB. |
Device Type | deviceType | Y | Required for new devices if the snmpOid field is not present. Can be either a GUID or a name. You can find the legal GUIDs and names in the Device Adapter Capabilities report. To generate this report, see Viewing a Device Adapter Capabilities report. |
SNMP OID | snmpOid | N | Required for new devices if the deviceType field is not present. OID is used to look up the device type. If the device has both device type and snmpOid fields, and the two values are not consistent with each other as specified in the corresponding device adapter definition, the device is not imported. |
Category | category | Y | Required for new devices. The category can come from one of the following:
|
Remote Image File Server | imageFileServer | N | If remote file servers are defined, use this field to copy the image files to the remote file server associated with a device (instead of copying the files into the system's local database). |
Security Context | securityContextType | N | If the device represents a security context within a multi-context device, then this value specifies what sort of context. Legal values are admin, system, userDefined, and none. |
Security Context Name | securityContextName | N | Name of the security context when securityContextType is userDefined. |
Device Agent 1 | agent | N | If not specified, the default agent is used. |
Device Agent NIC1 | agentNIC | N | If not specified, the default NIC is used. Note: If you specify the name of the default NIC in XML, device import fails. If you leave the field empty, default NIC is used. |
Access Mode 1 | accessMode | N | Default = auto, Field options: auto, telnet, ssh2, http10, http11, https10 or https11 |
Port 1 | port | N | When you set accessMode to a mode other than auto, you can specify a TCP port number for connecting to the device. If you do not specify this column, Network Automation uses the default well-known port associated with the accessMode (22 for SSH, 23 for Telnet, 80 for HTTP, and 443 for HTTPS). |
File Transfer Mode 1 | transferMode | N | Default = auto, Field options: auto, tftp, ftp, scp, tunneled |
Device Security Profile 1 | deviceSecurityProfile | N | Default = auto, Supply the name of the DSP to be used as device credentials. |
NAT Address 1 | enaNatAddress | N | See Adding a device for a description of the NAT Address. |
Dynamic Field Label | dynamicField | N | In the example, Location is a dynamic field. |
Static Groups | groups | N |
In the example, Device Location and Contract PO Number are two groups with comma as the separator. |
Device Status Tab (Inventory) | inventory | N | The inventory text is displayed in the Device Details tab. |
Hostname/IP Address 2 | auxAddress | N | Required only if:
|
Access Mode 2 | auxAccessMode | N | Default = auto, Field options: auto, telnet, ssh2, http10, http11, https10 or https11 |
Port 2 | auxPort | N | When you set accessMode to a mode other than auto, you can specify a TCP port number for connecting to the device. If you do not specify this column, Network Automation uses the default well-known port associated with the accessMode (22 for SSH, 23 for Telnet, 80 for HTTP, and 443 for HTTPS). |
File Transfer Mode 2 | auxTransferMode | N | Default = auto, Field options: auto, tftp, ftp, scp, tunneled |
Device Security Profile 2 | auxDeviceSecurityProfile | N | Default = auto, Supply the name of the DSP to be used as device credentials. |
NAT Address 2 | auxNatAddress | N | See Adding a device for a description of the NAT Address. |
Device Agent 2 | auxAgent | N | If not specified, the default agent is used. |
Device Agent NIC 2 | auxAgentNIC | N | If not specified, the default NIC is used. Note: If you specify the name of the default NIC in XML, device import fails. If you leave the field empty, default NIC is used. |
- These attributes are for the primary interface.
- These attributes are for the auxiliary interface.
CSV formatting guidelines
Follow these guidelines when preparing a CSV file:
- The first row in the CSV file must contain the column field labels exactly as specified in the table.
- Field labels are case-sensitive.
- Ordering of fields is user defined.
- Device field data must follow the field label order on subsequent lines.
- Dynamic fields are identified by using the field label (for example, Location).
- Enclose multiple groups in double quotation marks.
- Specify any character except single quotes (') and double quotes (") to separate multiple groups.
Example CSV formatted file
Note
The column labels must use the letter case shown in the previous table (for example, name, externalId).
name, address, realm, deviceType, agent, Location, category, snmpOid, agentNIC, groups
ATL-cisco-1760, 10.1.2.45, Speeding Print Service, BE2B2D21-1CAA-53C3-05C3-CBB0A5D151B8, Local, Atlanta,1, 1.3.6.1.4.1.9.1.416, 10.1.64.4, "Device Location, Contract PO Number"
Comments
Log in or register to comment.