Cannot attach/detach mirror to LSP using lsp_attach_mirror/lsp_detach_mirror
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ovsdbapp |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I'm using an API to manipulate mirrors and found the following log entries and nothing changed in LSP mirror_rules column.
```
2024-02-26 09:41:09,079 ovsdbapp.
2024-02-26 09:41:09,079 ovsdbapp.
2024-02-26 09:41:09,080 ovsdbapp.
2024-02-26 09:41:09,080 ovsdbapp.
```
A little investigation led to the `run_idl` method in the `LspAttachMirror` and `LspDetachMirror` commands. When trying to use `lsp_attach_mirror` and `lsp_detach_mirror` I got this error when passing mirror UUIDs represented as string as described in API docstring. https:/
That's because of incorrect passed value to `row.addvalue(...)`
https:/
and this string value follows to https:/
So, we should pass looked up `mirror` row instead of raw string/uuid to the row.addvalue method.
Also I've found that tests were passed without issues because we use pass the `mirror` arg with the uuid.UUID type to call corresponding methods. But there are also some tests for API methods that expect str or uuid.UUID and we don't test API with strings and check only with UUID.
Fix proposed to branch: master /review. opendev. org/c/openstack /ovsdbapp/ +/910278
Review: https:/