Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Cloud:OpenStack:Newton
openstack-neutron-doc
0001-set_db_attribute-differs-between-vsctl-and...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-set_db_attribute-differs-between-vsctl-and-native.patch of Package openstack-neutron-doc
From: Terry Wilson <twilson@redhat.com> Date: Mon, 3 Oct 2016 22:32:42 -0500 Subject: [PATCH] set_db_attribute differs between vsctl and native On the following: b.set_db_attribute('Port', pname, 'other_config', {'a': 'b'}) b.set_db_attribute('Port', pname, 'other_config', {'c': 'd'}) will produce different results between the vsctl and native OVSDB implementations. vsctl will merge the values into a single dict and native will overwrite the dict. This patch makes the native implementation mirror vsctl. Related-Bug: #1630920 Change-Id: Ie7680a301b8b3ee8e5654666e2aea78ecbd07a12 --- native/commands.py | 6 ++++++ 1 file changed, 6 insertions(+) Index: neutron-9.4.2.dev21/neutron/agent/ovsdb/native/commands.py =================================================================== --- neutron-9.4.2.dev21.orig/neutron/agent/ovsdb/native/commands.py +++ neutron-9.4.2.dev21/neutron/agent/ovsdb/native/commands.py @@ -249,6 +249,12 @@ class DbSetCommand(BaseCommand): # this soon. if isinstance(val, collections.OrderedDict): val = dict(val) + if isinstance(val, dict): + # NOTE(twilson) OVS 2.6's Python IDL has mutate methods that + # would make this cleaner, but it's too early to rely on them. + existing = getattr(record, col, {}) + existing.update(val) + val = existing setattr(record, col, val)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor