diff --git a/src/device/service/Tools.py b/src/device/service/Tools.py index 05610e1d2c2522bc167d43c7d0803f00e2472c9b..11a2e49b8e9da03efbceb730cae2a3cd9d10f0b5 100644 --- a/src/device/service/Tools.py +++ b/src/device/service/Tools.py @@ -92,6 +92,8 @@ def populate_endpoints(device : Device, driver : _Driver, monitoring_loops : Mon if isinstance(resource_value, Exception): errors.append(ERROR_GET.format(device_uuid, str(resource_key), str(resource_value))) continue + if resource_value is None: + continue endpoint_uuid = resource_value.get('uuid') diff --git a/src/device/service/drivers/p4/p4_driver.py b/src/device/service/drivers/p4/p4_driver.py index 606bb91ebe5e14804bbdd4f34e7c795c6cfd1b32..6057c07baf15d30373838e45ab13b3db6d235159 100644 --- a/src/device/service/drivers/p4/p4_driver.py +++ b/src/device/service/drivers/p4/p4_driver.py @@ -29,7 +29,7 @@ from .p4_common import matches_ipv4, matches_ipv6, valid_port,\ P4_ATTR_DEV_P4BIN, P4_ATTR_DEV_P4INFO, P4_ATTR_DEV_TIMEOUT,\ P4_VAL_DEF_VENDOR, P4_VAL_DEF_HW_VER, P4_VAL_DEF_SW_VER,\ P4_VAL_DEF_TIMEOUT -from .p4_manager import P4Manager, KEY_TABLE,\ +from .p4_manager import P4Manager, KEY_TABLE, KEY_ACTION, \ KEY_ACTION_PROFILE, KEY_COUNTER, KEY_DIR_COUNTER, KEY_METER, KEY_DIR_METER,\ KEY_CTL_PKT_METADATA from .p4_client import WriteOperation @@ -448,6 +448,12 @@ class P4Driver(_Driver): ap_name) if ap_entries: entries.append(ap_entries) + elif KEY_ACTION == resource_key: + #To be implemented or deprecated + pass + elif '__endpoints__' == resource_key: + #Not Supported for P4 devices + pass elif KEY_CTL_PKT_METADATA == resource_key: msg = f"{resource_key.capitalize()} is not a " \ f"retrievable resource"