Skip to content
GitLab
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
TFS
controller
Compare revisions
e2482470bedf98989ae3624760f928eaf2fd1775...43dd7eb78d6d64fd87e3fef7ec638e0e9c899ae2
Commits (4)
fix: return None for endpoints instead of exception
· 40fd6903
famelis
authored
Feb 01, 2023
and
Vasilis Katopodis
committed
Feb 01, 2023
40fd6903
fix: Check if endpoints returned are None
· 8df9af0c
famelis
authored
Feb 01, 2023
and
Vasilis Katopodis
committed
Feb 01, 2023
8df9af0c
fix: remove debug loggers
· 53398cc2
famelis
authored
Feb 01, 2023
and
Vasilis Katopodis
committed
Feb 01, 2023
53398cc2
fix: add pass to empty cases
· 43dd7eb7
famelis
authored
Feb 01, 2023
and
Vasilis Katopodis
committed
Feb 01, 2023
43dd7eb7
Hide whitespace changes
Inline
Side-by-side
src/device/service/Tools.py
View file @
43dd7eb7
...
@@ -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'
)
...
...
src/device/service/drivers/p4/p4_driver.py
View file @
43dd7eb7
...
@@ -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"
...
...