Snapshot Input

This category of questions allows you to learn how well Batfish understands your network snapshot.

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

[5]:
result = bf.q.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

[6]:
result.head(5)
[6]:
Nodes Source_Lines Type Details Line_Text Parser_Context
0 ['as1border1'] None Convert warning (redflag) No virtual address set for VRRP on interface: 'GigabitEthernet0/0' None None

Print the first row of the returned Dataframe

[7]:
result.iloc[0]
[7]:
Nodes                                                                 ['as1border1']
Source_Lines                                                                    None
Type                                                       Convert warning (redflag)
Details           No virtual address set for VRRP on interface: 'GigabitEthernet0/0'
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

[10]:
result = bf.q.fileParseStatus().answer().frame()

Return Value

Name

Description

Type

File_Name

The file that was parsed

str

Status

The status of the parsing operation

str

File_Format

The detected format of the file

str

Nodes

Names of nodes produced from this file

List of str

Print the first 5 rows of the returned Dataframe

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

Print the first row of the returned Dataframe

[12]:
result.iloc[0]
[12]:
File_Name      configs/as1border1.cfg
Status                         PASSED
File_Format                 CISCO_IOS
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

[15]:
result = bf.q.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

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