Module Import alias Import alias Import alias Import alias Import alias Import alias identifier ImportFrom alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias identifier ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Assign NameStore Str ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore Num FunctionDef arguments args NameParam defaults kwarg body TryExcept body Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr Str Dict Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr BoolOpOr Call AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Raise Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If BoolOpAnd CompareIsNot Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad ListLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Return decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Dict AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call SubscriptLoad NameLoad Index SubscriptLoad SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Num Index Str If BoolOpAnd NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Raise Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Raise Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam NameParam defaults body Return BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Str If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpMod AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Assign NameStore BinOpMod AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Str If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpMod AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad If Call AttributeLoad NameLoad attr NameLoad body Assign NameStore BinOpMod AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index Str If CompareIs NameLoad Str body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad orelse If CompareIs NameLoad Str body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return SubscriptLoad Call AttributeLoad NameLoad attr Slice AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body If BoolOpAnd AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr body Return AttributeLoad NameLoad attr orelse Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Dict Str Str keyword AttributeLoad NameLoad attr If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Assign NameStore Dict Str Str Str Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Raise Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return BinOpMod Str TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return SubscriptLoad SubscriptLoad NameLoad Index Str Index Str decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Assign NameStore BinOpAdd SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num Str If CompareEq NameLoad NameLoad body Return Call NameLoad BinOpMult Call NameLoad SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num Num orelse If CompareEq NameLoad NameLoad body Return Call NameLoad BinOpAdd BinOpMult Call NameLoad SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num Num Num orelse Assign NameStore Dict Str Str Str NameLoad Raise Call AttributeLoad NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore ListComp SubscriptLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Index Num comprehension NameStore NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpMod Str NameLoad For NameStore NameLoad body If CompareIn Str NameLoad body Assign NameStore SubscriptLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Index Num Expr Call AttributeLoad NameLoad attr Str NameLoad Return NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad Return CompareGt Call NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore ListLoad Str Str TryExcept body For NameStore NameLoad body Assign NameStore BinOpMod AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword NameLoad If Call AttributeLoad NameLoad attr NameLoad Str body Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Num handlers ExceptHandler type NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str For NameStore NameLoad body Assign NameStore SubscriptLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Index Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore ListLoad For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword Str If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Num Index Num If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Assign NameStore AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore ListLoad BinOpAdd Str Call NameLoad NameLoad BinOpAdd BinOpAdd BinOpAdd Str Call NameLoad NameLoad Str Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num If NameLoad body If CompareIn SubscriptLoad NameLoad Index Num NameLoad body Return NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Return NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Return CompareGt Call NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore BinOpMod AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore BinOpMod AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIn NameLoad Call AttributeLoad NameLoad attr body Assign NameStore BinOpMod AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body If CompareNotIn NameLoad Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Assign NameStore BinOpMod AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body If Call AttributeLoad NameLoad attr NameLoad body Assign NameStore BinOpMod AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body If CompareNotIn NameLoad Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Assign NameStore BinOpMod AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore BinOpMod AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Return Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad If UnaryOpNot NameLoad body Assign NameStore BinOpMod AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore BinOpMod AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore BinOpMod AttributeLoad NameLoad attr TupleLoad NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore BinOpMod AttributeLoad NameLoad attr TupleLoad NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore BinOpMod AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad BinOpAdd Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore BinOpMod AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad BinOpAdd Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore BinOpMod AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad If Call AttributeLoad NameLoad attr NameLoad body Assign NameStore BinOpMod AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore BinOpMod AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore BinOpMod AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore BinOpMod AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore BinOpMod AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore BinOpMod AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Return Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpAdd Num NameLoad If CompareLt Call NameLoad NameLoad BinOpAdd NameLoad Num body Return Str Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Num Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareIn Str AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Str attr attr Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr If CompareNotEq NameLoad Str body Expr Call AttributeLoad NameLoad attr NameLoad Delete NameDel Return Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad Str Dict Str Str Str Str SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad NameLoad Call AttributeLoad NameLoad attr TryExcept body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad handlers ExceptHandler type NameLoad name NameStore body If Call AttributeLoad NameLoad attr Str NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Pass orelse If Call NameLoad NameLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr body Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Dict Str Str Str Str Str Str NameLoad NameLoad NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str AttributeLoad NameLoad attr NameLoad Raise Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr Str Dict Str Str NameLoad AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If CompareIn Str NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Return NameLoad Assign NameStore AttributeLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num attr Assign NameStore AttributeLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num attr Assign NameStore Dict Str Str Str Str Str Str NameLoad NameLoad NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str AttributeLoad NameLoad attr NameLoad Raise Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list
N/A N/A inspect N/A logging N/A netaddr N/A re N/A time N/A xml.etree.ElementTree ET oslo_config cfg oslo_utils importutils networking_cisco._i18n _LE _LI _LW networking_cisco.plugins.cisco.cfg_agent cfg_exceptions cfg_exc networking_cisco.plugins.cisco.cfg_agent.device_drivers devicedriver_api networking_cisco.plugins.cisco.cfg_agent.device_drivers.csr1kv cisco_csr1kv_snippets snippets networking_cisco.plugins.cisco.common.htparser HTParser networking_cisco.plugins.cisco.extensions ha N/A ncclient N/A N/A importutils try_import ncclient N/A manager N/A N/A importutils try_import ncclient.manager N/A LOG N/A N/A logging getLogger __name__ N/A T1_PORT_NAME_PREFIX t1_p: N/A T2_PORT_NAME_PREFIX t2_p: IosXeRoutingDriver N/A N/A devicedriver_api RoutingDriverBase N/A N/A Generic IOS XE Routing Driver.

    This driver encapsulates the configuration logic via NETCONF protocol to
    configure a generic (IOS-XE based) device for implementing
    Neutron L3 services. These services include routing, NAT and floating
    IPs (as per Neutron terminology).
     N/A DEV_NAME_LEN 14 __init__ N/A N/A self N/A device_params N/A N/A N/A N/A N/A self _host_ip N/A device_params N/A management_ip_address N/A N/A self _host_ssh_port N/A device_params N/A protocol_port N/A credentials N/A N/A device_params get credentials N/A N/A N/A self _username N/A N/A credentials get user_name N/A N/A self _password N/A N/A credentials get password N/A N/A self _timeout N/A N/A N/A device_params get timeout N/A N/A N/A cfg CONF cfg_agent device_connection_timeout N/A N/A self _ncc_connection None N/A N/A self _itfcs_enabled False N/A N/A N/A KeyError N/A e N/A N/A N/A N/A LOG error N/A _LE Missing device parameter:%s. Aborting IosXeRoutingDriver initialization e N/A N/A N/A cfg_exc InitializationException N/A router_added N/A N/A self ri N/A N/A N/A N/A N/A self _create_vrf ri N/A router_removed N/A N/A self ri N/A N/A N/A N/A N/A self _remove_vrf ri N/A internal_network_added N/A N/A self ri port N/A N/A N/A N/A N/A self _create_sub_interface ri port N/A N/A N/A N/A N/A port get N/A ha HA_INFO None N/A N/A ri get N/A ha ENABLED False N/A N/A N/A N/A self _add_ha ri port N/A internal_network_removed N/A N/A self ri port N/A N/A N/A N/A N/A self _remove_sub_interface port N/A external_gateway_added N/A N/A self ri ext_gw_port N/A N/A N/A N/A N/A self _create_sub_interface ri ext_gw_port N/A N/A N/A self _add_default_route ri ext_gw_port N/A external_gateway_removed N/A N/A self ri ext_gw_port N/A N/A N/A N/A N/A self _remove_default_route ri ext_gw_port N/A N/A N/A self _remove_sub_interface ext_gw_port N/A enable_internal_network_NAT N/A N/A self ri port ext_gw_port N/A N/A N/A N/A N/A self _add_internal_nw_nat_rules ri port ext_gw_port N/A disable_internal_network_NAT N/A N/A self ri port ext_gw_port N/A N/A N/A N/A N/A self _remove_internal_nw_nat_rules ri N/A port ext_gw_port N/A floating_ip_added N/A N/A self ri ext_gw_port floating_ip fixed_ip N/A N/A N/A N/A N/A self _add_floating_ip ri floating_ip fixed_ip N/A floating_ip_removed N/A N/A self ri ext_gw_port floating_ip fixed_ip N/A N/A N/A N/A N/A self _remove_floating_ip ri ext_gw_port floating_ip fixed_ip N/A routes_updated N/A N/A self ri action route N/A N/A N/A N/A N/A self _update_routing_table ri action route N/A clear_connection N/A N/A self N/A N/A N/A N/A self _ncc_connection None N/A cleanup_invalid_cfg N/A N/A self hd routers N/A N/A N/A N/A get_configuration N/A N/A self N/A N/A N/A N/A N/A self _get_running_config split False N/A _create_sub_interface N/A N/A self ri port N/A N/A N/A vrf_name N/A N/A self _get_vrf_name ri N/A ip_cidr N/A port N/A ip_cidr N/A net_mask N/A N/A N/A netaddr IPNetwork ip_cidr netmask N/A gateway_ip N/A N/A N/A ip_cidr split / N/A 0 N/A sub_interface N/A N/A self _get_interface_name_from_hosting_port port N/A vlan N/A N/A self _get_interface_vlan_from_hosting_port port N/A N/A N/A self _do_create_sub_interface sub_interface vlan vrf_name gateway_ip net_mask N/A _remove_sub_interface N/A N/A self port N/A N/A N/A sub_interface N/A N/A self _get_interface_name_from_hosting_port port N/A N/A N/A self _do_remove_sub_interface sub_interface N/A _add_ha N/A N/A self ri port N/A N/A N/A func_dict N/A N/A ha HA_HSRP N/A ha HA_VRRP N/A ha HA_GLBP N/A self _add_ha_hsrp N/A self _add_ha_vrrp N/A self _add_ha_gblp N/A N/A N/A func_dict N/A N/A N/A ri N/A N/A ha DETAILS N/A N/A ha TYPE self ri port N/A _add_ha_hsrp N/A N/A self ri port N/A N/A N/A priority N/A N/A ri N/A N/A ha DETAILS N/A N/A ha PRIORITY N/A port_ha_info N/A port N/A N/A ha HA_INFO N/A group N/A port_ha_info N/A group N/A ip N/A N/A N/A N/A port_ha_info N/A ha_port N/A fixed_ips N/A 0 N/A ip_address N/A N/A ip group priority N/A N/A vrf_name N/A N/A self _get_vrf_name ri N/A sub_interface N/A N/A self _get_interface_name_from_hosting_port port N/A N/A N/A self _do_set_ha_hsrp sub_interface vrf_name priority group ip N/A _add_ha_vrrp N/A N/A self ri port N/A N/A N/A N/A NotImplementedError N/A _add_ha_gblp N/A N/A self ri port N/A N/A N/A N/A NotImplementedError N/A _remove_ha N/A N/A self ri port N/A N/A N/A N/A _get_acl_name_from_vlan N/A N/A self vlan N/A N/A N/A N/A acl_%s vlan N/A _add_internal_nw_nat_rules N/A N/A self ri port ext_port N/A N/A N/A vrf_name N/A N/A self _get_vrf_name ri N/A in_vlan N/A N/A self _get_interface_vlan_from_hosting_port port N/A acl_no N/A N/A self _get_acl_name_from_vlan in_vlan N/A internal_cidr N/A port N/A ip_cidr N/A internal_net N/A N/A N/A netaddr IPNetwork internal_cidr network N/A net_mask N/A N/A N/A netaddr IPNetwork internal_cidr hostmask N/A inner_itfc N/A N/A self _get_interface_name_from_hosting_port port N/A outer_itfc N/A N/A self _get_interface_name_from_hosting_port ext_port N/A N/A N/A self _nat_rules_for_internet_access acl_no internal_net net_mask inner_itfc outer_itfc vrf_name N/A _remove_internal_nw_nat_rules N/A N/A self ri ports ext_port N/A N/A N/A acls N/A N/A port ports N/A N/A in_itfc_name N/A N/A self _get_interface_name_from_hosting_port port N/A inner_vlan N/A N/A self _get_interface_vlan_from_hosting_port port N/A N/A N/A acls append N/A N/A self _get_acl_name_from_vlan inner_vlan N/A N/A N/A self _remove_interface_nat in_itfc_name inside N/A N/A N/A LOG debug Sleep for 2 seconds before clearing NAT rules N/A N/A N/A time sleep 2 N/A N/A N/A self _remove_dyn_nat_translations N/A vrf_name N/A N/A self _get_vrf_name ri N/A ext_itfc_name N/A N/A self _get_interface_name_from_hosting_port ext_port N/A acl acls N/A N/A N/A N/A self _remove_dyn_nat_rule acl ext_itfc_name vrf_name N/A _add_default_route N/A N/A self ri ext_gw_port N/A N/A N/A ext_gw_ip N/A N/A ext_gw_port N/A subnet N/A gateway_ip N/A ext_gw_ip N/A N/A vrf_name N/A N/A self _get_vrf_name ri N/A conf_str N/A N/A snippets DEFAULT_ROUTE_CFG N/A vrf_name ext_gw_ip N/A N/A N/A N/A self _cfg_exists conf_str N/A N/A conf_str N/A N/A snippets SET_DEFAULT_ROUTE N/A vrf_name ext_gw_ip N/A N/A N/A self _edit_running_config conf_str SET_DEFAULT_ROUTE N/A _remove_default_route N/A N/A self ri ext_gw_port N/A N/A N/A ext_gw_ip N/A N/A ext_gw_port N/A subnet N/A gateway_ip N/A ext_gw_ip N/A N/A vrf_name N/A N/A self _get_vrf_name ri N/A conf_str N/A N/A snippets DEFAULT_ROUTE_CFG N/A vrf_name ext_gw_ip N/A N/A N/A self _cfg_exists conf_str N/A N/A conf_str N/A N/A snippets REMOVE_DEFAULT_ROUTE N/A vrf_name ext_gw_ip N/A N/A N/A self _edit_running_config conf_str REMOVE_DEFAULT_ROUTE N/A _add_floating_ip N/A N/A self ri floating_ip fixed_ip N/A N/A N/A vrf_name N/A N/A self _get_vrf_name ri N/A N/A N/A self _do_add_floating_ip floating_ip fixed_ip vrf_name N/A _remove_floating_ip N/A N/A self ri ext_gw_port floating_ip fixed_ip N/A N/A N/A vrf_name N/A N/A self _get_vrf_name ri N/A out_itfc_name N/A N/A self _get_interface_name_from_hosting_port ext_gw_port N/A N/A N/A self _remove_interface_nat out_itfc_name outside N/A N/A N/A self _remove_dyn_nat_translations N/A N/A N/A self _do_remove_floating_ip floating_ip fixed_ip vrf_name N/A N/A N/A self _add_interface_nat out_itfc_name outside N/A _update_routing_table N/A N/A self ri action route N/A N/A N/A vrf_name N/A N/A self _get_vrf_name ri N/A destination_net N/A N/A netaddr IPNetwork N/A route N/A destination N/A dest N/A destination_net network N/A dest_mask N/A destination_net netmask N/A next_hop N/A route N/A nexthop N/A N/A action replace N/A N/A N/A N/A self _add_static_route dest dest_mask next_hop vrf_name N/A N/A N/A action delete N/A N/A N/A N/A self _remove_static_route dest dest_mask next_hop vrf_name N/A N/A N/A N/A LOG error N/A _LE Unknown route command %s action N/A _create_vrf N/A N/A self ri N/A N/A N/A vrf_name N/A N/A self _get_vrf_name ri N/A N/A N/A self _do_create_vrf vrf_name N/A _remove_vrf N/A N/A self ri N/A N/A N/A vrf_name N/A N/A self _get_vrf_name ri N/A N/A N/A self _do_remove_vrf vrf_name N/A _get_vrf_name N/A N/A self ri N/A N/A N/A N/A N/A N/A ri router_name N/A N/A self DEV_NAME_LEN N/A _get_connection N/A N/A self N/A N/A N/A Make SSH connection to the CSR.

        The external ncclient library is used for creating this connection.
        This method keeps state of any existing connections and reuses them if
        already connected. Also CSR1kv's interfaces (except management) are
        disabled by default when it is booted. So if connecting for the first
        time, driver will enable all other interfaces and keep that status in
        the `_itfcs_enabled` flag.
         N/A N/A N/A N/A N/A self _ncc_connection N/A N/A self _ncc_connection connected N/A N/A N/A self _ncc_connection N/A N/A N/A self _ncc_connection N/A N/A manager connect host N/A self _host_ip port N/A self _host_ssh_port username N/A self _username password N/A self _password device_params N/A name csr timeout N/A self _timeout N/A N/A N/A self _itfcs_enabled N/A N/A N/A self _itfcs_enabled N/A N/A self _enable_itfcs N/A self _ncc_connection N/A N/A self _ncc_connection N/A N/A N/A Exception N/A e N/A N/A conn_params N/A host port user timeout reason N/A self _host_ip N/A self _host_ssh_port N/A self _username N/A self _timeout N/A e message N/A N/A N/A cfg_exc ConnectionException conn_params N/A _get_interface_name_from_hosting_port N/A N/A self port N/A N/A N/A vlan N/A N/A self _get_interface_vlan_from_hosting_port port N/A int_no N/A N/A self _get_interface_no_from_hosting_port port N/A N/A GigabitEthernet%s.%s N/A int_no vlan N/A _get_interface_vlan_from_hosting_port N/A N/A port N/A N/A N/A N/A N/A port N/A hosting_info N/A segmentation_id N/A staticmethod _get_interface_no_from_hosting_port N/A N/A port N/A N/A N/A Calculate interface number from the hosting port's name.

         Interfaces in the CSR1kv are created in pairs (T1 and T2) where
         T1 interface is used for VLAN and T2 interface for VXLAN traffic
         respectively. On the neutron side these are named T1 and T2 ports and
         follows the naming convention: <Tx_PORT_NAME_PREFIX>:<PAIR_INDEX>
         where the `PORT_NAME_PREFIX` indicates either VLAN or VXLAN and
         `PAIR_INDEX` is the pair number. `PAIR_INDEX` starts at 1.

         In CSR1kv, GigabitEthernet 0 is not present and GigabitEthernet 1
         is used as a management interface (Note: this might change in
         future). So the first (T1,T2) pair corresponds to
         (GigabitEthernet 2, GigabitEthernet 3) and so forth. This function
         extracts the `PAIR_INDEX` and calculates the corresponding interface
         number.

        :param port: neutron port corresponding to the interface.
        :return: number of the interface (eg: 1 in case of GigabitEthernet1)
         N/A _name N/A N/A port N/A hosting_info N/A hosting_port_name N/A if_type N/A N/A N/A N/A _name split : N/A 0 : N/A N/A if_type T1_PORT_NAME_PREFIX N/A N/A N/A str N/A N/A int N/A N/A N/A _name split : N/A 1 2 N/A N/A N/A if_type T2_PORT_NAME_PREFIX N/A N/A N/A str N/A N/A N/A int N/A N/A N/A _name split : N/A 1 2 1 N/A N/A params N/A attribute value hosting_port_name _name N/A N/A N/A cfg_exc CSR1kvUnknownValueException params N/A staticmethod _get_interfaces N/A N/A self N/A N/A N/A Get a list of interfaces on this hosting device.

        :return: List of the interfaces
         N/A ios_cfg N/A N/A self _get_running_config N/A parse N/A HTParser ios_cfg N/A itfcs_raw N/A N/A parse find_lines ^interface GigabitEthernet N/A itfcs N/A N/A N/A N/A N/A N/A raw_if strip split N/A 1 N/A raw_if itfcs_raw N/A N/A N/A LOG debug Interfaces on hosting device: %s itfcs N/A itfcs N/A _get_interface_ip N/A N/A self interface_name N/A N/A N/A Get the ip address for an interface.

        :param interface_name: interface_name as a string
        :return: ip address of interface as a string
         N/A ios_cfg N/A N/A self _get_running_config N/A parse N/A HTParser ios_cfg N/A children N/A N/A parse find_children N/A ^interface %s interface_name N/A line children N/A N/A N/A ip address line N/A N/A ip_address N/A N/A N/A N/A N/A line strip split N/A 2 N/A N/A N/A LOG debug IP Address:%s ip_address N/A ip_address N/A N/A N/A LOG warning N/A _LW Cannot find interface: %s interface_name N/A None N/A _interface_exists N/A N/A self interface N/A N/A N/A Check whether interface exists. N/A ios_cfg N/A N/A self _get_running_config N/A parse N/A HTParser ios_cfg N/A itfcs_raw N/A N/A parse find_lines N/A ^interface  interface N/A N/A N/A len itfcs_raw 0 N/A _enable_itfcs N/A N/A self conn N/A N/A N/A Enable the interfaces of a CSR1kv Virtual Router.

        When the virtual router first boots up, all interfaces except
        management are down. This method will enable all data interfaces.

        Note: In CSR1kv, GigabitEthernet 0 is not present. GigabitEthernet 1
        is used as management and GigabitEthernet 2 and up are used for data.
        This might change in future releases.

        Currently only the second and third Gig interfaces corresponding to a
        single (T1,T2) pair and configured as trunk for VLAN and VXLAN
        is enabled.

        :param conn: Connection object
        :return: True or False
         N/A interfaces N/A GigabitEthernet 2 GigabitEthernet 3 N/A N/A N/A i interfaces N/A N/A conf_str N/A N/A snippets ENABLE_INTF i N/A rpc_obj N/A N/A conn edit_config target running config conf_str N/A N/A N/A self _check_response rpc_obj ENABLE_INTF N/A N/A N/A N/A LOG info N/A _LI Enabled interface %s  i N/A N/A N/A time sleep 1 N/A N/A N/A Exception N/A N/A False N/A True N/A _get_vrfs N/A N/A self N/A N/A N/A Get the current VRFs configured in the device.

        :return: A list of vrf names as string
         N/A vrfs N/A N/A ios_cfg N/A N/A self _get_running_config N/A parse N/A HTParser ios_cfg N/A vrfs_raw N/A N/A parse find_lines ^vrf definition N/A line vrfs_raw N/A N/A vrf_name N/A N/A N/A N/A N/A line strip split N/A 2 N/A N/A N/A vrfs append vrf_name N/A N/A N/A LOG info N/A _LI VRFs:%s vrfs N/A vrfs N/A _get_capabilities N/A N/A self N/A N/A N/A Get the servers NETCONF capabilities.

        :return: List of server capabilities.
         N/A conn N/A N/A self _get_connection N/A capabilities N/A N/A c N/A conn server_capabilities N/A N/A N/A N/A capabilities append c N/A N/A N/A LOG debug Server capabilities: %s capabilities N/A capabilities N/A _get_running_config N/A N/A self split N/A True N/A N/A Get the CSR's current running config.

        :return: Current IOS running config as multiline string
         N/A conn N/A N/A self _get_connection N/A config N/A N/A conn get_config source running N/A config N/A N/A root N/A N/A ET fromstring N/A config _raw N/A running_config N/A N/A root N/A 0 N/A 0 N/A N/A split True N/A N/A rgx N/A N/A re compile 
*
+ N/A ioscfg N/A N/A rgx split N/A running_config text N/A N/A ioscfg N/A running_config text N/A ioscfg N/A _check_acl N/A N/A self acl_no network netmask N/A N/A N/A Check a ACL config exists in the running config.

        :param acl_no: access control list (ACL) number
        :param network: network which this ACL permits
        :param netmask: netmask of the network
        :return:
         N/A exp_cfg_lines N/A N/A ip access-list standard  N/A str acl_no N/A N/A N/A  permit  N/A str network N/A str netmask N/A ios_cfg N/A N/A self _get_running_config N/A parse N/A HTParser ios_cfg N/A acls_raw N/A N/A parse find_children N/A exp_cfg_lines N/A 0 N/A acls_raw N/A N/A N/A N/A exp_cfg_lines N/A 1 acls_raw N/A N/A True N/A N/A N/A LOG error N/A _LE Mismatch in ACL configuration for %s acl_no N/A False N/A N/A N/A LOG debug %s is not present in config acl_no N/A False N/A _cfg_exists N/A N/A self cfg_str N/A N/A N/A Check a partial config string exists in the running config.

        :param cfg_str: config string to check
        :return : True or False
         N/A ios_cfg N/A N/A self _get_running_config N/A parse N/A HTParser ios_cfg N/A cfg_raw N/A N/A parse find_lines N/A ^ cfg_str N/A N/A N/A LOG debug _cfg_exists(): Found lines %s cfg_raw N/A N/A N/A len cfg_raw 0 N/A _set_interface N/A N/A self name ip_address mask N/A N/A N/A conf_str N/A N/A snippets SET_INTC N/A name ip_address mask N/A N/A N/A self _edit_running_config conf_str SET_INTC N/A _do_create_vrf N/A N/A self vrf_name N/A N/A N/A conf_str N/A N/A snippets CREATE_VRF vrf_name N/A N/A N/A self _edit_running_config conf_str CREATE_VRF N/A _do_remove_vrf N/A N/A self vrf_name N/A N/A N/A N/A vrf_name N/A N/A self _get_vrfs N/A N/A conf_str N/A N/A snippets REMOVE_VRF vrf_name N/A N/A N/A self _edit_running_config conf_str REMOVE_VRF N/A _do_create_sub_interface N/A N/A self sub_interface vlan_id vrf_name ip mask N/A N/A N/A N/A vrf_name N/A N/A self _get_vrfs N/A N/A N/A N/A LOG error N/A _LE VRF %s not present vrf_name N/A conf_str N/A N/A snippets CREATE_SUBINTERFACE N/A sub_interface vlan_id vrf_name ip mask N/A N/A N/A self _edit_running_config conf_str CREATE_SUBINTERFACE N/A _do_remove_sub_interface N/A N/A self sub_interface N/A N/A N/A N/A N/A self _interface_exists sub_interface N/A N/A conf_str N/A N/A snippets REMOVE_SUBINTERFACE sub_interface N/A N/A N/A self _edit_running_config conf_str REMOVE_SUBINTERFACE N/A _do_set_ha_hsrp N/A N/A self sub_interface vrf_name priority group ip N/A N/A N/A N/A vrf_name N/A N/A self _get_vrfs N/A N/A N/A N/A LOG error N/A _LE VRF %s not present vrf_name N/A conf_str N/A N/A snippets SET_INTC_HSRP N/A sub_interface vrf_name group priority group ip N/A action N/A SET_INTC_HSRP (Group: %s, Priority: % s) N/A group priority N/A N/A N/A self _edit_running_config conf_str action N/A _do_remove_ha_hsrp N/A N/A self sub_interface group N/A N/A N/A conf_str N/A N/A snippets REMOVE_INTC_HSRP N/A sub_interface group N/A action N/A REMOVE_INTC_HSRP (subinterface:%s, Group:%s) N/A sub_interface group N/A N/A N/A self _edit_running_config conf_str action N/A _get_interface_cfg N/A N/A self interface N/A N/A N/A ios_cfg N/A N/A self _get_running_config N/A parse N/A HTParser ios_cfg N/A N/A N/A parse find_children N/A interface  interface N/A _nat_rules_for_internet_access N/A N/A self acl_no network netmask inner_itfc outer_itfc vrf_name N/A N/A N/A Configure the NAT rules for an internal network.

        Configuring NAT rules in the CSR1kv is a three step process. First
        create an ACL for the IP range of the internal network. Then enable
        dynamic source NATing on the external interface of the CSR for this
        ACL and VRF of the neutron router. Finally enable NAT on the
        interfaces of the CSR where the internal and external networks are
        connected.

        :param acl_no: ACL number of the internal network.
        :param network: internal network
        :param netmask: netmask of the internal network.
        :param inner_itfc: (name of) interface connected to the internal
        network
        :param outer_itfc: (name of) interface connected to the external
        network
        :param vrf_name: VRF corresponding to this virtual router
        :return: True if configuration succeeded
        :raises: networking_cisco.plugins.cisco.cfg_agent.cfg_exceptions.
        CSR1kvConfigException
         N/A acl_present N/A N/A self _check_acl acl_no network netmask N/A N/A acl_present N/A N/A conf_str N/A N/A snippets CREATE_ACL N/A acl_no network netmask N/A N/A N/A self _edit_running_config conf_str CREATE_ACL N/A conf_str N/A N/A snippets SET_DYN_SRC_TRL_INTFC N/A acl_no outer_itfc vrf_name N/A N/A N/A self _edit_running_config conf_str SET_DYN_SRC_TRL_INTFC N/A conf_str N/A N/A snippets SET_NAT N/A inner_itfc inside N/A N/A N/A self _edit_running_config conf_str SET_NAT_INSIDE N/A conf_str N/A N/A snippets SET_NAT N/A outer_itfc outside N/A N/A N/A self _edit_running_config conf_str SET_NAT_OUTSIDE N/A _add_interface_nat N/A N/A self itfc_name itfc_type N/A N/A N/A conf_str N/A N/A snippets SET_NAT N/A itfc_name itfc_type N/A N/A N/A self _edit_running_config conf_str N/A SET_NAT_ itfc_type N/A _remove_interface_nat N/A N/A self itfc_name itfc_type N/A N/A N/A conf_str N/A N/A snippets REMOVE_NAT N/A itfc_name itfc_type N/A N/A N/A self _edit_running_config conf_str N/A SET_NAT_ itfc_type N/A _remove_dyn_nat_rule N/A N/A self acl_no outer_itfc_name vrf_name N/A N/A N/A conf_str N/A N/A snippets SNAT_CFG N/A acl_no outer_itfc_name vrf_name N/A N/A N/A self _cfg_exists conf_str N/A N/A conf_str N/A N/A snippets REMOVE_DYN_SRC_TRL_INTFC N/A acl_no outer_itfc_name vrf_name N/A N/A N/A self _edit_running_config conf_str REMOVE_DYN_SRC_TRL_INTFC N/A conf_str N/A N/A snippets REMOVE_ACL acl_no N/A N/A N/A self _edit_running_config conf_str REMOVE_ACL N/A _remove_dyn_nat_translations N/A N/A self N/A N/A N/A conf_str N/A snippets CLEAR_DYN_NAT_TRANS N/A N/A N/A self _edit_running_config conf_str CLEAR_DYN_NAT_TRANS N/A _do_add_floating_ip N/A N/A self floating_ip fixed_ip vrf N/A N/A N/A conf_str N/A N/A snippets SET_STATIC_SRC_TRL N/A fixed_ip floating_ip vrf N/A N/A N/A self _edit_running_config conf_str SET_STATIC_SRC_TRL N/A _do_remove_floating_ip N/A N/A self floating_ip fixed_ip vrf N/A N/A N/A conf_str N/A N/A snippets REMOVE_STATIC_SRC_TRL N/A fixed_ip floating_ip vrf N/A N/A N/A self _edit_running_config conf_str REMOVE_STATIC_SRC_TRL N/A _get_floating_ip_cfg N/A N/A self N/A N/A N/A ios_cfg N/A N/A self _get_running_config N/A parse N/A HTParser ios_cfg N/A res N/A N/A parse find_lines ip nat inside source static N/A res N/A _add_static_route N/A N/A self dest dest_mask next_hop vrf N/A N/A N/A conf_str N/A N/A snippets SET_IP_ROUTE N/A vrf dest dest_mask next_hop N/A N/A N/A self _edit_running_config conf_str SET_IP_ROUTE N/A _remove_static_route N/A N/A self dest dest_mask next_hop vrf N/A N/A N/A conf_str N/A N/A snippets REMOVE_IP_ROUTE N/A vrf dest dest_mask next_hop N/A N/A N/A self _edit_running_config conf_str REMOVE_IP_ROUTE N/A _get_static_route_cfg N/A N/A self N/A N/A N/A ios_cfg N/A N/A self _get_running_config N/A parse N/A HTParser ios_cfg N/A N/A N/A parse find_lines ip route N/A caller_name N/A N/A self skip N/A 2 N/A N/A 
        Get a name of a caller in the format module.class.method

       `skip` specifies how many levels of stack to skip while getting caller
       name. skip=1 means "who calls me", skip=2 "who calls my caller" etc.

       An empty string is returned if skipped levels exceed stack height
        N/A stack N/A N/A inspect stack N/A start N/A 0 skip N/A N/A N/A len stack N/A start 1 N/A N/A N/A parentframe N/A N/A stack N/A start N/A 0 N/A name N/A N/A module N/A N/A inspect getmodule parentframe N/A module N/A N/A N/A N/A name append N/A module __name__ N/A N/A self N/A parentframe f_locals N/A N/A N/A N/A name append N/A N/A N/A N/A parentframe f_locals N/A self __class__ __name__ N/A codename N/A N/A parentframe f_code co_name N/A N/A codename <module> N/A N/A N/A N/A name append codename N/A parentframe N/A N/A N/A . join name N/A _edit_running_config N/A N/A self conf_str snippet N/A N/A N/A conn N/A N/A self _get_connection N/A N/A N/A LOG info N/A _LI Config generated for [%(device)s] %(snip)s is:%(conf)s caller:%(caller)s N/A device snip conf caller N/A N/A self hosting_device N/A id snippet conf_str N/A N/A self caller_name N/A N/A N/A rpc_obj N/A N/A conn edit_config target running config conf_str N/A N/A N/A self _check_response rpc_obj snippet conf_str conf_str N/A N/A N/A Exception N/A e N/A N/A N/A N/A re search REMOVE_|DELETE_ snippet N/A N/A N/A N/A LOG warning N/A _LW Pass exception for %s snippet N/A N/A N/A N/A isinstance e N/A N/A N/A ncclient operations rpc RPCError N/A N/A e_tag N/A e tag N/A e_type N/A e type N/A params N/A snippet type tag dev_id ip confstr snippet e_type e_tag N/A N/A self hosting_device N/A id N/A self _host_ip conf_str N/A N/A N/A cfg_exc CSR1kvConfigException params N/A _check_response N/A N/A self rpc_obj snippet_name conf_str N/A None N/A N/A This function checks the rpc response object for status.

        This function takes as input the response rpc_obj and the snippet name
        that was executed. It parses it to see, if the last edit operation was
        a success or not.
            <?xml version="1.0" encoding="UTF-8"?>
            <rpc-reply message-id="urn:uuid:81bf8082-....-b69a-000c29e1b85c"
                       xmlns="urn:ietf:params:netconf:base:1.0">
                <ok />
            </rpc-reply>
        In case of error, CSR1kv sends a response as follows.
        We take the error type and tag.
            <?xml version="1.0" encoding="UTF-8"?>
            <rpc-reply message-id="urn:uuid:81bf8082-....-b69a-000c29e1b85c"
            xmlns="urn:ietf:params:netconf:base:1.0">
                <rpc-error>
                    <error-type>protocol</error-type>
                    <error-tag>operation-failed</error-tag>
                    <error-severity>error</error-severity>
                </rpc-error>
            </rpc-reply>
        :return: True if the config operation completed successfully
        :raises: networking_cisco.plugins.cisco.cfg_agent.cfg_exceptions.
        CSR1kvConfigException
         N/A N/A N/A LOG debug RPCReply for %(snippet_name)s is %(rpc_obj)s N/A snippet_name rpc_obj snippet_name N/A rpc_obj xml N/A xml_str N/A rpc_obj xml N/A N/A <ok /> xml_str N/A N/A N/A N/A LOG info N/A _LI %s was successfully executed snippet_name N/A True N/A e_type N/A N/A N/A N/A rpc_obj _root N/A 0 N/A 0 text N/A e_tag N/A N/A N/A N/A rpc_obj _root N/A 0 N/A 1 text N/A params N/A snippet type tag dev_id ip confstr snippet_name e_type e_tag N/A N/A self hosting_device N/A id N/A self _host_ip conf_str N/A N/A N/A cfg_exc CSR1kvConfigException params N/A N/A