由荣旸发起的TESLAMAXCOMPUTE SDK自动发布, BUILD_ID=325, 版本号:1.2.8

Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
This commit is contained in:
haowei.yao
2018-03-13 11:25:52 +08:00
parent f725320265
commit 6b7af1732d
4 changed files with 66 additions and 25 deletions

View File

@@ -1,3 +1,6 @@
2018-03-13 Version: 1.2.8
1, API GetQuotaHistoryInfo fix field error.
2018-03-07 Version: 1.2.7 2018-03-07 Version: 1.2.7
1, add GetAlbumsByNames 1, add GetAlbumsByNames
2, add ListEvent/CreateEvent/EditEvent/DeleteEvent/GetEvent 2, add ListEvent/CreateEvent/EditEvent/DeleteEvent/GetEvent

View File

@@ -1 +1 @@
1.2.7 1.2.8

View File

@@ -38,31 +38,45 @@ namespace AlibabaCloud
{ {
struct CpuMaxQuota struct CpuMaxQuota
{ {
int min; float min;
int avg; float avg;
int max; float max;
}; };
struct CpuMinQuota struct CpuMinQuota
{ {
int min; float min;
int avg; float avg;
int max; float max;
}; };
struct MemUsed struct MemUsed
{ {
int min; float min;
int avg; float avg;
int max; float max;
}; };
struct CpuUsed struct CpuUsed
{ {
int min; float min;
int avg; float avg;
int max; float max;
};
struct MemMaxQuota
{
float min;
float avg;
float max;
};
struct MemMinQuota
{
float min;
float avg;
float max;
}; };
std::vector<CpuMinQuota> cpuMinQuota; std::vector<CpuMinQuota> cpuMinQuota;
std::vector<MemUsed> memUsed; std::vector<MemUsed> memUsed;
std::vector<MemMaxQuota> memMaxQuota;
std::vector<CpuMaxQuota> cpuMaxQuota; std::vector<CpuMaxQuota> cpuMaxQuota;
std::vector<MemMinQuota> memMinQuota;
std::vector<CpuUsed> cpuUsed; std::vector<CpuUsed> cpuUsed;
}; };
int times; int times;

View File

@@ -55,11 +55,11 @@ void GetQuotaHistoryInfoResult::parse(const std::string &payload)
{ {
DataItem::Point::CpuMaxQuota cpuMaxQuotaObject; DataItem::Point::CpuMaxQuota cpuMaxQuotaObject;
if(!value["Min"].isNull()) if(!value["Min"].isNull())
cpuMaxQuotaObject.min = std::stoi(value["Min"].asString()); cpuMaxQuotaObject.min = std::stof(value["Min"].asString());
if(!value["Max"].isNull()) if(!value["Max"].isNull())
cpuMaxQuotaObject.max = std::stoi(value["Max"].asString()); cpuMaxQuotaObject.max = std::stof(value["Max"].asString());
if(!value["Avg"].isNull()) if(!value["Avg"].isNull())
cpuMaxQuotaObject.avg = std::stoi(value["Avg"].asString()); cpuMaxQuotaObject.avg = std::stof(value["Avg"].asString());
pointObject.cpuMaxQuota.push_back(cpuMaxQuotaObject); pointObject.cpuMaxQuota.push_back(cpuMaxQuotaObject);
} }
auto allCpuMinQuota = value["CpuMinQuota"]; auto allCpuMinQuota = value["CpuMinQuota"];
@@ -67,11 +67,11 @@ void GetQuotaHistoryInfoResult::parse(const std::string &payload)
{ {
DataItem::Point::CpuMinQuota cpuMinQuotaObject; DataItem::Point::CpuMinQuota cpuMinQuotaObject;
if(!value["Min"].isNull()) if(!value["Min"].isNull())
cpuMinQuotaObject.min = std::stoi(value["Min"].asString()); cpuMinQuotaObject.min = std::stof(value["Min"].asString());
if(!value["Max"].isNull()) if(!value["Max"].isNull())
cpuMinQuotaObject.max = std::stoi(value["Max"].asString()); cpuMinQuotaObject.max = std::stof(value["Max"].asString());
if(!value["Avg"].isNull()) if(!value["Avg"].isNull())
cpuMinQuotaObject.avg = std::stoi(value["Avg"].asString()); cpuMinQuotaObject.avg = std::stof(value["Avg"].asString());
pointObject.cpuMinQuota.push_back(cpuMinQuotaObject); pointObject.cpuMinQuota.push_back(cpuMinQuotaObject);
} }
auto allMemUsed = value["MemUsed"]; auto allMemUsed = value["MemUsed"];
@@ -79,11 +79,11 @@ void GetQuotaHistoryInfoResult::parse(const std::string &payload)
{ {
DataItem::Point::MemUsed memUsedObject; DataItem::Point::MemUsed memUsedObject;
if(!value["Min"].isNull()) if(!value["Min"].isNull())
memUsedObject.min = std::stoi(value["Min"].asString()); memUsedObject.min = std::stof(value["Min"].asString());
if(!value["Max"].isNull()) if(!value["Max"].isNull())
memUsedObject.max = std::stoi(value["Max"].asString()); memUsedObject.max = std::stof(value["Max"].asString());
if(!value["Avg"].isNull()) if(!value["Avg"].isNull())
memUsedObject.avg = std::stoi(value["Avg"].asString()); memUsedObject.avg = std::stof(value["Avg"].asString());
pointObject.memUsed.push_back(memUsedObject); pointObject.memUsed.push_back(memUsedObject);
} }
auto allCpuUsed = value["CpuUsed"]; auto allCpuUsed = value["CpuUsed"];
@@ -91,13 +91,37 @@ void GetQuotaHistoryInfoResult::parse(const std::string &payload)
{ {
DataItem::Point::CpuUsed cpuUsedObject; DataItem::Point::CpuUsed cpuUsedObject;
if(!value["Min"].isNull()) if(!value["Min"].isNull())
cpuUsedObject.min = std::stoi(value["Min"].asString()); cpuUsedObject.min = std::stof(value["Min"].asString());
if(!value["Max"].isNull()) if(!value["Max"].isNull())
cpuUsedObject.max = std::stoi(value["Max"].asString()); cpuUsedObject.max = std::stof(value["Max"].asString());
if(!value["Avg"].isNull()) if(!value["Avg"].isNull())
cpuUsedObject.avg = std::stoi(value["Avg"].asString()); cpuUsedObject.avg = std::stof(value["Avg"].asString());
pointObject.cpuUsed.push_back(cpuUsedObject); pointObject.cpuUsed.push_back(cpuUsedObject);
} }
auto allMemMaxQuota = value["MemMaxQuota"];
for (auto value : allMemMaxQuota)
{
DataItem::Point::MemMaxQuota memMaxQuotaObject;
if(!value["Min"].isNull())
memMaxQuotaObject.min = std::stof(value["Min"].asString());
if(!value["Max"].isNull())
memMaxQuotaObject.max = std::stof(value["Max"].asString());
if(!value["Avg"].isNull())
memMaxQuotaObject.avg = std::stof(value["Avg"].asString());
pointObject.memMaxQuota.push_back(memMaxQuotaObject);
}
auto allMemMinQuota = value["MemMinQuota"];
for (auto value : allMemMinQuota)
{
DataItem::Point::MemMinQuota memMinQuotaObject;
if(!value["Min"].isNull())
memMinQuotaObject.min = std::stof(value["Min"].asString());
if(!value["Max"].isNull())
memMinQuotaObject.max = std::stof(value["Max"].asString());
if(!value["Avg"].isNull())
memMinQuotaObject.avg = std::stof(value["Avg"].asString());
pointObject.memMinQuota.push_back(memMinQuotaObject);
}
dataObject.point.push_back(pointObject); dataObject.point.push_back(pointObject);
} }
data_.push_back(dataObject); data_.push_back(dataObject);