File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 66
66
// Action strings in lower case, as those are compared to the lower case letters
67
67
// in parseAction().
68
68
const (
69
+ actionAll = "all"
69
70
actionDrop = "drop"
70
71
actionFlood = "flood"
71
72
actionInPort = "in_port"
@@ -96,6 +97,8 @@ func (a *textAction) MarshalText() ([]byte, error) {
96
97
// GoString implements Action.
97
98
func (a * textAction ) GoString () string {
98
99
switch a .action {
100
+ case actionAll :
101
+ return "ovs.All()"
99
102
case actionDrop :
100
103
return "ovs.Drop()"
101
104
case actionFlood :
@@ -113,6 +116,14 @@ func (a *textAction) GoString() string {
113
116
}
114
117
}
115
118
119
+ // All outputs the packet on all switch ports except
120
+ // the port on which it was received.
121
+ func All () Action {
122
+ return & textAction {
123
+ action : actionAll ,
124
+ }
125
+ }
126
+
116
127
// Drop immediately discards the packet. It must be the only Action
117
128
// specified when used.
118
129
func Drop () Action {
Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ func TestActionConstants(t *testing.T) {
24
24
a Action
25
25
out string
26
26
}{
27
+ {
28
+ a : All (),
29
+ out : "all" ,
30
+ },
27
31
{
28
32
a : Drop (),
29
33
out : "drop" ,
You can’t perform that action at this time.
0 commit comments