Importing Host and HBA Card Entities

The JSON file required for importing Host or HBA Card entities is nearly identical to the alias (nicknames) import file, differing only by the type designator and how add is used. For Host entities, you choose the host type; for HBA Card entities, you choose the hba type.

Structure of a host entity import file:

{

"entities": [

{

"child_entities": {

"add": ["hba1", "hba2", "ip1", "ip2"]

},

"description": "description text",

"edit_type" : "add",

"name": "name text",

"tags": ["JSONIMPORTED"],

"type": "host"

}

],

"version": 2

}

Structure of an import file for two HBA entities:

{

"entities": [

{

"child_entities": {

"add": ["WWN1", "WWN2"]

},

"description": "description text",

"edit_type": "add",

"name": "name text",

"tags": ["JSONIMPORTED"],

"type": "hba"

},

{

"child_entities": {

"add": ["WWN1", "WWN2"]

},

"description": "description text",

"name": "name text",

"tags": ["JSONIMPORTED"],

"type": "hba"

}

],

"version": 2

}

Note that edit_type was not used in the last example shown above. Instead, add appears inside child_entities.

The following syntaxes for add when used with JSON-element are equivalent:

{

"child_entities": [...],

"edit_type": "add",

...

}

{

"child_entities": {

"add": [...]

}

...

}

Example of an import file to create two HBA Card entities and two Host entities:

The following example creates two HBA Card entities from two WWNs, Server44_HBA0/1, and then creates a Host entity from the two HBA Card entities.

Note that the host entity appears in the file before the HBAs. Entities can appear in any order in the file.

{

"entities": [

{

"child_entities": {"add": ["Server44_HBA0", "Server44_HBA1"]},

"description": "Server #44 connects to fabrics A and B",

"name": "Server44",

"tags": ["JSONIMPORTED"],

"type": "host"

},

{

"child_entities": {"add": ["10000000c9123456"]},

"name": "Server44_HBA0",

"tags": ["JSONIMPORTED"],

"type": "hba"

},

{

"child_entities": {"add": ["10000000c9890123", "10000000c9890124"]},

"name": "Server44_HBA1",

"tags": ["JSONIMPORTED"],

"type": "hba"

}

],

"version": 2

}