Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the apply_rec() API for bulk create operations according. #246

Merged

Conversation

IGordynskyi
Copy link
Contributor

There were couple of errors seen during the sairec test run with the recording file generated on latest SONiC/SAI source code:

                    # Convert into "sai-object-type:key"
                    key = record[0][1] + ":" + record[idx + 1][0]
                    # Update OIDs in the key
                    key = self.__update_key(rec[0], key)
                    # Convert into ["sai-object-type", "key"]
>                   key = key.split(":", 1)[1]
E                   IndexError: list index out of range
...
Ignored line 131: ['a', 'APPLY_VIEW']
#132: [['A', 'SAI_STATUS_SUCCESS']]
Ignored line 132: ['A', 'SAI_STATUS_SUCCESS']
#133: [['C', 'SAI_OBJECT_TYPE_PORT'], ['oid:0x1000000000009', 'SAI_PORT_ATTR_HW_LANE_LIST=1:1', 'SAI_PORT_ATTR_SPEED=25000'], ['oid:0x100000000000a', 'SAI_PORT_ATTR_HW_LANE_LIST=1:2', 'SAI_PORT_ATTR_SPEED=25000'], ['oid:0x100000000000b', 'SAI_PORT_ATTR_HW_LANE_LIST=1:3', 'SAI_PORT_ATTR_SPEED=25000'], ['oid:0x100000000000c', 'SAI_PORT_ATTR_HW_LANE_LIST=1:4', 'SAI_PORT_ATTR_SPEED=25000'], ['oid:0x100000000000d', 'SAI_PORT_ATTR_HW_LANE_LIST=1:5', 'SAI_PORT_ATTR_SPEED=25000'], ['oid:0x100000000000e', 'SAI_PORT_ATTR_HW_LANE_LIST=1:6', 'SAI_PORT_ATTR_SPEED=25000'], ['oid:0x100000000000f', 'SAI_PORT_ATTR_HW_LANE_LIST=1:7', 'SAI_PORT_ATTR_SPEED=25000'], ['oid:0x1000000000010', 'SAI_PORT_ATTR_HW_LANE_LIST=1:8', 'SAI_PORT_ATTR_SPEED=25000']]
=================================================================================== warnings summary ===================================================================================
...

>               if key.startswith("{"):
E               AttributeError: 'dict' object has no attribute 'startswith'

/usr/local/lib/python3.11/dist-packages/saichallenger/common/sai.py:625: AttributeError

Signed-off-by: IGordynskyi <yuriy.gordynskyy@gmail.com>
common/sai.py Outdated Show resolved Hide resolved
Signed-off-by: IGordynskyi <yuriy.gordynskyy@gmail.com>
@andriy-kokhan andriy-kokhan merged commit 5f500a5 into opencomputeproject:main Dec 19, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants