Skip to content

rack/csv

A CSV definition for a rack used by the impot CSV function

This parameter is used to specify the csv content that should become a rack. This follows a simple rack patter with some expected fields and format.

The first row of the file is a header that defines columns names.

There MUST be the following columns. Column names are case insensitive

  • TYPE - One of: cabinet, server, switch. cabinet indicates the general rack entity
  • host name - The name of the machine for server types, the name of the switch for switch types, and the name of the rack for the cabinet type
  • serial number - This is the serial number of the component.

There MAY be the following columns.

  • host gateway - the gateway for the rack - stored as a machine parameter esxi/network-firstboot-gateway
  • host subnet - the CIDR for the rack - stored as machine parameters esxi/network-firstboot-subnet and esxi/network-firstboot-netmask
  • host vlan - the VLAN for the rack - stored as machine parameter esxi/network-firstboot-vlan
  • oobm gateway - the gateway of the OOB network for the rack - stored as a machine parameter ipmi/configure/gateway
  • oobm subnet - the CIDR of the OOB network for the rack - stored as machine parameters ipmi/configure/subnet and ipmi/configure/netmask

There MUST be one SWITCH row to enable auto-discovery by the rack.

The SERIAL NUMBER field is used to machine machines in the rack to machines discovered by the system.

Additional colums are turned into parameters. The following are column name to machine parameter name pairs. These are only added if present in the CSV.

  • rack - rack/name
  • bottom ru - rack/bottom-ru
  • carrier - rack/carrier
  • generation - rack/generation
  • bom - rack/bom
  • service offering - rack/build
  • prime - rack/prime
  • site - rack/site
  • label identifier - rack/label-identifier
  • location - rack/lcoation
  • contact - rack/contact
  • tracking number - rack/tracking-number
  • po - rack/po

This can be used with the importRackCSV action on the system object.

drpcli system runaction importRackCSV rack/csv "$(jq -Rs . < rack.csv)"