sk2 / ank_legacy_v2 Goto Github PK
View Code? Open in Web Editor NEWLegacy edition of autonetkit. Please see https://github.com/sk2/autonetkit for latest version
Home Page: www.autonetkit.org
License: BSD 3-Clause "New" or "Revised" License
Legacy edition of autonetkit. Please see https://github.com/sk2/autonetkit for latest version
Home Page: www.autonetkit.org
License: BSD 3-Clause "New" or "Revised" License
Miscellaneous tasks to improve ANK codebase:
fix .name attribute being integer for graphs, use graph.graph['asn']
Move compiler into plugin
add rev dns as tap_host for 172.16.0.1 (or whatever tap host is defined to be)
use defaultdict more
replace code that gets highest match by sorting then taking [0] with code that looks at max value and then takes the item at that index
use python startswith() instead of string[0]
convert list(set(x)) to just operate as a set, and convert to list as last step
use try/except instead of checking
use generator functions with tuples for dictionaries
ensure no from x import *
use defaultdict to initialise dicts
make python classes inherit from Object
use nodes_iter() and edges_iter() instead of .nodes() and .edges()
Move all the reverse and forward dns mangling into the dns module out of compiler
remove double brackets on multiline formats for logger etc
networkx technique to check between node and nbunch list:
if nbunch in self: # return a single node
return next(self.degree_iter(nbunch,weight))[1]
else: # return a dict
return dict(self.degree_iter(nbunch,weight))
use same tar code as for junos compiler in the netkit compiler, rather than system call
Ank needs a software licence - possibly MIT?
Mako templates cache currently uses /tmp
this is a problem for multiple users on the same machine.
From Olaf:
if i setup a small topology (only one node per AS), no ospf is configured
(quite obviously). however, the "daemons" file specified 'ospf yes'.
so when netkit boots it looks for an ospf configuration, which is not there
(and not needed)!
Currently BGP sessions are created in the following manner:
This is limited:
The problem is trying to stitch the session information onto the physical connectivity graph. An interim solution is to create a seperate graph for BGP sessions.
This can later be merged into the main graph, with edge types to denote the layer at which they operate.
For now a seperete graph will suffice, keep things simple, and allow user-specified topologies to be loaded.
The node id will be used like a database foreign key to related nodes between the graphs.
Check that netkit deploy is reading the source folder from configuration, rather than hardcoded
initial progress in QueryPlotter, this needs to be developed better and documented
Autonetkit has framework in place for documentation using sphinx.
This needs to be brought up to date, along with the user guides generated for the website
with multiple target platforms, need a systematic way to define tags/labels inside netkit
currently it is ad-hoc, eg
ip, sn, asn, ram
some properties only make sense to certain platforms
options: append _ eg nk_ip nk_sn ank_ram
or have nested dictionaries
eg ['nk']['ip']
need something that is easy to pull in/out of external formats, so the underscore format may work best.
We need a way for end users to interact with the network.
Ipython has some nice interactive console support, which could be integrated with the AutoNetkit module.
The QT version also allows inline plotting, which could be quite nice for rendering network plots:
http://stronginference.com/weblog/2011/7/15/innovations-in-ipython.html
http://wiki.netkit.org/man/man1/lstart.1.html#lbAE
lab-path/shared/
This subdirectory may contain files and directories that you want to make available (i.e., copy) inside every virtual machine filesystem. Files should be organized so that lab-path/shared/ corresponds to the root (`/') directory of the virtual machines.
In case of conflicts, files inside this subdirectory are overwritten by those inside lab-path/machine/.
Allow selection of deployment platform from command line
Eg
--Netkit --cbgp --gns3
Need to create a changelog for future versions of autonetkit
This should be automatically used by pypi to list modifications
Currently checks for env var but this is error-prone.
Better way would be:
$ lstart --version
Netkit version: 2.8
vs
$ lstart --version
-bash: lstart: command not found
Also look at Python cbgp interface: http://c-bgp.sourceforge.net/downloads.php
Netkit compiler needs to erase the lab directory before writing the new lab, if using local deployment.
Not an issue with remove deployment due to way tar is extracted.
will be useful when user is using svg shapes rather than the inbuilt primitive shapes from yed
Ank needs both
By default 2.7 will supress deprecation warnings
2.6 does not, so do this manually to not spam up the user's terminal output
Confirm all logs and all plots go into the appropriate autonetkit/logs and plots directories, not into the current working directory
add syntactic sugar to network to allow ip and subnet to be cleanly accessed, both for local and remote ip
eg
self.network.ip(src, dst)
self.network.subnet(src, dst)
cleaner syntax
Currently BGP sessions are created in the following manner:
This is limited:
The problem is trying to stitch the session information onto the physical connectivity graph. An interim solution is to create a separate graph for BGP sessions.
This can later be merged into the main graph, with edge types to denote the layer at which they operate.
For now a separate graph will suffice, keep things simple, and allow user-specified topologies to be loaded.
The node id will be used like a database foreign key to related nodes between the different graphs.
(similar style to in topzoo tools)
Provide easy method to dump BGP tables to a file which can be accessed by the host file system
Refer http://wiki.netkit.org/index.php/FAQ#How_can_I_move_files_from.2Fto_a_virtual_machine_to.2Ffrom_my_host.3F
gns3 currently only supports eigrp
use ospf by default, add flag to allow eigrp as igp
add bgp support
AutoNetkit currently uses Pexpect for interaction with local/remote hosts.
This is low-level and can lead to complicated code. This is a problem both for maintenance, and for flexibility for future versions.
We need a more flexible solution, especially as we automate different deployment platforms.
Contenders are Fabric and Expect.
Make config file and command line arguments use same base format
Ank uses optparse, which is deprecated. Use argparse instead for the demo.py script
If a lab folder exists, then rename it based on its date, rather than wiping it.
When importing, asn may be treated as a string. Need to force to be integer for scripts to work correctly.
Currently have AutoNetkit/demo.py which is used as entry point for Standalone scripts when deployed
And examples/dev.py which is used for testing
These should be merged into a single file, with testing generated plots, labs and demo input files ignore by github as appropriate
We have templates and an API. We should use these. Currently the netkit compiler has far too much logic for simple tasks. Complex logic should be split out into external functions. This will simplify the compiler, making it easier to write for other platforms.
Because it is out of date...
Add MPLS and VPLS support to ank
Following Best Practice, ANK requires more testing.
Look at:
Want to generate Junos configs and topology files for Junosphere:
http://www.juniper.net/as/en/products-services/software/junos-platform/junosphere/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.