Snapshot Input

Snapshot Initialization Issues

Returns issues encountered when processing the snapshot.

Reports issues encountered by Batfish, including failure to recognize certain lines in the configuration, lack of support for certain features, and errors when converting to vendor-independent models.

Inputs

Invocation

[6]:
result = bfq.initIssues().answer().frame()

Return Value

Name

Description

Type

Nodes

The nodes that were converted (if applicable)

List of str

Source_Lines

The files and lines that caused the issues (if applicable)

List of FileLines

Type

The type of issues identified

str

Details

Details about the issues identified

str

Line_Text

The text of the input files that caused the issues (if applicable)

str

Parser_Context

Batfish parser state when issues were encountered (if applicable)

str

Print the first 5 rows of the returned Dataframe

[7]:
result.head(5)
[7]:
Nodes Source_Lines Type Details Line_Text Parser_Context
0 ['as1border1'] None Convert warning (redflag) Could not determine update source for BGP neighbor: '3.2.2.2' None None
1 ['as1border1'] None Convert warning (redflag) Could not determine update source for BGP neighbor: '5.6.7.8' None None

Print the first row of the returned Dataframe

[8]:
result.iloc[0]
[8]:
Nodes             ['as1border1']
Source_Lines      None
Type              Convert warning (redflag)
Details           Could not determine update source for BGP neighbor: '3.2.2.2'
Line_Text         None
Parser_Context    None
Name: 0, dtype: object

Snapshot Input File Parse Status

Displays file parse status.

For each file in a snapshot, returns the host(s) that were produced by the file and the parse status: pass, fail, partially parsed.

Inputs

Invocation

[11]:
result = bfq.fileParseStatus().answer().frame()

Return Value

Name

Description

Type

File_Name

The file that was parsed

str

Status

The status of the parsing operation

str

Nodes

Names of nodes produced from this file

List of str

Print the first 5 rows of the returned Dataframe

[12]:
result.head(5)
[12]:
File_Name Status Nodes
0 configs/as1border1.cfg PASSED ['as1border1']
1 configs/as1border2.cfg PASSED ['as1border2']
2 configs/as1core1.cfg PASSED ['as1core1']
3 configs/as2border1.cfg PASSED ['as2border1']
4 configs/as2border2.cfg PASSED ['as2border2']

Print the first row of the returned Dataframe

[13]:
result.iloc[0]
[13]:
File_Name    configs/as1border1.cfg
Status       PASSED
Nodes        ['as1border1']
Name: 0, dtype: object

Snapshot Input File Parse Warnings

Returns warnings that occurred when parsing the snapshot.

Return warnings such as failure to recognize certain lines and lack of support for certain features.

Inputs

Name

Description

Type

Optional

Default Value

aggregateDuplicates

Whether to aggregate duplicate results.

bool

True

Invocation

[16]:
result = bfq.parseWarning().answer().frame()

Return Value

Name

Description

Type

Filename

The file that was parsed

str

Line

The line number in the input file that caused the warning

int

Text

The text of the input that caused the warning

str

Parser_Context

The context of the Batfish parser when the warning occurred

str

Comment

An optional comment explaining more information about the warning

str

Print the first 5 rows of the returned Dataframe

[17]:
result.head(5)
[17]:
Filename Line Text Parser_Context Comment