MVC2.0: Remove client library status "available"
This commit is contained in:
parent
418cc4dc50
commit
9408c11c3d
|
@ -47,7 +47,7 @@ struct ClientLibBinaryInfo {
|
|||
#define ASSERT_INDEX_IN_RANGE(idx, arr) ASSERT(idx >= 0 && idx < sizeof(arr) / sizeof(arr[0]))
|
||||
|
||||
const std::string& getStatusName(ClientLibStatus status) {
|
||||
static const std::string statusNames[] = { "disabled", "available", "uploading", "download", "active" };
|
||||
static const std::string statusNames[] = { "disabled", "uploading", "download", "active" };
|
||||
int idx = static_cast<int>(status);
|
||||
ASSERT_INDEX_IN_RANGE(idx, statusNames);
|
||||
return statusNames[idx];
|
||||
|
@ -124,13 +124,12 @@ ClientLibChecksumAlg getChecksumAlgByName(std::string_view checksumAlgName) {
|
|||
namespace {
|
||||
|
||||
bool isValidTargetStatus(ClientLibStatus status) {
|
||||
return status == ClientLibStatus::AVAILABLE || status == ClientLibStatus::DISABLED ||
|
||||
status == ClientLibStatus::DOWNLOAD || status == ClientLibStatus::ACTIVE;
|
||||
return status == ClientLibStatus::DISABLED || status == ClientLibStatus::DOWNLOAD ||
|
||||
status == ClientLibStatus::ACTIVE;
|
||||
}
|
||||
|
||||
bool isAvailableForDownload(ClientLibStatus status) {
|
||||
return status == ClientLibStatus::AVAILABLE || status == ClientLibStatus::DOWNLOAD ||
|
||||
status == ClientLibStatus::ACTIVE;
|
||||
return status == ClientLibStatus::DOWNLOAD || status == ClientLibStatus::ACTIVE;
|
||||
}
|
||||
|
||||
void updateClientLibChangeCounter(Transaction& tr, ClientLibStatus prevStatus, ClientLibStatus newStatus) {
|
||||
|
|
|
@ -35,10 +35,9 @@ namespace ClientLibManagement {
|
|||
|
||||
enum class ClientLibStatus {
|
||||
DISABLED = 0,
|
||||
AVAILABLE, // 1
|
||||
UPLOADING, // 2
|
||||
DOWNLOAD, // 3
|
||||
ACTIVE, // 4
|
||||
UPLOADING, // 1
|
||||
DOWNLOAD, // 2
|
||||
ACTIVE, // 3
|
||||
COUNT // must be the last one
|
||||
};
|
||||
|
||||
|
|
|
@ -435,7 +435,7 @@ struct ClientLibManagementWorkload : public TestWorkload {
|
|||
metadataJson[CLIENTLIB_ATTR_GIT_HASH] = randomHexadecimalStr(40);
|
||||
metadataJson[CLIENTLIB_ATTR_TYPE] = "debug";
|
||||
metadataJson[CLIENTLIB_ATTR_CHECKSUM] = randomHexadecimalStr(32);
|
||||
metadataJson[CLIENTLIB_ATTR_STATUS] = getStatusName(ClientLibStatus::AVAILABLE);
|
||||
metadataJson[CLIENTLIB_ATTR_STATUS] = getStatusName(ClientLibStatus::DOWNLOAD);
|
||||
metadataJson[CLIENTLIB_ATTR_API_VERSION] = 710;
|
||||
metadataJson[CLIENTLIB_ATTR_PROTOCOL] = "fdb00b07001001";
|
||||
metadataJson[CLIENTLIB_ATTR_CHECKSUM_ALG] = "md5";
|
||||
|
|
Loading…
Reference in New Issue