[racktables-users] Re: csv import script question

  • From: David Serpa <dserpa@xxxxxxxxx>
  • To: racktables-users@xxxxxxxxxxxxx
  • Date: Mon, 13 Apr 2015 09:33:43 -0400

This does help. Thank you Erik!

David

On Sun, Apr 12, 2015 at 3:50 AM, Erik Ruiter <erik.ruiter@xxxxxxxxxxx>
wrote:

Hi David,

I recently added an option for this in the script.
You can find it at: https://github.com/sara-nl/racktables-contribs/blob/
master/csv_import.php
Currently it only is possible to set a single attribute per line.
I hope it helps.

* Setting Object Attributes:

Syntax: OBJECTATTRIBUTE
Value 1, OBJECTATTRIBUTE
Value 2, Objectname: Specifies the name of the object
Value 3, attribute id
Value 4, attribute value

Examples:

OBJECTATTRIBUTE;myRouter;3,mgmt.myrouter.com
Sets the FQDN (3) for the myRouter object.


Best regards,

Erik Ruiter.



On 10/4/15 16:58 , David Serpa wrote:

Hi Everyone,

I am using the csv _import script from here https://github.com/sara-nl/
racktables-contribs/blob/master/csv_import.php to import our inventory
of over a thousand objects (servers and switches) into racktables. The
script allows you to import a csv and adds 6 attributes "Objecttype ;
Common name ; Visible label ; Asset tag; portname,portname, etc"

I was wondering if anyone has any experience adding custom attributes to
this script? I have a large inventory with attributes we created in
racktables I would like to be able to import all of that data in one swoop
if possible. Some of the custom attributes are listed below:


Customer
Reserved For
Purchased For
Install City
PO Number
Memory Type
SPLA
SPLA Type
CPU Cores
CPU Type
Cost



Thanks everyone!
Dave S


--
Erik Ruiter
| Infrastructure Services | SURFsara | Science Park 140 | 1098 XG
Amsterdam | T 06 1055 8290 | erik.ruiter@xxxxxxxxxxx | www.surfsara.nl |

Aanwezig op ma | di | wo | vr



Other related posts: