-
Bug
-
Resolution: Unresolved
-
None
-
unspecified
-
None
-
Operating System: Mac OS
Platform: PC
-
1881
How to handle the "all", "one_or_more", "zero_or_more", "exactly_one", and "zero_or_one"
meta-member keywords?
Technically, they are allowed at any level where a field name would be allowed in JSON. However, we currently only support them in the following places:
- We currently support "all", "one_or_more" and "zero_or_more" directly under
"flow_mod_types" because that is all that was illustrated. - We currently support "exactly_one" and "zero_or_one" directly under "match_set" and
"instruction_set" because that was all that was illustrated. - We currently support "exactly_one" and "zero_or_one" for action lists, i.e., actions in
instructions_set, action_set in bucket_type, and actions in packet_out - In all the above cases, I believe we accept JSON which would not be a valid TTP and
might need to add extra validation. This is true elsewhere as well.
These are the examples of where each is actually used in the SPEC:
- "all" is only used in one example under "flow_mod_types" in the middle of page 43
- "one_or_more" is never illustrated with an example
- "zero_or_more" sometimes points to an object and sometimes to an array. It seems like it
should always do one or the other. Only used under "flow_mod_types" in the
example. - "exactly_one" examples for "instruction_set" and "match_set"
- "zero_or_one" is only used in "instruction_set" and only to point to a single object;
never to an array. It seems like it should always point to an array, even
if it is an array with a single element.