1
// Copyright 2018 The CubeFS Authors.
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
7
// http://www.apache.org/licenses/LICENSE-2.0
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12
// implied. See the License for the specific language governing
13
// permissions and limitations under the License.
18
// List of operation name for cli
22
CliOpCreate = "create"
23
CliOpDelete = "delete"
27
CliOpUpdate = "update"
28
CliOpDecommission = "decommission"
29
CliOpRecommission = "recommission"
30
CliOpQueryProgress = "query-progress"
31
CliOpMigrate = "migrate"
32
CliOpDownloadZip = "load"
33
CliOpMetaCompatibility = "meta"
34
CliOpFreeze = "freeze"
35
CliOpSetThreshold = "threshold"
36
CliOpSetCluster = "set"
39
CliOpReplicate = "add-replica"
40
CliOpDelReplica = "del-replica"
41
CliOpExpand = "expand"
42
CliOpShrink = "shrink"
43
CliOpGetDiscard = "get-discard"
44
CliOpSetDiscard = "set-discard"
45
CliOpForbidMpDecommission = "forbid-mp-decommission"
47
// Shorthand format of operation name
48
CliOpDecommissionShortHand = "dec"
51
CliResourceDataNode = "datanode [COMMAND]"
52
CliResourceMetaNode = "metanode"
53
CliResourceDataPartition = "datapartition"
54
CliResourceMetaPartition = "metapartition"
55
CliResourceTopology = "topology"
56
CliResourceRaftNode = "raftnode"
57
CliResourceDisk = "disk"
58
CliResourceConfig = "config"
63
CliFlagDataPartitionSize = "dp-size"
64
CliFlagDataPartitionCount = "dp-count"
65
CliFlagMetaPartitionCount = "mp-count"
66
CliFlagReplicas = "replicas"
67
CliFlagEnable = "enable"
68
CliFlagEnableFollowerRead = "follower-read"
69
CliFlagAuthenticate = "authenticate"
70
CliFlagCapacity = "capacity"
71
CliFlagBusiness = "description"
72
CliFlagMPCount = "mp-count"
73
CliFlagDPCount = "dp-count"
74
CliFlagReplicaNum = "replica-num"
76
CliFlagVolType = "vol-type"
77
CliFlagFollowerRead = "follower-read"
78
CliFlagCacheRuleKey = "cache-rule-key"
79
CliFlagEbsBlkSize = "ebs-blk-size"
80
CliFlagCacheCapacity = "cache-capacity"
81
CliFlagCacheAction = "cache-action"
82
CliFlagCacheThreshold = "cache-threshold"
83
CliFlagCacheTTL = "cache-ttl"
84
CliFlagCacheHighWater = "cache-high-water"
85
CliFlagCacheLowWater = "cache-low-water"
86
CliFlagCacheLRUInterval = "cache-lru-interval"
87
CliFlagCacheRule = "cache-rule"
88
CliFlagThreshold = "threshold"
89
CliFlagAddress = "addr"
90
CliFlagDiskPath = "path"
91
CliFlagAuthKey = "authkey"
92
CliFlagINodeStartID = "inode-start"
94
CliFlagZoneName = "zone-name"
95
CliFlagDescription = "description"
96
CliFlagAutoRepairRate = "autoRepairRate"
97
CliFlagDelBatchCount = "batchCount"
98
CliFlagDelWorkerSleepMs = "deleteWorkerSleepMs"
99
CliFlagLoadFactor = "loadFactor"
100
CliFlagMarkDelRate = "markDeleteRate"
101
CliFlagMaxDpCntLimit = "maxDpCntLimit"
102
CliFlagDataNodeSelector = "dataNodeSelector"
103
CliFlagMetaNodeSelector = "metaNodeSelector"
104
CliFlagDataNodesetSelector = "dataNodesetSelector"
105
CliFlagMetaNodesetSelector = "metaNodesetSelector"
106
CliFlagCrossZone = "crossZone"
107
CliNormalZonesFirst = "normalZonesFirst"
108
CliFlagCount = "count"
109
CliDpReadOnlyWhenVolFull = "readonly-when-full"
110
CliTxMask = "transaction-mask"
111
CliTxTimeout = "transaction-timeout"
112
CliTxOpLimit = "transaction-limit"
113
CliTxConflictRetryNum = "tx-conflict-retry-num"
114
CliTxConflictRetryInterval = "tx-conflict-retry-Interval"
115
CliTxForceReset = "transaction-force-reset"
116
CliFlagMaxFiles = "maxFiles"
117
CliFlagMaxBytes = "maxBytes"
118
CliFlagMaxConcurrencyInode = "maxConcurrencyInode"
119
CliFlagForceInode = "forceInode"
120
CliFlagEnableQuota = "enableQuota"
121
CliFlagDeleteLockTime = "delete-lock-time"
122
CliFlagClientIDKey = "clientIDKey"
124
// CliFlagSetDataPartitionCount = "count" use dp-count instead
126
// Shorthand format of resource name
127
ResourceDataNodeShortHand = "dn"
128
ResourceMetaNodeShortHand = "mn"
129
ResourceDataPartitionShortHand = "dp"
130
ResourceMetaPartitionShortHand = "mp"
133
CliUsageClientIDKey = "needed if cluster authentication is on"
135
CliFlagVersionCreate = "verCreate"
136
CliFlagVersionList = "verList"
137
CliFlagVersionDel = "verDel"
138
CliFlagVersionSetStrategy = "verSetStrategy"
144
OpExpandVol MasterOp = iota