faucet.valve_table module

Abstraction of an OF table.

class faucet.valve_table.ValveGroupEntry(table, group_id, buckets)[source]

Bases: object

Abstraction for a single OpenFlow group entry.

add()[source]

Return flows to add this entry to the group table.

delete()[source]

Return flow to delete an existing group entry.

modify()[source]

Return flow to modify an existing group entry.

update_buckets(buckets)[source]

Update entry with new buckets.

class faucet.valve_table.ValveGroupTable[source]

Bases: object

Wrap access to group table.

delete_all()[source]

Delete all groups.

entries = None
get_entry(group_id, buckets)[source]

Update entry with group_id with buckets, and return the entry.

static group_id_from_str(key_str)[source]

Return a group ID based on a string key.

class faucet.valve_table.ValveTable(name, table_config, flow_cookie, notify_flow_removed=False, next_tables=None)[source]

Bases: object

Wrapper for an OpenFlow table.

flowcontroller(match=None, priority=None, inst=None, max_len=96)[source]

Add flow outputting to controller.

flowdel(match=None, priority=None, out_port=4294967295, strict=False)[source]

Delete matching flows from a table.

flowdrop(match=None, priority=None, hard_timeout=0)[source]

Add drop matching flow to a table.

flowmod(match=None, priority=None, inst=None, command=0, out_port=0, out_group=0, hard_timeout=0, idle_timeout=0, cookie=None)[source]

Helper function to construct a flow mod message with cookie.

goto(next_table)[source]

Add goto next table instruction.

goto_miss(next_table)[source]

Add miss goto table instruction.

goto_this()[source]
static match(in_port=None, vlan=None, eth_type=None, eth_src=None, eth_dst=None, eth_dst_mask=None, icmpv6_type=None, nw_proto=None, nw_dst=None, metadata=None, metadata_mask=None, vlan_pcp=None)[source]

Compose an OpenFlow match rule.

set_field(**kwds)[source]

Return set field action.

set_vlan_vid(vlan_vid)[source]

Set VLAN VID with VID_PRESENT flag set.

Parameters

vid (int) – VLAN VID

Returns

set VID with VID_PRESENT.

Return type

ryu.ofproto.ofproto_v1_3_parser.OFPActionSetField