File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,11 @@ clustering
9696 enables clustering regardless of the placement count. A value of ``never ``
9797 disables clustering regardless of the placement count. If unspecified,
9898 ``default `` is assumed.
99+ public_addrs
100+ Optional. A string in the form of <ipaddress/prefixlength>[%<destination interface>].
101+ Supported only when using Samba's clustering. Assign "virtual" IP
102+ addresses that will be managed by the clustering subsystem and may automatically
103+ move between nodes running Samba containers.
99104
100105Remove Cluster
101106++++++++++++++
Original file line number Diff line number Diff line change @@ -171,6 +171,7 @@ def cluster_create(
171171 custom_dns : Optional [List [str ]] = None ,
172172 placement : Optional [str ] = None ,
173173 clustering : Optional [SMBClustering ] = None ,
174+ public_addrs : Optional [List [str ]] = None ,
174175 ) -> results .Result :
175176 """Create an smb cluster"""
176177 domain_settings = None
@@ -255,6 +256,18 @@ def cluster_create(
255256 )
256257 )
257258
259+ c_public_addrs = []
260+ if public_addrs :
261+ for pa in public_addrs :
262+ pa_arr = pa .split ('%' , 1 )
263+ address = pa_arr [0 ]
264+ destination = pa_arr [1 ] if len (pa_arr ) > 1 else None
265+ c_public_addrs .append (
266+ resources .ClusterPublicIPAssignment (
267+ address = address , destination = destination
268+ )
269+ )
270+
258271 pspec = resources .WrappedPlacementSpec .wrap (
259272 PlacementSpec .from_string (placement )
260273 )
@@ -266,6 +279,7 @@ def cluster_create(
266279 custom_dns = custom_dns ,
267280 placement = pspec ,
268281 clustering = clustering ,
282+ public_addrs = c_public_addrs ,
269283 )
270284 to_apply .append (cluster )
271285 return self ._handler .apply (to_apply , create_only = True ).squash (cluster )
You can’t perform that action at this time.
0 commit comments