<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/openvswitch.git/tests/ovsdb-data.at, branch master</title>
<subtitle>github.com: openvswitch/ovs.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/'/>
<entry>
<title>ovsdb-data: Add function to apply diff in-place.</title>
<updated>2021-09-24T13:01:38+00:00</updated>
<author>
<name>Ilya Maximets</name>
<email>i.maximets@ovn.org</email>
</author>
<published>2021-09-22T23:47:24+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=32b51326ef9c307b4acd0bacafb0218dd1372f3d'/>
<id>32b51326ef9c307b4acd0bacafb0218dd1372f3d</id>
<content type='text'>
ovsdb_datum_apply_diff() is heavily used in ovsdb transactions, but
it's linear in terms of number of comparisons.  And it also clones
all the atoms along the way.  In most cases size of a diff is much
smaller than the size of the original datum, this allows to perform
the same operation in-place with only O(diff-&gt;n * log2(old-&gt;n))
comparisons and O(old-&gt;n + diff-&gt;n) memory copies with memcpy.
Using this function while applying diffs read from the storage gives
a significant performance boost and allows to execute much more
transactions per second.

Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
Acked-by: Mark D. Gray &lt;mark.d.gray@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ovsdb_datum_apply_diff() is heavily used in ovsdb transactions, but
it's linear in terms of number of comparisons.  And it also clones
all the atoms along the way.  In most cases size of a diff is much
smaller than the size of the original datum, this allows to perform
the same operation in-place with only O(diff-&gt;n * log2(old-&gt;n))
comparisons and O(old-&gt;n + diff-&gt;n) memory copies with memcpy.
Using this function while applying diffs read from the storage gives
a significant performance boost and allows to execute much more
transactions per second.

Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
Acked-by: Mark D. Gray &lt;mark.d.gray@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Require Python 3 and remove support for Python 2.</title>
<updated>2019-09-27T16:23:50+00:00</updated>
<author>
<name>Ben Pfaff</name>
<email>blp@ovn.org</email>
</author>
<published>2019-09-20T15:30:42+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=1ca0323e7c29dc7ef5a615c265df0460208f92de'/>
<id>1ca0323e7c29dc7ef5a615c265df0460208f92de</id>
<content type='text'>
Python 2 reaches end-of-life on January 1, 2020, which is only
a few months away.  This means that OVS needs to stop depending
on in the next release that should occur roughly that same time.
Therefore, this commit removes all support for Python 2.  It
also makes Python 3 a mandatory build dependency.

Some of the interesting consequences:

- HAVE_PYTHON, HAVE_PYTHON2, and HAVE_PYTHON3 conditionals have
  been removed, since we now know that Python3 is available.

- $PYTHON and $PYTHON2 are removed, and $PYTHON3 is always
  available.

- Many tests for Python 2 support have been removed, and the ones
  that depended on Python 3 now run unconditionally.  This allowed
  several macros in the testsuite to be removed, making the code
  clearer.  This does make some of the changes to the testsuite
  files large due to indentation level changes.

- #! lines for Python now use /usr/bin/python3 instead of
  /usr/bin/python.

- Packaging depends on Python 3 packages.

Acked-by: Numan Siddique &lt;nusiddiq@redhat.com&gt;
Tested-by: Numan Siddique &lt;nusiddiq@redhat.com&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Python 2 reaches end-of-life on January 1, 2020, which is only
a few months away.  This means that OVS needs to stop depending
on in the next release that should occur roughly that same time.
Therefore, this commit removes all support for Python 2.  It
also makes Python 3 a mandatory build dependency.

Some of the interesting consequences:

- HAVE_PYTHON, HAVE_PYTHON2, and HAVE_PYTHON3 conditionals have
  been removed, since we now know that Python3 is available.

- $PYTHON and $PYTHON2 are removed, and $PYTHON3 is always
  available.

- Many tests for Python 2 support have been removed, and the ones
  that depended on Python 3 now run unconditionally.  This allowed
  several macros in the testsuite to be removed, making the code
  clearer.  This does make some of the changes to the testsuite
  files large due to indentation level changes.

- #! lines for Python now use /usr/bin/python3 instead of
  /usr/bin/python.

- Packaging depends on Python 3 packages.

Acked-by: Numan Siddique &lt;nusiddiq@redhat.com&gt;
Tested-by: Numan Siddique &lt;nusiddiq@redhat.com&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ovsdb-data: Add support for integer ranges in database commands</title>
<updated>2017-01-05T16:48:10+00:00</updated>
<author>
<name>Lukasz Rzasik</name>
<email>lukasz.rzasik@gmail.com</email>
</author>
<published>2016-12-29T22:55:46+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=1ab39058cc1fbe9b2ce48e784284fd0383d537c5'/>
<id>1ab39058cc1fbe9b2ce48e784284fd0383d537c5</id>
<content type='text'>
Adding / removing a range of integers to a column accepting a set of
integers requires enumarating all of the integers. This patch simplifies
it by introducing 'range' concept to the database commands. Two integers
separated by a hyphen represent an inclusive range.

The patch adds positive and negative tests for the new syntax.
The patch was tested by 'make check'. Covarage was tested by
'make check-lcov'.

Signed-off-by: Lukasz Rzasik &lt;lukasz.rzasik@gmail.com&gt;
Suggested-by: &lt;my_ovs_discuss@yahoo.com&gt;
Suggested-by: Ben Pfaff &lt;blp@ovn.org&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adding / removing a range of integers to a column accepting a set of
integers requires enumarating all of the integers. This patch simplifies
it by introducing 'range' concept to the database commands. Two integers
separated by a hyphen represent an inclusive range.

The patch adds positive and negative tests for the new syntax.
The patch was tested by 'make check'. Covarage was tested by
'make check-lcov'.

Signed-off-by: Lukasz Rzasik &lt;lukasz.rzasik@gmail.com&gt;
Suggested-by: &lt;my_ovs_discuss@yahoo.com&gt;
Suggested-by: Ben Pfaff &lt;blp@ovn.org&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Fix typo: s/OSVDB/OVSDB/.</title>
<updated>2016-07-24T18:01:53+00:00</updated>
<author>
<name>Ben Pfaff</name>
<email>blp@ovn.org</email>
</author>
<published>2016-07-22T20:16:05+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=218f9539f9ac359c7321c1cab9432c39648285f1'/>
<id>218f9539f9ac359c7321c1cab9432c39648285f1</id>
<content type='text'>
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
Acked-by: Ryan Moats &lt;rmoats@us.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
Acked-by: Ryan Moats &lt;rmoats@us.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: add diff and apply diff APIs for ovsdb_datum</title>
<updated>2015-12-11T22:22:33+00:00</updated>
<author>
<name>Andy Zhou</name>
<email>azhou@nicira.com</email>
</author>
<published>2015-09-25T23:19:48+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=1a6f1cefc0ecfc60f13b815d53666421e6e0b1a0'/>
<id>1a6f1cefc0ecfc60f13b815d53666421e6e0b1a0</id>
<content type='text'>
When an OVSDB column change its value, it is more efficient to only
send what has changed, rather than sending the entire new copy.
This is analogous to software programmer send patches rather than
the entire source file.

For columns store a single element, the "diff" datum is the same
as the "new" datum.

For columns that store set or map, it is only necessary to send the
information about the elements changed (including addition or removal).
The "diff" for those types are all elements that are changed.

Those APIs are mainly used for implementing a new OVSDB server
"update2" JSON-RPC notification, which encodes modifications
of a column with the contents of those "diff"s. Later patch implements
the "update2" notification.

Signed-off-by: Andy Zhou &lt;azhou@nicira.com&gt;
Acked-by: Ben Pfaff &lt;blp@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When an OVSDB column change its value, it is more efficient to only
send what has changed, rather than sending the entire new copy.
This is analogous to software programmer send patches rather than
the entire source file.

For columns store a single element, the "diff" datum is the same
as the "new" datum.

For columns that store set or map, it is only necessary to send the
information about the elements changed (including addition or removal).
The "diff" for those types are all elements that are changed.

Those APIs are mainly used for implementing a new OVSDB server
"update2" JSON-RPC notification, which encodes modifications
of a column with the contents of those "diff"s. Later patch implements
the "update2" notification.

Signed-off-by: Andy Zhou &lt;azhou@nicira.com&gt;
Acked-by: Ben Pfaff &lt;blp@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ovsdb-date.at: convert tabs into spaces</title>
<updated>2015-12-11T22:22:33+00:00</updated>
<author>
<name>Andy Zhou</name>
<email>azhou@nicira.com</email>
</author>
<published>2015-10-16T22:33:36+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=a711c31730bd186e77715e8ba4057f0d32251eb4'/>
<id>a711c31730bd186e77715e8ba4057f0d32251eb4</id>
<content type='text'>
No content change.

Signed-off-by: Andy Zhou &lt;azhou@nicira.com&gt;
Acked-by: Ben Pfaff &lt;blp@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No content change.

Signed-off-by: Andy Zhou &lt;azhou@nicira.com&gt;
Acked-by: Ben Pfaff &lt;blp@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>json: Fix error message for corner case in json_string_unescape().</title>
<updated>2015-05-29T22:17:24+00:00</updated>
<author>
<name>Ben Pfaff</name>
<email>blp@nicira.com</email>
</author>
<published>2015-02-25T16:46:02+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=5aa7f168b1d891cadbf04321d5729a02f5384031'/>
<id>5aa7f168b1d891cadbf04321d5729a02f5384031</id>
<content type='text'>
The error message should not include bytes already copied from the input
string.

Found by inspection.

Signed-off-by: Ben Pfaff &lt;blp@nicira.com&gt;
Acked-by: Alex Wang &lt;alexw@nicira.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The error message should not include bytes already copied from the input
string.

Found by inspection.

Signed-off-by: Ben Pfaff &lt;blp@nicira.com&gt;
Acked-by: Alex Wang &lt;alexw@nicira.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Skip "strings at least 2 characters long" test for narrow Python.</title>
<updated>2012-03-12T21:46:56+00:00</updated>
<author>
<name>Ben Pfaff</name>
<email>blp@nicira.com</email>
</author>
<published>2012-03-12T21:46:56+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=4807bca9553b47e4213a85740b02ceff7f71aa6b'/>
<id>4807bca9553b47e4213a85740b02ceff7f71aa6b</id>
<content type='text'>
Narrow Python can't handle Unicode characters outside the BMP, so skip the
test.

Reported-by: Michael Shigorin &lt;mike@osdn.org.ua&gt;
Tested-by: Michael Shigorin &lt;mike@osdn.org.ua&gt;
Signed-off-by: Ben Pfaff &lt;blp@nicira.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Narrow Python can't handle Unicode characters outside the BMP, so skip the
test.

Reported-by: Michael Shigorin &lt;mike@osdn.org.ua&gt;
Tested-by: Michael Shigorin &lt;mike@osdn.org.ua&gt;
Signed-off-by: Ben Pfaff &lt;blp@nicira.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Fix the two Python XFAIL tests.</title>
<updated>2011-05-24T18:32:22+00:00</updated>
<author>
<name>Ben Pfaff</name>
<email>blp@nicira.com</email>
</author>
<published>2011-05-13T21:20:10+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=be44585c21cc8dbe097a460a930696f0350dc12d'/>
<id>be44585c21cc8dbe097a460a930696f0350dc12d</id>
<content type='text'>
OVS has two Python tests that have always failed, for reasons not
understood, since they were added to the tree.  This commit fixes them.

One problem was that Python was assuming that stdout was encoded in ASCII.
Apparently the only way to "fix" this at runtime is to set PYTHONIOENCODING
to utf_8 in the environment, so this change does that.

Second, it appears that Python really doesn't like to print invalid UTF-8,
so this avoids doing that in python/ovs/json.py, instead just printing
the hexadecimal values of the invalid bytes.  For consistency, it makes
the same change to the C version.

Third, the C version of test-ovsdb doesn't check UTF-8 for consistency, it
just sends it blindly to the OVSDB server, but Python does check it and so
it bails out earlier.  This commit changes the Python version of the
"no invalid UTF-8 sequences in strings" to allow for the slight difference
in output that occurs for that reason.

Finally, test-ovsdb.py needs to convert error messages to Unicode
explicitly before printing them in the "parse-atoms" function.  I don't
really understand why, but now it works.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OVS has two Python tests that have always failed, for reasons not
understood, since they were added to the tree.  This commit fixes them.

One problem was that Python was assuming that stdout was encoded in ASCII.
Apparently the only way to "fix" this at runtime is to set PYTHONIOENCODING
to utf_8 in the environment, so this change does that.

Second, it appears that Python really doesn't like to print invalid UTF-8,
so this avoids doing that in python/ovs/json.py, instead just printing
the hexadecimal values of the invalid bytes.  For consistency, it makes
the same change to the C version.

Third, the C version of test-ovsdb doesn't check UTF-8 for consistency, it
just sends it blindly to the OVSDB server, but Python does check it and so
it bails out earlier.  This commit changes the Python version of the
"no invalid UTF-8 sequences in strings" to allow for the slight difference
in output that occurs for that reason.

Finally, test-ovsdb.py needs to convert error messages to Unicode
explicitly before printing them in the "parse-atoms" function.  I don't
really understand why, but now it works.
</pre>
</div>
</content>
</entry>
<entry>
<title>python/ovs/ovsuuid: Fix behavior of UUID.from_json() with no symbol table.</title>
<updated>2011-03-10T19:23:58+00:00</updated>
<author>
<name>Ben Pfaff</name>
<email>blp@nicira.com</email>
</author>
<published>2011-02-28T23:33:08+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=fdba672899fe192cb8c646d5b6d6d9260f42904d'/>
<id>fdba672899fe192cb8c646d5b6d6d9260f42904d</id>
<content type='text'>
UUID.from_json(['named-uuid', 'x'], None) should raise an error about
invalid syntax, but instead it was raising a TypeError because it would
try to evaluate "'x' not in None".  This fixes the problem and adds a test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
UUID.from_json(['named-uuid', 'x'], None) should raise an error about
invalid syntax, but instead it was raising a TypeError because it would
try to evaluate "'x' not in None".  This fixes the problem and adds a test.
</pre>
</div>
</content>
</entry>
</feed>
