{ "info": { "author": "Codey Oxley", "author_email": "codey.a.oxley+os@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "aspath_graph\n============\n\n``aspath_graph`` converts raw ASPATHs to NetJSON Graph\n\n.. image:: http://www.wtfpl.net/wp-content/uploads/2012/12/wtfpl-badge-2.png\n :target: http://www.wtfpl.net/\n :alt: Do what the fuck you want\n :height: 25px\n\n|\n\n.. image:: path.png\n :alt: Stylized example\n\nNetJSON_ is a series of JSON schema for defining networks, `NetJSON Graph`_\nbeing specific to defining how nodes interconnect. \"aspath_graph\" uses\nthis to represent BGP autonomous systems as 'nodes' and how they connect\nfrom the perspective of INPUT\n\n.. _NetJSON: http://netjson.org/\n.. _NetJSON Graph: https://github.com/interop-dev/netjsongraph.js\n\n\nThis project aims to make it easy to go from BGP AS PATHs in their raw form to\nsomething NetJSON Graph understands. This makes it easy to add properties to\nnodes based on their label or ASN and display/handle them differently on the\nfrontend in CSS/JS/HTML.\n\n* Contents:\n\n + 1 aspath_graph_\n\n + 1.1 Quickstart_\n + 1.2 `Embedding In Existing Webpages`_\n + 1.3 Usage_\n\nQuickstart\n----------\n\nFor a really quick start, clone the repo and check out the examples folder. It\nhas a paths text-file for how I saw PATHs to 1.0.0.0/12+ at the time.\n\nFor your own data, there are two input methods currently:\n\n1. netconf to Junos devices\n2. Plain text file of ASPATHs\n\nGood news is that the second one is very flexible. Here are a few ways you can\ncreate it:\n\n.. code:: bash\n\n birdc 'show route table all'|grep BGP\\.as_path|egrep -o '[0-9]+ [0-9 ]+' > aspaths.txt\n\n\n.. code:: bash\n\n ssh junosrtr \"show route protocol bgp | match \\\"AS path\\\"\" | sed -e 's/.*AS path: //g' > aspaths.txt\n\n\nEmbedding In Existing Webpages\n------------------------------\n\nNetJSON Graph is pretty simple to embed into existing pages and theme, thus so\nis getting your AS nodes there. I'll refer you to the README and docs for the\nmain project, but below is a small example.\n\n.. code-block:: html\n\n \n \n \n \n \n \n \n \n
\n
\n \n
\n
\n\n \n
\n \n
\n
\n\n
\n
\n \n \n \n \n \n\n\nUsage\n-----\n\n.. code::\n\n $ aspath_graph --help Usage: aspath_graph [OPTIONS] INPUT\n\n Options:\n -v, --version Show the version and exit.\n -m, --mode [junos-netconf|txt] Mode to use\n -o, --output FILENAME Output file\n --asdot Whether to add ASDOT notation\n --ownas TEXT Apply perspective of own AS at the beginning\n of PATHS\n --runserver Run local server on 8000\n --user TEXT Only used for relevant modes\n --nopassword If using a login mode, this will enable\n public key auth\n --yaml FILENAME YAML for mapping and ignoring ASes\n --pprint Pretty print JSON\n -h, --help Show this message and exit.\n\nINPUT can either be a device or file depending on value of MODE. This\ndefaults to a file. (txt)\n\nOUTPUT can be '-' to send results to STDOUT.\n\nIf not passing '--nopassword', you will be prompted for a password for the\nrelevant modes.\n\nWhen using \"--asdot\" to provide ASDOT notation, the raw ASPLAIN will also\nbe provided on the node - just under the \"raw\" attribute.\n\nYAML can be formatted as such: (Note that \"ignore\" must ONLY be ASPLAIN)\n\n.. code:: yaml\n\n label_map:\n 65001: SFO\n 65002: ORD\n 65003: NYC\n 65003.1: NYC-R1\n 65003.2: NYC-R2\n\n ignore:\n - 7224\n - 9059\n\nBy default, ASDOT will be labeled according to the firsthalf. Eg, if 65001\nis configured to be labeled as DFW, 65001.211 will appear as DFW-R21. This\nassumes your ToR ASN is your spine ASN + (racknumber*10+1) - to disable\nthis simply set APG_ASDOT_RAW to true/yes/anything.\n\nAny of the supported options can be passed via ENV by upping the case,\nreplacing '-' with '_', and prefixing with 'APG'. Eg, 'APG_MODE'\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/coxley/aspath_graph/tarball/1.1", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/coxley/aspath_graph", "keywords": "networking,bgp,asn,netjson,json,graph,d3,routes", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "aspath_graph", "package_url": "https://pypi.org/project/aspath_graph/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/aspath_graph/", "project_urls": { "Download": "https://github.com/coxley/aspath_graph/tarball/1.1", "Homepage": "https://github.com/coxley/aspath_graph" }, "release_url": "https://pypi.org/project/aspath_graph/1.3/", "requires_dist": null, "requires_python": null, "summary": "Take BGP AS PATHs and generate an interactive javascript graph using NetJSON", "version": "1.3" }, "last_serial": 1974896, "releases": { "1.2": [ { "comment_text": "", "digests": { "md5": "322b76fb93b0397ecd4e5349d4490a68", "sha256": "7f971971492506e13c29232d5daea588c0a4fada0be4351d200c12c223467136" }, "downloads": -1, "filename": "aspath_graph-1.2.tar.gz", "has_sig": false, "md5_digest": "322b76fb93b0397ecd4e5349d4490a68", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 66393, "upload_time": "2016-02-20T11:51:21", "url": "https://files.pythonhosted.org/packages/a2/6a/f9dbcfef5b784e0db476ca8c04bface1cde91402011ebbb5eff2b877d46a/aspath_graph-1.2.tar.gz" } ], "1.3": [ { "comment_text": "", "digests": { "md5": "84e13c6b8a5be7f07b1d317f15c4d252", "sha256": "1b5c492a3633f1d2809a06345de27a77a3f9decb00b52a514d284b47198ef0bb" }, "downloads": -1, "filename": "aspath_graph-1.3.tar.gz", "has_sig": false, "md5_digest": "84e13c6b8a5be7f07b1d317f15c4d252", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 66841, "upload_time": "2016-02-24T20:14:23", "url": "https://files.pythonhosted.org/packages/3e/c6/c37ab2a18174e3faa9d47f0ebe6eca8c1265e5385fcee4f3a0dec97e2e2f/aspath_graph-1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "84e13c6b8a5be7f07b1d317f15c4d252", "sha256": "1b5c492a3633f1d2809a06345de27a77a3f9decb00b52a514d284b47198ef0bb" }, "downloads": -1, "filename": "aspath_graph-1.3.tar.gz", "has_sig": false, "md5_digest": "84e13c6b8a5be7f07b1d317f15c4d252", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 66841, "upload_time": "2016-02-24T20:14:23", "url": "https://files.pythonhosted.org/packages/3e/c6/c37ab2a18174e3faa9d47f0ebe6eca8c1265e5385fcee4f3a0dec97e2e2f/aspath_graph-1.3.tar.gz" } ] }