Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create OpenFlow 1.3 Instructions #14

Open
yasuhito opened this issue Jan 24, 2013 · 1 comment
Open

Create OpenFlow 1.3 Instructions #14

yasuhito opened this issue Jan 24, 2013 · 1 comment

Comments

@yasuhito
Copy link
Member

The following instructions should be created:

  • goto_table
  • write_metadata
  • write_actions
  • apply_actions
  • clear_actions
  • meter
  • experimenter
@nickkaranatsios
Copy link
Member

The following instruction classes are coded:

  • InstructionList::GotoTable.new( :table_id => 2 )
  • InstructionList::WriteMetadata.new( :metadata => rand( 2**64 ), :metadata_mask => rand( 2**64 ) )
  • InstructionList::WriteActions.new( :actions => build_action_list )
  • InstructionList::ApplyActions.new( :actions => build_action_list )
  • InstructionList::ClearActions.new
  • InstructionList::Meter.new( rand( 2**32 ) )
  • InstructionList::Experimenter.new( :experimenter => rand( 2 ** 32 ), :user_data => rand( 36**10 ).to_s( 36 ).unpack( "C" ) )
    All classes reside under trema/instruction-list and a typical class looks like the following:
module Trema
  module InstructionList
    class InstructionActions < InstructionAccessor
      array :actions, :presence => true, :validate_with => :check_actions
    end


    def check_actions actions, name
      raise ArgumentError, "At least one action object must be specified for #{ name }" if actions.empty?
    end
  end
end

The InstructionAccessor class name TBD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants