O'Reilly logo

JUNOS Automation Cookbook by Adam Chappell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Graph data

For our recipe, we need to establish a neutral software-readable format to exchange information about network graphs. In this case, we'll use JSON—with the simplicity of a well-known schema that defines our nodes and links.

At the top-level of our JSON extract is a JavaScript object—a hash, or associative array.

Field
Description

nodes

A list of node identifiers

links

A list of link 3-tuples, describing source node, destination node, and link metric respectively

In our case, we're likely to use router names as node identifiers, and the IGP distance or cost metric can be used as the link metric. Furthermore, we'll establish a convention that pseudo-nodesfalse nodes added to artificially represent multi-access ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required