Skip to content

Commit 233a447

Browse files
committed
Migrating from master and slave words
1 parent e631725 commit 233a447

File tree

14 files changed

+84
-84
lines changed

14 files changed

+84
-84
lines changed

jmespath/lexer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ class Lexer(object):
3838
)
3939

4040
def __init__(self):
41-
self.master_regex = re.compile(self.TOKENS)
41+
self.main_regex = re.compile(self.TOKENS)
4242

4343
def tokenize(self, expression):
4444
if not expression:
4545
raise EmptyExpressionError()
4646
previous_column = 0
47-
for match in self.master_regex.finditer(expression):
47+
for match in self.main_regex.finditer(expression):
4848
value = match.group()
4949
start = match.start()
5050
end = match.end()

tccli/services/cdb/v20170320/help.py

Lines changed: 31 additions & 31 deletions
Large diffs are not rendered by default.

tccli/services/dcdb/v20180411/help.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,15 +315,15 @@
315315
},
316316
{
317317
"name": "ReadOnly",
318-
"desc": "Whether to create a read-only account. 0: no; 1: for the account's SQL requests, the slave will be used first, and if it is unavailable, the master will be used; 2: the slave will be used first, and if it is unavailable, the operation will fail; 3: only the slave will be read from."
318+
"desc": "Whether to create a read-only account. 0: no; 1: for the account's SQL requests, the subordinate will be used first, and if it is unavailable, the main will be used; 2: the subordinate will be used first, and if it is unavailable, the operation will fail; 3: only the subordinate will be read from."
319319
},
320320
{
321321
"name": "Description",
322322
"desc": "Account remarks, which can contain 0–256 letters, digits, and common symbols."
323323
},
324324
{
325325
"name": "DelayThresh",
326-
"desc": "If the slave delay exceeds the set value of this parameter, the slave will be deemed to have failed.\nIt is recommended that this parameter be set to a value greater than 10. This parameter takes effect when `ReadOnly` is 1 or 2."
326+
"desc": "If the subordinate delay exceeds the set value of this parameter, the subordinate will be deemed to have failed.\nIt is recommended that this parameter be set to a value greater than 10. This parameter takes effect when `ReadOnly` is 1 or 2."
327327
}
328328
],
329329
"desc": "This API is used to create a TencentDB account. Multiple accounts can be created for one instance. Accounts with the same username but different hosts are different accounts."

tccli/services/dts/v20180330/help.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
],
175175
"desc": "This API is used to query the execution result of a task."
176176
},
177-
"SwitchDrToMaster": {
177+
"SwitchDrToMain": {
178178
"params": [
179179
{
180180
"name": "DstInfo",
@@ -185,7 +185,7 @@
185185
"desc": "Database type (such as MySQL)"
186186
}
187187
],
188-
"desc": "This API is used to promote a disaster recovery instance to a master instance, which will stop sync from the original master instance and end the master/slave relationship."
188+
"desc": "This API is used to promote a disaster recovery instance to a main instance, which will stop sync from the original main instance and end the main/subordinate relationship."
189189
},
190190
"StopMigrateJob": {
191191
"params": [

tccli/services/emr/v20190103/help.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
},
133133
{
134134
"name": "NodeFlag",
135-
"desc": "Node flag. Valid values:\n<li>all: gets the information of nodes in all types except TencentDB information.</li>\n<li>master: gets master node information.</li>\n<li>core: gets core node information.</li>\n<li>task: gets task node information.</li>\n<li>common: gets common node information.</li>\n<li>router: gets router node information.</li>\n<li>db: gets TencentDB information in normal status.</li>\nNote: only the above values are supported for the time being. Entering other values will cause errors."
135+
"desc": "Node flag. Valid values:\n<li>all: gets the information of nodes in all types except TencentDB information.</li>\n<li>main: gets main node information.</li>\n<li>core: gets core node information.</li>\n<li>task: gets task node information.</li>\n<li>common: gets common node information.</li>\n<li>router: gets router node information.</li>\n<li>db: gets TencentDB information in normal status.</li>\nNote: only the above values are supported for the time being. Entering other values will cause errors."
136136
},
137137
{
138138
"name": "Offset",
@@ -241,8 +241,8 @@
241241
"desc": "Client token."
242242
},
243243
{
244-
"name": "NeedMasterWan",
245-
"desc": "Whether to enable public IP access for master node. Valid values:\n<li>NEED_MASTER_WAN: enables public IP for master node.</li>\n<li>NOT_NEED_MASTER_WAN: does not enable.</li>Public IP is enabled for master node by default."
244+
"name": "NeedMainWan",
245+
"desc": "Whether to enable public IP access for main node. Valid values:\n<li>NEED_MASTER_WAN: enables public IP for main node.</li>\n<li>NOT_NEED_MASTER_WAN: does not enable.</li>Public IP is enabled for main node by default."
246246
},
247247
{
248248
"name": "RemoteLoginAtCreate",

tccli/services/es/v20180416/help.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -134,20 +134,20 @@
134134
"desc": "List of voucher IDs (only one voucher can be specified at a time currently)"
135135
},
136136
{
137-
"name": "EnableDedicatedMaster",
138-
"desc": "This parameter has been disused. Please use `NodeInfoList`\nWhether to create a dedicated master node <li>true: yes </li><li>false: no </li>Default value: false"
137+
"name": "EnableDedicatedMain",
138+
"desc": "This parameter has been disused. Please use `NodeInfoList`\nWhether to create a dedicated main node <li>true: yes </li><li>false: no </li>Default value: false"
139139
},
140140
{
141-
"name": "MasterNodeNum",
142-
"desc": "This parameter has been disused. Please use `NodeInfoList`\nNumber of dedicated master nodes (only 3 and 5 are supported. This value must be passed in if `EnableDedicatedMaster` is `true`)"
141+
"name": "MainNodeNum",
142+
"desc": "This parameter has been disused. Please use `NodeInfoList`\nNumber of dedicated main nodes (only 3 and 5 are supported. This value must be passed in if `EnableDedicatedMain` is `true`)"
143143
},
144144
{
145-
"name": "MasterNodeType",
146-
"desc": "This parameter has been disused. Please use `NodeInfoList`\nDedicated master node type, which must be passed in if `EnableDedicatedMaster` is `true` <li>ES.S1.SMALL2: 1-core 2 GB</li><li>ES.S1.MEDIUM4: 2-core 4 GB</li><li>ES.S1.MEDIUM8: 2-core 8 GB</li><li>ES.S1.LARGE16: 4-core 16 GB</li><li>ES.S1.2XLARGE32: 8-core 32 GB</li><li>ES.S1.4XLARGE32: 16-core 32 GB</li><li>ES.S1.4XLARGE64: 16-core 64 GB</li>"
145+
"name": "MainNodeType",
146+
"desc": "This parameter has been disused. Please use `NodeInfoList`\nDedicated main node type, which must be passed in if `EnableDedicatedMain` is `true` <li>ES.S1.SMALL2: 1-core 2 GB</li><li>ES.S1.MEDIUM4: 2-core 4 GB</li><li>ES.S1.MEDIUM8: 2-core 8 GB</li><li>ES.S1.LARGE16: 4-core 16 GB</li><li>ES.S1.2XLARGE32: 8-core 32 GB</li><li>ES.S1.4XLARGE32: 16-core 32 GB</li><li>ES.S1.4XLARGE64: 16-core 64 GB</li>"
147147
},
148148
{
149-
"name": "MasterNodeDiskSize",
150-
"desc": "This parameter has been disused. Please use `NodeInfoList`\nDedicated master node disk size in GB, which is optional. If passed in, it can only be 50 and cannot be customized currently"
149+
"name": "MainNodeDiskSize",
150+
"desc": "This parameter has been disused. Please use `NodeInfoList`\nDedicated main node disk size in GB, which is optional. If passed in, it can only be 50 and cannot be customized currently"
151151
},
152152
{
153153
"name": "ClusterNameInConf",
@@ -269,16 +269,16 @@
269269
"desc": "This parameter has been disused. Please use `NodeInfoList`\nNode specification <li>ES.S1.SMALL2: 1-core 2 GB </li><li>ES.S1.MEDIUM4: 2-core 4 GB </li><li>ES.S1.MEDIUM8: 2-core 8 GB </li><li>ES.S1.LARGE16: 4-core 16 GB </li><li>ES.S1.2XLARGE32: 8-core 32 GB </li><li>ES.S1.4XLARGE32: 16-core 32 GB </li><li>ES.S1.4XLARGE64: 16-core 64 GB </li>"
270270
},
271271
{
272-
"name": "MasterNodeNum",
273-
"desc": "This parameter has been disused. Please use `NodeInfoList`\nNumber of dedicated master nodes (only 3 and 5 are supported)"
272+
"name": "MainNodeNum",
273+
"desc": "This parameter has been disused. Please use `NodeInfoList`\nNumber of dedicated main nodes (only 3 and 5 are supported)"
274274
},
275275
{
276-
"name": "MasterNodeType",
277-
"desc": "This parameter has been disused. Please use `NodeInfoList`\nDedicated master node specification <li>ES.S1.SMALL2: 1-core 2 GB</li><li>ES.S1.MEDIUM4: 2-core 4 GB</li><li>ES.S1.MEDIUM8: 2-core 8 GB</li><li>ES.S1.LARGE16: 4-core 16 GB</li><li>ES.S1.2XLARGE32: 8-core 32 GB</li><li>ES.S1.4XLARGE32: 16-core 32 GB</li><li>ES.S1.4XLARGE64: 16-core 64 GB</li>"
276+
"name": "MainNodeType",
277+
"desc": "This parameter has been disused. Please use `NodeInfoList`\nDedicated main node specification <li>ES.S1.SMALL2: 1-core 2 GB</li><li>ES.S1.MEDIUM4: 2-core 4 GB</li><li>ES.S1.MEDIUM8: 2-core 8 GB</li><li>ES.S1.LARGE16: 4-core 16 GB</li><li>ES.S1.2XLARGE32: 8-core 32 GB</li><li>ES.S1.4XLARGE32: 16-core 32 GB</li><li>ES.S1.4XLARGE64: 16-core 64 GB</li>"
278278
},
279279
{
280-
"name": "MasterNodeDiskSize",
281-
"desc": "This parameter has been disused. Please use `NodeInfoList`\nDedicated master node disk size in GB. This is 50 GB by default and currently cannot be customized"
280+
"name": "MainNodeDiskSize",
281+
"desc": "This parameter has been disused. Please use `NodeInfoList`\nDedicated main node disk size in GB. This is 50 GB by default and currently cannot be customized"
282282
},
283283
{
284284
"name": "ForceRestart",
@@ -317,7 +317,7 @@
317317
"desc": "Kibana private port"
318318
}
319319
],
320-
"desc": "This API is used for operations such as modifying node specification, renaming an instance, modifying configuration, resetting password, and setting Kibana blacklist/whitelist. `InstanceId` is required, while `ForceRestart` is optional. Other parameters or parameter combinations and their meanings are as follows:\n- InstanceName: renames an instance (only for instance identification)\n- NodeInfoList: modifies node configuration (horizontally scaling nodes, vertically scaling nodes, adding master nodes, adding cold nodes, etc.)\n- EsConfig: modifies cluster configuration\n- Password: changes the password of the default user \"elastic\"\n- EsAcl: modifies the ACL\n- CosBackUp: sets auto-backup to COS for a cluster\nOnly one of the parameters or parameter combinations above can be passed in at a time, while passing fewer or more ones will cause the request to fail."
320+
"desc": "This API is used for operations such as modifying node specification, renaming an instance, modifying configuration, resetting password, and setting Kibana blacklist/whitelist. `InstanceId` is required, while `ForceRestart` is optional. Other parameters or parameter combinations and their meanings are as follows:\n- InstanceName: renames an instance (only for instance identification)\n- NodeInfoList: modifies node configuration (horizontally scaling nodes, vertically scaling nodes, adding main nodes, adding cold nodes, etc.)\n- EsConfig: modifies cluster configuration\n- Password: changes the password of the default user \"elastic\"\n- EsAcl: modifies the ACL\n- CosBackUp: sets auto-backup to COS for a cluster\nOnly one of the parameters or parameter combinations above can be passed in at a time, while passing fewer or more ones will cause the request to fail."
321321
},
322322
"DeleteInstance": {
323323
"params": [
@@ -349,7 +349,7 @@
349349
},
350350
{
351351
"name": "LogType",
352-
"desc": "Log type. Default value: 1\n<li>1: master log</li>\n<li>2: search slow log</li>\n<li>3: index slow log</li>\n<li>4: GC log</li>"
352+
"desc": "Log type. Default value: 1\n<li>1: main log</li>\n<li>2: search slow log</li>\n<li>3: index slow log</li>\n<li>4: GC log</li>"
353353
},
354354
{
355355
"name": "SearchKey",

tccli/services/gme/v20180711/help.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"desc": "Application status. Valid values: open, close"
5050
}
5151
],
52-
"desc": "This API is used to change the status of an application's master switch."
52+
"desc": "This API is used to change the status of an application's main switch."
5353
},
5454
"DescribeAppStatistics": {
5555
"params": [

tccli/services/kms/v20190118/help.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
"desc": "Unique CMK ID"
9696
}
9797
],
98-
"desc": "This API is used to disable a master key. The disabled key cannot be used for encryption and decryption operations."
98+
"desc": "This API is used to disable a main key. The disabled key cannot be used for encryption and decryption operations."
9999
},
100100
"GenerateDataKey": {
101101
"params": [
@@ -267,7 +267,7 @@
267267
"desc": "Specifies the key type. Default value: 1. Valid value: 1 - default type, indicating that the CMK is created by KMS; 2 - EXTERNAL type, indicating that you need to import key material. For more information, please see the `GetParametersForImport` and `ImportKeyMaterial` API documents."
268268
}
269269
],
270-
"desc": "Create a master key CMK (Custom Master Key) for user management data keys"
270+
"desc": "Create a main key CMK (Custom Main Key) for user management data keys"
271271
},
272272
"DescribeWhiteBoxKey": {
273273
"params": [
@@ -339,7 +339,7 @@
339339
"desc": "Filter by `KeyUsage` of CMKs. Valid values: `ALL` (filter all CMKs), `ENCRYPT_DECRYPT` (it will be used when the parameter is left empty), `ASYMMETRIC_DECRYPT_RSA_2048`, `ASYMMETRIC_DECRYPT_SM2`."
340340
}
341341
],
342-
"desc": "Get the master key list details according to the specified Offset and Limit."
342+
"desc": "Get the main key list details according to the specified Offset and Limit."
343343
},
344344
"AsymmetricRsaDecrypt": {
345345
"params": [

tccli/services/mariadb/v20170312/help.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
},
136136
{
137137
"name": "MetricName",
138-
"desc": "Name of pulled metric. Valid values: long_query, select_total, update_total, insert_total, delete_total, mem_hit_rate, disk_iops, conn_active, is_master_switched, slave_delay"
138+
"desc": "Name of pulled metric. Valid values: long_query, select_total, update_total, insert_total, delete_total, mem_hit_rate, disk_iops, conn_active, is_main_switched, subordinate_delay"
139139
}
140140
],
141141
"desc": "This API is used to view the instance performance data details."
@@ -362,15 +362,15 @@
362362
},
363363
{
364364
"name": "ReadOnly",
365-
"desc": "Whether to create a read-only account. 0: no; 1: for the account's SQL requests, the slave will be used first, and if it is unavailable, the master will be used; 2: the slave will be used first, and if it is unavailable, the operation will fail."
365+
"desc": "Whether to create a read-only account. 0: no; 1: for the account's SQL requests, the subordinate will be used first, and if it is unavailable, the main will be used; 2: the subordinate will be used first, and if it is unavailable, the operation will fail."
366366
},
367367
{
368368
"name": "Description",
369369
"desc": "Account remarks, which can contain 0–256 letters, digits, and common symbols."
370370
},
371371
{
372372
"name": "DelayThresh",
373-
"desc": "Determines whether the slave is unavailable based on the passed-in time"
373+
"desc": "Determines whether the subordinate is unavailable based on the passed-in time"
374374
}
375375
],
376376
"desc": "This API is used to create a TencentDB account. Multiple accounts can be created for one instance. Accounts with the same username but different hosts are different accounts."
@@ -440,8 +440,8 @@
440440
"desc": "Sorting order. Valid values: desc, asc"
441441
},
442442
{
443-
"name": "Slave",
444-
"desc": "Whether to query slow queries of the slave. 0: master, 1: slave"
443+
"name": "Subordinate",
444+
"desc": "Whether to query slow queries of the subordinate. 0: main, 1: subordinate"
445445
}
446446
],
447447
"desc": "This API is used to query the slow query log list."
@@ -555,7 +555,7 @@
555555
},
556556
{
557557
"name": "MetricName",
558-
"desc": "Name of pulled metric. Valid values: long_query, select_total, update_total, insert_total, delete_total, mem_hit_rate, disk_iops, conn_active, is_master_switched, slave_delay"
558+
"desc": "Name of pulled metric. Valid values: long_query, select_total, update_total, insert_total, delete_total, mem_hit_rate, disk_iops, conn_active, is_main_switched, subordinate_delay"
559559
}
560560
],
561561
"desc": "This API is used to view the current performance data of a database instance."

tccli/services/mongodb/v20190725/help.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
"params": [
121121
{
122122
"name": "NodeNum",
123-
"desc": "Number of nodes in each replica set. Currently, the number of nodes per replica set is fixed at 3, while the number of slave nodes per shard is customizable. For more information, please see the parameter returned by the `DescribeSpecInfo` API."
123+
"desc": "Number of nodes in each replica set. Currently, the number of nodes per replica set is fixed at 3, while the number of subordinate nodes per shard is customizable. For more information, please see the parameter returned by the `DescribeSpecInfo` API."
124124
},
125125
{
126126
"name": "Memory",
@@ -288,7 +288,7 @@
288288
},
289289
{
290290
"name": "NodeNum",
291-
"desc": "Number of nodes in each replica set. Currently, the number of nodes per replica set is fixed at 3, while the number of slave nodes per shard is customizable. For more information, please see the parameter returned by the `DescribeSpecInfo` API."
291+
"desc": "Number of nodes in each replica set. Currently, the number of nodes per replica set is fixed at 3, while the number of subordinate nodes per shard is customizable. For more information, please see the parameter returned by the `DescribeSpecInfo` API."
292292
},
293293
{
294294
"name": "Memory",
@@ -433,7 +433,7 @@
433433
"desc": "Search keyword, which can be instance ID, instance name, or complete IP"
434434
}
435435
],
436-
"desc": "This API is used to query the list of TencentDB instances (which can be master, disaster recovery, or read-only instances). It supports filtering instances by project ID, instance ID, and instance status."
436+
"desc": "This API is used to query the list of TencentDB instances (which can be main, disaster recovery, or read-only instances). It supports filtering instances by project ID, instance ID, and instance status."
437437
},
438438
"IsolateDBInstance": {
439439
"params": [

0 commit comments

Comments
 (0)