@@ -478,7 +478,7 @@ def apply_default_port(nodes):
478478 Adds the default port if the port is missing.
479479
480480 @type nodes: string
481- @param nodes: A comma seprated list of nodes
481+ @param nodes: A comma separated list of nodes
482482 @rtype: array of strings
483483 @return: The nodes with the port postfixed on each one
484484 """
@@ -1130,7 +1130,7 @@ def __init__(self):
11301130 choices = [128 , 1024 ], help = "Sets the number of magma vBuckets, "
11311131 "either 128 (the default) or 1024" )
11321132
1133- group .add_argument ("--encryption-key" , dest = "encryption_key" , metavar = "<keyid >" ,
1133+ group .add_argument ("--encryption-key" , dest = "encryption_key" , metavar = "<key_id >" ,
11341134 help = "The key id of the encryption key to use on this bucket" )
11351135 group .add_argument ("--dek-rotate-every" , dest = "dek_rotate_interval" , metavar = "<days>" , type = (int ),
11361136 help = "How often to rotate the DEK for this bucket" )
@@ -1384,7 +1384,7 @@ def __init__(self):
13841384 help = "Sets the rank of this bucket in case of failover/rebalance. Buckets with larger "
13851385 "ranks are prioritised over buckets with smaller ranks" )
13861386
1387- group .add_argument ("--encryption-key" , dest = "encryption_key" , metavar = "<keyid >" ,
1387+ group .add_argument ("--encryption-key" , dest = "encryption_key" , metavar = "<key_id >" ,
13881388 help = "The key id of the encryption key to use on this bucket" )
13891389 group .add_argument ("--dek-rotate-every" , dest = "dek_rotate_interval" , metavar = "<days>" , type = (int ),
13901390 help = "How often to rotate the DEK for this bucket" )
@@ -2977,7 +2977,7 @@ def execute(self, opts):
29772977 " --audit-log-rotate-size, --disabled-users, --disable-events] is required with"
29782978 " --set" ])
29792979
2980- # Match the behavior in the WebUI, which is to internally translate the '/couchbase' postfix into '/local'
2980+ # Match the behaviour in the WebUI, which is to internally translate the '/couchbase' postfix into '/local'
29812981 # see MB-46970 for more information.
29822982 if opts .disabled_users is not None :
29832983 opts .disabled_users = re .sub (r'\/couchbase' , '/local' , opts .disabled_users )
@@ -3068,15 +3068,15 @@ def __init__(self):
30683068 + "Couchbase Server Enterprise Edition only." )
30693069 group .add_argument ("--failover-data-disk-period" , dest = "failover_on_data_disk_period" ,
30703070 metavar = "<seconds>" , type = (int ),
3071- help = "The amount of time the Data Serivce disk failures has to be happening for to trigger"
3071+ help = "The amount of time the Data Service disk failures has to be happening for to trigger"
30723072 " an auto-failover" )
30733073 group .add_argument ("--enable-failover-on-data-disk-non-responsive" ,
30743074 dest = "enable_failover_on_data_disk_non_responsive" , metavar = "<1|0>" , choices = ["0" , "1" ],
30753075 help = "Enable/disable auto-failover when the Data Service reports disk is not responsive. "
30763076 + "Couchbase Server Enterprise Edition only." )
30773077 group .add_argument ("--failover-data-disk-non-responsive-period" ,
30783078 dest = "failover_on_data_disk_non_responsive_period" , metavar = "<seconds>" , type = (int ),
3079- help = "The amount of time the Data Serivce disk non-responsiveness has to be happening for to"
3079+ help = "The amount of time the Data Service disk non-responsiveness has to be happening for to"
30803080 " trigger an auto-failover" )
30813081 group .add_argument ("--allow-failover-for-ephemeral-without-replica" , metavar = "<1|0>" , choices = ["0" , "1" ],
30823082 help = "Whether to allow autofailover on nodes with an ephemeral buckets that do not have at "
@@ -3357,18 +3357,18 @@ def __init__(self):
33573357 help = "Set the encryption settings of config/log/audit" )
33583358 group_me .add_argument ("--list-keys" , dest = "list_keys" , action = "store_true" , help = "List the encryption keys" )
33593359 group_me .add_argument ("--add-key" , dest = "add_key" , action = "store_true" , help = "Create a new encryption key" )
3360- group_me .add_argument ("--edit-key" , dest = "edit_key" , metavar = "<keyid >" , help = "Edit an encryption key" )
3361- group_me .add_argument ("--rotate-key" , dest = "rotate_key" , metavar = "<keyid >" ,
3360+ group_me .add_argument ("--edit-key" , dest = "edit_key" , metavar = "<key_id >" , help = "Edit an encryption key" )
3361+ group_me .add_argument ("--rotate-key" , dest = "rotate_key" , metavar = "<key_id >" ,
33623362 help = "Rotate the specified encryption key" )
3363- group_me .add_argument ("--delete-key" , dest = "delete_key" , metavar = "<keyid >" ,
3363+ group_me .add_argument ("--delete-key" , dest = "delete_key" , metavar = "<key_id >" ,
33643364 help = "Delete the specified encryption key" )
33653365
33663366 # --set arguments
33673367 group .add_argument ("--target" , dest = "target" , choices = ["config" , "log" , "audit" ],
33683368 help = "The type of files to configure the encryption of" )
33693369 group .add_argument ("--type" , dest = "encryption_type" , choices = ["disabled" , "master-password" , "key" ],
33703370 help = "The type of encryption to use" )
3371- group .add_argument ("--key" , dest = "key" , metavar = "<keyid >" ,
3371+ group .add_argument ("--key" , dest = "key" , metavar = "<key_id >" ,
33723372 help = "The id of the key to encrypt these files with" )
33733373 group .add_argument ("--dek-rotate-every" , dest = "dek_rotation_interval" , metavar = "<days>" , type = (int ),
33743374 help = "The number of days the DEK should be rotated" )
@@ -3410,12 +3410,12 @@ def __init__(self):
34103410 group_encrypt_me = group .add_mutually_exclusive_group (required = False )
34113411 group_encrypt_me .add_argument ("--encrypt-with-master-password" , dest = "encrypt_with_master" , action = "store_true" ,
34123412 help = "Encrypt this key with the master password" )
3413- group_encrypt_me .add_argument ("--encrypt-with-key" , dest = "encrypt_with_key" , metavar = "<keyid >" ,
3413+ group_encrypt_me .add_argument ("--encrypt-with-key" , dest = "encrypt_with_key" , metavar = "<key_id >" ,
34143414 help = "Encrypt this key with another key" , type = (int ))
34153415
34163416 group .add_argument ("--kmip-operations" , dest = "kmip_ops" , choices = ["get" , "encrypt-decrypt" ],
34173417 help = "What operations to use with the KMIP server" )
3418- group .add_argument ("--kmip-key" , dest = "kmip_key" , metavar = "<keyid >" , help = "The key on the KMIP server to use" )
3418+ group .add_argument ("--kmip-key" , dest = "kmip_key" , metavar = "<key_id >" , help = "The key on the KMIP server to use" )
34193419 group .add_argument ("--kmip-host" , dest = "kmip_host" , metavar = "<host>" , help = "The hostname of the KMIP server" )
34203420 group .add_argument ("--kmip-port" , dest = "kmip_port" , metavar = "<port>" , type = (int ),
34213421 help = "The port of the KMIP server" )
@@ -3666,7 +3666,7 @@ def __init__(self):
36663666 help = "Allow gsi compaction to run before this time (Circular mode only)" )
36673667 group .add_argument ("--enable-gsi-compaction-abort" , dest = "enable_gsi_abort" , metavar = "<1|0>" ,
36683668 choices = ["0" , "1" ],
3669- help = "Abort gsi compaction if when run outside of the accepted interaval "
3669+ help = "Abort gsi compaction if when run outside of the accepted interval "
36703670 + "(Circular mode only)" )
36713671
36723672 @rest_initialiser (cluster_init_check = True , version_check = True )
@@ -4858,7 +4858,7 @@ def _create(self, opts):
48584858 if opts .collection_migration == '1' and opts .collection_explicit_mappings == '1' :
48594859 _exit_if_errors (['cannot enable both collection migration and explicit mappings' ])
48604860 if opts .filter_skip and opts .filter is None :
4861- _exit_if_errors (["--filter-expersion is needed with the --filter-skip-restream option" ])
4861+ _exit_if_errors (["--filter-expression is needed with the --filter-skip-restream option" ])
48624862 _ , errors = self .rest .create_xdcr_replication (opts .cluster_name , opts .to_bucket , opts .from_bucket , opts .chk_int ,
48634863 opts .worker_batch_size , opts .doc_batch_size , opts .fail_interval ,
48644864 opts .rep_thresh , opts .src_nozzles , opts .dst_nozzles ,
@@ -4919,7 +4919,7 @@ def _settings(self, opts):
49194919 if opts .replicator_id is None :
49204920 _exit_if_errors (["--xdcr-replicator is needed to change a replicators settings" ])
49214921 if opts .filter_skip and opts .filter is None :
4922- _exit_if_errors (["--filter-expersion is needed with the --filter-skip-restream option" ])
4922+ _exit_if_errors (["--filter-expression is needed with the --filter-skip-restream option" ])
49234923 if opts .collection_migration == '1' and opts .collection_explicit_mappings == '1' :
49244924 _exit_if_errors (['cannot enable both collection migration and explicit mappings' ])
49254925 _ , errors = self .rest .xdcr_replicator_settings (opts .chk_int , opts .worker_batch_size , opts .doc_batch_size ,
@@ -5060,7 +5060,7 @@ def _set(self, opts):
50605060
50615061 def _delete (self , opts ):
50625062 if opts .name is None :
5063- _exit_if_errors (["--xdcr-cluster-name is required to deleta a cluster connection" ])
5063+ _exit_if_errors (["--xdcr-cluster-name is required to delete a cluster connection" ])
50645064
50655065 _ , errors = self .rest .delete_xdcr_reference (opts .name )
50665066 _exit_if_errors (errors )
@@ -5266,7 +5266,7 @@ def _deploy_undeploy(self, opts, deploy):
52665266
52675267 _ , errors = self .rest .deploy_undeploy_function (opts .name , opts .bucket , opts .scope , deploy , opts .boundary )
52685268 self ._exit_if_function_not_found (opts , errors )
5269- # For backwards compatability we don't want to error if you try to (un)deploy an (un)deployed function
5269+ # For backwards compatibility we don't want to error if you try to (un)deploy an (un)deployed function
52705270 if errors is not None and len (errors ) == 1 and isinstance (errors [0 ], str ) and \
52715271 errors [0 ].endswith (f'already in { "deployed" if deploy else "undeployed" } state.' ):
52725272 _success (f'Function is already in { "deployed" if deploy else "undeployed" } state' )
@@ -5724,7 +5724,7 @@ def execute(self, opts):
57245724 if opts .new_pass is None :
57255725 _exit_if_errors (["--new-password is required" ])
57265726
5727- _ , rv = self .rest .user_change_passsword (opts .new_pass )
5727+ _ , rv = self .rest .user_change_password (opts .new_pass )
57285728 _exit_if_errors (rv )
57295729 _success (f'Changed password for { opts .username } ' )
57305730
@@ -6078,7 +6078,7 @@ def execute(self, opts):
60786078 print (f'{ ports :{column_size }} ' , end = '' )
60796079 print ()
60806080 else :
6081- # For cluster_run and single node clusters there is no hostanme
6081+ # For cluster_run and single node clusters there is no hostname
60826082 try :
60836083 print (f'{ node ["hostname" ]} ' )
60846084 except KeyError :
@@ -6440,21 +6440,21 @@ def _get(rest):
64406440 nodes , err = rest .nodes_info ()
64416441 _exit_if_errors (err )
64426442 encrypted_nodes = []
6443- unencrpyted_nodes = []
6443+ unencrypted_nodes = []
64446444 for n in nodes :
64456445 if n ['nodeEncryption' ]:
64466446 encrypted_nodes .append (n ['hostname' ])
64476447 else :
6448- unencrpyted_nodes .append (n ['hostname' ])
6448+ unencrypted_nodes .append (n ['hostname' ])
64496449
64506450 if len (encrypted_nodes ) == len (nodes ):
64516451 print ('Node-to-node encryption is enabled' )
6452- elif len (unencrpyted_nodes ) == len (nodes ):
6452+ elif len (unencrypted_nodes ) == len (nodes ):
64536453 print ('Node-to-node encryption is disabled' )
64546454 else :
64556455 print ('Cluster is in mixed mode' )
64566456 print (f'Nodes with encryption enabled: { encrypted_nodes } ' )
6457- print (f'Nodes with encryption disabled: { unencrpyted_nodes } ' )
6457+ print (f'Nodes with encryption disabled: { unencrypted_nodes } ' )
64586458
64596459 @staticmethod
64606460 def get_man_page_name ():
@@ -6794,7 +6794,7 @@ def remove_repository(self, repository_id: str, state: str, delete_repo: bool =
67946794 """
67956795 if not repository_id :
67966796 _exit_if_errors (['--id is required' ])
6797- # the following is devided in two options to give better error messages depending if state is missing or if it
6797+ # the following is divided in two options to give better error messages depending if state is missing or if it
67986798 # is invalid
67996799 if not state :
68006800 _exit_if_errors (['--state is required' ])
@@ -6946,10 +6946,10 @@ def get_repository(self, repository_id, state, json_out=False):
69466946 if json_out :
69476947 print (json .dumps (repository , indent = 2 ))
69486948 else :
6949- self .human_firendly_print_repository (repository )
6949+ self .human_friendly_print_repository (repository )
69506950
69516951 @staticmethod
6952- def human_firendly_print_repository (repository ):
6952+ def human_friendly_print_repository (repository ):
69536953 """Print the repository in a human friendly format
69546954
69556955 Args:
@@ -6969,7 +6969,7 @@ def human_firendly_print_repository(repository):
69696969
69706970 if 'scheduled' in repository and repository ['scheduled' ]:
69716971 print ()
6972- BackupServiceRepository .human_firendly_print_repository_scheduled_tasks (repository ['scheduled' ])
6972+ BackupServiceRepository .human_friendly_print_repository_scheduled_tasks (repository ['scheduled' ])
69736973
69746974 one_off = repository ['running_one_off' ] if 'running_one_off' in repository else None
69756975 running_scheduled = repository ['running_tasks' ] if 'running_tasks' in repository else None
@@ -7008,7 +7008,7 @@ def human_friendly_print_running_tasks(one_off, scheduled):
70087008 print (f'{ task ["name" ]:<{name_pad }} | { task ["type" ].title ():<10} | { task ["status" ]:<8} | { task ["start" ]} ' )
70097009
70107010 @staticmethod
7011- def human_firendly_print_repository_scheduled_tasks (scheduled ):
7011+ def human_friendly_print_repository_scheduled_tasks (scheduled ):
70127012 """Print the scheduled task in a tabular format"""
70137013 name_pad = 5
70147014 for name in scheduled :
@@ -7108,7 +7108,7 @@ def __init__(self, subparser):
71087108
71097109 @rest_initialiser (version_check = True , enterprise_check = True , cluster_init_check = True )
71107110 def execute (self , opts ):
7111- """Run the backup plan managment command"""
7111+ """Run the backup plan management command"""
71127112 if opts .list :
71137113 self .list_plans (opts .output == 'json' )
71147114 elif opts .get :
@@ -7201,7 +7201,7 @@ def human_print_plan(plan: object):
72017201 print (f'Name: { plan ["name" ]} ' )
72027202 print (f'Description: { plan ["description" ] if "description" in plan else "N/A" } ' )
72037203 print (f'Services: { BackupServicePlan .service_list_to_str (plan ["services" ])} ' )
7204- print (f'Default: { (plan ["default" ] if "deafult " in plan else False )!s} ' )
7204+ print (f'Default: { (plan ["default" ] if "default " in plan else False )!s} ' )
72057205
72067206 # If the are no tasks return
72077207 if not plan ["tasks" ]:
0 commit comments