DataImporter - Import CI Types

SHOW ALL CONTENT

Table of contents

Overview

Importing the CI type will help prepare your CMDB in a batch. 

Once the CI types are imported, it's possible to import the CIs associated with each type. 

 

References

Links to the articles related to the CI type imports and the XML file configuration. 

 

What you need to know:  

The reference template files (.xlsx and .xml) to prepare imports are included in the CI_EN.zip file.
 

Required Fields

  • DescriptionFR - Text (100)
    • Name of the CI type in French
  • DescriptionEN - Text (100)
    • Name of the CI type in English

Optional Fields

  • IsDocument - Boolean
    • Indicates if this CI type will contain a document tab
    • Accepted values are: 1 or 0, True or False, Yes or No
    • If this field is not completed, the default value is No
  • IsComputer - Boolean
    • Indicates if this CI type is a computer
    • Accepted values are: 1 or 0, True or False, Yes or No
    • If this field is not completed, the default value is No
  • TheoreticalLifeTime - Whole Number
    • Represents, in years the lifetime of the CI type
  • SuggestedReplacementValue - Whole Number
    • Indicates the suggested value for the replacement of the CI type.
  • ResponsibleGroup
    • Represents the group responsible for the maintenance and must be the name of a valid group
    • Example: System Administrators
  • Attributes
    • Represents the list of attributes to add to a CI type, each value separated by a comma ( , ) or a pipe ( | ).
    • Example: IP Address,Mac Address,Manufacturing Date
NOTE: This field is valid only for version 4.2.140 and before, from version 4.2.150 on this field will be retired and replaced by a separate import for attributes. See this article to find the new way of importing CI attributes
  • Categories
    • Represents a list of categories to be added to the CI type, each value separated by a comma ( , ) or a pipe ( | ).
    • Example: Tower,Desktop,Mini-PC,Tablet-PC
  • Icon
    • Represents the path to an image to be used for this specified CI type. Path should be local (not a URL).
    • Example: C:\Octopus\Icons\Workstation.png

Configuration File (XML)

The declaration of the source is done by indicating the CIType value in the <Content> tag. 
 

NOTE: The XML file used as this example is for an import done from Excel 2007 or 2010.

 


<?xml version="1.0" encoding="utf-8" ?>
<Sources>
     <Source Name="CITypeImport">

<ConnectionString>Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\Import\CI.xlsx;Extended Properties="Excel 12.0 Xml;HDR=YES";</ConnectionString>
<ViewName>[Import CIType$]</ViewName>
<Content>CIType</Content>

<!-- Additionnal tags -->
<AttributesSplitStrategy>ByPipe</AttributesSplitStrategy>
<EmptyValueHandling>NoChange</EmptyValueHandling>


     </Source>
</Sources>

Refer to the XML Configuration File article that explains how to program references to your data sources.

Information on Additional Tags

To import CI types, the XML file can contain additional tags. These tags are not mandatory and if it's not specified, the default values will be used. 

What you need to know:

The additional tags are case sensitive.

If the value is not written exactly the way it is documented, Octopus will ignore the tag and use to the default value. 

Data Separator Management

When importing choices for categories, a separator must indicate the delimitation of the data. 

The two choices are:

  • The pipe ( | ) 
  • The comma ( , )

To specify which separator to use in the file, the AttributesSplitStrategy tag must be added to the XML file

Values allowed for the AttributesSplitStrategy tag:

  • ByPipe (default value)
  • ByComma

To use this tag, add the following line in the XML file.


<AttributesSplitStrategy>VALUE</AttributesSplitStrategy>

If the tag is not specified in the XML file, the default value is applied.

Management of Empty Fields

DataImporter can help clean the data contained in Octopus when empty fields are encountered. If this tag is not present, the NoChange default value will be used. 

If you want to use this tag as part of an import, it is important that your data source only contains columns to act on.

DataImporter will systematically try to clean all these columns. You can clean all fields except:

  • Required fields
  • Fields that have been configured as mandatory in the Octopus database
  • Fields that accept only specific values, for example boolean type fields (yes/no)

Permitted values for the EmptyValueHandling tag:

  • Clear: The existing value in Octopus will be cleared and the field will be empty
  • NoChange (Default Value): Fields that are empty in the data source being imported will be ignored and the existing value in Octopus will be kept

To use this tag, add the following line to the XML file : 

<EmptyValueHandling>VALUE</EmptyValueHandling>
X
Help us improve our articles








Help us improve our articles