DataImporter - Import CI Types

Table of contents

Overview

Importing the CI type will help fill you CMDB with types that are not already there.
Once the CI types are imported, it's possible to import the CI associated to each type. 
In the next section you will find links to articles related to CI imports and files with templates that can be used for it.



References

 

What you need to know :  

The reference template files (.xlsx et .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 coma ( , ) 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. See this article to find the new way of importing attributes. 
  • Categories
    • Represents a list of categories to be added to the CI type, each value separated by a coma ( , ) 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.

 


<!-- 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="ImportationTypeDeCI">

<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 1 additional tag. This tag is not mandatory and if it's not specified, the default value will be used. 

Data Separator Management

When importing, a separator must indicate the delimitation of the data. For example, it is required for the import of attributes or categories to specify what will separate each value to add.

The two choices are:

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

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

Values allowed for the AttributesSplitStrategy tag:

  • ByPipe (defaut 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 contain 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