@@ -254,7 +254,40 @@
<dt><code>lsp-set-type</code> <var>port</var> <var>type</var></dt>
<dd>
- Set the type for the logical port. No special types have been
implemented yet
+ <p>
+ Set the type for the logical port. Logical ports can be used
to
+ model other types of connectivity into an OVN logical switch.
The
+ following types are defined:
+ </p>
+ <dl>
+ <dt>(empty string)</dt>
+ <dd>
+ A VM (or VIF) interface.
+ </dd>
+
+ <dt><code>router</code></dt>
+ <dd>
+ A connection to a logical router.
+ </dd>
+
+ <dt><code>localnet</code></dt>
+ <dd>
+ A connection to a locally accessible network from each
+ <code>ovn-controller</code> instance. A logical switch can
only
+ have a single <code>localnet</code> port attached. This is
used
+ to model direct connectivity to an existing network.
+ </dd>
+
+ <dt><code>l2gateway</code></dt>
+ <dd>
+ A connection to a physical network.
+ </dd>
+
+ <dt><code>vtep</code></dt>
+ <dd>
+ A port to a logical switch on a VTEP gateway.
+ </dd>
+ </dl>
</dd>
<dt><code>lsp-get-type</code> <var>port</var></dt>
@@ -1098,6 +1098,11 @@ nbctl_lsp_set_type(struct ctl_context *ctx)
const struct nbrec_logical_switch_port *lsp;
lsp = lsp_by_name_or_uuid(ctx, id, true);
+ if (strcmp(type, "") && strcmp(type, "router") && strcmp(type,
"localnet")
+ && strcmp(type, "l2gateway") && strcmp(type, "vtep"))
+ {
+ ctl_fatal("%s: Invalid type. See ovn-nbctl.8.xml.",
ctx->argv[1]);
+ }
nbrec_logical_switch_port_set_type(lsp, type);