[racktables-users] Re: CSV import plugin

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

Hi Lucas,

This is not difficult.
I just added the following:

Importing Object IP interfaces

 Syntax: OBJECTIP; Objectname; OS Interface name; IP address; Type
 Value 1, OBJECTIP
 Value 2, Objectname: Specifies the name of the object
 Value 3, OS Interface name: Specifies the name of the interface to be added
 Value 4, IP address: Specifies the ip address of the interface to b e added 
(IPv4 or Ipv6) no subnet mask required
 Value 5, Type: Chooses the type of interface to be added. Can be: connected, 
loopback, shared, router, point-to-point. The default type is: router

 Examples:

 OBJECTIP;myRouter;eth0;10.1.3.1;connected
 Creates an IP interface name eth0, with address 10.1.3.1 and type 'connected', 
which is added to the myRouter object.


Please try it and let me know if it works.

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: Tuesday, September 23, 2014 at 22:39
To: "racktables-users@xxxxxxxxxxxxx<mailto:racktables-users@xxxxxxxxxxxxx>" 
<racktables-users@xxxxxxxxxxxxx<mailto:racktables-users@xxxxxxxxxxxxx>>
Subject: [racktables-users] Re: CSV import plugin

Hi Erik,

Very nice plugin! I'll give it a try right away. I do have tons of IP subnets 
and VLANs to be imported into racktables.

As far as I've seen, your script does support:
- importing objects;
- importing racks;
- assigning rackspaces;
- linking ports;
- importing vlans;
- importing IP spaces;

Now, how difficult is it to implement the creation of interfaces with their IP 
address into a router?

Example:

IPinterface;10.1.3.1;to_router_B;routerA;connected
Creates the IP interface called "to_router_B" of type "connected" within 
"routerA"   with IP address 10.1.3.1

Thanks!

Regards,

Lucas


On Mon, Jul 14, 2014 at 6:17 AM, Erik Ruiter 
<erik.ruiter@xxxxxxxxxxx<mailto:erik.ruiter@xxxxxxxxxxx>> wrote:
Hi Olivier,

Thanks for the feedback.
Other formats would indeed be nice, but that would be a lot of work.
For our internal usage there is not much need at the moment.

Best regards,

Erik.


From: Olivier Contant 
<Olivier.Contant@xxxxxxxxxxxxxxxxx<mailto:Olivier.Contant@xxxxxxxxxxxxxxxxx>>
Reply-To: 
"racktables-users@xxxxxxxxxxxxx<mailto:racktables-users@xxxxxxxxxxxxx>" 
<racktables-users@xxxxxxxxxxxxx<mailto:racktables-users@xxxxxxxxxxxxx>>
Date: Friday, July 11, 2014 at 17:58
To: "racktables-users@xxxxxxxxxxxxx<mailto:racktables-users@xxxxxxxxxxxxx>" 
<racktables-users@xxxxxxxxxxxxx<mailto:racktables-users@xxxxxxxxxxxxx>>
Subject: [racktables-users] Re: CSV import plugin

Thank you very much for this plugin.

Maybe I could push you even more and ask you to support other format like json, 
xml, :)

Olivier Contant
System Administrator, Triton Digital

1440 Ste-Catherine W., Suite 1200 | Montreal, Qc, H3G 1R8
+1.514.448.4037<tel:%2B1.514.448.4037>
olivier.contant@xxxxxxxxxxxxxxxxx<mailto:olivier.contant@xxxxxxxxxxxxxxxxx>
________________________________
From: 
racktables-users-bounce@xxxxxxxxxxxxx<mailto:racktables-users-bounce@xxxxxxxxxxxxx>
 
[racktables-users-bounce@xxxxxxxxxxxxx<mailto:racktables-users-bounce@xxxxxxxxxxxxx>]
 on behalf of Erik Ruiter 
[erik.ruiter@xxxxxxxxxxx<mailto:erik.ruiter@xxxxxxxxxxx>]
Sent: July 11, 2014 10:34 AM
To: racktables-users@xxxxxxxxxxxxx<mailto:racktables-users@xxxxxxxxxxxxx>
Subject: [racktables-users] CSV import plugin

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.



--
"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: