Re: Python Script to convert firewall rules

2014-12-14 Thread Jason Friedman
> Thank you very much. Appreciated ! But the first requirement was to convert > format1 to format2 as below: > > set interface ethernet2/5 ip 10.17.10.1/24 (format 1) > set interfaces ge-0/0/0 unit 0 family inet address 10.17.10.1/24 (format 2) > (set, interface, ip) = (set, interfaces, family inet

Re: Python Script to convert firewall rules

2014-12-13 Thread Kashif Rana
Hi Jason Thank you very much. Appreciated ! But the first requirement was to convert format1 to format2 as below: set interface ethernet2/5 ip 10.17.10.1/24 (format 1) set interfaces ge-0/0/0 unit 0 family inet address 10.17.10.1/24 (format 2) (set, interface, ip) = (set, interfaces, family inet

Re: Python Script to convert firewall rules

2014-12-13 Thread Jason Friedman
> Thanks for the reply. I am learning python using CBT nuggets for python. But > If you can refer me some good course, that should be practical then it would > be great. > > For my requirement, if you can give me the best approach to start with or > high level steps or give me some sample cod, I

Re: Python Script to convert firewall rules

2014-12-13 Thread Kashif Rana
On Saturday, December 13, 2014 6:31:34 AM UTC+4, Jason Friedman wrote: > Thanks for the reply. Yes I can make the all possible keywords/values for > both formate. But after that what gonna be the logic to convert one format to > other format. Like to convert one line below are the keywords: > >

Re: Python Script to convert firewall rules

2014-12-12 Thread Jason Friedman
> > > Thanks for the reply. Yes I can make the all possible keywords/values for > both formate. But after that what gonna be the logic to convert one format > to other format. Like to convert one line below are the keywords: > > set interface ethernet2/5 ip 10.17.10.1/24 (format 1) > set interfaces

Re: Python Script to convert firewall rules

2014-12-11 Thread Kashif Rana
Hi Jason Thanks for the reply. Yes I can make the all possible keywords/values for both formate. But after that what gonna be the logic to convert one format to other format. Like to convert one line below are the keywords: set interface ethernet2/5 ip 10.17.10.1/24 (format 1) set interfaces ge

Re: Python Script to convert firewall rules

2014-12-11 Thread Jason Friedman
> I am network engineer and not expert in programming. I would like to make > one python script to convert juniper netscreen firewall configuration into > juniper SRX firewall configuration. > Looks pretty tricky, do you have a specification for each format containing all the possible keywords/val

Python Script to convert firewall rules

2014-12-10 Thread Kashif Rana
Hello Experts I am network engineer and not expert in programming. I would like to make one python script to convert juniper netscreen firewall configuration into juniper SRX firewall configuration. Sample is below. I would appreciate if anybody can give me the high level steps to start with.