[racktables-users] Re: CSV import plugin

  • From: Erik Ruiter <erik.ruiter@xxxxxxxxxxx>
  • To: "racktables-users@xxxxxxxxxxxxx" <racktables-users@xxxxxxxxxxxxx>
  • Date: Wed, 24 Sep 2014 07:46:14 +0000

Hi Lucas,

Thank for your feedback.
It seems a small bug entered the script recently, which made it impossible to 
add ports to objects.
It is fixed now.

Also please notice that all objects are created with a inner interface type of 
‘hardwired’
This means that you will need to enable the SFP-1000-LX (1204) port type for 
using ‘hardwired’ (inner) interfaces.
Else Racktables will throw an Foreign Key database exception.

You can update this in Configuration -> Enabled Port Types. Here you can create 
an inner / outer interface pair.

Hope this helps.

Best regards,

Erik.


From: Lucas Aimaretto <laimaretto@xxxxxxxxx<mailto:laimaretto@xxxxxxxxx>>
Reply-To: 
"racktables-users@xxxxxxxxxxxxx<mailto:racktables-users@xxxxxxxxxxxxx>" 
<racktables-users@xxxxxxxxxxxxx<mailto:racktables-users@xxxxxxxxxxxxx>>
Date: Wednesday, September 24, 2014 at 4:26
To: "racktables-users@xxxxxxxxxxxxx<mailto:racktables-users@xxxxxxxxxxxxx>" 
<racktables-users@xxxxxxxxxxxxx<mailto:racktables-users@xxxxxxxxxxxxx>>
Subject: [racktables-users] Re: CSV import plugin

On Fri, Jul 11, 2014 at 11:34 AM, Erik Ruiter 
<erik.ruiter@xxxxxxxxxxx<mailto:erik.ruiter@xxxxxxxxxxx>> wrote:
Hi All,

To make it easier to import objects and other things in Racktables, I built an 
CSV import plugin which enables loading batches of data.
It adds an CSV import page on the configuration menu screen.
From here you can choose to either import a CSV file, or paste some manual CSV 
lines in a textbox.

The script currently supports importing of Objects, Racks, VLANs and IP space.
It also supports linking ports, and assigning rackspace to objects.

The syntax of the CSV formatting is explained in the source code of the plugin.

I hope this might be useful to you. Feedback is very welcome of course.

You can find the plugin at:

https://github.com/sara-nl/racktables-contribs/blob/master/csv_import.php


Best Regards,

Erik Ruiter.

Hi Erik,

I'm using your plugin and have succesfully imported IP spaces and VLANs.

But when trying to import an object such as a router (type 7), it would import 
it but the ports are not created.

For example, I would do:

OBJECT;7;myRouter;www.router.com<http://www.router.com>;RT0001;eth[0-2];1204

And the object myRouter is created but the ports eth0-eth2 of type SFP-1000-LX 
(1204) are not created at all ...

Any hint?

Best regards!

Lucas




--
"Antes teníamos hambre y mirábamos el reloj para saber qué hora era. Ahora 
miramos el reloj para saber si tenemos hambre." -- Ernesto Sábato

Other related posts: