Commit dc02f6cb authored by Dimitris Aragiorgis's avatar Dimitris Aragiorgis Committed by Hrvoje Ribicic

Make network_vlan an optional OpParam

Make network_vlan OpParam of OpNetworkConnect default to the empty
string and thus make it optional (see defaultField definition). This
way we keep backwards compatibility with old RAPI.

Additionally bypass a sphinx warning related to the generated html
(i.e. Inline literal start-string without end-string) in case an
empty string is used as default value.
Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
Reviewed-by: default avatarHrvoje Ribicic <riba@google.com>
parent 543533af
......@@ -173,7 +173,10 @@ def _BuildOpcodeParams(op_id, include, exclude, alias):
if has_default or has_test:
buf.write(" (")
if has_default:
buf.write("defaults to ``%s``" % (default,))
if default == "":
buf.write("defaults to the empty string")
else:
buf.write("defaults to ``%s``" % (default,))
if has_test:
buf.write(", ")
if has_test:
......
......@@ -1634,5 +1634,5 @@ pNetworkLink =
pNetworkVlan :: Field
pNetworkVlan =
withDoc "Network vlan when connecting to a group" $
simpleField "network_vlan" [t| String |]
withDoc "Network vlan when connecting to a group" .
defaultField [| "" |] $ stringField "network_vlan"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment