:py:mod:`ttp-ex` ================ .. py:module:: ttp-ex .. autoapi-nested-parse:: TTP. Module Contents --------------- .. py:data:: data_to_parse :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """ router bgp 65001 bgp router-id 192.168.10.1 bgp log-neighbor-changes neighbor 10.1.0.1 remote-as 65000 neighbor 10.1.0.1 update-source GigabitEthernet2.1001 neighbor 10.1.0.5 remote-as 65000 neighbor 10.1.0.5 update-source GigabitEthernet3.1001 ! address-family ipv4 redistribute connected neighbor 10.1.0.1 activate neighbor 10.1.0.1 send-community both neighbor 10.1.0.1 route-map PL-EBGP-PE1-OUT out neighbor 10.1.0.5 activate neighbor 10.1.0.5 send-community both neighbor 10.1.0.5 route-map PL-EBGP-PE2-OUT out exit-address-family """ .. raw:: html
.. py:data:: ttp_template :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """ def to_bool(captured_data): represent_as_bools = ["activate", "log-neighbor-changes"] if captured_data in represent_as_bools: return captured_data, {captured_data: True} router bgp {{ asn }} bgp router-id {{ router-id }} bgp {{ log-neighbor-changes | macro('to_bool')}} neighbor {{ neighbor }} remote-as {{ remote-as }} neighbor 10.1.0.1 update-source {{ update-source }} ! {{ ignore }} address-family {{ afi }} redistribute {{ redistribute }} exit-address-family {{ ignore }} """ .. raw:: html
.. py:data:: parser .. py:data:: results