From ad8f74d9b54a24ea8b118f3d5732c6e06c4242c4 Mon Sep 17 00:00:00 2001 From: Yasuhito Takamiya Date: Wed, 11 Nov 2015 14:02:58 +0900 Subject: [PATCH] Add NiciraRegLoad action --- features/open_flow13/nicira_reg_load.feature | 56 ++++++++ lib/pio/open_flow.rb | 2 +- lib/pio/open_flow13.rb | 1 + lib/pio/open_flow13/match.rb | 121 +++++++++++------- lib/pio/open_flow13/nicira_reg_load.rb | 44 +++++++ lib/pio/open_flow13/nicira_reg_move.rb | 4 +- lib/pio/open_flow13/set_arp_operation.rb | 2 +- .../set_arp_sender_hardware_address.rb | 2 +- .../set_arp_sender_protocol_address.rb | 2 +- .../set_destination_mac_address.rb | 2 +- lib/pio/open_flow13/set_source_mac_address.rb | 2 +- spec/pio/open_flow13/match_spec.rb | 86 ++++++------- 12 files changed, 225 insertions(+), 99 deletions(-) create mode 100644 features/open_flow13/nicira_reg_load.feature create mode 100644 lib/pio/open_flow13/nicira_reg_load.rb diff --git a/features/open_flow13/nicira_reg_load.feature b/features/open_flow13/nicira_reg_load.feature new file mode 100644 index 00000000..8c3629fc --- /dev/null +++ b/features/open_flow13/nicira_reg_load.feature @@ -0,0 +1,56 @@ +@open_flow13 +Feature: Pio::NiciraRegLoad + + Scenario: new(0xdeadbeef, :reg0) + When I try to create an OpenFlow action with: + """ + Pio::NiciraRegLoad.new(0xdeadbeef, :reg0) + """ + Then it should finish successfully + And the action has the following fields and values: + | field | value | + | action_type.to_hex | 0xffff | + | action_length | 24 | + | experimenter_id.to_hex | 0x2320 | + | experimenter_type | 7 | + | offset | 0 | + | n_bits | 32 | + | destination | :reg0 | + | destination_internal | 65540 | + | value.to_hex | 0xdeadbeef | + + Scenario: new(0xdeadbeef, :metadata) + When I try to create an OpenFlow action with: + """ + Pio::NiciraRegLoad.new(0xdeadbeef, :metadata) + """ + Then it should finish successfully + And the action has the following fields and values: + | field | value | + | action_type.to_hex | 0xffff | + | action_length | 24 | + | experimenter_id.to_hex | 0x2320 | + | experimenter_type | 7 | + | offset | 0 | + | n_bits | 64 | + | destination | :metadata | + | destination_internal | 2147484680 | + | value.to_hex | 0xdeadbeef | + + Scenario: new(0xdeadbeef, :metadata, offset: 32, n_bits: 32) + When I try to create an OpenFlow action with: + """ + Pio::NiciraRegLoad.new(0xdeadbeef, :metadata, offset: 32, n_bits: 32) + """ + Then it should finish successfully + And the action has the following fields and values: + | field | value | + | action_type.to_hex | 0xffff | + | action_length | 24 | + | experimenter_id.to_hex | 0x2320 | + | experimenter_type | 7 | + | offset | 32 | + | n_bits | 32 | + | destination | :metadata | + | destination_internal | 2147484680 | + | value.to_hex | 0xdeadbeef | diff --git a/lib/pio/open_flow.rb b/lib/pio/open_flow.rb index 87bdeda9..a27fb424 100644 --- a/lib/pio/open_flow.rb +++ b/lib/pio/open_flow.rb @@ -21,7 +21,7 @@ def self.switch_version(version) :FlowStats, :DescriptionStats, :AggregateStats, :TableStats, :PortStats, :QueueStats, :Error, :NiciraResubmit, :SetArpOperation, :SetArpSenderProtocolAddress, :SetArpSenderHardwareAddress, - :NiciraResubmitTable, :NiciraRegMove].each do |each| + :NiciraResubmitTable, :NiciraRegMove, :NiciraRegLoad].each do |each| set_message_class_name each, version @version = version.to_s end diff --git a/lib/pio/open_flow13.rb b/lib/pio/open_flow13.rb index 0914e8c5..ec0fe85f 100644 --- a/lib/pio/open_flow13.rb +++ b/lib/pio/open_flow13.rb @@ -13,6 +13,7 @@ require 'pio/open_flow13/stats_request' # Actions +require 'pio/open_flow13/nicira_reg_load' require 'pio/open_flow13/nicira_reg_move' require 'pio/open_flow13/send_out_port' require 'pio/open_flow13/set_arp_operation' diff --git a/lib/pio/open_flow13/match.rb b/lib/pio/open_flow13/match.rb index ca5e019d..f911efa7 100644 --- a/lib/pio/open_flow13/match.rb +++ b/lib/pio/open_flow13/match.rb @@ -12,11 +12,23 @@ module OpenFlow13 # OpenFlow eXtensible Match (OXM) class Match - OXM_CLASS_OPENFLOW_BASIC = 0x8000 - OXM_CLASS_EXPERIMENTER = 0xFFFF + # OFPXMC_NXM_1 TLV value + class NiciraMatchExtensionValue < BinData::Record + OXM_CLASS = 0x1 + end + + # OFPXMC_OPENFLOW_BASIC TLV value + class OpenFlowBasicValue < BinData::Record + OXM_CLASS = 0x8000 + end + + # OFPXMC_EXPERIMENTER TLV value + class ExperimenterValue < BinData::Record + OXM_CLASS = 0xFFFF + end # The value of OXM_OF_IN_PORT match field. - class InPort < BinData::Record + class InPort < OpenFlowBasicValue OXM_FIELD = 0 endian :big @@ -29,7 +41,7 @@ def length end # The value of OXM_OF_METADATA match field - class Metadata < BinData::Record + class Metadata < OpenFlowBasicValue OXM_FIELD = 2 endian :big @@ -42,7 +54,7 @@ def length end # Masked OXM_OF_METADATA match field - class MaskedMetadata < BinData::Record + class MaskedMetadata < OpenFlowBasicValue endian :big uint64 :metadata @@ -54,7 +66,7 @@ def length end # The value of OXM_OF_ETH_DST match field. - class DestinationMacAddress < BinData::Record + class DestinationMacAddress < OpenFlowBasicValue OXM_FIELD = 3 endian :big @@ -67,7 +79,7 @@ def length end # The value of OXM_OF_ETH_SRC match field. - class SourceMacAddress < BinData::Record + class SourceMacAddress < OpenFlowBasicValue OXM_FIELD = 4 endian :big @@ -80,7 +92,7 @@ def length end # Masked OXM_OF_ETH_DST match field. - class MaskedDestinationMacAddress < BinData::Record + class MaskedDestinationMacAddress < OpenFlowBasicValue endian :big mac_address :destination_mac_address @@ -92,7 +104,7 @@ def length end # Masked OXM_OF_ETH_SRC match field. - class MaskedSourceMacAddress < BinData::Record + class MaskedSourceMacAddress < OpenFlowBasicValue endian :big mac_address :source_mac_address @@ -104,7 +116,7 @@ def length end # The value of OXM_OF_ETH_TYPE match field. - class EtherType < BinData::Record + class EtherType < OpenFlowBasicValue OXM_FIELD = 5 endian :big @@ -117,7 +129,7 @@ def length end # The value of OXM_OF_VLAN_VID match field - class VlanVid < BinData::Record + class VlanVid < OpenFlowBasicValue OXM_FIELD = 6 endian :big @@ -133,7 +145,7 @@ def length end # The value of OXM_OF_VLAN_PCP match field - class VlanPcp < BinData::Record + class VlanPcp < OpenFlowBasicValue OXM_FIELD = 7 endian :big @@ -149,7 +161,7 @@ def length end # The value of OXM_OF_IP_DSCP match field - class IpDscp < BinData::Record + class IpDscp < OpenFlowBasicValue OXM_FIELD = 8 endian :big @@ -165,7 +177,7 @@ def length end # The value of OXM_OF_IP_ECN match field - class IpEcn < BinData::Record + class IpEcn < OpenFlowBasicValue OXM_FIELD = 9 endian :big @@ -181,7 +193,7 @@ def length end # The value of OXM_OF_IP_PROTO - class IpProtocol < BinData::Record + class IpProtocol < OpenFlowBasicValue OXM_FIELD = 10 endian :big @@ -194,7 +206,7 @@ def length end # The value of OXM_OF_IPV4_SRC - class Ipv4SourceAddress < BinData::Record + class Ipv4SourceAddress < OpenFlowBasicValue OXM_FIELD = 11 endian :big @@ -207,7 +219,7 @@ def length end # The value of masked OXM_OF_IPV4_SRC - class MaskedIpv4SourceAddress < BinData::Record + class MaskedIpv4SourceAddress < OpenFlowBasicValue OXM_FIELD = 11 endian :big @@ -220,7 +232,7 @@ def length end # The value of OXM_OF_IPV4_DST - class Ipv4DestinationAddress < BinData::Record + class Ipv4DestinationAddress < OpenFlowBasicValue OXM_FIELD = 12 endian :big @@ -233,7 +245,7 @@ def length end # The value of masked OXM_OF_IPV4_DST - class MaskedIpv4DestinationAddress < BinData::Record + class MaskedIpv4DestinationAddress < OpenFlowBasicValue OXM_FIELD = 12 endian :big @@ -246,7 +258,7 @@ def length end # The value of OXM_OF_TCP_SRC - class TcpSourcePort < BinData::Record + class TcpSourcePort < OpenFlowBasicValue OXM_FIELD = 13 endian :big @@ -259,7 +271,7 @@ def length end # The value of OXM_OF_TCP_DST - class TcpDestinationPort < BinData::Record + class TcpDestinationPort < OpenFlowBasicValue OXM_FIELD = 14 endian :big @@ -272,7 +284,7 @@ def length end # The value of OXM_OF_UDP_SRC - class UdpSourcePort < BinData::Record + class UdpSourcePort < OpenFlowBasicValue OXM_FIELD = 15 endian :big @@ -285,7 +297,7 @@ def length end # The value of OXM_OF_UDP_SRC - class UdpDestinationPort < BinData::Record + class UdpDestinationPort < OpenFlowBasicValue OXM_FIELD = 16 endian :big @@ -298,7 +310,7 @@ def length end # The value of OXM_OF_SCTP_SRC - class SctpSourcePort < BinData::Record + class SctpSourcePort < OpenFlowBasicValue OXM_FIELD = 17 endian :big @@ -311,7 +323,7 @@ def length end # The value of OXM_OF_SCTP_DST - class SctpDestinationPort < BinData::Record + class SctpDestinationPort < OpenFlowBasicValue OXM_FIELD = 18 endian :big @@ -324,7 +336,7 @@ def length end # The value of OXM_OF_ICMPV4_TYPE - class Icmpv4Type < BinData::Record + class Icmpv4Type < OpenFlowBasicValue OXM_FIELD = 19 endian :big @@ -337,7 +349,7 @@ def length end # The value of OXM_OF_ICMPV4_CODE - class Icmpv4Code < BinData::Record + class Icmpv4Code < OpenFlowBasicValue OXM_FIELD = 20 endian :big @@ -350,7 +362,7 @@ def length end # The value of OXM_OF_ARP_OP - class ArpOperation < BinData::Record + class ArpOperation < OpenFlowBasicValue OXM_FIELD = 21 endian :big @@ -363,7 +375,7 @@ def length end # The value of OXM_OF_ARP_SPA - class ArpSenderProtocolAddress < BinData::Record + class ArpSenderProtocolAddress < OpenFlowBasicValue OXM_FIELD = 22 endian :big @@ -376,7 +388,7 @@ def length end # The value of masked OXM_OF_ARP_SPA - class MaskedArpSenderProtocolAddress < BinData::Record + class MaskedArpSenderProtocolAddress < OpenFlowBasicValue OXM_FIELD = 22 endian :big @@ -389,7 +401,7 @@ def length end # The value of OXM_OF_ARP_TPA - class ArpTargetProtocolAddress < BinData::Record + class ArpTargetProtocolAddress < OpenFlowBasicValue OXM_FIELD = 23 endian :big @@ -402,7 +414,7 @@ def length end # The value of masked OXM_OF_ARP_TPA - class MaskedArpTargetProtocolAddress < BinData::Record + class MaskedArpTargetProtocolAddress < OpenFlowBasicValue OXM_FIELD = 23 endian :big @@ -415,7 +427,7 @@ def length end # The value of OXM_OF_ARP_SHA match field. - class ArpSenderHardwareAddress < BinData::Record + class ArpSenderHardwareAddress < OpenFlowBasicValue OXM_FIELD = 24 endian :big @@ -428,7 +440,7 @@ def length end # Masked OXM_OF_ARP_SHA match field. - class MaskedArpSenderHardwareAddress < BinData::Record + class MaskedArpSenderHardwareAddress < OpenFlowBasicValue OXM_FIELD = 24 endian :big @@ -442,7 +454,7 @@ def length end # The value of OXM_OF_ARP_THA match field. - class ArpTargetHardwareAddress < BinData::Record + class ArpTargetHardwareAddress < OpenFlowBasicValue OXM_FIELD = 25 endian :big @@ -455,7 +467,7 @@ def length end # Masked OXM_OF_ARP_THA match field. - class MaskedArpTargetHardwareAddress < BinData::Record + class MaskedArpTargetHardwareAddress < OpenFlowBasicValue OXM_FIELD = 25 endian :big @@ -469,7 +481,7 @@ def length end # The value of OXM_OF_IPV6_SRC - class Ipv6SourceAddress < BinData::Record + class Ipv6SourceAddress < OpenFlowBasicValue OXM_FIELD = 26 endian :big @@ -482,7 +494,7 @@ def length end # The value of masked OXM_OF_IPV6_SRC - class MaskedIpv6SourceAddress < BinData::Record + class MaskedIpv6SourceAddress < OpenFlowBasicValue OXM_FIELD = 26 endian :big @@ -496,7 +508,7 @@ def length end # The value of OXM_OF_IPV6_DST - class Ipv6DestinationAddress < BinData::Record + class Ipv6DestinationAddress < OpenFlowBasicValue OXM_FIELD = 27 endian :big @@ -509,7 +521,7 @@ def length end # The value of OXM_OF_IPV6_DST - class MaskedIpv6DestinationAddress < BinData::Record + class MaskedIpv6DestinationAddress < OpenFlowBasicValue OXM_FIELD = 27 endian :big @@ -523,7 +535,7 @@ def length end # The value of OXM_OF_TUNNEL_ID match field - class TunnelId < BinData::Record + class TunnelId < OpenFlowBasicValue OXM_FIELD = 38 endian :big @@ -536,7 +548,7 @@ def length end # Masked OXM_OF_TUNNEL_ID match field - class MaskedTunnelId < BinData::Record + class MaskedTunnelId < OpenFlowBasicValue endian :big uint64 :tunnel_id @@ -547,6 +559,19 @@ def length end end + # NXM_NX_REG0 + class Reg0 < NiciraMatchExtensionValue + OXM_FIELD = 0 + + endian :big + + uint32 :reg0 + + def length + 4 + end + end + # OXM format class Oxm < BinData::Record # Experimenter part, data will use oxm_length @@ -727,10 +752,10 @@ def choose_tlv_value class MatchField < BinData::Record endian :big - uint16 :oxm_class, initial_value: OXM_CLASS_OPENFLOW_BASIC + uint16 :oxm_class, initial_value: OpenFlowBasicValue::OXM_CLASS choice :class_payload, selection: :oxm_class do - OpenflowBasic OXM_CLASS_OPENFLOW_BASIC - Experimenter OXM_CLASS_EXPERIMENTER + OpenflowBasic OpenFlowBasicValue::OXM_CLASS + Experimenter ExperimenterValue::OXM_CLASS end def oxm_field @@ -751,9 +776,9 @@ def length def method_missing(method, *args, &block) case oxm_class - when OXM_CLASS_OPENFLOW_BASIC + when OpenFlowBasicValue::OXM_CLASS return class_payload.tlv_value.__send__(method, *args, &block) - when OXM_CLASS_EXPERIMENTER + when ExperimenterValue::OXM_CLASS return class_payload.__send__(method, *args, &block) else fail NoMethodError, method.to_s @@ -779,7 +804,7 @@ def length # rubocop:disable Next def method_missing(method, *args, &block) match_fields.each do |each| - if each.oxm_class == OXM_CLASS_OPENFLOW_BASIC + if each.oxm_class == OpenFlowBasicValue::OXM_CLASS next unless each.class_payload.tlv_value.respond_to?(method) return each.class_payload.tlv_value.__send__( method, *args, &block) diff --git a/lib/pio/open_flow13/nicira_reg_load.rb b/lib/pio/open_flow13/nicira_reg_load.rb new file mode 100644 index 00000000..02529a49 --- /dev/null +++ b/lib/pio/open_flow13/nicira_reg_load.rb @@ -0,0 +1,44 @@ +require 'active_support/core_ext/string/inflections' +require 'pio/open_flow/action' + +module Pio + module OpenFlow13 + # NXAST_REG_LOAD action + class NiciraRegLoad < OpenFlow::Action + action_header action_type: 0xffff, action_length: 24 + uint32 :experimenter_id, value: 0x2320 + uint16 :experimenter_type, value: 7 + bit10 :offset_internal, initial_value: 0 + bit6 :n_bits_internal + uint32 :destination_internal + uint64 :value_internal + + attr_reader :destination + + # rubocop:disable AbcSize + # rubocop:disable LineLength + def initialize(value, destination, options = {}) + @destination = destination + oxm_klass = Match.const_get(destination.to_s.capitalize) + super(value_internal: value, + offset_internal: options[:offset] || 0, + n_bits_internal: options[:n_bits] ? options[:n_bits] - 1 : oxm_klass.new.length * 8 - 1, + destination_internal: ((oxm_klass.superclass.const_get(:OXM_CLASS) << 16) | (oxm_klass.const_get(:OXM_FIELD) << 9) | oxm_klass.new.length)) + end + # rubocop:enable AbcSize + # rubocop:enable LineLength + + def offset + offset_internal + end + + def n_bits + n_bits_internal + 1 + end + + def value + value_internal + end + end + end +end diff --git a/lib/pio/open_flow13/nicira_reg_move.rb b/lib/pio/open_flow13/nicira_reg_move.rb index 89795d78..bb251142 100644 --- a/lib/pio/open_flow13/nicira_reg_move.rb +++ b/lib/pio/open_flow13/nicira_reg_move.rb @@ -11,11 +11,11 @@ class NiciraRegMove < OpenFlow::Action uint16 :n_bits, initial_value: -> { source_oxm_length * 8 } uint16 :source_offset, value: 0 uint16 :destination_offset, value: 0 - uint16 :source_class, value: Match::OXM_CLASS_OPENFLOW_BASIC + uint16 :source_class, value: Match::OpenFlowBasicValue::OXM_CLASS bit7 :source_oxm_field bit1 :source_oxm_hasmask, value: 0 uint8 :source_oxm_length - uint16 :destination_oxm_class, value: Match::OXM_CLASS_OPENFLOW_BASIC + uint16 :destination_oxm_class, value: Match::OpenFlowBasicValue::OXM_CLASS bit7 :destination_oxm_field bit1 :destination_oxm_hasmask, value: 0 uint8 :destination_oxm_length diff --git a/lib/pio/open_flow13/set_arp_operation.rb b/lib/pio/open_flow13/set_arp_operation.rb index 678ac8ed..2d51f94b 100644 --- a/lib/pio/open_flow13/set_arp_operation.rb +++ b/lib/pio/open_flow13/set_arp_operation.rb @@ -7,7 +7,7 @@ module OpenFlow13 class SetArpOperation < OpenFlow::Action action_header action_type: 25, action_length: 16 - uint16 :oxm_class, value: Match::OXM_CLASS_OPENFLOW_BASIC + uint16 :oxm_class, value: Match::OpenFlowBasicValue::OXM_CLASS bit7 :oxm_field, value: Match::ArpOperation::OXM_FIELD bit1 :oxm_hasmask, value: 0 uint8 :oxm_length, value: 2 diff --git a/lib/pio/open_flow13/set_arp_sender_hardware_address.rb b/lib/pio/open_flow13/set_arp_sender_hardware_address.rb index a224b523..6d3265c7 100644 --- a/lib/pio/open_flow13/set_arp_sender_hardware_address.rb +++ b/lib/pio/open_flow13/set_arp_sender_hardware_address.rb @@ -7,7 +7,7 @@ module OpenFlow13 class SetArpSenderHardwareAddress < OpenFlow::Action action_header action_type: 25, action_length: 16 - uint16 :oxm_class, value: Match::OXM_CLASS_OPENFLOW_BASIC + uint16 :oxm_class, value: Match::OpenFlowBasicValue::OXM_CLASS bit7 :oxm_field, value: Match::ArpSenderHardwareAddress::OXM_FIELD bit1 :oxm_hasmask, value: 0 uint8 :oxm_length, value: 6 diff --git a/lib/pio/open_flow13/set_arp_sender_protocol_address.rb b/lib/pio/open_flow13/set_arp_sender_protocol_address.rb index f4264614..3539ddeb 100644 --- a/lib/pio/open_flow13/set_arp_sender_protocol_address.rb +++ b/lib/pio/open_flow13/set_arp_sender_protocol_address.rb @@ -7,7 +7,7 @@ module OpenFlow13 class SetArpSenderProtocolAddress < OpenFlow::Action action_header action_type: 25, action_length: 16 - uint16 :oxm_class, value: Match::OXM_CLASS_OPENFLOW_BASIC + uint16 :oxm_class, value: Match::OpenFlowBasicValue::OXM_CLASS bit7 :oxm_field, value: Match::ArpSenderProtocolAddress::OXM_FIELD bit1 :oxm_hasmask, value: 0 uint8 :oxm_length, value: 4 diff --git a/lib/pio/open_flow13/set_destination_mac_address.rb b/lib/pio/open_flow13/set_destination_mac_address.rb index a5aab5c8..cd2a03b5 100644 --- a/lib/pio/open_flow13/set_destination_mac_address.rb +++ b/lib/pio/open_flow13/set_destination_mac_address.rb @@ -7,7 +7,7 @@ module OpenFlow13 class SetDestinationMacAddress < OpenFlow::Action action_header action_type: 25, action_length: 16 - uint16 :oxm_class, value: Match::OXM_CLASS_OPENFLOW_BASIC + uint16 :oxm_class, value: Match::OpenFlowBasicValue::OXM_CLASS bit7 :oxm_field, value: Match::DestinationMacAddress::OXM_FIELD bit1 :oxm_hasmask, value: 0 uint8 :oxm_length, value: 6 diff --git a/lib/pio/open_flow13/set_source_mac_address.rb b/lib/pio/open_flow13/set_source_mac_address.rb index 71e2bfb0..f0d4bf07 100644 --- a/lib/pio/open_flow13/set_source_mac_address.rb +++ b/lib/pio/open_flow13/set_source_mac_address.rb @@ -7,7 +7,7 @@ module OpenFlow13 class SetSourceMacAddress < OpenFlow::Action action_header action_type: 25, action_length: 16 - uint16 :oxm_class, value: Match::OXM_CLASS_OPENFLOW_BASIC + uint16 :oxm_class, value: Match::OpenFlowBasicValue::OXM_CLASS bit7 :oxm_field, value: Match::SourceMacAddress::OXM_FIELD bit1 :oxm_hasmask, value: 0 uint8 :oxm_length, value: 6 diff --git a/spec/pio/open_flow13/match_spec.rb b/spec/pio/open_flow13/match_spec.rb index 2bd9bc00..45721698 100644 --- a/spec/pio/open_flow13/match_spec.rb +++ b/spec/pio/open_flow13/match_spec.rb @@ -20,7 +20,7 @@ And { match.match_fields.size == 1 } And do match.match_fields[0].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[0].oxm_field == @@ -42,7 +42,7 @@ And { match.match_fields.size == 1 } And do match.match_fields[0].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[0].oxm_field == @@ -64,7 +64,7 @@ And { match.match_fields.size == 1 } And do match.match_fields[0].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[0].oxm_field == @@ -87,7 +87,7 @@ And { match.match_fields.size == 1 } And do match.match_fields[0].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[0].oxm_field == @@ -111,7 +111,7 @@ And { match.match_fields.size == 1 } And do match.match_fields[0].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[0].oxm_field == @@ -131,7 +131,7 @@ And { match.match_fields.size == 1 } And do match.match_fields[0].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[0].oxm_field == @@ -151,7 +151,7 @@ And { match.match_fields.size == 1 } And do match.match_fields[0].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[0].oxm_field == @@ -172,7 +172,7 @@ And { match.match_fields.size == 2 } And do match.match_fields[1].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[1].oxm_field == @@ -193,7 +193,7 @@ And { match.match_fields.size == 2 } And do match.match_fields[1].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[1].oxm_field == @@ -214,7 +214,7 @@ And { match.match_fields.size == 2 } And do match.match_fields[1].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[1].oxm_field == @@ -238,7 +238,7 @@ And { match.match_fields.size == 2 } And do match.match_fields[0].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[0].oxm_field == @@ -248,7 +248,7 @@ And { match.match_fields[0].oxm_length == 2 } And do match.match_fields[1].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[1].oxm_field == @@ -272,7 +272,7 @@ And { match.match_fields.size == 2 } And do match.match_fields[0].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[0].oxm_field == @@ -282,7 +282,7 @@ And { match.match_fields[0].oxm_length == 2 } And do match.match_fields[1].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[1].oxm_field == @@ -310,7 +310,7 @@ And { match.match_fields.size == 3 } And do match.match_fields[2].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[2].oxm_field == @@ -338,7 +338,7 @@ And { match.match_fields.size == 3 } And do match.match_fields[2].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[2].oxm_field == @@ -366,7 +366,7 @@ And { match.match_fields.size == 3 } And do match.match_fields[2].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[2].oxm_field == @@ -394,7 +394,7 @@ And { match.match_fields.size == 3 } And do match.match_fields[2].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[2].oxm_field == @@ -420,7 +420,7 @@ And { match.match_fields.size == 2 } And do match.match_fields[1].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[1].oxm_field == @@ -446,7 +446,7 @@ And { match.match_fields.size == 2 } And do match.match_fields[1].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[1].oxm_field == @@ -474,7 +474,7 @@ And { match.match_fields.size == 2 } And do match.match_fields[1].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[1].oxm_field == @@ -500,7 +500,7 @@ And { match.match_fields.size == 2 } And do match.match_fields[1].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[1].oxm_field == @@ -528,7 +528,7 @@ And { match.match_fields.size == 2 } And do match.match_fields[1].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[1].oxm_field == @@ -554,7 +554,7 @@ And { match.match_fields.size == 2 } And do match.match_fields[1].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[1].oxm_field == @@ -582,7 +582,7 @@ And { match.match_fields.size == 2 } And do match.match_fields[1].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[1].oxm_field == @@ -608,7 +608,7 @@ And { match.match_fields.size == 2 } And do match.match_fields[1].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[1].oxm_field == @@ -636,7 +636,7 @@ And { match.match_fields.size == 2 } And do match.match_fields[1].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[1].oxm_field == @@ -658,7 +658,7 @@ And { match.match_fields.size == 1 } And do match.match_fields[0].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[0].oxm_field == @@ -684,7 +684,7 @@ And { match.match_fields.size == 1 } And do match.match_fields[0].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[0].oxm_field == @@ -725,7 +725,7 @@ def read_raw_data_file(name) And { match.match_fields.size == 1 } And do match.match_fields[0].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[0].oxm_field == @@ -747,7 +747,7 @@ def read_raw_data_file(name) And { match.match_fields.size == 1 } And do match.match_fields[0].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[0].oxm_field == @@ -769,7 +769,7 @@ def read_raw_data_file(name) And { match.match_fields.size == 1 } And do match.match_fields[0].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[0].oxm_field == @@ -792,7 +792,7 @@ def read_raw_data_file(name) And { match.match_fields.size == 1 } And do match.match_fields[0].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[0].oxm_field == @@ -815,7 +815,7 @@ def read_raw_data_file(name) And { match.match_fields.size == 1 } And do match.match_fields[0].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[0].oxm_field == @@ -837,7 +837,7 @@ def read_raw_data_file(name) And { match.match_fields.size == 1 } And do match.match_fields[0].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[0].oxm_field == @@ -859,7 +859,7 @@ def read_raw_data_file(name) And { match.match_fields.size == 1 } And do match.match_fields[0].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[0].oxm_field == @@ -881,7 +881,7 @@ def read_raw_data_file(name) And { match.match_fields.size == 2 } And do match.match_fields[0].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[0].oxm_field == @@ -903,7 +903,7 @@ def read_raw_data_file(name) And { match.match_fields.size == 2 } And do match.match_fields[1].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[1].oxm_field == @@ -925,7 +925,7 @@ def read_raw_data_file(name) And { match.match_fields.size == 2 } And do match.match_fields[1].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[1].oxm_field == @@ -948,7 +948,7 @@ def read_raw_data_file(name) And { match.match_fields.size == 2 } And do match.match_fields[0].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[0].oxm_field == @@ -958,7 +958,7 @@ def read_raw_data_file(name) And { match.match_fields[0].oxm_length == 2 } And do match.match_fields[1].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[1].oxm_field == @@ -981,7 +981,7 @@ def read_raw_data_file(name) And { match.match_fields.size == 2 } And do match.match_fields[0].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[0].oxm_field == @@ -991,7 +991,7 @@ def read_raw_data_file(name) And { match.match_fields[0].oxm_length == 2 } And do match.match_fields[1].oxm_class == - Pio::OpenFlow13::Match::OXM_CLASS_OPENFLOW_BASIC + Pio::OpenFlow13::Match::OpenFlowBasicValue::OXM_CLASS end And do match.match_fields[1].oxm_field ==