The networking_cisco.apps.saf.agent.vdp.ovs_vdp
Module¶
This file contains the mixin class implementation of OVS extensions for VDP. VDP is a part of LLDP Agent Daemon (lldpad). For more information on VDP, pls visit http://www.ieee802.org/1/pages/802.1bg.html
-
class
networking_cisco.apps.saf.agent.vdp.ovs_vdp.
LocalVlan
(vlan, segmentation_id)¶ Bases:
object
-
any_consistent_vlan
()¶
-
any_valid_vlan
()¶
-
decr_reset_vlan
(port_uuid, new_vlan)¶
-
get_portid_fail_reason
(port_id)¶
-
get_portid_vlan
(port_id)¶
-
reset_port_vlan
(vdp_vlan)¶
-
set_fail_reason
(port_uuid, fail_reason)¶
-
set_port_uuid
(port_uuid, vdp_vlan, fail_reason)¶
-
set_port_vlan
(vdp_vlan)¶
-
set_portid_fail_reason
(port_id, fail_reason)¶
-
set_portid_vlan
(port_id, new_vlan)¶
-
-
class
networking_cisco.apps.saf.agent.vdp.ovs_vdp.
OVSNeutronVdp
(uplink, integ_br, ext_br, root_helper, vdp_vlan_cb, vdp_mode=10)¶ Bases:
object
Implements the VDP specific changes in OVS.
Creating the veth pairs, programming the flows for VDP, deleting the VDP specific flows, communicating with VDP (lldpad) daemon using lldpad class are some of the functionality provided by this class.
-
clear_obj_params
()¶
-
delete_vdp_flows
()¶
-
find_interconnect_ports
()¶ Find the internal veth or patch ports.
-
gen_veth_str
(const_str, intf_str)¶ Generate a veth string.
Concatenates the constant string with remaining available length of interface string from trailing position.
-
get_lldp_local_bridge_port
()¶
-
get_lldp_ovs_bridge_port
()¶
-
get_lvid_vdp_vlan
(net_uuid, port_uuid)¶ Retrieve the Local Vlan ID and VDP Vlan.
-
get_uplink_fail_reason
()¶
-
is_lldpad_setup_done
()¶
-
pop_local_cache
(port_uuid, mac, net_uuid, lvid, vdp_vlan, segmentation_id)¶ Populate the local cache after restart.
-
port_down_segment_mode
(lldpad_port, port_uuid, mac, net_uuid, segmentation_id, oui)¶
-
port_up_segment_mode
(lldpad_port, port_name, port_uuid, mac, net_uuid, segmentation_id, oui)¶
-
program_vdp_flows
(lldp_ovs_portnum, phy_port_num)¶
-
program_vm_ovs_flows
(lvid, old_vlan, new_vlan)¶
-
provision_vdp_overlay_networks
(port_uuid, mac, net_uuid, segmentation_id, lvid, oui)¶ Provisions a overlay type network configured using VDP.
Parameters: - port_uuid – the uuid of the VM port.
- mac – the MAC address of the VM.
- net_uuid – the uuid of the network associated with this vlan.
- segmentation_id – the VID for ‘vlan’ or tunnel ID for ‘tunnel’
Lvid: Local VLAN ID
Oui: OUI Parameters
-
send_vdp_port_event
(port_uuid, mac, net_uuid, segmentation_id, status, oui)¶ Send vNIC UP/Down event to VDP.
Parameters: - port – a ovslib.VifPort object.
- net_uuid – the net_uuid this port is to be associated with.
- segmentation_id – the VID for ‘vlan’ or tunnel ID for ‘tunnel’
- status – Type of port event. ‘up’ or ‘down’
-
send_vdp_port_event_internal
(port_uuid, mac, net_uuid, segmentation_id, status, oui)¶ Send vNIC UP/Down event to VDP.
Parameters: - port_uuid – a ovslib.VifPort object.
- net_uuid – the net_uuid this port is to be associated with.
- segmentation_id – the VID for ‘vlan’ or tunnel ID for ‘tunnel’
- status – Type of port event. ‘up’ or ‘down’
Mac: MAC address of the VNIC
Oui: OUI Parameters
-
setup_lldpad_ports
()¶ Setup the flows for passing LLDP/VDP frames in OVS.
-
unprovision_vdp_overlay_networks
(net_uuid, lvid, vdp_vlan, oui)¶ Unprovisions a overlay type network configured using VDP.
Parameters: net_uuid – the uuid of the network associated with this vlan. Lvid: Local VLAN ID Vdp_vlan: VDP VLAN ID Oui: OUI Parameters
-
vdp_vlan_change
(vsw_cb_data, vdp_vlan, fail_reason)¶ Callback Function from VDP when provider VLAN changes.
This will be called only during error cases when switch reloads or when compute reloads.
-
vdp_vlan_change_internal
(vsw_cb_data, vdp_vlan, fail_reason)¶ Callback Function from VDP when provider VLAN changes.
This will be called only during error cases when switch reloads or when compute reloads.
-
-
networking_cisco.apps.saf.agent.vdp.ovs_vdp.
delete_uplink_and_flows
(root_helper, br_ex, port_name)¶
-
networking_cisco.apps.saf.agent.vdp.ovs_vdp.
glob_delete_vdp_flows
(br_ex, root_helper)¶
-
networking_cisco.apps.saf.agent.vdp.ovs_vdp.
is_bridge_present
(br, root_helper)¶
-
networking_cisco.apps.saf.agent.vdp.ovs_vdp.
is_uplink_already_added
(root_helper, br_ex, port_name)¶