From: John Mulligan Date: Mon, 23 Feb 2026 17:23:57 +0000 (-0500) Subject: mgr/smb: add an option to enable the local variation of remotectl X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8a7c55196d41af05d98ce4368a31753b5aec0a12;p=ceph.git mgr/smb: add an option to enable the local variation of remotectl Signed-off-by: John Mulligan --- diff --git a/src/pybind/mgr/smb/resources.py b/src/pybind/mgr/smb/resources.py index 29ca657b4b6..e72a5f82cc6 100644 --- a/src/pybind/mgr/smb/resources.py +++ b/src/pybind/mgr/smb/resources.py @@ -14,6 +14,7 @@ from ceph.deployment.service_spec import ( SMBClusterPublicIPSpec, SpecValidationError, ) +from ceph.smb.constants import REMOTE_CONTROL, REMOTE_CONTROL_LOCAL from ceph.smb.network import to_network from object_format import ErrorResponseBase @@ -604,6 +605,9 @@ class ExternalCephClusterSource(_RBase): class RemoteControl(_RBase): # enabled can be set to explicitly toggle the remote control server enabled: Optional[bool] = None + # locally_enabled can be set to explicitly toggle the remote control + # servers local unix socket mode + locally_enabled: Optional[bool] = None # cert specifies the ssl/tls certificate to use cert: Optional[TLSSource] = None # cert specifies the ssl/tls server key to use @@ -617,10 +621,24 @@ class RemoteControl(_RBase): @property def is_enabled(self) -> bool: + return self._locally_enabled() or self._remotely_enabled() + + def _locally_enabled(self) -> bool: + return bool(self.locally_enabled) + + def _remotely_enabled(self) -> bool: if self.enabled is not None: return self.enabled return bool(self.cert and self.key) + def enabled_features(self) -> list[str]: + out = [] + if self._locally_enabled(): + out.append(REMOTE_CONTROL_LOCAL) + if self._remotely_enabled(): + out.append(REMOTE_CONTROL) + return out + @resourcelib.resource('ceph.smb.cluster') class Cluster(_RBase):