pybvc.openflowdev package

Submodules

pybvc.openflowdev.ofswitch module

@authors: Sergei Garbuzov @status: Development @version: 1.1.0

ofswitch.py: OpenFlow switch properties and methods

class pybvc.openflowdev.ofswitch.Action(order=None)

Bases: object

set_order(order)
class pybvc.openflowdev.ofswitch.ArpSrcHwAddrMatch

Bases: pybvc.openflowdev.ofswitch.Match

ARP source hardware address

class pybvc.openflowdev.ofswitch.ArpTgtHwAddrMatch

Bases: pybvc.openflowdev.ofswitch.Match

ARP target hardware address

class pybvc.openflowdev.ofswitch.BucketCounter(d)

Group Buckets statistics data. Helper class of the GroupStatistics class.

get_id()
to_ofp_oxm_syntax()
class pybvc.openflowdev.ofswitch.CopyTTLInwardsAction(order=0)

Bases: pybvc.openflowdev.ofswitch.Action

Copy the TTL from outermost to next-to-outermost header with TTL. Copy can be IP-to-IP, MPLS-to-MPLS, or MPLS-to-IP. (OpenFlow Switch Specification Version 1.3)

to_ofp_oxm_syntax()
class pybvc.openflowdev.ofswitch.CopyTTLOutwardsAction(order=0)

Bases: pybvc.openflowdev.ofswitch.Action

Copy the TTL from next-to-outermost to outermost header with TTL. Copy can be IP-to-IP, MPLS-to-MPLS, or IP-to-MPLS. (OpenFlow Switch Specification Version 1.3)

to_ofp_oxm_syntax()
class pybvc.openflowdev.ofswitch.DecMplsTTLAction(order=0)

Bases: pybvc.openflowdev.ofswitch.Action

Decrement the MPLS TTL. Only applies to packets with an existing MPLS shim header. (OpenFlow Switch Specification Version 1.3)

to_ofp_oxm_syntax()
class pybvc.openflowdev.ofswitch.DecNwTTLAction(order=0)

Bases: pybvc.openflowdev.ofswitch.Action

Decrement the IPv4 TTL or IPv6 Hop Limit field and update the IP checksum. Only applies to IPv4 and IPv6 packets. (OpenFlow Switch Specification Version 1.3)

to_ofp_oxm_syntax()
class pybvc.openflowdev.ofswitch.DropAction(order=None)

Bases: pybvc.openflowdev.ofswitch.Action

There is no explicit action to represent drops. Instead, packets whose action sets have no output actions should be dropped. This result could come from empty instruction sets or empty action buckets in the processing pipeline, or after executing a Clear-Actions instruction. (OpenFlow Switch Specification Version 1.0 and 1.3)

set_order(order)
to_ofp_oxm_syntax()
class pybvc.openflowdev.ofswitch.EthernetMatch(d=None)

Bases: pybvc.openflowdev.ofswitch.Match

Ethernet specific match fields

get_dst()
get_src()
get_type()
set_dst(eth_dst)
set_src(eth_src)
set_type(eth_type)
class pybvc.openflowdev.ofswitch.FlowEntry(flow_json=None, flow_dict=None)

Bases: object

Class for creating and interacting with OpenFlow flows

add_instruction(instruction)
add_instructions(instructions)
add_match(match)
get_bytes_cnt()
get_duration()
get_flow_barrier(barrier)
get_flow_hard_timeout()
get_flow_id()
get_flow_idle_timeout()
get_flow_install_hw()
get_flow_name()
get_flow_priority()
get_flow_strict()
get_flow_table_id()
get_instructions()
get_match_fields()
get_payload()

Return FlowEntry as a payload for the HTTP request body

get_pkts_cnt()
set_flow_barrier(barrier)
set_flow_hard_timeout(hard_timeout)
set_flow_id(flow_id)
set_flow_idle_timeout(idle_timeout)
set_flow_install_hw(install_hw)
set_flow_name(flow_name)
set_flow_priority(flow_priority)
set_flow_strict(strict)
set_flow_table_id(table_id)
to_json()

Return FlowEntry as JSON

to_ofp_oxm_syntax()
to_yang_json(strip=False)
class pybvc.openflowdev.ofswitch.GroupAction(order=None, group=None, group_id=None, d=None)

Bases: pybvc.openflowdev.ofswitch.Action

Process the packet through the specified group. The exact interpretation depends on group type. (OpenFlow Switch Specification Version 1.3)

get_group_id()
set_group(group)
set_group_id(group_id)
to_ofp_oxm_syntax()
class pybvc.openflowdev.ofswitch.GroupBucket(bucket_id=None, bucket_dict=None)

Helper class for representing ‘buckets’ property of the GroupEntry class

add_action(action)
create_action_from_dict(d)
get_actions()
get_id()
get_watch_group()
get_watch_port()
get_weight()
set_watch_group(group_id)
set_watch_port(port)
set_weight(weight)
to_json()

Return this object represented as JSON

to_ofp_oxm_syntax(skip_garbage=False)

Controller returns value of 2**32-1 (4294967295) for unassigned counters, ‘skip_garbage’ flag set True tells to ignore them

to_string()

Returns string representation of this object.

class pybvc.openflowdev.ofswitch.GroupDescription(stats)

Description of an OpenFlow Group.

add_bucket(bucket)
get_buckets()
get_id()
to_json()

Return this object as JSON

to_ofp_oxm_syntax()
to_yang_json(strip=False)
class pybvc.openflowdev.ofswitch.GroupEntry(group_id=None, group_type=None, group_dict=None)

Class that represents a group entry in the OpenFlow Group Table

add_bucket(bucket)
get_barrier(barrier)
get_buckets()
get_container_name()
get_group_id()
get_group_name()
get_group_type()
get_payload()

Return GroupEntry as a payload for the HTTP request body

set_barrier(barrier)
set_container_name(name)
set_group_id(group_id)
set_group_name(name)
set_group_type(group_type)
to_json()

Return GroupEntry represented as JSON object

to_ofp_oxm_syntax()
to_string()

Returns string representation of this object.

to_yang_json(strip=False)
class pybvc.openflowdev.ofswitch.GroupFeatures(features)

Represents Group Features of an OpenFlow device (group types, max number of groups for each type, group capabilities and group supported actions).

actions_bitmap = {0: 'OUTPUT', 1: 'SET_VLAN_VID', 2: 'SET_VLAN_PCP', 3: 'STRIP_VLAN', 4: 'SET_DL_SRC', 5: 'SET_DL_DST', 6: 'SET_NW_SRC', 7: 'SET_NW_DST', 8: 'SET_NW_TOS', 9: 'SET_TP_SRC', 10: 'SET_TP_DST', 11: 'COPY-TTL-OUT', 12: 'COPY-TTL-IN', 15: 'SET-MPLS-TTL', 16: 'DEC-MPLS-TTL', 17: 'PUSH-VLAN', 18: 'POP-VLAN', 19: 'PUSH-MPLS', 20: 'POP-MPLS', 21: 'SET-QUEUE', 22: 'GROUP', 23: 'SET-NW-TTL', 24: 'DEC-NW-TTL', 25: 'SET-FIELD', 26: 'PUSH-PBB', 27: 'POP-PBB'}
actions_bitmap_size = 28
capabilities_map = {'select-liveness': 2, 'chaining-checks': 8, 'select-weight': 1, 'chaining': 4}
get_actions()
get_capabilities()
get_max_groups()
get_types()
types_map = {'ff': 3, 'all': 0, 'indirect': 2, 'select': 1}
class pybvc.openflowdev.ofswitch.GroupInfo(group_info)

Represents current state of an OpenFlow group entry in the Controller’s operational data store. (OpenFlow switch context specific data)

add_bucket(bucket)
get_buckets()
get_description()
get_id()
get_statistics()
to_ofp_oxm_syntax()
class pybvc.openflowdev.ofswitch.GroupStatistics(stats)

Statistics data for an OpenFlow Group

add_bucket(bucket)
get_buckets()
get_duration()
get_group_id()
to_json()

Return this object as JSON

to_ofp_oxm_syntax()
to_yang_json(strip=False)
class pybvc.openflowdev.ofswitch.IcmpMatch(d=None)

Bases: pybvc.openflowdev.ofswitch.Match

ICMPv4 specific match fields

get_code()
get_type()
set_code(icmp_code)
set_type(icmp_type)
class pybvc.openflowdev.ofswitch.IcmpV6Match(d=None)

Bases: pybvc.openflowdev.ofswitch.Match

ICMPv6 specific match fields

get_code()
get_type()
set_code(icmpv6_code)
set_type(icmpv6_type)
class pybvc.openflowdev.ofswitch.Instruction(instruction_order=None, d=None)

Class representing an OpenFlow flow instruction

add_apply_action(action)
create_action_from_dict(d)
get_apply_actions()
is_apply_actions_type()
class pybvc.openflowdev.ofswitch.Instructions(d=None)

‘Class representing OpenFlow flow instructions set

add_instruction(instruction)
get_instructions()
class pybvc.openflowdev.ofswitch.IpMatch(d=None)

Bases: pybvc.openflowdev.ofswitch.Match

IPv4 protocol specific match fields

get_ip_dscp()
get_ip_ecn()
get_ip_proto()
set_ip_dscp(ip_dscp)
set_ip_ecn(ip_ecn)
set_ip_proto(ip_proto)
class pybvc.openflowdev.ofswitch.Ipv6ExtHdr(exthdr=None, exthdr_mask=None)

Bases: pybvc.openflowdev.ofswitch.Match

IPv6 Extension Header pseudo-field

get_exthdr()
get_exthdr_mask()
set_exthdr(exthdr, exthdr_mask=None)
set_exthdr_mask(exthdr_mask)
class pybvc.openflowdev.ofswitch.Ipv6Label(flabel=None, flabel_mask=None)

Bases: pybvc.openflowdev.ofswitch.Match

IPv6 Flow Label

get_flabel()
get_flabel_mask()
set_flabel(flabel, flabel_mask=None)
set_flabel_mask(flabel_mask)
class pybvc.openflowdev.ofswitch.Match(d=None)

Bases: object

Class that represents OpenFlow flow matching attributes

get_arp_opcode()
get_arp_src_hw_address()
get_arp_src_transport_address()
get_arp_tgt_hw_address()
get_arp_tgt_transport_address()
get_eth_dst()
get_eth_src()
get_eth_type()
get_icmp4_type()
get_icmpv4_code()
get_icmpv6_code()
get_icmpv6_type()
get_in_phy_port()
get_in_port()
get_ip_dscp()
get_ip_ecn()
get_ip_proto()
get_ipv4_dst()
get_ipv4_src()
get_ipv6_dst()
get_ipv6_exh_hdr()
get_ipv6_flabel()
get_ipv6_src()
get_metadata()
get_metadata_mask()
get_mpls_bos()
get_mpls_label()
get_mpls_tc()
get_sctp_dst()
get_sctp_src()
get_tcp_dst()
get_tcp_src()
get_tunnel_id()
get_udp_dst()
get_udp_src()
get_vlan_id()
get_vlan_pcp()
set_arp_opcode(arp_opcode)
set_arp_src_hw_address(arp_src_hw_addr)
set_arp_src_transport_address(arp_src_tp_addr)
set_arp_tgt_hw_address(arp_tgt_hw_addr)
set_arp_tgt_transport_address(arp_tgt_tp_addr)
set_eth_dst(eth_dst)
set_eth_src(eth_src)
set_eth_type(eth_type)
set_icmpv4_code(icmpv4_code)
set_icmpv4_type(icmpv4_type)
set_icmpv6_code(icmpv6_code)
set_icmpv6_type(icmpv6_type)
set_in_phy_port(in_phy_port)
set_in_port(in_port)
set_ip_dscp(ip_dscp)
set_ip_ecn(ip_ecn)
set_ip_proto(ip_proto)
set_ipv4_dst(ipv4_dst)
set_ipv4_src(ipv4_src)
set_ipv6_dst(ipv6_dst)
set_ipv6_exh_hdr(ipv6_exthdr)
set_ipv6_flabel(ipv6_flabel)
set_ipv6_src(ipv6_src)
set_metadata(metadata)
set_metadata_mask(metadata_mask)
set_mpls_bos(mpls_bos)
set_mpls_label(mpls_label)
set_mpls_tc(mpls_tc)
set_sctp_dst(sctp_port)
set_sctp_src(sctp_port)
set_tcp_dst(tcp_port)
set_tcp_src(tcp_port)
set_tunnel_id(tunnel_id)
set_udp_dst(udp_port)
set_udp_src(udp_port)
set_vlan_id(vlan_id)
set_vlan_pcp(vlan_pcp)
class pybvc.openflowdev.ofswitch.Metadata

Bases: pybvc.openflowdev.ofswitch.Match

Table metadata. Used to pass information between tables

get_metadata()
get_metadata_mask()
set_metadata(metadata)
set_metadata_mask(metadata_mask)
class pybvc.openflowdev.ofswitch.MeterFeatures(features)

Represents Metering Features of an OpenFlow device.

capabilities_map = {'stats': 8, 'pktps': 2, 'kbps': 1, 'burst': 4}
get_band_types()
get_capabilities()
get_max_bands()
get_max_colors()
get_max_meters()
types_map = {'experimenter': 65535, 'drop': 1, 'dscp-remark': 2}
class pybvc.openflowdev.ofswitch.OFSwitch(ctrl=None, name=None, dpid=None)

Bases: pybvc.controller.openflownode.OpenflowNode

Class that represents an instance of ‘OpenFlow Switch’ (OpenFlow capable device).

add_modify_flow(flow_entry)
add_modify_flow_json(table_id, flow_id, flow_json)
add_modify_group(group_entry)

Create a new or modify an existing group in the configuration data store of the Controller

add_modify_group_json(group_id, group_json)

Create a new or modify an existing group in the configuration data store of the Controller

delete_flow(table_id, flow_id)
delete_flows(flow_table_id)
delete_group(group_id)

Remove given group from the configuration data store of the Controller

get_FlowEntries(tableid, operational=True)
get_FlowEntry(table_id, flow_id, operational=True)
get_GroupEntries(operational=True)
get_GroupEntry(group_id, operational=True)
get_configured_FlowEntries(flow_table_id)
get_configured_FlowEntry(tableid, flowid)
get_configured_GroupEntries()
get_configured_GroupEntry(group_id)
get_configured_flow(tableid, flowid)
get_configured_flows(tableid)
get_configured_group(group_id, decode_object=False)

Retrieve group information from the Controller’s configuration data store

get_configured_group_ids()

Retrieve list of group IDs in the configuration data store of the Controller

get_configured_groups(decode_object=False)
get_features_info()
get_flow(tableid, flowid, operational=True)
get_flows(tableid, operational=True)
get_group(group_id, operational=True, decode_object=False)

Retrieve group information from the Controller, (refer to operational or configuration data store)

get_group_description(group_id, decode_object=False)

Retrieve description of the given group (along with the group’s bucket actions) from the Controller’s operational data store

get_group_features(decode_object=False)

Retrieve from the Controller’s operational data store information about group features supported by the OpenFlow switch

get_group_ids(operational=True)

Retrieve list of group IDs available on the Controller (refer to operational or configuration data store)

get_group_statistics(group_id, decode_object=False)

Retrieve statistics for the given group in the Controller’s operational data store

get_groups(operational=True)
get_groups_description(decode_object=False)

Retrieve description of all groups (along with the group’s bucket actions) from the Controller’s operational data store

get_groups_statistics(decode_object=False)

Retrieve statistics for all groups in the Controller’s operational data store

get_meter_features(decode_object=False)

Retrieve from the Controller’s operational data store information about metering features supported by the OpenFlow switch

get_operational_FlowEntries(flow_table_id)
get_operational_FlowEntry(tableid, flowid)
get_operational_GroupEntries()
get_operational_GroupEntry(group_id)
get_operational_flow(tableid, flowid)
get_operational_flows(tableid)
get_operational_group(group_id, decode_object=False)

Retrieve group information from the Controller’s operational data store

get_operational_group_ids()

Retrieve list of group IDs in the operational data store of the Controller

get_port_brief_info(portnum)
get_port_detail_info(portnum)
get_port_queue_stats(port_num, queue_id, decode_obj=False)
get_port_queues_stats(port_num, decode_obj=False)
get_ports_brief_info()
get_ports_list()
get_switch_info()
to_json()

Returns JSON representation of this object.

to_string()

Returns string representation of this object.

class pybvc.openflowdev.ofswitch.OutputAction(order=None, port=None, max_len=None, d=None)

Bases: pybvc.openflowdev.ofswitch.Action

The Output action forwards a packet to a specified OpenFlow port. OpenFlow switches must support forwarding to physical ports, switch-defined logical ports and the required reserved ports. (OpenFlow Switch Specification Version 1.0 and 1.3)

get_max_len()
get_outport()
set_max_len(max_len)
set_order(order)
set_outport(port)
to_ofp_oxm_syntax()
class pybvc.openflowdev.ofswitch.Pbb

Bases: pybvc.openflowdev.ofswitch.ProtocolMatchFields

The I-SID in the first PBB service instance tag

set_pbb_isid(pbb_isid)
set_pbb_mask(pbb_mask)
class pybvc.openflowdev.ofswitch.PopMplsHeaderAction(order=0, ethernet_type=None, d=None)

Bases: pybvc.openflowdev.ofswitch.Action

Pop the outer-most MPLS tag or shim header from the packet. The ‘ethernet_type’ is used as the Ethernet Type for the resulting packet (Ethernet Type for the MPLS payload). (OpenFlow Switch Specification Version 1.3)

get_eth_type()
set_eth_type(eth_type)
to_ofp_oxm_syntax()
class pybvc.openflowdev.ofswitch.PopPBBHeaderAction(order=0)

Bases: pybvc.openflowdev.ofswitch.Action

Pop the outer-most PBB service instance header (I-TAG TCI) from the packet PBB - Provider Backbone Bridges is an Ethernet data-plane technology . (also known as MAC-in-MAC) that involves encapsulating an . Ethernet datagram inside another one with new source and . destination addresses. (OpenFlow Switch Specification Version 1.3)

class pybvc.openflowdev.ofswitch.PopVlanHeaderAction(order=None)

Bases: pybvc.openflowdev.ofswitch.Action

Pop the outer-most VLAN header from the packet. (OpenFlow Switch Specification Version 1.3)

to_ofp_oxm_syntax()
class pybvc.openflowdev.ofswitch.ProtocolMatchFields(d=None)

Bases: pybvc.openflowdev.ofswitch.Match

Protocol match fields

get_mpls_bos()
get_mpls_label()
get_mpls_tc()
set_mpls_bos(mpls_bos)
set_mpls_label(mpls_label)
set_mpls_tc(mpls_tc)
class pybvc.openflowdev.ofswitch.PushMplsHeaderAction(order=None, ethernet_type=None, d=None)

Bases: pybvc.openflowdev.ofswitch.Action

Push a new MPLS shim header onto the packet. The ‘ethernet_type’ is used as the Ethernet Type for the tag, only 0x8847 or 0x8848 values should be used. (OpenFlow Switch Specification Version 1.3)

get_eth_type()
set_eth_type(eth_type)
to_ofp_oxm_syntax()
class pybvc.openflowdev.ofswitch.PushPBBHeaderAction(order=0, ethernet_type=None, d=None)

Bases: pybvc.openflowdev.ofswitch.Action

Push a new PBB service instance header (I-TAG TCI) onto the packet. The ‘ethernet_type’ is used as the Ethernet Type for the tag. Only Ethernet Type 0x88E7 should be used PBB - Provider Backbone Bridges is an Ethernet data-plane technology . (also known as MAC-in-MAC) that involves encapsulating an . Ethernet datagram inside another one with new source and . destination addresses. (OpenFlow Switch Specification Version 1.3)

set_eth_type(ethernet_type)
class pybvc.openflowdev.ofswitch.PushVlanHeaderAction(order=None, eth_type=None, tag=None, pcp=None, cfi=None, vid=None, d=None)

Bases: pybvc.openflowdev.ofswitch.Action

Push a new VLAN header onto the packet. The ‘ethernet_type’ is used as the Ethernet Type for the tag, only 0x8100 or 0x88a8 values should be used. (OpenFlow Switch Specification Version 1.3)

get_eth_type()
set_cfi(cfi)
set_eth_type(eth_type)
set_order(order)
set_pcp(pcp)
set_tag(tag)
set_vid(vid)
to_ofp_oxm_syntax()
class pybvc.openflowdev.ofswitch.QueueStats(queue_id, stats)

Queue statistics for a port

queue_id()
time_alive()
to_json()

Return this object as JSON

tx_bytes()
tx_errs()
tx_pkts()
class pybvc.openflowdev.ofswitch.SetDlDstAction(order=None, mac_addr=None, d=None)

Bases: pybvc.openflowdev.ofswitch.Action

Modify Ethernet destination MAC address. Replace the existing Ethernet destination MAC address with the new value. (OpenFlow Switch Specification Version 1.0)

get_dl_dst()
set_dl_dst(mac_addr)
to_ofp_oxm_syntax()
class pybvc.openflowdev.ofswitch.SetDlSrcAction(order=None, mac_addr=None, d=None)

Bases: pybvc.openflowdev.ofswitch.Action

Modify Ethernet source MAC address. Replace the existing Ethernet source MAC address with the new value. (OpenFlow Switch Specification Version 1.0)

get_dl_src()
set_dl_src(mac_addr)
to_ofp_oxm_syntax()
class pybvc.openflowdev.ofswitch.SetFieldAction(order=None, d=None)

Bases: pybvc.openflowdev.ofswitch.Action

The Extensible set_field action reuses the OXM encoding defined for matches, and enables to rewrite any header field in a single action. This allows any new match field, including experimenter fields, to be available for rewrite. The various Set-Field actions are identified by their field type and modify the values of respective header fields in the packet. While not strictly required, the support of rewriting various header fields using Set-Field actions greatly increase the usefulness of an OpenFlow implementation. To aid integration with existing networks, we suggest that VLAN modification actions be supported. Set-Field actions should always be applied to the outermost-possible header (e.g. a ‘Set VLAN ID’ action always sets the ID of the outermost VLAN tag), unless the field type specifies otherwise. (OpenFlow Switch Specification Version 1.3)

get_eth_dst()
get_eth_src()
get_ip_dscp()
get_ip_ecn()
get_ipv4_dst()
get_ipv4_src()
get_mpls_label()
get_tcp_dst()
get_tcp_src()
get_udp_dst()
get_udp_src()
get_vlan_id()
get_vlan_pcp()
set_eth_dst(mac_addr)
set_eth_src(mac_addr)
set_ip_dscp(dscp)
set_ip_ecn(ecn)
set_ipv4_dst(ipv4_addr)
set_ipv4_src(ipv4_addr)
set_mpls_label(mpls_label)
set_tcp_dst(tcp_port)
set_tcp_src(tcp_port)
set_udp_dst(udp_port)
set_udp_src(udp_port)
set_vlan_id(vid)
set_vlan_pcp(vlan_pcp)
to_ofp_oxm_syntax()
class pybvc.openflowdev.ofswitch.SetMplsTTLAction(order=0, ttl=None, d=None)

Bases: pybvc.openflowdev.ofswitch.Action

Replace the existing MPLS TTL. Only applies to packets with an existing MPLS shim header. (OpenFlow Switch Specification Version 1.3)

get_ttl()
set_ttl(ttl)
to_ofp_oxm_syntax()
class pybvc.openflowdev.ofswitch.SetNwDstAction(order=None, ip_addr=None, d=None)

Bases: pybvc.openflowdev.ofswitch.Action

Modify IPv4 destination address. Replace the existing IP destination address with new value and update the IP checksum (and TCP/UDP checksum if applicable). This action is only applicable to IPv4 packets. (OpenFlow Switch Specification Version 1.0)

get_nw_dst()
set_nw_dst(ip_addr)
to_ofp_oxm_syntax()
class pybvc.openflowdev.ofswitch.SetNwSrcAction(order=None, ip_addr=None, d=None)

Bases: pybvc.openflowdev.ofswitch.Action

Modify IPv4 source address. Replace the existing IP source address with new value and update the IP checksum (and TCP/UDP checksum if applicable). This action is only applicable to IPv4 packets. (OpenFlow Switch Specification Version 1.0)

get_nw_src()
set_nw_src(ip_addr)
to_ofp_oxm_syntax()
class pybvc.openflowdev.ofswitch.SetNwTTLAction(order=0, ttl=None, d=None)

Bases: pybvc.openflowdev.ofswitch.Action

Replace the existing IPv4 TTL or IPv6 Hop Limit and update the IP checksum. Only applies to IPv4 and IPv6 packets. (OpenFlow Switch Specification Version 1.3)

get_ttl()
set_ttl(ttl)
to_ofp_oxm_syntax()
class pybvc.openflowdev.ofswitch.SetNwTosAction(order=None, tos=None, d=None)

Bases: pybvc.openflowdev.ofswitch.Action

Modify IPv4 ToS bits. Replace the existing IP ToS field. This action is only applied to IPv4 packets. (OpenFlow Switch Specification Version 1.0)

get_tos()
set_tos(tos)
to_ofp_oxm_syntax()
class pybvc.openflowdev.ofswitch.SetQueueAction(order=None, queue=None, queue_id=None, d=None)

Bases: pybvc.openflowdev.ofswitch.Action

The set-queue action sets the queue id for a packet. When the packet is forwarded to a port using the output action, the queue id determines which queue attached to this port is used for scheduling and forwarding the packet. Forwarding behavior is dictated by the configuration of the queue and is used to provide basic Quality-of-Service (QoS) support. (OpenFlow Switch Specification Version 1.3)

get_queue_id()
set_gueue_id(queue_id)
set_queue(queue)
to_ofp_oxm_syntax()
class pybvc.openflowdev.ofswitch.SetTpDstAction(order=None, port=None, d=None)

Bases: pybvc.openflowdev.ofswitch.Action

Modify transport destination port. Replace the existing TCP/UDP destination port with new value and update the TCP/UDP checksum. This action is only applicable to TCP and UDP packets. (OpenFlow Switch Specification Version 1.0)

get_tp_dst()
set_tp_dst(port)
to_ofp_oxm_syntax()
class pybvc.openflowdev.ofswitch.SetTpSrcAction(order=None, port=None, d=None)

Bases: pybvc.openflowdev.ofswitch.Action

Modify transport source port. Replace the existing TCP/UDP source port with new value and update the TCP/UDP checksum. This action is only applicable to TCP and UDP packets. (OpenFlow Switch Specification Version 1.0)

get_tp_src()
set_tp_src(port)
to_ofp_oxm_syntax()
class pybvc.openflowdev.ofswitch.SetVlanIdAction(order=None, vid=None, d=None)

Bases: pybvc.openflowdev.ofswitch.Action

Set the 802.1q VLAN ID. If no VLAN is present, a new header is added with the specified VLAN ID and priority of zero. If a VLAN header already exists, the VLAN ID is replaced with the specified value. (OpenFlow Switch Specification Version 1.0)

get_vid()
set_vid(vid)
to_ofp_oxm_syntax()
class pybvc.openflowdev.ofswitch.SetVlanPCPAction(order=None, vlan_pcp=None, d=None)

Bases: pybvc.openflowdev.ofswitch.Action

Set VLAN priority. If no VLAN is present, a new header is added with the specified priority and a VLAN ID of zero. If a VLAN header already exists, the priority field is replaced with the specified value. (OpenFlow Switch Specification Version 1.0)

get_vlan_pcp()
set_vlan_pcp(vlan_pcp)
to_ofp_oxm_syntax()
class pybvc.openflowdev.ofswitch.StripVlanAction(order=None)

Bases: pybvc.openflowdev.ofswitch.Action

Strip VLAN header if present. (OpenFlow Switch Specification Version 1.0)

to_ofp_oxm_syntax()
class pybvc.openflowdev.ofswitch.Tunnel

Bases: pybvc.openflowdev.ofswitch.Match

Metadata associated with a logical port

get_id()
set_id(tunnel_id)
class pybvc.openflowdev.ofswitch.VlanId(d=None)

Bases: pybvc.openflowdev.ofswitch.VlanMatch

Helper subclass of VlanMatch class to help in serialization of VLAN ID information encoded in match rules of a flow entry

get_vid()
set_vid(vid)
class pybvc.openflowdev.ofswitch.VlanMatch(d=None)

Bases: pybvc.openflowdev.ofswitch.Match

VLAN specific match fields

get_pcp()
get_vid()
set_pcp(pcp)
set_vid(vid)

Module contents