@@ -177,18 +177,18 @@ def force_communicate_tls(rest: ClusterManager) -> bool:
177177
178178
179179def rest_initialiser (cluster_init_check = False , version_check = False , enterprise_check = None , credentials_required = True ,
180- columnar_check = None ):
180+ enterprise_analytics_check = None ):
181181 """rest_initialiser is a decorator that does common subcommand tasks.
182182
183183 The decorator will always creates a cluster manager and assign it to the subcommand variable rest
184184 :param cluster_init_check: if true it will check if the cluster is initialized before executing the subcommand
185185 :param version_check: if true it will check if the cluster and CLI version match if they do not it prints a warning
186186 :param enterprise_check: if true it will check if the cluster is enterprise and fail if not. If it is false it does
187- the check but it does not fail if not enterprise. If none it does not perform the check. The result of the check
188- is stored on the instance parameter enterprise
189- :param columnar_check : if true it will check if the cluster supports columnar and fail if not. If it is false it does
190- the check but it does not fail if not columnar . If none it does not perform the check. The result of the check
191- is stored on the instance parameter columnar
187+ the check but it does not fail if not enterprise. If none it does not perform the check. The result of the
188+ check is stored on the instance parameter enterprise
189+ :param enterprise_analytics_check : if true it will check if the cluster supports Enterprise Analytics and fail if
190+ not. If it is false it does the check but it does not fail if not Enterprise Analytics . If none it does not
191+ perform the check. The result of the check is stored on the instance parameter enterprise_analytics
192192 """
193193 def inner (fn ):
194194 def decorator (self , opts ):
@@ -208,21 +208,21 @@ def decorator(self, opts):
208208 check_cluster_initialized (self .rest )
209209 if version_check :
210210 check_versions (self .rest )
211- if enterprise_check is not None or columnar_check is not None :
212- # check columnar when we check enterprise to avoid a duplicate fetch on pools
213- enterprise , columnar , errors = self .rest .is_enterprise_columnar ()
211+ if enterprise_check is not None or enterprise_analytics_check is not None :
212+ # check Enterprise Analytics when we check enterprise to avoid a duplicate fetch on pools
213+ enterprise , enterprise_analytics , errors = self .rest .get_cluster_type ()
214214 _exit_if_errors (errors )
215215
216216 if enterprise_check and not enterprise :
217217 _exit_if_errors (['Command only available in enterprise edition' ])
218218
219- if columnar_check and not columnar :
220- _exit_if_errors (['Command only available for columnar ' ])
219+ if enterprise_analytics_check and not enterprise_analytics :
220+ _exit_if_errors (['Command only available for Enterprise Analytics ' ])
221221
222222 if enterprise_check is not None :
223223 self .enterprise = enterprise
224- if columnar_check is not None :
225- self .columnar = columnar
224+ if enterprise_analytics_check is not None :
225+ self .enterprise_analytics = enterprise_analytics
226226
227227 return fn (self , opts )
228228 return decorator
@@ -324,13 +324,13 @@ def index_storage_mode_to_param(value, default="plasma"):
324324 return value
325325
326326
327- def process_services (services , enterprise , columnar , cluster_version = "0.0.0" ):
327+ def process_services (services , enterprise , enterprise_analytics , cluster_version = "0.0.0" ):
328328 """Converts services to a format Couchbase understands"""
329- if not services and not columnar :
329+ if not services and not enterprise_analytics :
330330 services = "data"
331- elif services and columnar :
332- return None , ["--services cannot be specified on Columnar " ]
333- elif columnar :
331+ elif services and enterprise_analytics :
332+ return None , ["--services cannot be specified on Enterprise Analytics " ]
333+ elif enterprise_analytics :
334334 return None , None
335335
336336 sep = ","
@@ -763,7 +763,7 @@ def __init__(self, deprecate_username=False, deprecate_password=False, cluster_d
763763 # Filled by the decorators
764764 self .rest = None
765765 self .enterprise = None
766- self .columnar = None
766+ self .enterprise_analytics = None
767767
768768 self .parser = CliParser (formatter_class = CLIHelpFormatter , add_help = False , allow_abbrev = False )
769769 group = self .parser .add_argument_group ("Cluster options" )
@@ -911,7 +911,7 @@ def __init__(self):
911911 group .add_argument ("--node-to-node-encryption" , dest = "encryption" , metavar = "<on|off>" , default = "off" ,
912912 choices = ["on" , "off" ], help = "Enable node to node encryption" )
913913
914- @rest_initialiser (enterprise_check = False , columnar_check = False )
914+ @rest_initialiser (enterprise_check = False , enterprise_analytics_check = False )
915915 def execute (self , opts ):
916916 initialized , errors = self .rest .is_cluster_initialized ()
917917 _exit_if_errors (errors )
@@ -921,13 +921,13 @@ def execute(self, opts):
921921 if not self .enterprise and opts .index_storage_mode == 'memopt' :
922922 _exit_if_errors (["memopt option for --index-storage-setting can only be configured on enterprise edition" ])
923923
924- if not self .columnar and opts .services and "manager-only" in opts .services :
924+ if not self .enterprise_analytics and opts .services and "manager-only" in opts .services :
925925 _exit_if_errors (["Cannot initialize cluster with the manager only service" ])
926926
927- services , errors = process_services (opts .services , self .enterprise , self .columnar )
927+ services , errors = process_services (opts .services , self .enterprise , self .enterprise_analytics )
928928 _exit_if_errors (errors )
929929
930- if not self .columnar and 'kv' not in services .split (',' ):
930+ if not self .enterprise_analytics and 'kv' not in services .split (',' ):
931931 _exit_if_errors (["Cannot set up first cluster node without the data service" ])
932932
933933 if 'ipv4' in opts .ip_family :
@@ -936,7 +936,7 @@ def execute(self, opts):
936936 ip_family = 'ipv6'
937937 ip_only = True if 'only' in opts .ip_family else False
938938
939- if not self .columnar and not opts .index_storage_mode and 'index' in services .split (',' ):
939+ if not self .enterprise_analytics and not opts .index_storage_mode and 'index' in services .split (',' ):
940940 opts .index_storage_mode = "default"
941941
942942 default = "plasma"
@@ -951,7 +951,7 @@ def execute(self, opts):
951951 _exit_if_errors (errors )
952952
953953 versionCheck = compare_versions (min_version , "7.2.3" )
954- if not self .columnar and versionCheck == - 1 :
954+ if not self .enterprise_analytics and versionCheck == - 1 :
955955 _exit_if_errors (["--cluster-init can only be used against >= 7.2.3 clusters" ])
956956
957957 if not self .enterprise and opts .notifications == "0" :
@@ -2489,7 +2489,8 @@ def __init__(self):
24892489 group .add_argument ("--index-storage-setting" , dest = "index_storage_mode" , metavar = "<mode>" ,
24902490 choices = ["default" , "memopt" ], help = "The index storage mode" )
24912491
2492- @rest_initialiser (cluster_init_check = True , version_check = True , enterprise_check = False , columnar_check = False )
2492+ @rest_initialiser (cluster_init_check = True , version_check = True ,
2493+ enterprise_check = False , enterprise_analytics_check = False )
24932494 def execute (self , opts ):
24942495 if opts .use_client_cert :
24952496 if opts .server_username is not None or opts .server_password is not None :
@@ -2505,13 +2506,14 @@ def execute(self, opts):
25052506 min_version , error = self .rest .min_version ()
25062507 _exit_if_errors (error )
25072508
2508- opts .services , errors = process_services (opts .services , self .enterprise , self .columnar , min_version )
2509+ opts .services , errors = process_services (opts .services , self .enterprise , self .enterprise_analytics , min_version )
25092510 _exit_if_errors (errors )
25102511
25112512 settings , errors = self .rest .index_settings ()
25122513 _exit_if_errors (errors )
25132514
2514- if not self .columnar and opts .index_storage_mode is None and settings ['storageMode' ] == "" and "index" in opts .services :
2515+ if not self .enterprise_analytics and opts .index_storage_mode is None and settings [
2516+ 'storageMode' ] == "" and "index" in opts .services :
25152517 opts .index_storage_mode = "default"
25162518
25172519 # For supporting the default index backend changing from forestdb to plasma in Couchbase 5.0
@@ -4077,7 +4079,7 @@ def execute(self, opts):
40774079 _exit_if_errors (errors )
40784080
40794081 versionCheck = compare_versions (min_version , "7.2.3" )
4080- if not self .enterprise and not self .columnar and versionCheck != - 1 :
4082+ if not self .enterprise and not self .enterprise_analytics and versionCheck != - 1 :
40814083 _exit_if_errors (["Modifying notifications settings is an Enterprise Edition only feature" ])
40824084
40834085 enabled = None
@@ -5670,7 +5672,7 @@ def __init__(self):
56705672 ld_group .add_argument ("--link-details-path" , dest = "link_details_path" , metavar = "<path>" ,
56715673 help = "The path to the link details JSON file" )
56725674
5673- @rest_initialiser (cluster_init_check = True , version_check = True , columnar_check = True )
5675+ @rest_initialiser (cluster_init_check = True , version_check = True , enterprise_analytics_check = True )
56745676 def execute (self , opts ):
56755677 if opts .create or opts .edit :
56765678 self ._set (opts )
0 commit comments