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:
@@ -91,6 +91,17 @@ void AddNodesRequest::setComputeSpotStrategy(const std::string& computeSpotStrat
|
||||
setParameter("ComputeSpotStrategy", computeSpotStrategy);
|
||||
}
|
||||
|
||||
std::string AddNodesRequest::getJobQueue()const
|
||||
{
|
||||
return jobQueue_;
|
||||
}
|
||||
|
||||
void AddNodesRequest::setJobQueue(const std::string& jobQueue)
|
||||
{
|
||||
jobQueue_ = jobQueue;
|
||||
setParameter("JobQueue", jobQueue);
|
||||
}
|
||||
|
||||
std::string AddNodesRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
|
||||
@@ -135,6 +135,17 @@ void CreateClusterRequest::setEcsOrderComputeInstanceType(const std::string& ecs
|
||||
setParameter("EcsOrderComputeInstanceType", ecsOrderComputeInstanceType);
|
||||
}
|
||||
|
||||
std::string CreateClusterRequest::getJobQueue()const
|
||||
{
|
||||
return jobQueue_;
|
||||
}
|
||||
|
||||
void CreateClusterRequest::setJobQueue(const std::string& jobQueue)
|
||||
{
|
||||
jobQueue_ = jobQueue;
|
||||
setParameter("JobQueue", jobQueue);
|
||||
}
|
||||
|
||||
std::string CreateClusterRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
|
||||
@@ -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_;
|
||||
|
||||
49
ehpc/src/model/ListQueuesRequest.cc
Normal file
49
ehpc/src/model/ListQueuesRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/ehpc/model/ListQueuesRequest.h>
|
||||
|
||||
using AlibabaCloud::EHPC::Model::ListQueuesRequest;
|
||||
|
||||
ListQueuesRequest::ListQueuesRequest() :
|
||||
RpcServiceRequest("ehpc", "2018-04-12", "ListQueues")
|
||||
{}
|
||||
|
||||
ListQueuesRequest::~ListQueuesRequest()
|
||||
{}
|
||||
|
||||
std::string ListQueuesRequest::getClusterId()const
|
||||
{
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void ListQueuesRequest::setClusterId(const std::string& clusterId)
|
||||
{
|
||||
clusterId_ = clusterId;
|
||||
setParameter("ClusterId", clusterId);
|
||||
}
|
||||
|
||||
std::string ListQueuesRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void ListQueuesRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
60
ehpc/src/model/ListQueuesResult.cc
Normal file
60
ehpc/src/model/ListQueuesResult.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/ehpc/model/ListQueuesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::EHPC;
|
||||
using namespace AlibabaCloud::EHPC::Model;
|
||||
|
||||
ListQueuesResult::ListQueuesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListQueuesResult::ListQueuesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListQueuesResult::~ListQueuesResult()
|
||||
{}
|
||||
|
||||
void ListQueuesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
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["Type"].isNull())
|
||||
queuesObject.type = value["Type"].asString();
|
||||
queues_.push_back(queuesObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<ListQueuesResult::QueueInfo> ListQueuesResult::getQueues()const
|
||||
{
|
||||
return queues_;
|
||||
}
|
||||
|
||||
@@ -69,15 +69,15 @@ void SetAutoScaleConfigRequest::setEnableAutoGrow(bool enableAutoGrow)
|
||||
setParameter("EnableAutoGrow", std::to_string(enableAutoGrow));
|
||||
}
|
||||
|
||||
std::string SetAutoScaleConfigRequest::getSpotPriceLimit()const
|
||||
float SetAutoScaleConfigRequest::getSpotPriceLimit()const
|
||||
{
|
||||
return spotPriceLimit_;
|
||||
}
|
||||
|
||||
void SetAutoScaleConfigRequest::setSpotPriceLimit(const std::string& spotPriceLimit)
|
||||
void SetAutoScaleConfigRequest::setSpotPriceLimit(float spotPriceLimit)
|
||||
{
|
||||
spotPriceLimit_ = spotPriceLimit;
|
||||
setParameter("SpotPriceLimit", spotPriceLimit);
|
||||
setParameter("SpotPriceLimit", std::to_string(spotPriceLimit));
|
||||
}
|
||||
|
||||
bool SetAutoScaleConfigRequest::getEnableAutoShrink()const
|
||||
@@ -146,6 +146,25 @@ void SetAutoScaleConfigRequest::setShrinkIntervalInMinutes(int shrinkIntervalInM
|
||||
setParameter("ShrinkIntervalInMinutes", std::to_string(shrinkIntervalInMinutes));
|
||||
}
|
||||
|
||||
std::vector<SetAutoScaleConfigRequest::Queues> SetAutoScaleConfigRequest::getQueues()const
|
||||
{
|
||||
return queues_;
|
||||
}
|
||||
|
||||
void SetAutoScaleConfigRequest::setQueues(const std::vector<Queues>& queues)
|
||||
{
|
||||
queues_ = queues;
|
||||
int i = 0;
|
||||
for(int i = 0; i!= queues.size(); i++) {
|
||||
auto obj = queues.at(i);
|
||||
std::string str ="Queues."+ std::to_string(i);
|
||||
setParameter(str + ".SpotStrategy", obj.spotStrategy);
|
||||
setParameter(str + ".QueueName", obj.queueName);
|
||||
setParameter(str + ".InstanceType", obj.instanceType);
|
||||
setParameter(str + ".SpotPriceLimit", std::to_string(obj.spotPriceLimit));
|
||||
}
|
||||
}
|
||||
|
||||
int SetAutoScaleConfigRequest::getExtraNodesGrowRatio()const
|
||||
{
|
||||
return extraNodesGrowRatio_;
|
||||
|
||||
@@ -124,6 +124,17 @@ void SubmitJobRequest::setCommandLine(const std::string& commandLine)
|
||||
setParameter("CommandLine", commandLine);
|
||||
}
|
||||
|
||||
std::string SubmitJobRequest::getJobQueue()const
|
||||
{
|
||||
return jobQueue_;
|
||||
}
|
||||
|
||||
void SubmitJobRequest::setJobQueue(const std::string& jobQueue)
|
||||
{
|
||||
jobQueue_ = jobQueue;
|
||||
setParameter("JobQueue", jobQueue);
|
||||
}
|
||||
|
||||
std::string SubmitJobRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
|
||||
Reference in New Issue
Block a user