Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
196 lines (145 sloc) 3.97 KB

bf_extract_facts

Extracts facts for a Batfish snapshot

Synopsis

  • Extracts and returns facts for a Batfish snapshot and saves them (one YAML file node) to the output directory if specified.

Requirements

The following software packages must be installed on hosts that execute this module:

  • pybatfish

Module-specific Options

The following options may be specified for this module:

parameter type required default comments
network
str no Value in the bf_network fact.
Name of the network to extract facts for.
nodes
str no All nodes
Nodes to extract facts for. See https://github.com/batfish/batfish/blob/master/questions/Parameters.md#node-specifier for more details on node specifiers.
output_directory
str no None
Directory to save facts to.
session
dict no Value in the bf_session fact.
Batfish session object required to connect to the Batfish service.
snapshot
str no Value in the bf_snapshot fact.
Name of the snapshot to extract facts for.

Examples

# Extract facts and save to an output directory
- bf_extract_facts:
    output_directory: output/facts/
# Extract facts for nodes whose names contain as1border or host
- bf_extract_facts:
    nodes: /as1border|host/

Return Values

name description returned type
result
Dictionary of extracted facts.
always complex
contains:
name description returned type
nodes
Dictionary of node-name to node-facts for each node.
always complex
version
Fact-format version of the returned facts.
always str
summary
Summary of action(s) performed.
always str


Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

You can’t perform that action at this time.