readonly: bool = False
browseable: bool = True
cephfs: Optional[CephFSStorage] = None
+ custom_smb_share_options: Optional[Dict[str, str]] = None
def __post_init__(self) -> None:
# if name is not given explicitly, take it from the share_id
# currently only cephfs is supported
if self.cephfs is None:
raise ValueError('a cephfs configuration is required')
+ validation.check_custom_options(self.custom_smb_share_options)
@property
def checked_cephfs(self) -> CephFSStorage:
rc.on_construction_error(InvalidResourceError.wrap)
return rc
+ @property
+ def cleaned_custom_smb_share_options(self) -> Optional[Dict[str, str]]:
+ return validation.clean_custom_options(self.custom_smb_share_options)
+
@resourcelib.component()
class JoinAuthValues(_RBase):
domain_settings: Optional[DomainSettings] = None
user_group_settings: Optional[List[UserGroupSource]] = None
custom_dns: Optional[List[str]] = None
+ custom_smb_global_options: Optional[Dict[str, str]] = None
# embedded orchestration placement spec
placement: Optional[WrappedPlacementSpec] = None
raise ValueError(
'domain settings not supported for user auth mode'
)
+ validation.check_custom_options(self.custom_smb_global_options)
@resourcelib.customize
def _customize_resource(rc: resourcelib.Resource) -> resourcelib.Resource:
rc.on_construction_error(InvalidResourceError.wrap)
return rc
+ @property
+ def cleaned_custom_smb_global_options(self) -> Optional[Dict[str, str]]:
+ return validation.clean_custom_options(self.custom_smb_global_options)
+
@resourcelib.resource('ceph.smb.join.auth')
class JoinAuth(_RBase):