@@ -1334,6 +1334,7 @@ def __init__(self,
13341334 state_update_notify : Optional [bool ] = True ,
13351335 state_update_interval_sec : Optional [int ] = 5 ,
13361336 enable_spdk_discovery_controller : Optional [bool ] = False ,
1337+ enable_key_encryption : Optional [bool ] = True ,
13371338 omap_file_lock_duration : Optional [int ] = 20 ,
13381339 omap_file_lock_retries : Optional [int ] = 30 ,
13391340 omap_file_lock_retry_sleep_interval : Optional [float ] = 1.0 ,
@@ -1344,7 +1345,7 @@ def __init__(self,
13441345 allowed_consecutive_spdk_ping_failures : Optional [int ] = 1 ,
13451346 spdk_ping_interval_in_seconds : Optional [float ] = 2.0 ,
13461347 ping_spdk_under_lock : Optional [bool ] = False ,
1347- max_hosts_per_namespace : Optional [int ] = 1 ,
1348+ max_hosts_per_namespace : Optional [int ] = 8 ,
13481349 max_namespaces_with_netmask : Optional [int ] = 1000 ,
13491350 max_subsystems : Optional [int ] = 128 ,
13501351 max_namespaces : Optional [int ] = 1024 ,
@@ -1419,6 +1420,8 @@ def __init__(self,
14191420 self .state_update_interval_sec = state_update_interval_sec
14201421 #: ``enable_spdk_discovery_controller`` SPDK or ceph-nvmeof discovery service
14211422 self .enable_spdk_discovery_controller = enable_spdk_discovery_controller
1423+ #: ``enable_key_encryption`` encrypt DHCHAP and PSK keys before saving in OMAP
1424+ self .enable_key_encryption = enable_key_encryption
14221425 #: ``enable_prometheus_exporter`` enables Prometheus exporter
14231426 self .enable_prometheus_exporter = enable_prometheus_exporter
14241427 #: ``verify_nqns`` enables verification of subsystem and host NQNs for validity
@@ -1639,25 +1642,25 @@ def validate(self) -> None:
16391642 if (self .max_namespaces_with_netmask and self .max_namespaces_with_netmask < 0 ):
16401643 raise SpecValidationError ("Max namespaces with netmask can't be negative" )
16411644
1642- if type (self .max_subsystems ) != int :
1645+ if not isinstance (self .max_subsystems , int ) :
16431646 raise SpecValidationError ("Max subsystems must be an integer" )
16441647
16451648 if self .max_subsystems <= 0 :
16461649 raise SpecValidationError ("Max subsystems must be greater than zero" )
16471650
1648- if type (self .max_namespaces ) != int :
1651+ if not isinstance (self .max_namespaces , int ) :
16491652 raise SpecValidationError ("Max namespaces must be an integer" )
16501653
16511654 if self .max_namespaces <= 0 :
16521655 raise SpecValidationError ("Max namespaces must be greater than zero" )
16531656
1654- if type (self .max_namespaces_per_subsystem ) != int :
1657+ if not isinstance (self .max_namespaces_per_subsystem , int ) :
16551658 raise SpecValidationError ("Max namespaces per subsystem must be an integer" )
16561659
16571660 if self .max_namespaces_per_subsystem <= 0 :
16581661 raise SpecValidationError ("Max namespaces per subsystem must be greater than zero" )
16591662
1660- if type (self .max_hosts_per_subsystem ) != int :
1663+ if not isinstance (self .max_hosts_per_subsystem , int ) :
16611664 raise SpecValidationError ("Max hosts per subsystem must be an integer" )
16621665
16631666 if self .max_hosts_per_subsystem <= 0 :
0 commit comments