diff mbox

[ovs-dev] ovn-nbctl: Specify the range of the tag for "ovn-nbctl lsp-add" command

Message ID OFCDE7F13B.A30EF009-ON48258092.002B95EC-48258092.002B8D95@zte.com.cn
State Not Applicable
Headers show

Commit Message

zhou.huijing@zte.com.cn Dec. 23, 2016, 7:55 a.m. UTC
From  6e3a951654756f4dbd2b853980b710df66763a56   Wed Dec 14 09:13:00 2016
From: zhaojingjing <zhao.jingjing1@zte.com.cn>
Date:   Wed Dec 14 09:19:20 2016 +0800
Subject: [PATCH] datapath:ovn/utilities/ovn-nbctl.8.xml 
b/ovn/utilities/ovn-nbctl.8.xml,
                          ovn/utilities/ovn-nbctl.c 
b/ovn/utilities/ovn-nbctl.c :
                          Specify the range of the tag for "ovn-nbctl 
lsp-add" command

Signed-off-by: zhaojingjing <zhao.jingjing1@zte.com.cn>
---
 

         ctl_fatal("lsp-add with parent must also specify a tag");
diff mbox

Patch

diff --git a/ovn/utilities/ovn-nbctl.8.xml b/ovn/utilities/ovn-nbctl.8.xml
index 3904685..3683876 100644
--- a/ovn/utilities/ovn-nbctl.8.xml
+++ b/ovn/utilities/ovn-nbctl.8.xml
@@ -125,7 +125,9 @@ 
         <p>
           Creates on <var>switch</var> a logical switch port named
           <var>port</var> that is a child of <var>parent</var> that is
-          identified with VLAN ID <var>tag_request</var>.  If
+          identified with VLAN ID <var>tag_request</var>.
+                 <var>Tag_request</var> must be between <code>0</code> 
and
+                 <code>4095</code>, inclusive. If
           <var>tag_request</var> is <code>0</code>, 
<code>ovn-northd</code>
           generates a tag that is unique in the scope of 
<var>parent</var>.
           This is useful in cases such as virtualized container 
environments
diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c
index 0cc0c1f..a90f94a 100644
--- a/ovn/utilities/ovn-nbctl.c
+++ b/ovn/utilities/ovn-nbctl.c
@@ -798,7 +798,7 @@  nbctl_lsp_add(struct ctl_context *ctx)
         parent_name = ctx->argv[3];
         if (!ovs_scan(ctx->argv[4], "%"SCNd64, &tag)
             || tag < 0 || tag > 4095) {
-            ctl_fatal("%s: invalid tag", ctx->argv[4]);
+            ctl_fatal("%s: invalid tag, the tag in range 0 to 4095.", 
ctx->argv[4]);
         }
     } else {