From 8a0dc4fd46464fe2bd3041eb9073f16800352409 Mon Sep 17 00:00:00 2001 From: pfamelis Date: Wed, 13 Mar 2024 15:19:21 +0200 Subject: [PATCH 1/2] fix: _MeterEntryBase should pass p4_client to its super --- src/device/service/drivers/p4/p4_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/device/service/drivers/p4/p4_manager.py b/src/device/service/drivers/p4/p4_manager.py index b93c86b5f..0c7088052 100644 --- a/src/device/service/drivers/p4/p4_manager.py +++ b/src/device/service/drivers/p4/p4_manager.py @@ -5213,7 +5213,7 @@ class _MeterEntryBase(_P4EntityBase): """ def __init__(self, p4_client, *args, **kwargs): - super().__init__(*args, **kwargs) + super().__init__(p4_client, *args, **kwargs) self._meter_type = self._info.spec.unit self.index = -1 self.cir = -1 -- GitLab From ee55358f6f8ae3942748b166ed67359c5727211d Mon Sep 17 00:00:00 2001 From: pfamelis Date: Wed, 13 Mar 2024 15:21:40 +0200 Subject: [PATCH 2/2] fix: controller_packet_metadata should not throw exception --- src/device/service/drivers/p4/p4_driver.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/device/service/drivers/p4/p4_driver.py b/src/device/service/drivers/p4/p4_driver.py index 6bb5fbe41..45ba6d88c 100644 --- a/src/device/service/drivers/p4/p4_driver.py +++ b/src/device/service/drivers/p4/p4_driver.py @@ -455,9 +455,8 @@ class P4Driver(_Driver): #Not Supported for P4 devices pass elif KEY_CTL_PKT_METADATA == resource_key: - msg = f"{resource_key.capitalize()} is not a " \ - f"retrievable resource" - raise Exception(msg) + #To-Do: Check what we should do with controller_packet_metadata + LOGGER.warning(f"{resource_key.capitalize()} is not a not a retreivable source") else: msg = f"GetConfig failed due to invalid " \ f"resource key: {resource_key}" -- GitLab