@@ -1340,6 +1340,8 @@ def __init__(self,
13401340 allowed_consecutive_spdk_ping_failures : Optional [int ] = 1 ,
13411341 spdk_ping_interval_in_seconds : Optional [float ] = 2.0 ,
13421342 ping_spdk_under_lock : Optional [bool ] = False ,
1343+ max_hosts_per_namespace : Optional [int ] = 1 ,
1344+ max_namespaces_with_netmask : Optional [int ] = 1000 ,
13431345 server_key : Optional [str ] = None ,
13441346 server_cert : Optional [str ] = None ,
13451347 client_key : Optional [str ] = None ,
@@ -1348,7 +1350,9 @@ def __init__(self,
13481350 spdk_path : Optional [str ] = None ,
13491351 tgt_path : Optional [str ] = None ,
13501352 spdk_timeout : Optional [float ] = 60.0 ,
1351- spdk_log_level : Optional [str ] = 'WARNING' ,
1353+ spdk_log_level : Optional [str ] = '' ,
1354+ spdk_protocol_log_level : Optional [str ] = 'WARNING' ,
1355+ spdk_log_file_dir : Optional [str ] = '' ,
13521356 rpc_socket_dir : Optional [str ] = '/var/tmp/' ,
13531357 rpc_socket_name : Optional [str ] = 'spdk.sock' ,
13541358 conn_retries : Optional [int ] = 10 ,
@@ -1368,6 +1372,7 @@ def __init__(self,
13681372 log_directory : Optional [str ] = '/var/log/ceph/' ,
13691373 monitor_timeout : Optional [float ] = 1.0 ,
13701374 enable_monitor_client : bool = True ,
1375+ monitor_client_log_file_dir : Optional [str ] = '' ,
13711376 placement : Optional [PlacementSpec ] = None ,
13721377 unmanaged : bool = False ,
13731378 preview_only : bool = False ,
@@ -1416,6 +1421,10 @@ def __init__(self,
14161421 self .omap_file_lock_retry_sleep_interval = omap_file_lock_retry_sleep_interval
14171422 #: ``omap_file_update_reloads`` number of attempt to reload OMAP when it differs from local
14181423 self .omap_file_update_reloads = omap_file_update_reloads
1424+ #: ``max_hosts_per_namespace`` max number of hosts per namespace
1425+ self .max_hosts_per_namespace = max_hosts_per_namespace
1426+ #: ``max_namespaces_with_netmask`` max number of namespaces which are not auto visible
1427+ self .max_namespaces_with_netmask = max_namespaces_with_netmask
14191428 #: ``allowed_consecutive_spdk_ping_failures`` # of ping failures before aborting gateway
14201429 self .allowed_consecutive_spdk_ping_failures = allowed_consecutive_spdk_ping_failures
14211430 #: ``spdk_ping_interval_in_seconds`` sleep interval in seconds between SPDK pings
@@ -1441,7 +1450,11 @@ def __init__(self,
14411450 #: ``spdk_timeout`` SPDK connectivity timeout
14421451 self .spdk_timeout = spdk_timeout
14431452 #: ``spdk_log_level`` the SPDK log level
1444- self .spdk_log_level = spdk_log_level or 'WARNING'
1453+ self .spdk_log_level = spdk_log_level
1454+ #: ``spdk_protocol_log_level`` the SPDK protocol log level
1455+ self .spdk_protocol_log_level = spdk_protocol_log_level or 'WARNING'
1456+ #: ``spdk_log_file_dir`` the SPDK log output file file directory
1457+ self .spdk_log_file_dir = spdk_log_file_dir
14451458 #: ``rpc_socket_dir`` the SPDK RPC socket file directory
14461459 self .rpc_socket_dir = rpc_socket_dir or '/var/tmp/'
14471460 #: ``rpc_socket_name`` the SPDK RPC socket file name
@@ -1478,6 +1491,8 @@ def __init__(self,
14781491 self .monitor_timeout = monitor_timeout
14791492 #: ``enable_monitor_client`` whether to connect to the ceph monitor or not
14801493 self .enable_monitor_client = enable_monitor_client
1494+ #: ``monitor_client_log_file_dir`` the monitor client log output file file directory
1495+ self .monitor_client_log_file_dir = monitor_client_log_file_dir
14811496
14821497 def get_port_start (self ) -> List [int ]:
14831498 return [5500 , 4420 , 8009 ]
@@ -1522,6 +1537,16 @@ def validate(self) -> None:
15221537 'Invalid SPDK log level. Valid values are: '
15231538 'DEBUG, INFO, WARNING, ERROR, NOTICE' )
15241539
1540+ if self .spdk_protocol_log_level :
1541+ if self .spdk_protocol_log_level .lower () not in ['debug' ,
1542+ 'info' ,
1543+ 'warning' ,
1544+ 'error' ,
1545+ 'notice' ]:
1546+ raise SpecValidationError (
1547+ 'Invalid SPDK protocol log level. Valid values are: '
1548+ 'DEBUG, INFO, WARNING, ERROR, NOTICE' )
1549+
15251550 if (
15261551 self .spdk_ping_interval_in_seconds
15271552 and self .spdk_ping_interval_in_seconds < 1.0
0 commit comments