2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-23 02:17:42 +00:00

13 Commits

Author SHA1 Message Date
Russell Bryant
cb96c1b27e python: Convert dict iterators.
In Python 2, dict.items(), dict.keys(), and dict.values() returned a
list.  dict.iteritems(), dict.iterkeys(), and dict.itervalues() returned
an iterator.

As of Python 3, dict.iteritems(), dict.itervalues(), and dict.iterkeys()
are gone.  items(), keys(), and values() now return an iterator.

In the case where we want an iterator, we now use the six.iter*()
helpers.  If we want a list, we explicitly create a list from the
iterator.

Signed-off-by: Russell Bryant <russell@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
2016-01-21 23:00:11 -05:00
Russell Bryant
37520ab386 python: Restrict line length to 79 chars.
Resolve pep8 error:

  E501 line too long (80 > 79 characters)

Signed-off-by: Russell Bryant <russell@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
2016-01-05 20:19:20 -05:00
Russell Bryant
bdca6c4b56 python: Resolve pep8 blank line errors.
Resolve pep8 errors E302 and E303:

  E302 expected 2 blank lines, found 1
  E303 too many blank lines (3)

Signed-off-by: Russell Bryant <russell@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
2016-01-05 18:13:47 -05:00
Russell Bryant
e8049bc5e8 python: Fix invalid varable/function references.
This code referred to "rows" where it meant to refer to "fetched_rows".
The patch resolves flake8 error:

  F821 undefined name 'rows'

python/build/nroff.py used a function fatal() that was not defined,
which raised the same type of error.

Signed-off-by: Russell Bryant <russell@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
2016-01-05 18:13:47 -05:00
Ben Pfaff
08258b507a nroff: Add support for <b>...</b> and <i>...</i> inline markup.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
2015-09-29 16:57:09 -07:00
Ben Pfaff
41f17e52e0 nroff: Support inline XML inside <pre> blocks.
This is useful so that one can write, e.g.

<p>The following shows how to add 1 to variable <var>x</var>:</p>
<pre>
<var>x</var> = <var>x</var> + 1;
</pre>

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
2015-09-29 16:56:32 -07:00
Ben Pfaff
dcd2143357 nroff: Allow comments in more contexts.
Reported-by: Russell Bryant <rbryant@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Russell Bryant <rbryant@redhat.com>
2015-08-26 08:54:09 -07:00
Ben Pfaff
d70bc2449c nroff: Add support for 'diagram' XML element for protocol headers.
This will be used in documentation for an upcoming change, to document
how Geneve OVN options are encoded.

The code in this change is from a series (not yet submitted) that makes
much more extensive use of it for documenting protocol headers.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2015-08-03 10:16:44 -07:00
Ben Pfaff
7202883c3a xml2nroff: Allow comments in block XML.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
2015-07-12 15:38:48 -07:00
Ben Pfaff
4d9d1d9e72 nroff: Fix style of names.
The recommended Google Python style is multi_word_names, not
multiWordNames.

There are lots of other places where the style could be improved.
I started here because I was working in this code anyway and because
this code is only used at build time and not installed, so that it
can't break any third-party code.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
2015-07-06 21:05:51 -07:00
Ben Pfaff
7102846b86 nroff: Fix the escape of '.'.
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Alex Wang <alexw@nicira.com>
2015-06-23 11:06:51 -07:00
Ben Pfaff
d75ef07f40 ovn-nbctl: Take default database target from OVN_NB_DB in environment.
This makes life easier for testing at the point you start to separate your
environment into multiple machines.

Also work on the manpage a little.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Alex Wang <alexw@nicira.com>
2015-06-16 08:23:12 -07:00
Ben Pfaff
7b8c46c8b5 ovsdb-doc: Factor out nroff formatting into a separate Python module.
This will make it cleaner to add another build-time program that generates
nroff from XML.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2015-02-19 11:11:30 -08:00