Skip to content

Commit 2698e05

Browse files
mgr/smb: add a remote control configuration to cluster resource
Add the remote control component to a field of the cluster resource. A remote control side car can be explicitly enabled or implicitly enabled by specifying the tls creds. Signed-off-by: John Mulligan <[email protected]>
1 parent ccd7475 commit 2698e05

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/pybind/mgr/smb/resources.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,8 @@ class Cluster(_RBase):
530530
# bind_addrs are used to restrict what IP addresses instances of this
531531
# cluster will use
532532
bind_addrs: Optional[List[ClusterBindIP]] = None
533+
# configure a remote control sidecar server.
534+
remote_control: Optional[RemoteControl] = None
533535

534536
def validate(self) -> None:
535537
if not self.cluster_id:
@@ -576,6 +578,15 @@ def cleaned_custom_smb_global_options(self) -> Optional[Dict[str, str]]:
576578
def clustering_mode(self) -> SMBClustering:
577579
return self.clustering if self.clustering else SMBClustering.DEFAULT
578580

581+
@property
582+
def remote_control_is_enabled(self) -> bool:
583+
"""Return true if a remote control service should be enabled for this
584+
cluster.
585+
"""
586+
if not self.remote_control:
587+
return False
588+
return self.remote_control.is_enabled
589+
579590
def is_clustered(self) -> bool:
580591
"""Return true if smbd instance should use (CTDB) clustering."""
581592
if self.clustering_mode == SMBClustering.ALWAYS:

0 commit comments

Comments
 (0)