@@ -1328,7 +1328,6 @@ def __init__(self,
13281328 verify_nqns : Optional [bool ] = True ,
13291329 allowed_consecutive_spdk_ping_failures : Optional [int ] = 1 ,
13301330 spdk_ping_interval_in_seconds : Optional [float ] = 2.0 ,
1331- ping_spdk_under_lock : Optional [bool ] = False ,
13321331 server_key : Optional [str ] = None ,
13331332 server_cert : Optional [str ] = None ,
13341333 client_key : Optional [str ] = None ,
@@ -1337,7 +1336,8 @@ def __init__(self,
13371336 spdk_path : Optional [str ] = None ,
13381337 tgt_path : Optional [str ] = None ,
13391338 spdk_timeout : Optional [float ] = 60.0 ,
1340- spdk_log_level : Optional [str ] = 'WARNING' ,
1339+ spdk_log_level : Optional [str ] = '' ,
1340+ spdk_protocol_log_level : Optional [str ] = 'WARNING' ,
13411341 rpc_socket_dir : Optional [str ] = '/var/tmp/' ,
13421342 rpc_socket_name : Optional [str ] = 'spdk.sock' ,
13431343 conn_retries : Optional [int ] = 10 ,
@@ -1406,8 +1406,6 @@ def __init__(self,
14061406 self .allowed_consecutive_spdk_ping_failures = allowed_consecutive_spdk_ping_failures
14071407 #: ``spdk_ping_interval_in_seconds`` sleep interval in seconds between SPDK pings
14081408 self .spdk_ping_interval_in_seconds = spdk_ping_interval_in_seconds
1409- #: ``ping_spdk_under_lock`` whether or not we should perform SPDK ping under the RPC lock
1410- self .ping_spdk_under_lock = ping_spdk_under_lock
14111409 #: ``bdevs_per_cluster`` number of bdevs per cluster
14121410 self .bdevs_per_cluster = bdevs_per_cluster
14131411 #: ``server_key`` gateway server key
@@ -1427,7 +1425,9 @@ def __init__(self,
14271425 #: ``spdk_timeout`` SPDK connectivity timeout
14281426 self .spdk_timeout = spdk_timeout
14291427 #: ``spdk_log_level`` the SPDK log level
1430- self .spdk_log_level = spdk_log_level or 'WARNING'
1428+ self .spdk_log_level = spdk_log_level
1429+ #: ``spdk_protocol_log_level`` the SPDK-GW protocol log level
1430+ self .spdk_protocol_log_level = spdk_protocol_log_level or 'WARNING'
14311431 #: ``rpc_socket_dir`` the SPDK socket file directory
14321432 self .rpc_socket_dir = rpc_socket_dir or '/var/tmp/'
14331433 #: ``rpc_socket_name`` the SPDK socket file name
@@ -1488,22 +1488,33 @@ def validate(self) -> None:
14881488 raise SpecValidationError ('Invalid transport. Valid values are tcp' )
14891489
14901490 if self .log_level :
1491- if self .log_level not in ['debug' , 'DEBUG ' ,
1492- 'info' , 'INFO ' ,
1493- 'warning' , 'WARNING ' ,
1494- 'error' , 'ERROR ' ,
1495- 'critical' , 'CRITICAL ' ]:
1491+ if self .log_level . lower () not in ['debug' ,
1492+ 'info ' ,
1493+ 'warning ' ,
1494+ 'error ' ,
1495+ 'critical ' ]:
14961496 raise SpecValidationError (
14971497 'Invalid log level. Valid values are: debug, info, warning, error, critial' )
14981498
14991499 if self .spdk_log_level :
1500- if self .spdk_log_level not in ['debug' , 'DEBUG ' ,
1501- 'info' , 'INFO ' ,
1502- 'warning' , 'WARNING ' ,
1503- 'error' , 'ERROR ' ,
1504- 'notice' , 'NOTICE ' ]:
1500+ if self .spdk_log_level . lower () not in ['debug' ,
1501+ 'info ' ,
1502+ 'warning ' ,
1503+ 'error ' ,
1504+ 'notice ' ]:
15051505 raise SpecValidationError (
1506- 'Invalid SPDK log level. Valid values are: DEBUG, INFO, WARNING, ERROR, NOTICE' )
1506+ 'Invalid SPDK log level. Valid values are: '
1507+ 'DEBUG, INFO, WARNING, ERROR, NOTICE' )
1508+
1509+ if self .spdk_protocol_log_level :
1510+ if self .spdk_protocol_log_level .lower () not in ['debug' ,
1511+ 'info' ,
1512+ 'warning' ,
1513+ 'error' ,
1514+ 'notice' ]:
1515+ raise SpecValidationError (
1516+ 'Invalid SPDK protocol log level. Valid values are: '
1517+ 'DEBUG, INFO, WARNING, ERROR, NOTICE' )
15071518
15081519 if (
15091520 self .spdk_ping_interval_in_seconds
0 commit comments