Re: [ovs-dev] [PATCH ovn v1] utilities: add ovn-sim

2019-10-09 Thread 0-day Robot
Bleep bloop.  Greetings Flavio Fernandes, I am a robot and I have tried out 
your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
WARNING: Line is 81 characters long (recommended limit is 79)
#160 FILE: Documentation/ref/ovn-sim.1.rst:77:
Simulating hypervisors and and starting ovn controller (via ovn_attach) on 
each::

WARNING: Line is 89 characters long (recommended limit is 79)
#170 FILE: Documentation/ref/ovn-sim.1.rst:87:
ovs-vsctl add-port br-int vif$i -- set Interface vif$i 
external-ids:iface-id=lp$i

WARNING: Line is 92 characters long (recommended limit is 79)
#189 FILE: Documentation/ref/ovn-sim.1.rst:106:
ovs-vsctl add-port br-int vif$i -- set Interface vif$i 
external-ids:iface-id=lp$i) &

WARNING: Line is 99 characters long (recommended limit is 79)
#205 FILE: Documentation/ref/ovn-sim.1.rst:122:
watch 'for i in `seq $n`; do if test `ovn-nbctl lsp-get-up lp$i` != up; 
then echo $i; fi; done'

WARNING: Line has trailing whitespace
#777 FILE: utilities/ovn-sim.in:278:
   --pidfile=ovn-controller.${sandbox}.pid 

WARNING: New doc ovn-sim.1.rst not listed in Documentation/automake.mk
Lines checked: 810, Warnings: 6, Errors: 0


Please check this out.  If you feel there has been an error, please email 
acon...@redhat.com

Thanks,
0-day Robot
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH ovn v1] utilities: add ovn-sim

2019-10-09 Thread Flavio Fernandes
Adding a wrapper to ovs-sim called ovn-sim, which re-introduces the
primitives for OVN in the simulator that were lost as part of
the ovn-org/ovn split.

Also resurrected the man page used to document ovn-sim usage.

Lastly, there were some leftover ovs-sim references that were
not proper. This patch renames these to ovn-sim.

All in all, this change is nothing but porting over the
OVN sections of ovs-sim from OVS version 2.12 (pre-split).
Fixes #21

Reported-by: Flavio Fernandes 
Reported-at: https://github.com/ovn-org/ovn/issues/21
Signed-off-by: Flavio Fernandes 
---
 Documentation/automake.mk   |   2 +-
 Documentation/conf.py   |   4 +-
 Documentation/ref/index.rst |   2 +-
 Documentation/ref/ovn-sim.1.rst | 122 +
 Documentation/ref/ovs-sim.1.rst | 244 -
 Makefile.am |   1 +
 utilities/.gitignore|   1 +
 utilities/automake.mk   |   6 +-
 utilities/ovn-sim.in| 308 
 9 files changed, 441 insertions(+), 249 deletions(-)
 create mode 100644 Documentation/ref/ovn-sim.1.rst
 delete mode 100644 Documentation/ref/ovs-sim.1.rst
 create mode 100755 utilities/ovn-sim.in

diff --git a/Documentation/automake.mk b/Documentation/automake.mk
index 5968d6941..bf2166349 100644
--- a/Documentation/automake.mk
+++ b/Documentation/automake.mk
@@ -106,7 +106,7 @@ RST_MANPAGES = \
 # rST formatted manpages that we don't want to install because they
 # document stuff that only works with a build tree, not with an
 # installed OVS.
-RST_MANPAGES_NOINST = ovs-sim.1.rst
+RST_MANPAGES_NOINST = ovn-sim.1.rst
 
 # The GNU standards say that these variables should control
 # installation directories for manpages in each section.  Automake
diff --git a/Documentation/conf.py b/Documentation/conf.py
index 6bf528bde..2c85dcf4d 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -114,8 +114,8 @@ html_static_path = ['_static']
 # One entry per manual page. List of tuples
 # (source start file, name, description, authors, manual section).
 _man_pages = [
-('ovs-sim.1',
- u'Open vSwitch simulator environment'),
+('ovn-sim.1',
+ u'Open Virtual Network simulator environment'),
 ('ovsdb-server.7',
  u'Open vSwitch Database Server Protocol'),
 ('ovsdb.5',
diff --git a/Documentation/ref/index.rst b/Documentation/ref/index.rst
index 530d639d6..7ff9edd09 100644
--- a/Documentation/ref/index.rst
+++ b/Documentation/ref/index.rst
@@ -39,7 +39,7 @@ time:
 .. toctree::
:maxdepth: 3
 
-   ovs-sim.1
+   ovn-sim.1
ovsdb-server.7
ovsdb.5
ovsdb.7
diff --git a/Documentation/ref/ovn-sim.1.rst b/Documentation/ref/ovn-sim.1.rst
new file mode 100644
index 0..b906740f0
--- /dev/null
+++ b/Documentation/ref/ovn-sim.1.rst
@@ -0,0 +1,122 @@
+===
+ovn-sim
+===
+
+Synopsis
+
+
+``ovn-sim`` [*option*]... [*script*]...
+
+Description
+===
+
+``ovn-sim`` is a wrapper script that adds ovn related commands on
+top of ``ovs-sim``.
+
+``ovs-sim`` provides a convenient environment for running one or more Open
+vSwitch instances and related software in a sandboxed simulation environment.
+
+To use ``ovn-sim``, first build Open vSwitch, then invoke it directly from the
+build directory, e.g.::
+
+git clone https://github.com/openvswitch/ovs.git
+cd ovs
+./boot.sh && ./configure && make
+cd ..
+git clone https://github.com/ovn-org/ovn.git
+cd ovn
+./boot.sh && ./configure --with-ovs-source=${PWD}/../ovs
+make
+utilities/ovn-sim
+
+See documentation on ``ovs-sim`` for info on simulator, including the
+parameters you can use.
+
+OVN Commands
+
+
+These commands interact with OVN, the Open Virtual Network.
+
+``ovn_start`` [*options*]
+Creates and initializes the central OVN databases (both
+``ovn-sb(5)`` and ``ovn-nb(5)``) and starts an instance of
+``ovsdb-server`` for each one.  Also starts an instance of
+``ovn-northd``.
+
+The following options are available:
+
+   ``--nbdb-model`` *model*
+   Uses the given database model for the northbound database.
+   The *model* may be ``standalone`` (the default), ``backup``,
+   or ``clustered``.
+
+   ``--nbdb-servers`` *n*
+   For a clustered northbound database, the number of servers in
+   the cluster.  The default is 3.
+
+   ``--sbdb-model`` *model*
+   Uses the given database model for the southbound database.
+   The *model* may be ``standalone`` (the default), ``backup``,
+   or ``clustered``.
+
+   ``--sbdb-servers`` *n*
+   For a clustered southbound database, the number of servers in
+   the cluster.  The default is 3.
+
+``ovn_attach`` *network* *bridge* *ip* [*masklen*]
+First, this command attaches bridge to interconnection network
+network, just like ``net_attach`` *network* *bridge*.  Second, it
+configures (simulated) IP