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

WIP: Dump flow entries with ActiveFlow::Base.all #3

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions features/all.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,33 @@
フィーチャ: all クラスメソッド
@wip
シナリオ: all クラスメソッドですべてのフローエントリを読み込む
前提 Open vSwitch (dpid = 0x1) が起動している
かつ 次のテーブルを定義:
"""
class RoutingTable < ActiveFlow::Base
table_id 3
end
"""
かつ 次のテーブルを定義:
"""
class Classifier < ActiveFlow::Base
table_id 1
end
"""
かつ 次のコードを実行:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Classifier.create は前提条件なので、前提の「かつ」にしてください。

"""
Classifier.create(0x1,
priority: 100,
ether_type: IPV4,
instructions: GotoTable.new(RoutingTable))
"""
もし 次のコードを実行:
"""
Classifier.all.first
"""
ならば Open vSwitch (dpid = 0x1) から次のフローエントリが取得できる
| field | value |
| table_id | 1 |
| priority | 100 |
| ether_type | ARP |
| actions | GotoTable(3) |