From 233a4478f927810a24b427dea5af57764e839a2b Mon Sep 17 00:00:00 2001
From: Bogdan Popescu <68062990+bopopescu@users.noreply.github.com>
Date: Wed, 22 Jul 2020 09:13:00 +0300
Subject: [PATCH] Migrating from master and slave words
---
jmespath/lexer.py | 4 +-
tccli/services/cdb/v20170320/help.py | 62 +++++++++++-----------
tccli/services/dcdb/v20180411/help.py | 4 +-
tccli/services/dts/v20180330/help.py | 4 +-
tccli/services/emr/v20190103/help.py | 6 +--
tccli/services/es/v20180416/help.py | 32 +++++------
tccli/services/gme/v20180711/help.py | 2 +-
tccli/services/kms/v20190118/help.py | 6 +--
tccli/services/mariadb/v20170312/help.py | 12 ++---
tccli/services/mongodb/v20190725/help.py | 6 +--
tccli/services/redis/v20180412/help.py | 20 +++----
tccli/services/scf/v20180416/help.py | 6 +--
tccli/services/sqlserver/v20180328/help.py | 2 +-
tccli/services/vpc/v20170312/help.py | 2 +-
14 files changed, 84 insertions(+), 84 deletions(-)
diff --git a/jmespath/lexer.py b/jmespath/lexer.py
index e436c150..a7a1a2bc 100644
--- a/jmespath/lexer.py
+++ b/jmespath/lexer.py
@@ -38,13 +38,13 @@ class Lexer(object):
)
def __init__(self):
- self.master_regex = re.compile(self.TOKENS)
+ self.main_regex = re.compile(self.TOKENS)
def tokenize(self, expression):
if not expression:
raise EmptyExpressionError()
previous_column = 0
- for match in self.master_regex.finditer(expression):
+ for match in self.main_regex.finditer(expression):
value = match.group()
start = match.start()
end = match.end()
diff --git a/tccli/services/cdb/v20170320/help.py b/tccli/services/cdb/v20170320/help.py
index 4d20b0d1..28a8734f 100644
--- a/tccli/services/cdb/v20170320/help.py
+++ b/tccli/services/cdb/v20170320/help.py
@@ -170,7 +170,7 @@
},
{
"name": "TaskTypes",
- "desc": "Task type. If no value is passed in, all task types will be queried. Valid values:\n1 - rolling back a database;\n2 - performing an SQL operation;\n3 - importing data;\n5 - setting a parameter;\n6 - initializing a TencentDB instance;\n7 - restarting a TencentDB instance;\n8 - enabling GTID of a TencentDB instance;\n9 - upgrading a read-only instance;\n10 - rolling back databases in batches;\n11 - upgrading a master instance;\n12 - deleting a TencentDB table;\n13 - promoting a disaster recovery instance."
+ "desc": "Task type. If no value is passed in, all task types will be queried. Valid values:\n1 - rolling back a database;\n2 - performing an SQL operation;\n3 - importing data;\n5 - setting a parameter;\n6 - initializing a TencentDB instance;\n7 - restarting a TencentDB instance;\n8 - enabling GTID of a TencentDB instance;\n9 - upgrading a read-only instance;\n10 - rolling back databases in batches;\n11 - upgrading a main instance;\n12 - deleting a TencentDB table;\n13 - promoting a disaster recovery instance."
},
{
"name": "TaskStatus",
@@ -386,7 +386,7 @@
"desc": "Instance ID in the format of cdb-c1nl9rpv. It is the same as the instance ID displayed on the TencentDB Console page."
}
],
- "desc": "This API (SwitchForUpgrade) is used to switch to a new instance. You can initiate this process when the master instance being upgraded is pending switch."
+ "desc": "This API (SwitchForUpgrade) is used to switch to a new instance. You can initiate this process when the main instance being upgraded is pending switch."
},
"DeleteParamTemplate": {
"params": [
@@ -458,16 +458,16 @@
"desc": "AZ information. By default, the system will automatically select an AZ. Please use the [DescribeDBZoneConfig](https://cloud.tencent.com/document/api/236/17229) API to query the supported AZs."
},
{
- "name": "MasterInstanceId",
- "desc": "Instance ID, which is required and the same as the master instance ID when purchasing read-only or disaster recovery instances. Please use the [DescribeDBInstances](https://cloud.tencent.com/document/api/236/15872) API to query the instance IDs."
+ "name": "MainInstanceId",
+ "desc": "Instance ID, which is required and the same as the main instance ID when purchasing read-only or disaster recovery instances. Please use the [DescribeDBInstances](https://cloud.tencent.com/document/api/236/15872) API to query the instance IDs."
},
{
"name": "InstanceRole",
- "desc": "Instance type. Valid values: master (master instance), dr (disaster recovery instance), ro (read-only instance). Default value: master."
+ "desc": "Instance type. Valid values: main (main instance), dr (disaster recovery instance), ro (read-only instance). Default value: main."
},
{
- "name": "MasterRegion",
- "desc": "AZ information of the master instance, which is required for purchasing disaster recovery instances."
+ "name": "MainRegion",
+ "desc": "AZ information of the main instance, which is required for purchasing disaster recovery instances."
},
{
"name": "Port",
@@ -475,7 +475,7 @@
},
{
"name": "Password",
- "desc": "Sets the root account password. Rule: the password can contain 8–64 characters and must contain at least two of the following types of characters: letters, digits, and special symbols (_+-&=!@#$%^*()). This parameter can be specified when purchasing master instances and is meaningless for read-only or disaster recovery instances."
+ "desc": "Sets the root account password. Rule: the password can contain 8–64 characters and must contain at least two of the following types of characters: letters, digits, and special symbols (_+-&=!@#$%^*()). This parameter can be specified when purchasing main instances and is meaningless for read-only or disaster recovery instances."
},
{
"name": "ParamList",
@@ -483,19 +483,19 @@
},
{
"name": "ProtectMode",
- "desc": "Data replication mode. Valid values: 0 (async), 1 (semi-sync), 2 (strong sync). Default value: 0. This parameter can be specified when purchasing master instances and is meaningless for read-only or disaster recovery instances."
+ "desc": "Data replication mode. Valid values: 0 (async), 1 (semi-sync), 2 (strong sync). Default value: 0. This parameter can be specified when purchasing main instances and is meaningless for read-only or disaster recovery instances."
},
{
"name": "DeployMode",
- "desc": "Multi-AZ. Valid value: 0 (single-AZ), 1 (multi-AZ). Default value: 0. This parameter can be specified when purchasing master instances and is meaningless for read-only or disaster recovery instances."
+ "desc": "Multi-AZ. Valid value: 0 (single-AZ), 1 (multi-AZ). Default value: 0. This parameter can be specified when purchasing main instances and is meaningless for read-only or disaster recovery instances."
},
{
- "name": "SlaveZone",
- "desc": "AZ information of slave database 1, which is the `Zone` value by default. This parameter can be specified when purchasing master instances and is meaningless for read-only or disaster recovery instances."
+ "name": "SubordinateZone",
+ "desc": "AZ information of subordinate database 1, which is the `Zone` value by default. This parameter can be specified when purchasing main instances and is meaningless for read-only or disaster recovery instances."
},
{
"name": "BackupZone",
- "desc": "AZ information of slave database 2, which is empty by default. This parameter can be specified when purchasing strong sync master instances and is meaningless for other types of instances."
+ "desc": "AZ information of subordinate database 2, which is empty by default. This parameter can be specified when purchasing strong sync main instances and is meaningless for other types of instances."
},
{
"name": "SecurityGroup",
@@ -530,7 +530,7 @@
"desc": "Instance type. Valid values: HA (High-Availability Edition), BASIC (Basic Edition). If this parameter is not specified, High-Availability Edition will be used by default."
}
],
- "desc": "This API is used to create a pay-as-you-go TencentDB instance (which can be a master, disaster recovery, or read-only instance) by passing in information such as instance specifications, MySQL version number, and quantity.\n\nThis is an async API. You can also use the [DescribeDBInstances](https://cloud.tencent.com/document/api/236/15872) API to query the instance details. If the `Status` value of an instance is 1 and `TaskStatus` is 0, the instance has been successfully delivered.\n\n1. Please use the [DescribeDBZoneConfig](https://cloud.tencent.com/document/api/236/17229) API to query the supported instance specifications first and then use the [DescribeDBPrice](https://cloud.tencent.com/document/api/236/18566) API to query the prices of the supported instances;\n2. You can create up to 100 instances at a time, with an instance validity period of up to 36 months;\n3. MySQL v5.5, v5.6, and v5.7 are supported;\n4. Master instances, read-only instances, and disaster recovery instances can be created;\n5. If `Port`, `ParamList`, or `Password` is set in the input parameters, the instance will be initialized."
+ "desc": "This API is used to create a pay-as-you-go TencentDB instance (which can be a main, disaster recovery, or read-only instance) by passing in information such as instance specifications, MySQL version number, and quantity.\n\nThis is an async API. You can also use the [DescribeDBInstances](https://cloud.tencent.com/document/api/236/15872) API to query the instance details. If the `Status` value of an instance is 1 and `TaskStatus` is 0, the instance has been successfully delivered.\n\n1. Please use the [DescribeDBZoneConfig](https://cloud.tencent.com/document/api/236/17229) API to query the supported instance specifications first and then use the [DescribeDBPrice](https://cloud.tencent.com/document/api/236/18566) API to query the prices of the supported instances;\n2. You can create up to 100 instances at a time, with an instance validity period of up to 36 months;\n3. MySQL v5.5, v5.6, and v5.7 are supported;\n4. Main instances, read-only instances, and disaster recovery instances can be created;\n5. If `Port`, `ParamList`, or `Password` is set in the input parameters, the instance will be initialized."
},
"AddTimeWindow": {
"params": [
@@ -768,14 +768,14 @@
},
{
"name": "EngineVersion",
- "desc": "Version of master instance database engine. Value range: 5.6, 5.7"
+ "desc": "Version of main instance database engine. Value range: 5.6, 5.7"
},
{
"name": "WaitSwitch",
"desc": "Mode of switch to a new instance. Value range: 0 (switch immediately), 1 (switch within a time window). Default value: 0. If the value is 1, the switch process will be performed within a time window. Or, you can call the [switching to new instance API](https://cloud.tencent.com/document/product/236/15864) to trigger the process."
}
],
- "desc": "This API (UpgradeDBInstanceEngineVersion) is used to upgrade the version of a TencentDB instance, which can be a master instance, disaster recovery instance, or read-only instance."
+ "desc": "This API (UpgradeDBInstanceEngineVersion) is used to upgrade the version of a TencentDB instance, which can be a main instance, disaster recovery instance, or read-only instance."
},
"DescribeInstanceParamRecords": {
"params": [
@@ -928,7 +928,7 @@
},
{
"name": "InstanceTypes",
- "desc": "Instance type. Value range: 1 (master), 2 (disaster recovery), 3 (read-only)."
+ "desc": "Instance type. Value range: 1 (main), 2 (disaster recovery), 3 (read-only)."
},
{
"name": "Vips",
@@ -960,7 +960,7 @@
},
{
"name": "TaskStatus",
- "desc": "Instance task status. Value range:
0 - no task
1 - upgrading
2 - importing data
3 - activating slave
4 - public network access enabled
5 - batch operation in progress
6 - rolling back
7 - public network access not enabled
8 - modifying password
9 - renaming instance
10 - restarting
12 - migrating self-built instance
13 - dropping table
14 - creating and syncing disaster recovery instance
15 - pending upgrade and switch
16 - upgrade and switch in progress
17 - upgrade and switch completed"
+ "desc": "Instance task status. Value range:
0 - no task
1 - upgrading
2 - importing data
3 - activating subordinate
4 - public network access enabled
5 - batch operation in progress
6 - rolling back
7 - public network access not enabled
8 - modifying password
9 - renaming instance
10 - restarting
12 - migrating self-built instance
13 - dropping table
14 - creating and syncing disaster recovery instance
15 - pending upgrade and switch
16 - upgrade and switch in progress
17 - upgrade and switch completed"
},
{
"name": "EngineVersions",
@@ -1012,22 +1012,22 @@
},
{
"name": "WithDr",
- "desc": "Whether instances corresponding to the disaster recovery relationship are included. Valid values: 0 (not included), 1 (included). Default value: 1. If a master instance is pulled, the data of the disaster recovery relationship will be in the `DrInfo` field. If a disaster recovery instance is pulled, the data of the disaster recovery relationship will be in the `MasterInfo` field. The disaster recovery relationship contains only partial basic data. To get the detailed data, you need to call an API to pull it."
+ "desc": "Whether instances corresponding to the disaster recovery relationship are included. Valid values: 0 (not included), 1 (included). Default value: 1. If a main instance is pulled, the data of the disaster recovery relationship will be in the `DrInfo` field. If a disaster recovery instance is pulled, the data of the disaster recovery relationship will be in the `MainInfo` field. The disaster recovery relationship contains only partial basic data. To get the detailed data, you need to call an API to pull it."
},
{
"name": "WithRo",
"desc": "Whether read-only instances are included. Valid values: 0 (not included), 1 (included). Default value: 1."
},
{
- "name": "WithMaster",
- "desc": "Whether master instances are included. Valid values: 0 (not included), 1 (included). Default value: 1."
+ "name": "WithMain",
+ "desc": "Whether main instances are included. Valid values: 0 (not included), 1 (included). Default value: 1."
},
{
"name": "DeployGroupIds",
"desc": "Placement group ID list."
}
],
- "desc": "This API (DescribeDBInstances) 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, access address, and instance status."
+ "desc": "This API (DescribeDBInstances) 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, access address, and instance status."
},
"ModifyRoGroupInfo": {
"params": [
@@ -1196,7 +1196,7 @@
"desc": "Array of instance IDs in the format of cdb-c1nl9rpv. It is the same as the instance ID displayed on the TencentDB Console page."
}
],
- "desc": "This API (RestartDBInstances) is used to restart TencentDB instances.\n\nNote:\n1. This API only supports restarting master instances.\n2. The instance status must be normal, and no other async tasks are in progress."
+ "desc": "This API (RestartDBInstances) is used to restart TencentDB instances.\n\nNote:\n1. This API only supports restarting main instances.\n2. The instance status must be normal, and no other async tasks are in progress."
},
"ModifyAccountPassword": {
"params": [
@@ -1482,19 +1482,19 @@
},
{
"name": "ProtectMode",
- "desc": "Data replication mode. Valid values: 0 (async), 1 (semi-sync), 2 (strong sync). This parameter can be specified when upgrading master instances and is meaningless for read-only or disaster recovery instances."
+ "desc": "Data replication mode. Valid values: 0 (async), 1 (semi-sync), 2 (strong sync). This parameter can be specified when upgrading main instances and is meaningless for read-only or disaster recovery instances."
},
{
"name": "DeployMode",
- "desc": "Deployment mode. Valid values: 0 (single-AZ), 1 (multi-AZ). Default value: 0. This parameter can be specified when upgrading master instances and is meaningless for read-only or disaster recovery instances."
+ "desc": "Deployment mode. Valid values: 0 (single-AZ), 1 (multi-AZ). Default value: 0. This parameter can be specified when upgrading main instances and is meaningless for read-only or disaster recovery instances."
},
{
- "name": "SlaveZone",
- "desc": "AZ information of slave database 1, which is the `Zone` value of the instance by default. This parameter can be specified when upgrading master instances in multi-AZ mode and is meaningless for read-only or disaster recovery instances. You can use the [DescribeDBZoneConfig](https://cloud.tencent.com/document/product/236/17229) API to query the supported AZs."
+ "name": "SubordinateZone",
+ "desc": "AZ information of subordinate database 1, which is the `Zone` value of the instance by default. This parameter can be specified when upgrading main instances in multi-AZ mode and is meaningless for read-only or disaster recovery instances. You can use the [DescribeDBZoneConfig](https://cloud.tencent.com/document/product/236/17229) API to query the supported AZs."
},
{
"name": "EngineVersion",
- "desc": "Version of master instance database engine. Valid values: 5.5, 5.6, 5.7."
+ "desc": "Version of main instance database engine. Valid values: 5.5, 5.6, 5.7."
},
{
"name": "WaitSwitch",
@@ -1502,14 +1502,14 @@
},
{
"name": "BackupZone",
- "desc": "AZ information of slave database 2, which is empty by default. This parameter can be specified when upgrading master instances and is meaningless for read-only or disaster recovery instances."
+ "desc": "AZ information of subordinate database 2, which is empty by default. This parameter can be specified when upgrading main instances and is meaningless for read-only or disaster recovery instances."
},
{
"name": "InstanceRole",
- "desc": "Instance type. Valid values: master (master instance), dr (disaster recovery instance), ro (read-only instance). Default value: master."
+ "desc": "Instance type. Valid values: main (main instance), dr (disaster recovery instance), ro (read-only instance). Default value: main."
}
],
- "desc": "This API is used to upgrade or downgrade a TencentDB instance, which can be a master instance, disaster recovery instance, or read-only instance."
+ "desc": "This API is used to upgrade or downgrade a TencentDB instance, which can be a main instance, disaster recovery instance, or read-only instance."
},
"CreateDeployGroup": {
"params": [
diff --git a/tccli/services/dcdb/v20180411/help.py b/tccli/services/dcdb/v20180411/help.py
index 36128e6b..8c648199 100644
--- a/tccli/services/dcdb/v20180411/help.py
+++ b/tccli/services/dcdb/v20180411/help.py
@@ -315,7 +315,7 @@
},
{
"name": "ReadOnly",
- "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."
+ "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."
},
{
"name": "Description",
@@ -323,7 +323,7 @@
},
{
"name": "DelayThresh",
- "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."
+ "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."
}
],
"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."
diff --git a/tccli/services/dts/v20180330/help.py b/tccli/services/dts/v20180330/help.py
index 1519c680..d5aa40ad 100644
--- a/tccli/services/dts/v20180330/help.py
+++ b/tccli/services/dts/v20180330/help.py
@@ -174,7 +174,7 @@
],
"desc": "This API is used to query the execution result of a task."
},
- "SwitchDrToMaster": {
+ "SwitchDrToMain": {
"params": [
{
"name": "DstInfo",
@@ -185,7 +185,7 @@
"desc": "Database type (such as MySQL)"
}
],
- "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."
+ "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."
},
"StopMigrateJob": {
"params": [
diff --git a/tccli/services/emr/v20190103/help.py b/tccli/services/emr/v20190103/help.py
index 3db063f8..56c9affc 100644
--- a/tccli/services/emr/v20190103/help.py
+++ b/tccli/services/emr/v20190103/help.py
@@ -132,7 +132,7 @@
},
{
"name": "NodeFlag",
- "desc": "Node flag. Valid values:\n