Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing the master/slave jargon #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions jmespath/lexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
62 changes: 31 additions & 31 deletions tccli/services/cdb/v20170320/help.py

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions tccli/services/dcdb/v20180411/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,15 +315,15 @@
},
{
"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",
"desc": "Account remarks, which can contain 0–256 letters, digits, and common symbols."
},
{
"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."
Expand Down
4 changes: 2 additions & 2 deletions tccli/services/dts/v20180330/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
],
"desc": "This API is used to query the execution result of a task."
},
"SwitchDrToMaster": {
"SwitchDrToMain": {
"params": [
{
"name": "DstInfo",
Expand All @@ -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": [
Expand Down
6 changes: 3 additions & 3 deletions tccli/services/emr/v20190103/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
},
{
"name": "NodeFlag",
"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."
"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."
},
{
"name": "Offset",
Expand Down Expand Up @@ -241,8 +241,8 @@
"desc": "Client token."
},
{
"name": "NeedMasterWan",
"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."
"name": "NeedMainWan",
"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."
},
{
"name": "RemoteLoginAtCreate",
Expand Down
32 changes: 16 additions & 16 deletions tccli/services/es/v20180416/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,20 +134,20 @@
"desc": "List of voucher IDs (only one voucher can be specified at a time currently)"
},
{
"name": "EnableDedicatedMaster",
"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"
"name": "EnableDedicatedMain",
"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"
},
{
"name": "MasterNodeNum",
"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`)"
"name": "MainNodeNum",
"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`)"
},
{
"name": "MasterNodeType",
"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>"
"name": "MainNodeType",
"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>"
},
{
"name": "MasterNodeDiskSize",
"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"
"name": "MainNodeDiskSize",
"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"
},
{
"name": "ClusterNameInConf",
Expand Down Expand Up @@ -269,16 +269,16 @@
"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>"
},
{
"name": "MasterNodeNum",
"desc": "This parameter has been disused. Please use `NodeInfoList`\nNumber of dedicated master nodes (only 3 and 5 are supported)"
"name": "MainNodeNum",
"desc": "This parameter has been disused. Please use `NodeInfoList`\nNumber of dedicated main nodes (only 3 and 5 are supported)"
},
{
"name": "MasterNodeType",
"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>"
"name": "MainNodeType",
"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>"
},
{
"name": "MasterNodeDiskSize",
"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"
"name": "MainNodeDiskSize",
"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"
},
{
"name": "ForceRestart",
Expand Down Expand Up @@ -317,7 +317,7 @@
"desc": "Kibana private port"
}
],
"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."
"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."
},
"DeleteInstance": {
"params": [
Expand Down Expand Up @@ -349,7 +349,7 @@
},
{
"name": "LogType",
"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>"
"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>"
},
{
"name": "SearchKey",
Expand Down
2 changes: 1 addition & 1 deletion tccli/services/gme/v20180711/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"desc": "Application status. Valid values: open, close"
}
],
"desc": "This API is used to change the status of an application's master switch."
"desc": "This API is used to change the status of an application's main switch."
},
"DescribeAppStatistics": {
"params": [
Expand Down
6 changes: 3 additions & 3 deletions tccli/services/kms/v20190118/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"desc": "Unique CMK ID"
}
],
"desc": "This API is used to disable a master key. The disabled key cannot be used for encryption and decryption operations."
"desc": "This API is used to disable a main key. The disabled key cannot be used for encryption and decryption operations."
},
"GenerateDataKey": {
"params": [
Expand Down Expand Up @@ -267,7 +267,7 @@
"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."
}
],
"desc": "Create a master key CMK (Custom Master Key) for user management data keys"
"desc": "Create a main key CMK (Custom Main Key) for user management data keys"
},
"DescribeWhiteBoxKey": {
"params": [
Expand Down Expand Up @@ -339,7 +339,7 @@
"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`."
}
],
"desc": "Get the master key list details according to the specified Offset and Limit."
"desc": "Get the main key list details according to the specified Offset and Limit."
},
"AsymmetricRsaDecrypt": {
"params": [
Expand Down
12 changes: 6 additions & 6 deletions tccli/services/mariadb/v20170312/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
},
{
"name": "MetricName",
"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"
"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"
}
],
"desc": "This API is used to view the instance performance data details."
Expand Down Expand Up @@ -362,15 +362,15 @@
},
{
"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."
"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."
},
{
"name": "Description",
"desc": "Account remarks, which can contain 0–256 letters, digits, and common symbols."
},
{
"name": "DelayThresh",
"desc": "Determines whether the slave is unavailable based on the passed-in time"
"desc": "Determines whether the subordinate is unavailable based on the passed-in time"
}
],
"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."
Expand Down Expand Up @@ -440,8 +440,8 @@
"desc": "Sorting order. Valid values: desc, asc"
},
{
"name": "Slave",
"desc": "Whether to query slow queries of the slave. 0: master, 1: slave"
"name": "Subordinate",
"desc": "Whether to query slow queries of the subordinate. 0: main, 1: subordinate"
}
],
"desc": "This API is used to query the slow query log list."
Expand Down Expand Up @@ -555,7 +555,7 @@
},
{
"name": "MetricName",
"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"
"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"
}
],
"desc": "This API is used to view the current performance data of a database instance."
Expand Down
6 changes: 3 additions & 3 deletions tccli/services/mongodb/v20190725/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"params": [
{
"name": "NodeNum",
"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."
"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."
},
{
"name": "Memory",
Expand Down Expand Up @@ -288,7 +288,7 @@
},
{
"name": "NodeNum",
"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."
"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."
},
{
"name": "Memory",
Expand Down Expand Up @@ -433,7 +433,7 @@
"desc": "Search keyword, which can be instance ID, instance name, or complete IP"
}
],
"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."
"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."
},
"IsolateDBInstance": {
"params": [
Expand Down
Loading