bf.set_network('generate_questions')

bf.set_snapshot('generate_questions')

"""
Explanation: Snapshot Input
This category of questions allows you to learn how well Batfish
understands your network snapshot.

Snapshot Initialization Issues
Snapshot Input File Parse Status
Snapshot Input File Parse Warnings
End of explanation
"""


result = bf.q.initIssues().answer().frame()

"""
Explanation: 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
End of explanation
"""


result.head(5)

"""
Explanation: 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
End of explanation
"""


result.iloc[0]

bf.set_network('generate_questions')

bf.set_snapshot('generate_questions')

"""
Explanation: Print the first row of the returned Dataframe
End of explanation
"""


result = bf.q.fileParseStatus().answer().frame()

"""
Explanation: 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
End of explanation
"""


result.head(5)

"""
Explanation: 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
End of explanation
"""


result.iloc[0]

bf.set_network('generate_questions')

bf.set_snapshot('generate_questions')

"""
Explanation: Print the first row of the returned Dataframe
End of explanation
"""


result = bf.q.parseWarning().answer().frame()

"""
Explanation: 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
End of explanation
"""


result.head(5)

"""
Explanation: 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
End of explanation
"""


