由荣旸发起的TESLAMAXCOMPUTE SDK自动发布, 版本号:1.8.2
Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
2018-05-08 Version: 1.8.2
|
||||
1, Add instance params.
|
||||
|
||||
2018-05-08 Version: 1.8.1
|
||||
1, Remove DescribeAccountAttributes.
|
||||
|
||||
|
||||
@@ -37,12 +37,18 @@ namespace AlibabaCloud
|
||||
|
||||
std::string getCluster()const;
|
||||
void setCluster(const std::string& cluster);
|
||||
std::string getQuotaId()const;
|
||||
void setQuotaId(const std::string& quotaId);
|
||||
std::string getRegion()const;
|
||||
void setRegion(const std::string& region);
|
||||
std::string getQuotaName()const;
|
||||
void setQuotaName(const std::string& quotaName);
|
||||
|
||||
private:
|
||||
std::string cluster_;
|
||||
std::string quotaId_;
|
||||
std::string region_;
|
||||
std::string quotaName_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -36,25 +36,29 @@ namespace AlibabaCloud
|
||||
{
|
||||
struct Instance
|
||||
{
|
||||
std::string status;
|
||||
int quotaId;
|
||||
float cpuUsedRatioMin;
|
||||
std::string runTime;
|
||||
std::string skynetId;
|
||||
long memRequest;
|
||||
std::string instanceId;
|
||||
std::string cluster;
|
||||
std::string user;
|
||||
std::string isRealOwner;
|
||||
float memUsedRatioMax;
|
||||
std::string nickName;
|
||||
long memUsedTotal;
|
||||
float cpuUsedRatioMax;
|
||||
std::string project;
|
||||
std::string quotaName;
|
||||
long memUsed;
|
||||
long cpuUsedTotal;
|
||||
std::string projectOwner;
|
||||
std::string taskType;
|
||||
float memUsedRatioMin;
|
||||
std::string collectTime;
|
||||
long cpuUsed;
|
||||
std::string status;
|
||||
long memRequest;
|
||||
std::string instanceId;
|
||||
std::string cluster;
|
||||
std::string nickName;
|
||||
std::string project;
|
||||
float memUsedRatioMin;
|
||||
std::string userAccount;
|
||||
long cpuRequest;
|
||||
};
|
||||
|
||||
@@ -36,6 +36,17 @@ void GetInstancesStatusCountRequest::setCluster(const std::string& cluster)
|
||||
setParameter("Cluster", cluster);
|
||||
}
|
||||
|
||||
std::string GetInstancesStatusCountRequest::getQuotaId()const
|
||||
{
|
||||
return quotaId_;
|
||||
}
|
||||
|
||||
void GetInstancesStatusCountRequest::setQuotaId(const std::string& quotaId)
|
||||
{
|
||||
quotaId_ = quotaId;
|
||||
setParameter("QuotaId", quotaId);
|
||||
}
|
||||
|
||||
std::string GetInstancesStatusCountRequest::getRegion()const
|
||||
{
|
||||
return region_;
|
||||
@@ -47,3 +58,14 @@ void GetInstancesStatusCountRequest::setRegion(const std::string& region)
|
||||
setParameter("Region", region);
|
||||
}
|
||||
|
||||
std::string GetInstancesStatusCountRequest::getQuotaName()const
|
||||
{
|
||||
return quotaName_;
|
||||
}
|
||||
|
||||
void GetInstancesStatusCountRequest::setQuotaName(const std::string& quotaName)
|
||||
{
|
||||
quotaName_ = quotaName;
|
||||
setParameter("QuotaName", quotaName);
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ void GetQuotaInstanceResult::parse(const std::string &payload)
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Total"].isNull())
|
||||
data_.total = std::stoi(dataNode["Total"].asString());
|
||||
auto allDetail = value["Detail"]["instance"];
|
||||
auto allDetail = value["Detail"]["Instance"];
|
||||
for (auto value : allDetail)
|
||||
{
|
||||
Data::Instance instanceObject;
|
||||
@@ -89,6 +89,14 @@ void GetQuotaInstanceResult::parse(const std::string &payload)
|
||||
instanceObject.quotaName = value["QuotaName"].asString();
|
||||
if(!value["QuotaId"].isNull())
|
||||
instanceObject.quotaId = std::stoi(value["QuotaId"].asString());
|
||||
if(!value["User"].isNull())
|
||||
instanceObject.user = value["User"].asString();
|
||||
if(!value["IsRealOwner"].isNull())
|
||||
instanceObject.isRealOwner = value["IsRealOwner"].asString();
|
||||
if(!value["ProjectOwner"].isNull())
|
||||
instanceObject.projectOwner = value["ProjectOwner"].asString();
|
||||
if(!value["CollectTime"].isNull())
|
||||
instanceObject.collectTime = value["CollectTime"].asString();
|
||||
data_.detail.push_back(instanceObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
|
||||
Reference in New Issue
Block a user