Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-ovsdbapp for openSUSE:Factory
checked in at 2023-03-07 16:49:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ovsdbapp (Old)
and /work/SRC/openSUSE:Factory/.python-ovsdbapp.new.31432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-ovsdbapp"
Tue Mar 7 16:49:38 2023 rev:13 rq:1069689 version:2.2.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-ovsdbapp/python-ovsdbapp.changes
2022-12-02 13:13:07.117845724 +0100
+++
/work/SRC/openSUSE:Factory/.python-ovsdbapp.new.31432/python-ovsdbapp.changes
2023-03-07 16:50:13.125548076 +0100
@@ -1,0 +2,8 @@
+Mon Mar 6 15:50:49 UTC 2023 - [email protected]
+
+- update to version 2.2.1
+ - Update tox.ini for tox4
+ - Accept HA chassis group commands in HAChassisGroupAdd*
+ - Define "LbAddIpPortMappingCommand" with latin chars
+
+-------------------------------------------------------------------
Old:
----
ovsdbapp-2.2.0.tar.gz
New:
----
ovsdbapp-2.2.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-ovsdbapp.spec ++++++
--- /var/tmp/diff_new_pack.488qj7/_old 2023-03-07 16:50:13.713551171 +0100
+++ /var/tmp/diff_new_pack.488qj7/_new 2023-03-07 16:50:13.721551213 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-ovsdbapp
#
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,13 +18,13 @@
%define with_tests 1
Name: python-ovsdbapp
-Version: 2.2.0
+Version: 2.2.1
Release: 0
Summary: A library for creating OVSDB applications
License: Apache-2.0
Group: Development/Languages/Python
URL: https://docs.openstack.org/ovsdbapp
-Source0:
https://files.pythonhosted.org/packages/source/o/ovsdbapp/ovsdbapp-2.2.0.tar.gz
+Source0:
https://files.pythonhosted.org/packages/source/o/ovsdbapp/ovsdbapp-2.2.1.tar.gz
BuildRequires: openstack-macros
BuildRequires: python3-fixtures >= 3.0.0
BuildRequires: python3-netaddr >= 0.7.18
@@ -70,7 +70,7 @@
%{py3_build}
# generate html docs
-PBR_VERSION=2.2.0 PYTHONPATH=. \
+PBR_VERSION=2.2.1 PYTHONPATH=. \
%sphinx_build -b html doc/source doc/build/html
rm -rf doc/build/html/.{doctrees,buildinfo}
@@ -79,7 +79,7 @@
%if 0%{?with_tests}
%check
-OS_TEST_PATH=./ovsdbapp/tests/unit PYTHONPATH=. python3 -m stestr.cli run
+OS_TEST_PATH=./ovsdbapp/tests/unit PYTHONPATH=. %{openstack_stestr_run}
%endif
%files -n python3-ovsdbapp
++++++ ovsdbapp-2.2.0.tar.gz -> ovsdbapp-2.2.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ovsdbapp-2.2.0/ChangeLog new/ovsdbapp-2.2.1/ChangeLog
--- old/ovsdbapp-2.2.0/ChangeLog 2022-11-16 15:11:02.000000000 +0100
+++ new/ovsdbapp-2.2.1/ChangeLog 2023-02-10 17:02:53.000000000 +0100
@@ -1,6 +1,13 @@
CHANGES
=======
+2.2.1
+-----
+
+* Define "LbAddIpPortMappingCommand" with latin chars
+* Accept HA chassis group commands in HAChassisGroupAdd\*
+* Update tox.ini for tox4
+
2.2.0
-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ovsdbapp-2.2.0/PKG-INFO new/ovsdbapp-2.2.1/PKG-INFO
--- old/ovsdbapp-2.2.0/PKG-INFO 2022-11-16 15:11:02.537545000 +0100
+++ new/ovsdbapp-2.2.1/PKG-INFO 2023-02-10 17:02:54.134330700 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: ovsdbapp
-Version: 2.2.0
+Version: 2.2.1
Summary: A library for creating OVSDB applications
Home-page: https://pypi.org/project/ovsdbapp/
Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ovsdbapp-2.2.0/ovsdbapp/api.py
new/ovsdbapp-2.2.1/ovsdbapp/api.py
--- old/ovsdbapp-2.2.0/ovsdbapp/api.py 2022-11-16 15:09:53.000000000 +0100
+++ new/ovsdbapp-2.2.1/ovsdbapp/api.py 2023-02-10 17:02:24.000000000 +0100
@@ -33,6 +33,16 @@
:param transaction_options: Options to pass to the transaction
"""
+ @property
+ @abc.abstractmethod
+ def result(self):
+ """Returned value from the command execution"""
+
+ @result.setter
+ @abc.abstractmethod
+ def result(self, value):
+ """Setter of the result property"""
+
class Transaction(object, metaclass=abc.ABCMeta):
@abc.abstractmethod
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ovsdbapp-2.2.0/ovsdbapp/backend/ovs_idl/__init__.py
new/ovsdbapp-2.2.1/ovsdbapp/backend/ovs_idl/__init__.py
--- old/ovsdbapp-2.2.0/ovsdbapp/backend/ovs_idl/__init__.py 2022-11-16
15:09:53.000000000 +0100
+++ new/ovsdbapp-2.2.1/ovsdbapp/backend/ovs_idl/__init__.py 2023-02-10
17:02:24.000000000 +0100
@@ -13,8 +13,10 @@
import logging
import uuid
+from ovs.db import idl
from ovsdbapp.backend.ovs_idl import command as cmd
from ovsdbapp.backend.ovs_idl import idlutils
+from ovsdbapp.backend.ovs_idl import rowview
from ovsdbapp.backend.ovs_idl import transaction
from ovsdbapp import exceptions
@@ -190,7 +192,11 @@
# Handle commands by simply returning its result
if isinstance(record, cmd.BaseCommand):
- return record.result
+ if isinstance(record.result, (rowview.RowView, idl.Row)):
+ # In case the command (creation) returns an existing record.
+ return record.result
+ else:
+ record = record.result
t = self.tables[table]
if isinstance(record, uuid.UUID):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ovsdbapp-2.2.0/ovsdbapp/backend/ovs_idl/command.py
new/ovsdbapp-2.2.1/ovsdbapp/backend/ovs_idl/command.py
--- old/ovsdbapp-2.2.0/ovsdbapp/backend/ovs_idl/command.py 2022-11-16
15:09:53.000000000 +0100
+++ new/ovsdbapp-2.2.1/ovsdbapp/backend/ovs_idl/command.py 2023-02-10
17:02:24.000000000 +0100
@@ -30,7 +30,15 @@
def __init__(self, api):
self.api = api
- self.result = None
+ self._result = None
+
+ @property
+ def result(self):
+ return self._result
+
+ @result.setter
+ def result(self, value):
+ self._result = value
def execute(self, check_error=False, log_errors=True, **kwargs):
try:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ovsdbapp-2.2.0/ovsdbapp/schema/ovn_northbound/commands.py
new/ovsdbapp-2.2.1/ovsdbapp/schema/ovn_northbound/commands.py
--- old/ovsdbapp-2.2.0/ovsdbapp/schema/ovn_northbound/commands.py
2022-11-16 15:09:53.000000000 +0100
+++ new/ovsdbapp-2.2.1/ovsdbapp/schema/ovn_northbound/commands.py
2023-02-10 17:02:24.000000000 +0100
@@ -1418,7 +1418,7 @@
raise RuntimeError(msg)
-class LbAddIpPortMappingСommand(cmd.BaseCommand):
+class LbAddIpPortMappingCommand(cmd.BaseCommand):
table = 'Load_Balancer'
def __init__(self, api, lb, endpoint_ip, port_name, source_ip):
@@ -1804,16 +1804,15 @@
def __init__(self, api, hcg_id, chassis, priority, **columns):
super().__init__(api)
- self.hcg_id = hcg_id
+ self.hcg = hcg_id
self.chassis = chassis
self.priority = priority
self.columns = columns
def run_idl(self, txn):
- hc_group = self.api.lookup('HA_Chassis_Group', self.hcg_id)
+ hc_group = self.api.lookup('HA_Chassis_Group', self.hcg)
found = False
- hc = None
- for hc in hc_group.ha_chassis:
+ for hc in getattr(hc_group, 'ha_chassis', []):
if hc.chassis_name != self.chassis:
continue
found = True
@@ -1835,26 +1834,29 @@
def __init__(self, api, hcg_id, chassis, if_exists=False):
super().__init__(api)
- self.hcg_id = hcg_id
+ self.hcg = hcg_id
self.chassis = chassis
self.if_exists = if_exists
def run_idl(self, txn):
try:
- hc_group = self.api.lookup('HA_Chassis_Group', self.hcg_id)
- except idlutils.RowNotFound:
+ hc_group = self.api.lookup('HA_Chassis_Group', self.hcg)
+ except idlutils.RowNotFound as exc:
if self.if_exists:
return
+ raise RuntimeError('HA Chassis Group %s does not exist' %
+ utils.get_uuid(self.hcg)) from exc
+
hc = None
- for hc in hc_group.ha_chassis:
+ for hc in getattr(hc_group, 'ha_chassis', []):
if hc.chassis_name == self.chassis:
break
else:
if self.if_exists:
return
raise RuntimeError(
- 'HA Chassis %s does not exist' % self.hcg_id)
+ 'HA Chassis %s does not exist' % utils.get_uuid(self.hcg))
hc_group.delvalue('ha_chassis', hc)
hc.delete()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ovsdbapp-2.2.0/ovsdbapp/schema/ovn_northbound/impl_idl.py
new/ovsdbapp-2.2.1/ovsdbapp/schema/ovn_northbound/impl_idl.py
--- old/ovsdbapp-2.2.0/ovsdbapp/schema/ovn_northbound/impl_idl.py
2022-11-16 15:09:53.000000000 +0100
+++ new/ovsdbapp-2.2.1/ovsdbapp/schema/ovn_northbound/impl_idl.py
2023-02-10 17:02:24.000000000 +0100
@@ -289,7 +289,7 @@
return cmd.LbDelHealthCheckCommand(self, lb, hc_uuid, if_exists)
def lb_add_ip_port_mapping(self, lb, endport_ip, port_name, source_ip):
- return cmd.LbAddIpPortMappingСommand(self, lb, endport_ip,
+ return cmd.LbAddIpPortMappingCommand(self, lb, endport_ip,
port_name, source_ip)
def lb_del_ip_port_mapping(self, lb, endport_ip):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ovsdbapp-2.2.0/ovsdbapp/tests/functional/schema/ovn_northbound/test_impl_idl.py
new/ovsdbapp-2.2.1/ovsdbapp/tests/functional/schema/ovn_northbound/test_impl_idl.py
---
old/ovsdbapp-2.2.0/ovsdbapp/tests/functional/schema/ovn_northbound/test_impl_idl.py
2022-11-16 15:09:53.000000000 +0100
+++
new/ovsdbapp-2.2.1/ovsdbapp/tests/functional/schema/ovn_northbound/test_impl_idl.py
2023-02-10 17:02:24.000000000 +0100
@@ -2192,6 +2192,37 @@
check_error=True)
self.assertEqual([], hcg.ha_chassis)
+ def test_ha_chassis_group_add_delete_chassis_within_txn(self):
+ with self.api.create_transaction(check_error=True) as txn:
+ hcg_cmd = txn.add(self.api.ha_chassis_group_add(self.hcg_name))
+ priority = 20
+ txn.add(self.api.ha_chassis_group_add_chassis(
+ hcg_cmd, self.chassis, priority))
+
+ # Assert that the HA Chassis entry was created
+ hcg = self.api.ha_chassis_group_get(self.hcg_name).execute(
+ check_error=True)
+ hc = self.api.db_find(
+ 'HA_Chassis',
+ ('chassis_name', '=', self.chassis)).execute(check_error=True)
+ self.assertEqual(priority, hc[0]['priority'])
+ ha_chassis_uuid_list = [hc.uuid for hc in hcg.ha_chassis]
+ self.assertEqual(ha_chassis_uuid_list, [hc[0]['_uuid']])
+
+ with self.api.create_transaction(check_error=True) as txn:
+ hcg_cmd = txn.add(self.api.ha_chassis_group_add(self.hcg_name,
+ may_exist=True))
+ txn.add(self.api.ha_chassis_group_del_chassis(hcg_cmd,
+ self.chassis))
+
+ hcg = self.api.ha_chassis_group_get(self.hcg_name).execute(
+ check_error=True)
+ ha = self.api.db_find(
+ 'HA_Chassis',
+ ('chassis_name', '=', self.chassis)).execute(check_error=True)
+ self.assertEqual([], ha)
+ self.assertEqual([], hcg.ha_chassis)
+
def test_ha_chassis_group_if_exists(self):
self.api.ha_chassis_group_add(self.hcg_name).execute(check_error=True)
self.api.ha_chassis_group_add_chassis(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ovsdbapp-2.2.0/ovsdbapp/tests/unit/backend/ovs_idl/test_idlutils.py
new/ovsdbapp-2.2.1/ovsdbapp/tests/unit/backend/ovs_idl/test_idlutils.py
--- old/ovsdbapp-2.2.0/ovsdbapp/tests/unit/backend/ovs_idl/test_idlutils.py
2022-11-16 15:09:53.000000000 +0100
+++ new/ovsdbapp-2.2.1/ovsdbapp/tests/unit/backend/ovs_idl/test_idlutils.py
2023-02-10 17:02:24.000000000 +0100
@@ -50,11 +50,19 @@
class MockCommand(api.Command):
def __init__(self, result):
- self.result = result
+ self._result = result
def execute(self, **kwargs):
pass
+ @property
+ def result(self):
+ return self._result
+
+ @result.setter
+ def result(self, value):
+ self._result = value
+
class TestIdlUtils(base.TestCase):
def test_condition_match(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ovsdbapp-2.2.0/ovsdbapp/utils.py
new/ovsdbapp-2.2.1/ovsdbapp/utils.py
--- old/ovsdbapp-2.2.0/ovsdbapp/utils.py 2022-11-16 15:09:53.000000000
+0100
+++ new/ovsdbapp-2.2.1/ovsdbapp/utils.py 2023-02-10 17:02:24.000000000
+0100
@@ -13,6 +13,11 @@
import uuid
import netaddr
+from ovs.db import idl
+
+from ovsdbapp import api
+from ovsdbapp.backend.ovs_idl import rowview
+
# NOTE(twilson) Clearly these are silly, but they are good enough for now
# I'm happy for someone to replace them with better parsing
@@ -76,3 +81,15 @@
return str(uuid.UUID(val)).replace('-', '') == _format_uuid_string(val)
except (TypeError, ValueError, AttributeError):
return False
+
+
+def get_uuid(reg_uuid_or_cmd):
+ """Return the UUID of a UUID itself or a BaseCommand"""
+ if isinstance(reg_uuid_or_cmd, api.Command):
+ reg_uuid = reg_uuid_or_cmd.result
+ if isinstance(reg_uuid, (rowview.RowView, idl.Row)):
+ reg_uuid = reg_uuid.uuid
+ else:
+ reg_uuid = reg_uuid_or_cmd
+
+ return reg_uuid
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ovsdbapp-2.2.0/ovsdbapp.egg-info/PKG-INFO
new/ovsdbapp-2.2.1/ovsdbapp.egg-info/PKG-INFO
--- old/ovsdbapp-2.2.0/ovsdbapp.egg-info/PKG-INFO 2022-11-16
15:11:02.000000000 +0100
+++ new/ovsdbapp-2.2.1/ovsdbapp.egg-info/PKG-INFO 2023-02-10
17:02:53.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: ovsdbapp
-Version: 2.2.0
+Version: 2.2.1
Summary: A library for creating OVSDB applications
Home-page: https://pypi.org/project/ovsdbapp/
Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ovsdbapp-2.2.0/ovsdbapp.egg-info/pbr.json
new/ovsdbapp-2.2.1/ovsdbapp.egg-info/pbr.json
--- old/ovsdbapp-2.2.0/ovsdbapp.egg-info/pbr.json 2022-11-16
15:11:02.000000000 +0100
+++ new/ovsdbapp-2.2.1/ovsdbapp.egg-info/pbr.json 2023-02-10
17:02:53.000000000 +0100
@@ -1 +1 @@
-{"git_version": "5f429b7", "is_release": true}
\ No newline at end of file
+{"git_version": "7733f0c", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ovsdbapp-2.2.0/tox.ini new/ovsdbapp-2.2.1/tox.ini
--- old/ovsdbapp-2.2.0/tox.ini 2022-11-16 15:09:53.000000000 +0100
+++ new/ovsdbapp-2.2.1/tox.ini 2023-02-10 17:02:24.000000000 +0100
@@ -1,11 +1,10 @@
[tox]
-minversion = 3.1.1
+minversion = 3.18.0
envlist = py3,pep8
-skipsdist = True
ignore_basepython_conflict = True
[testenv]
-basepython = python3
+basepython = {env:TOX_PYTHON:python3}
usedevelop = True
setenv =
VIRTUAL_ENV={envdir}
@@ -25,10 +24,11 @@
[testenv:pep8]
commands = flake8
- {toxinidir}/tools/coding-checks.sh --all '{posargs}'
+ bash {toxinidir}/tools/coding-checks.sh --all '{posargs}'
deps =
{[testenv]deps}
pylint==2.5.3 # GPLv2
+allowlist_externals = bash
[testenv:venv]
commands = {posargs}
@@ -46,7 +46,7 @@
[testenv:pdf-docs]
envdir = {toxworkdir}/docs
deps = {[testenv:docs]deps}
-whitelist_externals =
+allowlist_externals =
make
commands =
sphinx-build -W -b latex doc/source doc/build/pdf
@@ -71,8 +71,9 @@
OVN_BRANCH={env:OVN_BRANCH:}
passenv = KEEP_VENV
commands =
- {toxinidir}/tools/setup-ovs.sh
+ bash {toxinidir}/tools/setup-ovs.sh
{[testenv]commands}
+allowlist_externals = bash
[flake8]
# W504 line break after binary operator