Make the parser compatible with how we print group buckets and allow actions= to be specified, e.g.:
group_id=1,type=all,bucket=actions=output:2,bucket=actions=output:3 Also, better document the supported syntax in the manual page. Signed-off-by: Thomas Graf <tg...@noironetworks.com> --- lib/ofp-parse.c | 6 ++++++ utilities/ovs-ofctl.8.in | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c index 93bdbea..ff7b9ce 100644 --- a/lib/ofp-parse.c +++ b/lib/ofp-parse.c @@ -2121,6 +2121,12 @@ parse_bucket_str(struct ofputil_bucket *bucket, char *str_, error = xasprintf("invalid watch_group id %"PRIu32, bucket->watch_group); } + } else if (!strcasecmp(act, "actions")) { + if (ofputil_parse_key_value(&arg, &act, &arg)) { + error = str_to_ofpact__(pos, act, arg, &ofpacts, n_actions, + usable_protocols); + n_actions++; + } } else { error = str_to_ofpact__(pos, act, arg, &ofpacts, n_actions, usable_protocols); diff --git a/utilities/ovs-ofctl.8.in b/utilities/ovs-ofctl.8.in index cc811ff..42fd397 100644 --- a/utilities/ovs-ofctl.8.in +++ b/utilities/ovs-ofctl.8.in @@ -1895,11 +1895,13 @@ be specified. \fIbucket_parameters\fR consists of a list of \fIfield\fB=\fIvalue\fR assignments, separated by commas or white space followed by a comma-separated list of actions. -The syntax of actions are same -to \fBactions=\fR field described in \fBFlow Syntax\fR above. The fields for \fIbucket_parameters\fR are: . .RS +.IP \fBactions=\fR[\fIaction\fR][\fB,\fIaction\fR...]\fR +The syntax of actions are identical to the \fBactions=\fR field described in +\fBFlow Syntax\fR above. Specyfing \fBactions=\fR is optional, any unknown +bucket parameter will be interpreted as an action. .IP \fBweight=\fIvalue\fR The relative weight of the bucket as an integer. This may be used by the switch during bucket select for groups whose \fBtype\fR is \fBselect\fR. -- 1.9.3 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev