Need to parse some network configuration

Suljettu Julkaistu 3 vuotta sitten Maksettu toimituksen yhteydessä
Suljettu Maksettu toimituksen yhteydessä

Hi -- I need to be able to parse the following FortiOS configuration:

```

config system interface

edit "VLAN100"

set vdom "customer-a"

set ip [login to view URL] [login to view URL]

set bfd disable

set snmp-index 51

set interface "Po-1"

set vlanid 150

next

edit "VLAN100-B"

set vdom "customer-a"

set ip [login to view URL] [login to view URL]

set bfd disable

set snmp-index 51

set interface "Po-1"

set vlanid 150

next

edit "VLAN200"

set vdom "customer-b"

set ip [login to view URL] [login to view URL]

set snmp-index 52

set interface "Po-2"

set vlanid 250

next

end

```

I want to be able to parse the above block of data so that I can export to a CSV in the following format:

vdom: customer-a

interface: VLAN100

vlan: 150

IP: [login to view URL]

interface: VLAN100-B

vlan: 150

IP: [login to view URL]

vdom: customer-b

interface: VLAN200

vlan: 250

IP: [login to view URL]

and so on..

As per above, 'vdom' being the top and having 'interface' children and so on. Keeping in mind that I won't know the names of the vdom as per this example. Also there is a lot of extra configuration before and after the above that is not needed. I want to be able to dump my configuration file and take out only what I have mentioned above in CSV.

Shell Script Python

Projektin tunnus: #26826490

Tietoa projektista

4 ehdotusta Etäprojekti Aktiivinen 3 vuotta sitten

4 freelanceria on tarjonnut keskimäärin $125 tähän työhön

tushortz

Hello there. i can write regular expressions to parse the data into csv for you. i can also start work immediately

$140 AUD 1 päivässä
(40 arvostelua)
5.1
gopalvora

Hello Greetings!! I have gone through the details of your project and I find it well within my capabilities. Please feel free to contact me directly to discuss the project. Thanks

$190 AUD 7 päivässä
(8 arvostelua)
5.2
sodiqa32

Hello, I am pleasure with your job as detailed. Thank you for the job posting. It’s a pleasure to meet you. I’d really like to work with you on this one if possible! I do have a couple of questions, but first I’d like Lisää

$30 AUD 1 päivässä
(13 arvostelua)
4.9
Kuvvat

hi how are you, i can parse it for you, can you send sample config file ? thanks good luck

$140 AUD 7 päivässä
(3 arvostelua)
2.6