EHPC SDK Auto Released By qianzheng.llc,Version:1.27.0
Signed-off-by: yixiong.jxy <yixiong.jxy@alibaba-inc.com>
This commit is contained in:
@@ -40,6 +40,20 @@ void GetAutoScaleConfigResult::parse(const std::string &payload)
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allQueues = value["Queues"]["QueueInfo"];
|
||||
for (auto value : allQueues)
|
||||
{
|
||||
QueueInfo queuesObject;
|
||||
if(!value["QueueName"].isNull())
|
||||
queuesObject.queueName = value["QueueName"].asString();
|
||||
if(!value["InstanceType"].isNull())
|
||||
queuesObject.instanceType = value["InstanceType"].asString();
|
||||
if(!value["SpotStrategy"].isNull())
|
||||
queuesObject.spotStrategy = value["SpotStrategy"].asString();
|
||||
if(!value["SpotPriceLimit"].isNull())
|
||||
queuesObject.spotPriceLimit = std::stof(value["SpotPriceLimit"].asString());
|
||||
queues_.push_back(queuesObject);
|
||||
}
|
||||
if(!value["Uid"].isNull())
|
||||
uid_ = value["Uid"].asString();
|
||||
if(!value["ClusterId"].isNull())
|
||||
@@ -69,7 +83,7 @@ void GetAutoScaleConfigResult::parse(const std::string &payload)
|
||||
if(!value["SpotStrategy"].isNull())
|
||||
spotStrategy_ = value["SpotStrategy"].asString();
|
||||
if(!value["SpotPriceLimit"].isNull())
|
||||
spotPriceLimit_ = value["SpotPriceLimit"].asString();
|
||||
spotPriceLimit_ = std::stof(value["SpotPriceLimit"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -133,11 +147,16 @@ int GetAutoScaleConfigResult::getShrinkIntervalInMinutes()const
|
||||
return shrinkIntervalInMinutes_;
|
||||
}
|
||||
|
||||
std::string GetAutoScaleConfigResult::getSpotPriceLimit()const
|
||||
float GetAutoScaleConfigResult::getSpotPriceLimit()const
|
||||
{
|
||||
return spotPriceLimit_;
|
||||
}
|
||||
|
||||
std::vector<GetAutoScaleConfigResult::QueueInfo> GetAutoScaleConfigResult::getQueues()const
|
||||
{
|
||||
return queues_;
|
||||
}
|
||||
|
||||
std::string GetAutoScaleConfigResult::getExcludeNodes()const
|
||||
{
|
||||
return excludeNodes_;
|
||||
|
||||
Reference in New Issue
Block a user