db_clear should support subkeys

Bug #2015108 reported by Ihar Hrachyshka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ovsdbapp
In Progress
Undecided
Unassigned

Bug Description

In OVN driver, when I need to clear one of fields inside e.g. 'external_ids' for Port_Group (or options, or other_config...), I don't have API in ovsdbapp to achieve it. I would like support for this added to db_clear function.

Also, support for subkeys in db_set may also need a revisit. I've tried this.

        ext_ids = pg['external_ids'].copy()
        ext_ids.pop(ovn_const.OVN_REV_NUM_EXT_ID_KEY)
        self.nb_api.db_set(
            'Port_Group', pg['name'],
            ('external_ids', ext_ids)).execute(check_error=True)

And it's not working too.

Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

Here's a draft fix from Terry: https://paste.centos.org/view/ba69052e

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ovsdbapp (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/ovsdbapp/+/879367

Changed in ovsdbapp:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ovsdbapp (master)

Change abandoned by "Terry Wilson <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/ovsdbapp/+/879367
Reason: db_remove is the proper way to do this

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.