Module Expr Str Import alias Import alias Import alias ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias identifier ImportFrom alias identifier ImportFrom alias identifier Assign NameStore Call AttributeLoad NameLoad attr NameLoad ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr IfExp BoolOpOr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr CompareGtE BinOpAdd AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Str body Expr Str Assign NameStore BinOpSub Call AttributeLoad NameLoad attr NameLoad If CompareIn NameLoad AttributeLoad NameLoad attr body AugAssignAdd SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index Str NameLoad AugAssignAdd SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index Str Num If CompareLt NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index Str body Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index Str NameLoad If CompareGt NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index Str body Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index Str NameLoad orelse Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Dict Str Str Str Str NameLoad Num NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index Str BinOpDiv SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index Str SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index Str NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index Str SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index Str decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body Expr Str For NameStore TupleLoad Num Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr TryExcept body Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr keyword TupleLoad Str NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Str NameLoad keyword NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type NameLoad body Pass If CompareEq AttributeLoad NameLoad attr NameLoad body Raise Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad If CompareEq NameLoad Num body Assign NameStore NameLoad orelse Raise Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults Str Str NameLoad NameLoad body Expr Str If UnaryOpNot NameLoad body Assign NameStore ListLoad For NameStore TupleLoad Num Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr TryExcept body Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Break handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Str NameLoad keyword NameLoad For NameStore NameLoad body If CompareIn NameLoad Call AttributeLoad NameLoad attr Call NameLoad NameLoad body Return TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type NameLoad body Pass If CompareEq NameLoad Num body Assign NameStore NameLoad orelse Raise Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad If BoolOpAnd NameLoad Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameLoad body Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad NameLoad Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad NameLoad AttributeLoad NameLoad attr Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad NameLoad AttributeLoad NameLoad attr Assign NameStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore Call AttributeLoad NameLoad attr TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword Num keyword Dict Str Str handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad Raise Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr body AugAssignAdd NameStore AttributeLoad NameLoad attr Assign NameStore BinOpMod AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore BinOpMod AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str Dict Str Str NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot NameLoad body Return Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore ListLoad For NameStore Call NameLoad Call NameLoad NameLoad body Assign TupleStore NameStore NameStore NameStore NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad TryExcept body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Num handlers ExceptHandler type NameLoad body Assign NameStore Num If CompareIsNot NameLoad Num body Assign NameStore Str Assign NameStore Call NameLoad NameLoad AugAssignAdd SubscriptStore NameLoad Index NameLoad TupleLoad NameLoad If BoolOpAnd NameLoad CompareIn Str NameLoad body Pass orelse Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad Str If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Assign NameStore NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If CompareGt Call NameLoad NameLoad Num body Expr Call AttributeLoad NameLoad attr Str Call NameLoad SubscriptLoad NameLoad Index Num Return Call NameLoad SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Call NameLoad Str Return Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareEq Call NameLoad NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad SubscriptLoad NameLoad Index Num attr Return IfExp CompareEq Call NameLoad NameLoad Num SubscriptLoad NameLoad Index Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Assign NameStore BinOpMod AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Assign NameStore BinOpMod AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad orelse Assign NameStore BinOpMod AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore BinOpMod AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad keyword Str keyword NameLoad keyword ListLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore BinOpMod NameLoad TupleLoad NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore ListLoad If NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore NameLoad body AugAssignAdd NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Str If NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore BinOpMod NameLoad TupleLoad NameLoad NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr AugAssignAdd NameStore BinOpMod NameLoad TupleLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword Str keyword NameLoad keyword ListLoad Str Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore BinOpMod AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad keyword Str keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore BinOpMod AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad keyword Str keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpMod AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr BinOpMod AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr BinOpMod AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list decorator_list
N/A N/A 
Implements a Nexus-OS NETCONF over SSHv2 API Client
 N/A re N/A six N/A time oslo_config cfg oslo_log log logging oslo_utils importutils networking_cisco._i18n _LW networking_cisco.plugins.ml2.drivers.cisco.nexus config conf networking_cisco.plugins.ml2.drivers.cisco.nexus constants const networking_cisco.plugins.ml2.drivers.cisco.nexus exceptions cexc networking_cisco.plugins.ml2.drivers.cisco.nexus nexus_snippets snipp N/A LOG N/A N/A logging getLogger __name__ CiscoNexusDriver N/A object N/A N/A Nexus Driver Main Class. __init__ N/A N/A self N/A N/A N/A N/A self ncclient None N/A N/A self nexus_switches N/A N/A conf ML2MechCiscoConfig nexus_dict N/A N/A self connections N/A N/A N/A self time_stats N/A N/A N/A N/A self init_ssh_caching N/A keep_ssh_caching N/A N/A self N/A N/A N/A N/A self _close_ssh_session False N/A init_ssh_caching N/A N/A self N/A N/A N/A N/A self _close_ssh_session N/A N/A N/A N/A N/A cfg CONF ml2_cisco never_cache_ssh_connection N/A N/A N/A N/A cfg CONF rpc_workers N/A N/A cfg CONF api_workers N/A const MAX_NEXUS_SSH_SESSIONS True False N/A _import_ncclient N/A N/A self N/A N/A N/A Import the NETCONF client (ncclient) module.

        The ncclient module is not installed as part of the normal Neutron
        distributions. It is imported dynamically in this module so that
        the import can be mocked, allowing unit testing without requiring
        the installation of ncclient.

         N/A N/A N/A importutils import_module ncclient.manager N/A capture_and_print_timeshot N/A N/A self start_time which other switch N/A 99 0.0.0.0 N/A N/A Determine delta, keep track, and print results. N/A curr_timeout N/A N/A N/A time time start_time N/A N/A which N/A self time_stats N/A N/A N/A N/A N/A self time_stats N/A which N/A total_time curr_timeout N/A N/A N/A N/A self time_stats N/A which N/A total_count 1 N/A N/A curr_timeout N/A N/A N/A self time_stats N/A which N/A min N/A N/A N/A N/A N/A self time_stats N/A which N/A min curr_timeout N/A N/A curr_timeout N/A N/A N/A self time_stats N/A which N/A max N/A N/A N/A N/A N/A self time_stats N/A which N/A max curr_timeout N/A N/A N/A N/A self time_stats N/A which N/A total_time total_count min max curr_timeout 1 curr_timeout curr_timeout N/A N/A N/A LOG debug NEXUS_TIME_STATS %s: %s_timeout %f count %d average %f other %d min %f max %f switch which curr_timeout N/A N/A N/A self time_stats N/A which N/A total_count N/A N/A N/A N/A self time_stats N/A which N/A total_time N/A N/A N/A self time_stats N/A which N/A total_count other N/A N/A N/A self time_stats N/A which N/A min N/A N/A N/A self time_stats N/A which N/A max N/A _get_close_ssh_session N/A N/A self N/A N/A N/A N/A self _close_ssh_session N/A _close_session N/A N/A self mgr nexus_host N/A N/A N/A Close the connection to the nexus switch. N/A starttime N/A N/A time time N/A mgr N/A N/A N/A N/A N/A self connections pop nexus_host None N/A N/A N/A mgr close_session N/A N/A N/A self capture_and_print_timeshot starttime close switch nexus_host N/A _get_config N/A N/A self nexus_host filter N/A N/A N/A Get Nexus Host Configuration

        :param nexus_host: IP address of switch
        :param filter: filter string in XML format
        :returns: Configuration requested in string format
         N/A retry_count N/A 1 2 N/A N/A mgr N/A N/A self nxos_connect nexus_host N/A starttime N/A N/A time time N/A N/A N/A data_xml N/A N/A N/A mgr get filter N/A subtree filter data_xml N/A N/A N/A Exception N/A e N/A N/A N/A N/A self capture_and_print_timeshot starttime geterr retry_count switch nexus_host N/A N/A N/A N/A N/A self _close_session mgr nexus_host N/A N/A N/A Exception N/A N/A N/A N/A N/A snipp EXEC_GET_INVENTORY_SNIPPET filter N/A N/A N/A N/A cexc NexusConfigFailed nexus_host nexus_host config filter exc e N/A N/A retry_count 1 N/A N/A first_exc e N/A N/A N/A N/A cexc NexusConfigFailed nexus_host nexus_host config filter exc first_exc N/A N/A N/A N/A self capture_and_print_timeshot starttime get switch nexus_host N/A data_xml N/A _edit_config N/A N/A self nexus_host target config allowed_exc_strs check_to_close_session N/A running None True N/A N/A Modify switch config for a target config type.

        :param nexus_host: IP address of switch to configure
        :param target: Target config type
        :param config: Configuration string in XML format
        :param allowed_exc_strs: Exceptions which have any of these strings
                                 as a subset of their exception message
                                 (str(exception)) can be ignored
        :param check_to_close_session: Set to False when configured to close
                                       the ssh session is not to be checked.

        :raises: NexusConfigFailed: if _edit_config() encountered an exception
                                    not containing one of allowed_exc_strs

         N/A N/A allowed_exc_strs N/A N/A allowed_exc_strs N/A N/A retry_count N/A 1 2 N/A N/A mgr N/A N/A self nxos_connect nexus_host N/A N/A N/A LOG debug NexusDriver edit config for host %s: %s nexus_host config N/A starttime N/A N/A time time N/A N/A N/A N/A N/A mgr edit_config target target config config N/A N/A N/A N/A Exception N/A e N/A N/A N/A N/A self capture_and_print_timeshot starttime editerr retry_count switch nexus_host N/A exc_str allowed_exc_strs N/A N/A N/A exc_str N/A N/A six u N/A str e N/A N/A N/A N/A N/A N/A N/A self _close_session mgr nexus_host N/A N/A N/A Exception N/A N/A N/A N/A retry_count 1 N/A N/A first_exc e N/A N/A N/A N/A cexc NexusConfigFailed nexus_host nexus_host config config exc first_exc N/A N/A N/A self capture_and_print_timeshot starttime edit switch nexus_host N/A N/A check_to_close_session N/A N/A self _get_close_ssh_session N/A N/A N/A N/A self _close_session mgr nexus_host N/A nxos_connect N/A N/A self nexus_host N/A N/A N/A Make SSH connection to the Nexus Switch. N/A N/A getattr N/A N/A N/A self connections get nexus_host connected None N/A N/A N/A N/A self connections N/A nexus_host N/A N/A N/A self ncclient N/A N/A N/A self ncclient N/A N/A self _import_ncclient N/A nexus_ssh_port N/A int N/A N/A self nexus_switches N/A N/A nexus_host ssh_port N/A nexus_user N/A N/A self nexus_switches N/A N/A nexus_host N/A const USERNAME N/A nexus_password N/A N/A self nexus_switches N/A N/A nexus_host N/A const PASSWORD N/A hostkey_verify N/A N/A N/A cfg CONF ml2_cisco host_key_checks N/A starttime N/A N/A time time N/A N/A N/A man N/A N/A N/A self ncclient connect host nexus_host port nexus_ssh_port username nexus_user password nexus_password hostkey_verify hostkey_verify timeout 30 device_params N/A name nexus N/A N/A N/A Exception N/A e N/A N/A N/A N/A self capture_and_print_timeshot starttime connecterr switch nexus_host N/A N/A N/A cexc NexusConnectFailed nexus_host nexus_host exc e N/A N/A N/A self capture_and_print_timeshot starttime connect switch nexus_host N/A N/A N/A self connections N/A nexus_host man N/A N/A N/A self connections N/A nexus_host N/A create_xml_snippet N/A N/A self customized_config N/A N/A N/A Create XML snippet.

        Creates the Proper XML structure for the Nexus Switch Configuration.
        and also does 'copy run start' if configured to do so.  This
        latter command allows configuration to persist on the switch after
        reboot.
         N/A N/A N/A N/A N/A conf cfg CONF ml2_cisco persistent_switch_config N/A N/A customized_config N/A snipp EXEC_SAVE_CONF_SNIPPET N/A conf_xml_snippet N/A N/A snipp EXEC_CONF_SNIPPET customized_config N/A conf_xml_snippet N/A get_interface_switch N/A N/A self nexus_host intf_type interface N/A N/A N/A Get the interface data from host.

        :param nexus_host: IP address of Nexus switch
        :param intf_type:  String which specifies interface type.
                           example: ethernet
        :param interface:  String indicating which interface.
                           example: 1/19
        :returns response:
         N/A confstr N/A N/A snipp EXEC_GET_INTF_SNIPPET N/A intf_type interface N/A starttime N/A N/A time time N/A response N/A N/A self _get_config nexus_host confstr N/A N/A N/A self capture_and_print_timeshot starttime getif switch nexus_host N/A N/A N/A LOG debug GET call returned interface %(if_type)s %(interface)s config N/A if_type interface intf_type interface N/A response N/A initialize_all_switch_interfaces N/A N/A self interfaces N/A N/A N/A Configure Nexus interface and get port channel number.

        Receive a list of interfaces containing:
        :param nexus_host: IP address of Nexus switch
        :param intf_type:  String which specifies interface type.
                           example: ethernet
        :param interface:  String indicating which interface.
                           example: 1/19
        :returns interface: Appends port channel to each entry
                            channel number is 0 if none
         N/A N/A interfaces N/A N/A N/A starttime N/A N/A time time N/A ifs N/A N/A i N/A range N/A len interfaces N/A N/A N/A nexus_host intf_type nexus_port is_native N/A interfaces N/A i N/A response N/A N/A self get_interface_switch nexus_host intf_type nexus_port N/A mo N/A N/A re search channel-group\s(\d*)\s response N/A N/A N/A ch_grp N/A int N/A N/A mo group 1 N/A N/A N/A Exception N/A N/A ch_grp 0 N/A N/A ch_grp 0 N/A N/A intf_type port-channel N/A nexus_port N/A str ch_grp N/A N/A interfaces N/A i N/A ch_grp N/A N/A response N/A switchport trunk allowed vlan response N/A N/A N/A N/A N/A N/A ifs append N/A N/A self build_intf_confstr N/A snipp CMD_INT_VLAN_SNIPPET intf_type nexus_port None N/A ifs N/A N/A confstr N/A N/A self create_xml_snippet N/A N/A join ifs N/A N/A N/A self _edit_config nexus_host target running config confstr N/A N/A N/A self capture_and_print_timeshot starttime get_allif switch nexus_host N/A get_version N/A N/A self nexus_host N/A N/A N/A Given the nexus host, get the version data.

        :param nexus_host: IP address of Nexus switch
        :returns version number
         N/A confstr N/A snipp EXEC_GET_VERSION_SNIPPET N/A response N/A N/A self _get_config nexus_host confstr N/A N/A N/A LOG debug GET call returned version N/A version None N/A response N/A N/A version N/A N/A re findall \<sys_ver_str\>([ -~]+)\<\/sys_ver_str\> response N/A version N/A get_nexus_type N/A N/A self nexus_host N/A N/A N/A Given the nexus host, get the type of Nexus switch.

        :param nexus_host: IP address of Nexus switch
        :returns Nexus type
         N/A confstr N/A snipp EXEC_GET_INVENTORY_SNIPPET N/A starttime N/A N/A time time N/A response N/A N/A self _get_config nexus_host confstr N/A N/A N/A self capture_and_print_timeshot starttime gettype switch nexus_host N/A response N/A N/A nexus_type N/A N/A re findall \<[mod:]*desc\>"*Nexus\s*(\d)\d+\s*[0-9A-Z]+\s*[cC]hassis\s*"*\<\/[mod:]*desc\> response N/A N/A N/A len nexus_type 0 N/A N/A N/A N/A LOG debug GET call returned Nexus type %d N/A int N/A nexus_type N/A 0 N/A N/A int N/A nexus_type N/A 0 N/A N/A N/A LOG warning N/A _LW GET call failed to return Nexus type N/A -1 N/A _extract_line_item_data N/A N/A self obj which re_str N/A N/A N/A data N/A N/A obj re_search_children which N/A N/A N/A len data 1 N/A N/A data N/A N/A re findall re_str N/A N/A data N/A 0 text N/A N/A N/A N/A len data 1 N/A data N/A 0 None N/A set_all_vlan_states N/A N/A self nexus_host vlanid_range N/A N/A N/A Set the VLAN states to active. N/A starttime N/A N/A time time N/A N/A N/A LOG debug NexusDriver:  N/A snippet N/A N/A snipp CMD_VLAN_CREATE_SNIPPET vlanid_range N/A N/A N/A self capture_and_print_timeshot starttime set_all_vlan_states switch nexus_host N/A N/A N/A self send_edit_string nexus_host snippet N/A get_create_vlan N/A N/A self nexus_host vlanid vni N/A N/A N/A Returns an XML snippet for create VLAN on a Nexus Switch. N/A N/A N/A LOG debug NexusDriver:  N/A starttime N/A N/A time time N/A vni N/A N/A snippet N/A N/A snipp CMD_VLAN_CONF_VNSEGMENT_SNIPPET N/A vlanid vni N/A N/A snippet N/A N/A snipp CMD_VLAN_CREATE_SNIPPET vlanid N/A N/A N/A self capture_and_print_timeshot starttime get_create_vlan switch nexus_host N/A snippet N/A create_vlan N/A N/A self nexus_host vlanid vlanname vni N/A N/A N/A Create a VLAN on a Nexus Switch.

        Creates a VLAN given the VLAN ID, name and possible VxLAN ID.
         N/A N/A N/A LOG debug NexusDriver:  N/A starttime N/A N/A time time N/A confstr N/A N/A self get_create_vlan nexus_host vlanid vni N/A N/A N/A self send_edit_string nexus_host confstr N/A N/A N/A self capture_and_print_timeshot starttime create_vlan_seg switch nexus_host N/A delete_vlan N/A N/A self nexus_host vlanid N/A N/A N/A Delete a VLAN on Nexus Switch given the VLAN ID. N/A confstr N/A N/A snipp CMD_NO_VLAN_CONF_SNIPPET vlanid N/A confstr N/A N/A self create_xml_snippet confstr N/A starttime N/A N/A time time N/A N/A N/A self _edit_config nexus_host target running config confstr allowed_exc_strs N/A None of the VLANs exist N/A N/A N/A self capture_and_print_timeshot starttime del_vlan switch nexus_host N/A build_intf_confstr N/A N/A self snippet intf_type interface vlanid N/A N/A N/A Build the VLAN config string xml snippet to be used. N/A confstr N/A snippet N/A intf_type interface vlanid intf_type N/A confstr N/A get_enable_vlan_on_trunk_int N/A N/A self nexus_host vlanid intf_type interface is_native confstr N/A N/A N/A Prepares an XML snippet for VLAN on a trunk interface.

        :param nexus_host: IP address of Nexus switch
        :param vlanid:     Vlanid(s) to add to interface
        :param intf_type:  String which specifies interface type.
                           example: ethernet
        :param interface:  String indicating which interface.
                           example: 1/19
        :param confstr:    last confstr
        :returns           XML snippet
         N/A starttime N/A N/A time time N/A snippets N/A N/A is_native N/A N/A N/A N/A snippets append N/A snipp CMD_INT_VLAN_NATIVE_SNIPPET N/A N/A N/A snippets append N/A snipp CMD_INT_VLAN_ADD_SNIPPET N/A snip snippets N/A N/A confstr N/A N/A self build_intf_confstr snippet snip intf_type intf_type interface interface vlanid vlanid N/A N/A N/A self capture_and_print_timeshot starttime createif switch nexus_host N/A confstr N/A disable_vlan_on_trunk_int N/A N/A self nexus_host vlanid intf_type interface is_native N/A N/A N/A Disable a VLAN on a trunk interface. N/A starttime N/A N/A time time N/A confstr N/A is_native N/A N/A snippet N/A snipp CMD_NO_VLAN_INT_NATIVE_SNIPPET N/A confstr N/A snippet N/A intf_type interface intf_type N/A snippet N/A snipp CMD_NO_VLAN_INT_SNIPPET N/A confstr N/A snippet N/A intf_type interface vlanid intf_type N/A confstr N/A N/A self create_xml_snippet confstr N/A N/A N/A self _edit_config nexus_host target running config confstr N/A N/A N/A self capture_and_print_timeshot starttime delif switch nexus_host N/A send_edit_string N/A N/A self nexus_host confstr N/A N/A N/A Sends any XML snippet to Nexus switch. N/A starttime N/A N/A time time N/A confstr N/A N/A self create_xml_snippet confstr N/A N/A N/A self _edit_config nexus_host target running config confstr allowed_exc_strs N/A VLAN with the same name exists Can't modify state for extended Command is only allowed on VLAN N/A N/A N/A self capture_and_print_timeshot starttime send_edit switch nexus_host N/A send_enable_vlan_on_trunk_int N/A N/A self nexus_host vlanid intf_type interface is_native N/A N/A N/A Gathers and sends an interface trunk XML snippet. N/A confstr N/A N/A self get_enable_vlan_on_trunk_int nexus_host vlanid intf_type interface is_native N/A N/A N/A self send_edit_string nexus_host confstr N/A create_and_trunk_vlan N/A N/A self nexus_host vlan_id vlan_name intf_type nexus_port vni is_native N/A N/A N/A Create VLAN and trunk it on the specified ports. N/A starttime N/A N/A time time N/A N/A N/A self create_vlan nexus_host vlan_id vlan_name vni N/A N/A N/A LOG debug NexusDriver created VLAN: %s vlan_id N/A nexus_port N/A N/A N/A N/A self send_enable_vlan_on_trunk_int nexus_host vlan_id intf_type nexus_port is_native N/A N/A N/A self capture_and_print_timeshot starttime create_all switch nexus_host N/A create_vlan_svi N/A N/A self nexus_host vlan_id gateway_ip N/A N/A N/A Create VLAN vn_segment. N/A confstr N/A N/A snipp CMD_VLAN_SVI_SNIPPET N/A vlan_id gateway_ip N/A confstr N/A N/A self create_xml_snippet confstr N/A N/A N/A LOG debug NexusDriver:  N/A N/A N/A self _edit_config nexus_host target running config confstr N/A delete_vlan_svi N/A N/A self nexus_host vlan_id N/A N/A N/A Delete VLAN vn_segment. N/A confstr N/A N/A snipp CMD_NO_VLAN_SVI_SNIPPET vlan_id N/A confstr N/A N/A self create_xml_snippet confstr N/A N/A N/A LOG debug NexusDriver:  N/A N/A N/A self _edit_config nexus_host target running config confstr N/A enable_vxlan_feature N/A N/A self nexus_host nve_int_num src_intf N/A N/A N/A Enable VXLAN on the switch. N/A confstr N/A N/A self create_xml_snippet N/A snipp CMD_FEATURE_VXLAN_SNIPPET N/A N/A N/A LOG debug NexusDriver:  N/A N/A N/A self _edit_config nexus_host config confstr N/A confstr N/A N/A self create_xml_snippet N/A N/A snipp CMD_INT_NVE_SNIPPET N/A nve_int_num src_intf N/A N/A N/A LOG debug NexusDriver:  N/A N/A N/A self _edit_config nexus_host config confstr N/A disable_vxlan_feature N/A N/A self nexus_host N/A N/A N/A Disable VXLAN on the switch. N/A confstr N/A N/A self create_xml_snippet N/A snipp CMD_NO_FEATURE_VXLAN_SNIPPET N/A N/A N/A LOG debug NexusDriver:  N/A N/A N/A self _edit_config nexus_host config confstr N/A create_nve_member N/A N/A self nexus_host nve_int_num vni mcast_group N/A N/A N/A Add a member configuration to the NVE interface. N/A confstr N/A N/A self create_xml_snippet N/A N/A snipp CMD_INT_NVE_MEMBER_SNIPPET N/A nve_int_num vni mcast_group N/A N/A N/A LOG debug NexusDriver:  N/A N/A N/A self _edit_config nexus_host config confstr N/A delete_nve_member N/A N/A self nexus_host nve_int_num vni N/A N/A N/A Delete a member configuration on the NVE interface. N/A confstr N/A N/A self create_xml_snippet N/A N/A snipp CMD_INT_NVE_NO_MEMBER_SNIPPET N/A nve_int_num vni N/A N/A N/A LOG debug NexusDriver:  N/A N/A N/A self _edit_config nexus_host config confstr N/A N/A