The networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_network_driver Module

Implements a Nexus-OS NETCONF over SSHv2 API Client

class networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_network_driver.CiscoNexusSshDriver(*args, **kwargs)

Bases: networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_base_network_driver.CiscoNexusBaseDriver

Nexus Driver Main Class.

close_session(*args, **kwargs)
create_and_trunk_vlan(nexus_host, vlan_id, vlan_name, intf_type, nexus_port, vni, is_native)

Create VLAN and trunk it on the specified ports.

create_nve_member(nexus_host, nve_int_num, vni, mcast_group)

Add a member configuration to the NVE interface.

create_vlan(nexus_host, vlanid, vlanname, vni)

Create a VLAN on a Nexus Switch.

Creates a VLAN given the VLAN ID, name and possible VxLAN ID.

create_xml_snippet(customized_config)

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.

delete_nve_member(nexus_host, nve_int_num, vni)

Delete a member configuration on the NVE interface.

delete_vlan(nexus_host, vlanid)

Delete a VLAN on Nexus Switch given the VLAN ID.

disable_vlan_on_trunk_int(nexus_host, vlanid, intf_type, interface, is_native)

Disable a VLAN on a trunk interface.

disable_vxlan_feature(nexus_host)

Disable VXLAN on the switch.

enable_vxlan_feature(nexus_host, nve_int_num, src_intf)

Enable VXLAN on the switch.

get_create_vlan(nexus_host, vlanid, vni, conf_str)

Returns an XML snippet for create VLAN on a Nexus Switch.

get_interface_switch(nexus_host, intf_type, interface)

Get the interface data from host.

Parameters:
  • nexus_host – IP address of Nexus switch
  • intf_type – String which specifies interface type. example: ethernet
  • interface – String indicating which interface. example: 1/19
Returns response:
 
get_nexus_type(nexus_host)

Given the nexus host, get the type of Nexus switch.

Parameters:nexus_host – IP address of Nexus switch
Returns:Nexus type
init_ssh_caching(*args, **kwargs)
initialize_all_switch_interfaces(interfaces, switch_ip=None, replay=True)

Configure Nexus interface and get port channel number.

Parameters:
  • interfaces – List of interfaces for a given switch. ch_grp can be altered as last arg to each interface. If no ch_grp, this arg will be zero.
  • switch_ip – IP address of Nexus switch
  • replay – Whether in replay path
initialize_baremetal_switch_interfaces(interfaces)

Initialize Nexus interfaces and for initial baremetal event.

keep_ssh_caching(*args, **kwargs)
send_edit_string(nexus_host, path, confstr, check_to_close_session=True)

Sends any XML snippet to Nexus switch.

send_enable_vlan_on_trunk_int(nexus_host, vlanid, intf_type, interface, is_native)

Gathers and sends an interface trunk XML snippet.

set_all_vlan_states(nexus_host, vlanid_range)

Set the VLAN states to active.