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

bf_init_snapshot

Initializes a Batfish snapshot with provided snapshot data

Synopsis

  • Initializes a Batfish snapshot with provided snapshot data and populates bf_network and bf_snapshot facts.

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
extra_args
dict no
Additional arguments to pass to the Batfish service for snapshot initialization
network
str yes
Name of the network in which to initialize the snapshot.
overwrite
bool no False
Whether to overwrite a snapshot of the same name (if it exists) in the network.
session
dict no Value in the bf_session fact.
Batfish session object required to connect to the Batfish service.
snapshot
str yes
Name of the snapshot to initialize.
snapshot_data
str yes
Path to snapshot data directory or zip. See https://github.com/batfish/batfish/wiki/Packaging-snapshots-for-analysis for more details on packaging your snapshot for analysis.

Examples

# Initialize a snapshot with specified snapshot data
- bf_init_snapshot
    network: datacenter_sea
    snapshot: 2019-01-01
    snapshot_data: /path/to/snapshot/data/
# Initialize a snapshot, replacing same named snapshot if it exists
- bf_init_snapshot
    network: network_name
    snapshot: duplicate_snapshot_name
    snapshot_data: /path/to/snapshot/data.zip
    overwrite: true

Return Values

name description returned type
result
Information about the snapshot created.
always complex
contains:
name description returned type
snapshot
Name of the snapshot created.
always str
network
Name of the network created.
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.