Bind config files parser in python

Selesai Dipasang Oct 23, 2014 Dibayar saat pengiriman
Selesai Dibayar saat pengiriman

Short: I need a python script that gets as input a file with a list of hostnames and outputs a cvs like formatted list of bind configuration parameters. The end goal is to import in excel.

Long:

The input file will have a hostname or ip address, one or several files locations on the destination server that must be parsed. The format of this file is at your choice (cvs like and variations, json, xml…)

Nice to have: the files locations could contains wildcards

Ex:

hostname1 : /var/lib/named/[url removed, login to view]

hostname2 : /var/lib/named/[url removed, login to view] : /var/lib/named/[url removed, login to view]

hostname 3 : /var/lib/named/named.*

The options for running the script:

--input <input file name>

--fetch -> just connect to the hosts from the file name and get the files and save them locally

--process <folder> -> get the bind config files from the folder and parse them

If just the “—input” is specified the script must do “fetch + process”

If no option is given, the help is shown

The local files are saved in the current folder with the name “date-time” (ex: 20141023-1027)

The connection to the servers is done with ssh with rsa keys. The rsa keys are already installed. The user is “named”.

The output of the parsing is as follows:

- the output is on the screen/terminal/standard output

- I’m interested only in the zone definitions

- must parse the forward, master and slave zone entries

For example server hostname1 have a file [url removed, login to view]:

zone "[url removed, login to view]" {

type forward;

forwarders { [url removed, login to view]; [url removed, login to view]; };

};

zone "[url removed, login to view]" in {

type master;

file "[url removed, login to view]";

};

zone "[url removed, login to view]" in {

type slave;

file "[url removed, login to view]";

};

zone "[url removed, login to view]" in {

type master;

file "[url removed, login to view]";

};

The output:

hostname1;[url removed, login to view];forward; [url removed, login to view]; [url removed, login to view];

hostname1;[url removed, login to view];master

hostname1;[url removed, login to view];slave

hostname1; [url removed, login to view];master

…..

Hostname2….

Hostname3…..

…..

The coder must have him own test platform, I can only test on my side and give feedback. I can’t give access to my servers or more sample files.

The script must work on python2.4 on RedHat.

FYI: the number of servers is around 200 with around 400 zone records per server.

DNS Python Pengembangan Perangkat Lunak

ID Proyek: #6630018

Tentang proyek

5 proposal Proyek online Aktif Oct 25, 2014

Diberikan kepada:

georgvogelhuber

Hello, I'm a graduated mathematician and computer scientist from germany. I've done a lot of work with python and I've also lots of experience with getting data from different servers and parsing data. For your p Lebih banyak

€29 EUR dalam 5 hari
(4 Ulasan)
3.1

5 freelancer rata-rata menawar €73 untuk pekerjaan ini

exansoft

A proposal has not yet been provided

€260 EUR dalam 7 hari
(9 Ulasan)
4.6
lockbox

Nie złożono jeszcze oferty.

€30 EUR dalam 0 hari
(4 Ulasan)
3.0
owaismunir

I am one of the python developer. I'll give you great solutions for your requirement. I done a lot work on python.

€29 EUR dalam 1 hari
(0 Ulasan)
0.0
galshtengel

A proposal has not yet been provided

€19 EUR dalam 1 hari
(0 Ulasan)
0.0