bf.set_network('generate_questions')

bf.set_snapshot('hybridcloud')

"""
Explanation: IPSec Tunnels
This category of questions allows you to query IPSec sessions and tunnels.

IPSec Session Status
IPSec Edges
End of explanation
"""


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

"""
Explanation: IPSec Session Status
Returns the status of configured IPSec sessions.
Shows configuration settings and status for each configured IPSec tunnel in the network. The status is IPSEC_SESSION_ESTABLISHED for tunnels that are expected to be established; it is IKE_PHASE1_FAILED if IKE parameters negotiation failed; it is IKE_PHASE1_KEY_MISMATCH if IKE negotiation was successful but IKE keys do not match; it is IPSEC_PHASE2_FAILED if negotiation of IPsec parameters failed; and it is MISSING_END_POINT if the remote endpoint for a configured IPsec tunnel could not be found in the network.
Inputs
Name | Description | Type | Optional | Default Value
--- | --- | --- | --- | --- 
nodes | Include sessions whose first node matches this specifier. | NodeSpec | True | 
remoteNodes | Include sessions whose second node matches this specifier. | NodeSpec | True | 
status | Only include IPSec sessions for which status matches this specifier. | IpsecSessionStatusSpec | True | 
Invocation
End of explanation
"""


result.head(5)

"""
Explanation: Return Value
Name | Description | Type
--- | --- | ---
Node | IPSec initiator | str
Node_Interface | Initiator Interface | Interface
Node_IP | Initiator IP | str
Remote_Node | IPSec responder | str
Remote_Node_Interface | Responder Interface | Interface
Remote_Node_IP | Responder IP | str
Tunnel_Interfaces | Tunnel interfaces pair used in peering session | str
Status | IPSec session status | str
Print the first 5 rows of the returned Dataframe
End of explanation
"""


result.iloc[0]

bf.set_network('generate_questions')

bf.set_snapshot('hybridcloud')

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


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

"""
Explanation: IPSec Edges
Returns IPSec tunnels.
Lists all IPSec tunnels in the network.
Inputs
Name | Description | Type | Optional | Default Value
--- | --- | --- | --- | --- 
nodes | Include tunnels whose first node matches this name or regex. | NodeSpec | True | .
remoteNodes | Include tunnels whose second node matches this name or regex. | NodeSpec | True | .
Invocation
End of explanation
"""


result.head(5)

"""
Explanation: Return Value
Name | Description | Type
--- | --- | ---
Source_Interface | Source interface used in the IPsec session | Interface
Tunnel_Interface | Tunnel interface (if any) used in the IPsec session | Interface
Remote_Source_Interface | Remote source interface used in the IPsec session | Interface
Remote_Tunnel_Interface | Remote tunnel interface (if any) used in the IPsec session | Interface
Print the first 5 rows of the returned Dataframe
End of explanation
"""


result.iloc[0]

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


