Commits (4)
...@@ -92,6 +92,8 @@ def populate_endpoints(device : Device, driver : _Driver, monitoring_loops : Mon ...@@ -92,6 +92,8 @@ def populate_endpoints(device : Device, driver : _Driver, monitoring_loops : Mon
if isinstance(resource_value, Exception): if isinstance(resource_value, Exception):
errors.append(ERROR_GET.format(device_uuid, str(resource_key), str(resource_value))) errors.append(ERROR_GET.format(device_uuid, str(resource_key), str(resource_value)))
continue continue
if resource_value is None:
continue
endpoint_uuid = resource_value.get('uuid') endpoint_uuid = resource_value.get('uuid')
......
...@@ -29,7 +29,7 @@ from .p4_common import matches_ipv4, matches_ipv6, valid_port,\ ...@@ -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_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_VENDOR, P4_VAL_DEF_HW_VER, P4_VAL_DEF_SW_VER,\
P4_VAL_DEF_TIMEOUT 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_ACTION_PROFILE, KEY_COUNTER, KEY_DIR_COUNTER, KEY_METER, KEY_DIR_METER,\
KEY_CTL_PKT_METADATA KEY_CTL_PKT_METADATA
from .p4_client import WriteOperation from .p4_client import WriteOperation
...@@ -448,6 +448,12 @@ class P4Driver(_Driver): ...@@ -448,6 +448,12 @@ class P4Driver(_Driver):
ap_name) ap_name)
if ap_entries: if ap_entries:
entries.append(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: elif KEY_CTL_PKT_METADATA == resource_key:
msg = f"{resource_key.capitalize()} is not a " \ msg = f"{resource_key.capitalize()} is not a " \
f"retrievable resource" f"retrievable resource"
......