[addCmdbNode]
brief = Add cmdb node to service - addcmdbnode | CMDB | generic | api | addcmdbnode
order = 1
node # the node short hostname
vendor # the node vendor_type. Use NetYCE vendor names
fqdn # the node full-qualified-name or ipv4 address
domain # the management domain
[delCmdbNode]
brief = Add cmdb node to service - delcmdbnode | CMDB | generic | api | delcmdbnode
order = 2
node
===== Using the CSV API =====
To add or remove a batch of nodes from the CMDB, go to the "Operate - API's - CSV API" tool. The large text-box already shows the available definitions as comments to clarify their use, mostly the fields required and their order.
You type or just can just paste in the CSV lines with the desired actions. Often an Excel sheet is used as the basis for these lines.
The tool auto-detects the field separator used (tab, comma, semicolon or vertical-bar. For readability spaces around the separator are ignored.
The sample below could be pasted in to add four and remove two nodes:
# Preamble is included with ALL api-types
# = client_type | service_class | service_type | service_task
# example: 'newClient | YCE | api | api | newclient | ESXi'
# addCmdbNode
# Add cmdb node to service - addcmdbnode | CMDB | generic | api | addcmdbnode
# addCmdbNode | | node | vendor | fqdn | domain
addCmdbNode | CMDB | generic | api | addCmdbNode | AMS-DC01-XC01 | Junos | ams-dc01-xc01.acme.com | ams-xc
addCmdbNode | CMDB | generic | api | addCmdbNode | AMS-DC01-XC02 | Junos | ams-dc01-xc02.acme.com | ams-xc
addCmdbNode | CMDB | generic | api | addCmdbNode | AMS-DC03-AC01 | Cisco_nexus | ams-dc03-ac01.acme.com | ams-ac
addCmdbNode | CMDB | generic | api | addCmdbNode | AMS-DC03-AC02 | Cisco_nexus | ams-dc03-ac02.acme.com | ams-ac
# delCmdbNode
# Add cmdb node to service - delcmdbnode | CMDB | generic | api | delcmdbnode
delCmdbNode | CMDB | generic | api | delCmdbNode | UTR-DC02-AC03
delCmdbNode | CMDB | generic | api | delCmdbNode | UTR-DC02-AC04
When submitting these records a summary is shown before actual execution. Errors are flagged and corrections can be made.
{{:guides:user:csv_api_adding_cmdb_nodes.png?800|}}
Each line is executed in succesion. Any failures due to incorrect service-type or unknown references halt the execution to allow corrections. The example below shows such a failure as the referenced Domain does not exist.
{{:guides:user:csv_api_error_report.png?600|}}
After correcting the error, the execution is restarted (skipping previously successful), resulting in the regular progress report.
{{:guides:user:csv_api_execution.png?600|}}
===== Download =====