sk2 / autonetkit

AutoNetkit: an automated network configuration engine
BSD 3-Clause "New" or "Revised" License
129 stars 49 forks source link

autonetkit fails to creat cisco output #240

Closed anubisg1 closed 10 years ago

anubisg1 commented 10 years ago

using the latest git code,

autonetkit fails to build with target cisco:

using small_internet.graphml the result is:

anubisg1@linux-uau6:~/netkit> autonetkit --target=cisco -f /usr/share/doc/autonetkit/example/small_internet.graphml INFO AutoNetkit 0.9.0 INFO Setting output target as Cisco INFO Converting graph input to undirected INFO Automatically assigning input interfaces INFO IPv4 allocations: Infrastructure: 10.0.0.0/8, Loopback: 192.168.0.0/22 INFO Allocating v4 Infrastructure IPs INFO Allocating v4 Primary Host loopback IPs INFO Skipping iBGP for iBGP disabled nodes: [] INFO All validation tests passed. INFO Compiling configurations for VIRL on internal ERROR Error generating network configurations: local variable 'platform_compiler' referenced before assignment. More information may be available in the debug log. Unable to build configurations

completely failing.

using the house.json file instead, it looks like everything is rendered, but no "cisco" files are generated. instead the standard "zebra" config is generated and this is the output from shell:

anubisg1@linux-uau6:~/netkit> autonetkit --target=cisco -f /usr/share/doc/autonetkit/example/house.json INFO AutoNetkit 0.9.0 INFO Setting output target as Cisco INFO IPv4 allocations: Infrastructure: 10.0.0.0/8, Loopback: 192.168.0.0/22 INFO Allocating v4 Infrastructure IPs INFO Allocating v4 Primary Host loopback IPs INFO Skipping iBGP for iBGP disabled nodes: [] INFO All validation tests passed. INFO Compiling configurations for netkit on localhost INFO Compiling Netkit for localhost INFO Rendering Configuration Files INFO Deploying Network INFO Finished

running the same commands with debug shows the following:

for small_internet.graphml :

full output is here: http://pastebin.com/9a9vzX5U but i'd say the most important this are:

DEBUG Unable to load autonetkit_cisco No module named autonetkit_cisco

and

INFO Compiling configurations for VIRL on internal ERROR Error generating network configurations: local variable 'platform_compiler' referenced before assignment. More information may be available in the debug log. DEBUG Error generating network configurations Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/autonetkit/console_script.py", line 226, in main build_options=build_options, grid=options.grid) File "/usr/lib/python2.7/site-packages/autonetkit/console_script.py", line 66, in manage_network nidb = compile_network(anm) File "/usr/lib/python2.7/site-packages/autonetkit/console_script.py", line 331, in compile_network platform_compiler.compile() # only compile if hosts set UnboundLocalError: local variable 'platform_compiler' referenced before assignment Unable to build configurations.

for house.json instead:

full output is here: http://pastebin.com/RKr3gfBM

but again , i believe the key thing is:

DEBUG Unable to load autonetkit_cisco No module named autonetkit_cisco

sk2 commented 10 years ago

That's correct, the autonetkit Cisco module is not part of that repository

Sent from a mobile device.

On 7 May 2014, at 7:32 pm, anubisg1 notifications@github.com wrote:

using the latest git code,

autonetkit fails to build with target cisco:

using small_internet.graphml the result is:

anubisg1@linux-uau6:~/netkit> autonetkit --target=cisco -f /usr/share/doc/autonetkit/example/small_internet.graphml INFO AutoNetkit 0.9.0 INFO Setting output target as Cisco INFO Converting graph input to undirected INFO Automatically assigning input interfaces INFO IPv4 allocations: Infrastructure: 10.0.0.0/8, Loopback: 192.168.0.0/22 INFO Allocating v4 Infrastructure IPs INFO Allocating v4 Primary Host loopback IPs INFO Skipping iBGP for iBGP disabled nodes: [] INFO All validation tests passed. INFO Compiling configurations for VIRL on internal ERROR Error generating network configurations: local variable 'platform_compiler' referenced before assignment. More information may be available in the debug log. Unable to build configurations

completely failing.

using the house.json file instead, it looks like everything is rendered, but no "cisco" files are generated. instead the standard "zebra" config is generated and this is the output from shell:

anubisg1@linux-uau6:~/netkit> autonetkit --target=cisco -f /usr/share/doc/autonetkit/example/house.json INFO AutoNetkit 0.9.0 INFO Setting output target as Cisco INFO IPv4 allocations: Infrastructure: 10.0.0.0/8, Loopback: 192.168.0.0/22 INFO Allocating v4 Infrastructure IPs INFO Allocating v4 Primary Host loopback IPs INFO Skipping iBGP for iBGP disabled nodes: [] INFO All validation tests passed. INFO Compiling configurations for netkit on localhost INFO Compiling Netkit for localhost INFO Rendering Configuration Files INFO Deploying Network INFO Finished

running the same commands with debug shows the following:

for small_internet.graphml :

full output is here: http://pastebin.com/9a9vzX5U but i'd say the most important this are:

DEBUG Unable to load autonetkit_cisco No module named autonetkit_cisco

and

INFO Compiling configurations for VIRL on internal ERROR Error generating network configurations: local variable 'platform_compiler' referenced before assignment. More information may be available in the debug log. DEBUG Error generating network configurations Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/autonetkit/console_script.py", line 226, in main build_options=build_options, grid=options.grid) File "/usr/lib/python2.7/site-packages/autonetkit/console_script.py", line 66, in manage_network nidb = compile_network(anm) File "/usr/lib/python2.7/site-packages/autonetkit/console_script.py", line 331, in compile_network platform_compiler.compile() # only compile if hosts set UnboundLocalError: local variable 'platform_compiler' referenced before assignment Unable to build configurations.

for house.json instead:

full output is here: http://pastebin.com/RKr3gfBM

but again , i believe the key thing is:

DEBUG Unable to load autonetkit_cisco No module named autonetkit_cisco

— Reply to this email directly or view it on GitHub.

anubisg1 commented 10 years ago

Hello Simon,

can you indicate me into which repository can find it ? i googled before opening this, i couldn't find it.

Thanks Andrea

sk2 commented 10 years ago

Hi,

The autonetkit Cisco extensions module isnt publicly available - it's been developed for a commercial product.

However the core data structures of ank are indeed public in this main autonetkit repository.

The basic IOS generation code is in the autonetkit repository, but you may need to create a platform compiler to strip the interface naming, any management console ports, etc.

I think there is a dynagen example platform compiler still in there.

What target environment were you looking at generating configurations for?

Sorry there's not more documentation on this process yet - it's being written as part of my phd thesis which I'm working on at the moment.

Sent from a mobile device.

On 7 May 2014, at 7:56 pm, anubisg1 notifications@github.com wrote:

Hello Simon,

can you indicate me into which repository can find it ? i googled before opening this, i couldn't find it.

Thanks Andrea

— Reply to this email directly or view it on GitHub.

anubisg1 commented 10 years ago

all right i understand.

I'm trying to target GNS3. in particular building for dynamips and IOU. We hope we can somehow integrate autonetkit to GNS3 so that we could be able to automate the lab deployment.