Support MinCount for AddNodes.
This commit is contained in:
@@ -87,6 +87,42 @@ EHPCClient::AddContainerAppOutcomeCallable EHPCClient::addContainerAppCallable(c
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EHPCClient::AddExistedNodesOutcome EHPCClient::addExistedNodes(const AddExistedNodesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return AddExistedNodesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return AddExistedNodesOutcome(AddExistedNodesResult(outcome.result()));
|
||||
else
|
||||
return AddExistedNodesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EHPCClient::addExistedNodesAsync(const AddExistedNodesRequest& request, const AddExistedNodesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, addExistedNodes(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EHPCClient::AddExistedNodesOutcomeCallable EHPCClient::addExistedNodesCallable(const AddExistedNodesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<AddExistedNodesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->addExistedNodes(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EHPCClient::AddLocalNodesOutcome EHPCClient::addLocalNodes(const AddLocalNodesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1455,6 +1491,42 @@ EHPCClient::DescribePriceOutcomeCallable EHPCClient::describePriceCallable(const
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EHPCClient::EcdDeleteDesktopsOutcome EHPCClient::ecdDeleteDesktops(const EcdDeleteDesktopsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return EcdDeleteDesktopsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return EcdDeleteDesktopsOutcome(EcdDeleteDesktopsResult(outcome.result()));
|
||||
else
|
||||
return EcdDeleteDesktopsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EHPCClient::ecdDeleteDesktopsAsync(const EcdDeleteDesktopsRequest& request, const EcdDeleteDesktopsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, ecdDeleteDesktops(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EHPCClient::EcdDeleteDesktopsOutcomeCallable EHPCClient::ecdDeleteDesktopsCallable(const EcdDeleteDesktopsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<EcdDeleteDesktopsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->ecdDeleteDesktops(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EHPCClient::EditJobTemplateOutcome EHPCClient::editJobTemplate(const EditJobTemplateRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
110
ehpc/src/model/AddExistedNodesRequest.cc
Normal file
110
ehpc/src/model/AddExistedNodesRequest.cc
Normal file
@@ -0,0 +1,110 @@
|
||||
/*
|
||||
* 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/AddExistedNodesRequest.h>
|
||||
|
||||
using AlibabaCloud::EHPC::Model::AddExistedNodesRequest;
|
||||
|
||||
AddExistedNodesRequest::AddExistedNodesRequest() :
|
||||
RpcServiceRequest("ehpc", "2018-04-12", "AddExistedNodes")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
AddExistedNodesRequest::~AddExistedNodesRequest()
|
||||
{}
|
||||
|
||||
std::string AddExistedNodesRequest::getImageId()const
|
||||
{
|
||||
return imageId_;
|
||||
}
|
||||
|
||||
void AddExistedNodesRequest::setImageId(const std::string& imageId)
|
||||
{
|
||||
imageId_ = imageId;
|
||||
setParameter("ImageId", imageId);
|
||||
}
|
||||
|
||||
std::vector<AddExistedNodesRequest::Instance> AddExistedNodesRequest::getInstance()const
|
||||
{
|
||||
return instance_;
|
||||
}
|
||||
|
||||
void AddExistedNodesRequest::setInstance(const std::vector<Instance>& instance)
|
||||
{
|
||||
instance_ = instance;
|
||||
for(int dep1 = 0; dep1!= instance.size(); dep1++) {
|
||||
auto instanceObj = instance.at(dep1);
|
||||
std::string instanceObjStr = "Instance." + std::to_string(dep1 + 1);
|
||||
setParameter(instanceObjStr + ".Id", instanceObj.id);
|
||||
}
|
||||
}
|
||||
|
||||
std::string AddExistedNodesRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void AddExistedNodesRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string AddExistedNodesRequest::getClusterId()const
|
||||
{
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void AddExistedNodesRequest::setClusterId(const std::string& clusterId)
|
||||
{
|
||||
clusterId_ = clusterId;
|
||||
setParameter("ClusterId", clusterId);
|
||||
}
|
||||
|
||||
std::string AddExistedNodesRequest::getJobQueue()const
|
||||
{
|
||||
return jobQueue_;
|
||||
}
|
||||
|
||||
void AddExistedNodesRequest::setJobQueue(const std::string& jobQueue)
|
||||
{
|
||||
jobQueue_ = jobQueue;
|
||||
setParameter("JobQueue", jobQueue);
|
||||
}
|
||||
|
||||
std::string AddExistedNodesRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void AddExistedNodesRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string AddExistedNodesRequest::getImageOwnerAlias()const
|
||||
{
|
||||
return imageOwnerAlias_;
|
||||
}
|
||||
|
||||
void AddExistedNodesRequest::setImageOwnerAlias(const std::string& imageOwnerAlias)
|
||||
{
|
||||
imageOwnerAlias_ = imageOwnerAlias;
|
||||
setParameter("ImageOwnerAlias", imageOwnerAlias);
|
||||
}
|
||||
|
||||
51
ehpc/src/model/AddExistedNodesResult.cc
Normal file
51
ehpc/src/model/AddExistedNodesResult.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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/AddExistedNodesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::EHPC;
|
||||
using namespace AlibabaCloud::EHPC::Model;
|
||||
|
||||
AddExistedNodesResult::AddExistedNodesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
AddExistedNodesResult::AddExistedNodesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
AddExistedNodesResult::~AddExistedNodesResult()
|
||||
{}
|
||||
|
||||
void AddExistedNodesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["TaskId"].isNull())
|
||||
taskId_ = value["TaskId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string AddExistedNodesResult::getTaskId()const
|
||||
{
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
@@ -126,6 +126,17 @@ void AddNodesRequest::setSystemDiskType(const std::string& systemDiskType)
|
||||
setParameter("SystemDiskType", systemDiskType);
|
||||
}
|
||||
|
||||
int AddNodesRequest::getMinCount()const
|
||||
{
|
||||
return minCount_;
|
||||
}
|
||||
|
||||
void AddNodesRequest::setMinCount(int minCount)
|
||||
{
|
||||
minCount_ = minCount;
|
||||
setParameter("MinCount", std::to_string(minCount));
|
||||
}
|
||||
|
||||
int AddNodesRequest::getSystemDiskSize()const
|
||||
{
|
||||
return systemDiskSize_;
|
||||
|
||||
@@ -521,6 +521,17 @@ void CreateClusterRequest::setOsTag(const std::string& osTag)
|
||||
setParameter("OsTag", osTag);
|
||||
}
|
||||
|
||||
bool CreateClusterRequest::getIsComputeEss()const
|
||||
{
|
||||
return isComputeEss_;
|
||||
}
|
||||
|
||||
void CreateClusterRequest::setIsComputeEss(bool isComputeEss)
|
||||
{
|
||||
isComputeEss_ = isComputeEss;
|
||||
setParameter("IsComputeEss", isComputeEss ? "true" : "false");
|
||||
}
|
||||
|
||||
std::vector<CreateClusterRequest::Application> CreateClusterRequest::getApplication()const
|
||||
{
|
||||
return application_;
|
||||
|
||||
@@ -38,6 +38,17 @@ void CreateHybridClusterRequest::setKeyPairName(const std::string& keyPairName)
|
||||
setParameter("KeyPairName", keyPairName);
|
||||
}
|
||||
|
||||
bool CreateHybridClusterRequest::getMultiOs()const
|
||||
{
|
||||
return multiOs_;
|
||||
}
|
||||
|
||||
void CreateHybridClusterRequest::setMultiOs(bool multiOs)
|
||||
{
|
||||
multiOs_ = multiOs;
|
||||
setParameter("MultiOs", multiOs ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string CreateHybridClusterRequest::getSecurityGroupName()const
|
||||
{
|
||||
return securityGroupName_;
|
||||
|
||||
@@ -38,6 +38,17 @@ void CreateJobTemplateRequest::setStderrRedirectPath(const std::string& stderrRe
|
||||
setParameter("StderrRedirectPath", stderrRedirectPath);
|
||||
}
|
||||
|
||||
std::string CreateJobTemplateRequest::getClockTime()const
|
||||
{
|
||||
return clockTime_;
|
||||
}
|
||||
|
||||
void CreateJobTemplateRequest::setClockTime(const std::string& clockTime)
|
||||
{
|
||||
clockTime_ = clockTime;
|
||||
setParameter("ClockTime", clockTime);
|
||||
}
|
||||
|
||||
std::string CreateJobTemplateRequest::getCommandLine()const
|
||||
{
|
||||
return commandLine_;
|
||||
@@ -82,6 +93,17 @@ void CreateJobTemplateRequest::setPackagePath(const std::string& packagePath)
|
||||
setParameter("PackagePath", packagePath);
|
||||
}
|
||||
|
||||
std::string CreateJobTemplateRequest::getMem()const
|
||||
{
|
||||
return mem_;
|
||||
}
|
||||
|
||||
void CreateJobTemplateRequest::setMem(const std::string& mem)
|
||||
{
|
||||
mem_ = mem;
|
||||
setParameter("Mem", mem);
|
||||
}
|
||||
|
||||
std::string CreateJobTemplateRequest::getStdoutRedirectPath()const
|
||||
{
|
||||
return stdoutRedirectPath_;
|
||||
@@ -126,6 +148,17 @@ void CreateJobTemplateRequest::setReRunable(bool reRunable)
|
||||
setParameter("ReRunable", reRunable ? "true" : "false");
|
||||
}
|
||||
|
||||
int CreateJobTemplateRequest::getThread()const
|
||||
{
|
||||
return thread_;
|
||||
}
|
||||
|
||||
void CreateJobTemplateRequest::setThread(int thread)
|
||||
{
|
||||
thread_ = thread;
|
||||
setParameter("Thread", std::to_string(thread));
|
||||
}
|
||||
|
||||
int CreateJobTemplateRequest::getPriority()const
|
||||
{
|
||||
return priority_;
|
||||
@@ -137,6 +170,39 @@ void CreateJobTemplateRequest::setPriority(int priority)
|
||||
setParameter("Priority", std::to_string(priority));
|
||||
}
|
||||
|
||||
int CreateJobTemplateRequest::getGpu()const
|
||||
{
|
||||
return gpu_;
|
||||
}
|
||||
|
||||
void CreateJobTemplateRequest::setGpu(int gpu)
|
||||
{
|
||||
gpu_ = gpu;
|
||||
setParameter("Gpu", std::to_string(gpu));
|
||||
}
|
||||
|
||||
int CreateJobTemplateRequest::getNode()const
|
||||
{
|
||||
return node_;
|
||||
}
|
||||
|
||||
void CreateJobTemplateRequest::setNode(int node)
|
||||
{
|
||||
node_ = node;
|
||||
setParameter("Node", std::to_string(node));
|
||||
}
|
||||
|
||||
int CreateJobTemplateRequest::getTask()const
|
||||
{
|
||||
return task_;
|
||||
}
|
||||
|
||||
void CreateJobTemplateRequest::setTask(int task)
|
||||
{
|
||||
task_ = task;
|
||||
setParameter("Task", std::to_string(task));
|
||||
}
|
||||
|
||||
std::string CreateJobTemplateRequest::getName()const
|
||||
{
|
||||
return name_;
|
||||
@@ -148,3 +214,14 @@ void CreateJobTemplateRequest::setName(const std::string& name)
|
||||
setParameter("Name", name);
|
||||
}
|
||||
|
||||
std::string CreateJobTemplateRequest::getQueue()const
|
||||
{
|
||||
return queue_;
|
||||
}
|
||||
|
||||
void CreateJobTemplateRequest::setQueue(const std::string& queue)
|
||||
{
|
||||
queue_ = queue;
|
||||
setParameter("Queue", queue);
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ void DescribePriceRequest::setCommodities(const std::vector<Commodities>& commod
|
||||
setParameter(commoditiesObjStr + ".NodeType", commoditiesObj.nodeType);
|
||||
setParameter(commoditiesObjStr + ".SystemDiskCategory", commoditiesObj.systemDiskCategory);
|
||||
setParameter(commoditiesObjStr + ".InternetChargeType", commoditiesObj.internetChargeType);
|
||||
setParameter(commoditiesObjStr + ".SystemDiskPerformanceLevel", commoditiesObj.systemDiskPerformanceLevel);
|
||||
setParameter(commoditiesObjStr + ".SystemDiskSize", std::to_string(commoditiesObj.systemDiskSize));
|
||||
setParameter(commoditiesObjStr + ".InternetMaxBandWidthOut", std::to_string(commoditiesObj.internetMaxBandWidthOut));
|
||||
setParameter(commoditiesObjStr + ".InstanceType", commoditiesObj.instanceType);
|
||||
|
||||
53
ehpc/src/model/EcdDeleteDesktopsRequest.cc
Normal file
53
ehpc/src/model/EcdDeleteDesktopsRequest.cc
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* 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/EcdDeleteDesktopsRequest.h>
|
||||
|
||||
using AlibabaCloud::EHPC::Model::EcdDeleteDesktopsRequest;
|
||||
|
||||
EcdDeleteDesktopsRequest::EcdDeleteDesktopsRequest() :
|
||||
RpcServiceRequest("ehpc", "2018-04-12", "EcdDeleteDesktops")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
EcdDeleteDesktopsRequest::~EcdDeleteDesktopsRequest()
|
||||
{}
|
||||
|
||||
std::string EcdDeleteDesktopsRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void EcdDeleteDesktopsRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::vector<std::string> EcdDeleteDesktopsRequest::getDesktopId()const
|
||||
{
|
||||
return desktopId_;
|
||||
}
|
||||
|
||||
void EcdDeleteDesktopsRequest::setDesktopId(const std::vector<std::string>& desktopId)
|
||||
{
|
||||
desktopId_ = desktopId;
|
||||
for(int dep1 = 0; dep1!= desktopId.size(); dep1++) {
|
||||
setParameter("DesktopId."+ std::to_string(dep1), desktopId.at(dep1));
|
||||
}
|
||||
}
|
||||
|
||||
44
ehpc/src/model/EcdDeleteDesktopsResult.cc
Normal file
44
ehpc/src/model/EcdDeleteDesktopsResult.cc
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* 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/EcdDeleteDesktopsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::EHPC;
|
||||
using namespace AlibabaCloud::EHPC::Model;
|
||||
|
||||
EcdDeleteDesktopsResult::EcdDeleteDesktopsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
EcdDeleteDesktopsResult::EcdDeleteDesktopsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
EcdDeleteDesktopsResult::~EcdDeleteDesktopsResult()
|
||||
{}
|
||||
|
||||
void EcdDeleteDesktopsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -38,6 +38,17 @@ void EditJobTemplateRequest::setStderrRedirectPath(const std::string& stderrRedi
|
||||
setParameter("StderrRedirectPath", stderrRedirectPath);
|
||||
}
|
||||
|
||||
std::string EditJobTemplateRequest::getClockTime()const
|
||||
{
|
||||
return clockTime_;
|
||||
}
|
||||
|
||||
void EditJobTemplateRequest::setClockTime(const std::string& clockTime)
|
||||
{
|
||||
clockTime_ = clockTime;
|
||||
setParameter("ClockTime", clockTime);
|
||||
}
|
||||
|
||||
std::string EditJobTemplateRequest::getCommandLine()const
|
||||
{
|
||||
return commandLine_;
|
||||
@@ -82,6 +93,17 @@ void EditJobTemplateRequest::setPackagePath(const std::string& packagePath)
|
||||
setParameter("PackagePath", packagePath);
|
||||
}
|
||||
|
||||
std::string EditJobTemplateRequest::getMem()const
|
||||
{
|
||||
return mem_;
|
||||
}
|
||||
|
||||
void EditJobTemplateRequest::setMem(const std::string& mem)
|
||||
{
|
||||
mem_ = mem;
|
||||
setParameter("Mem", mem);
|
||||
}
|
||||
|
||||
std::string EditJobTemplateRequest::getStdoutRedirectPath()const
|
||||
{
|
||||
return stdoutRedirectPath_;
|
||||
@@ -126,6 +148,17 @@ void EditJobTemplateRequest::setReRunable(bool reRunable)
|
||||
setParameter("ReRunable", reRunable ? "true" : "false");
|
||||
}
|
||||
|
||||
int EditJobTemplateRequest::getThread()const
|
||||
{
|
||||
return thread_;
|
||||
}
|
||||
|
||||
void EditJobTemplateRequest::setThread(int thread)
|
||||
{
|
||||
thread_ = thread;
|
||||
setParameter("Thread", std::to_string(thread));
|
||||
}
|
||||
|
||||
std::string EditJobTemplateRequest::getTemplateId()const
|
||||
{
|
||||
return templateId_;
|
||||
@@ -148,6 +181,39 @@ void EditJobTemplateRequest::setPriority(int priority)
|
||||
setParameter("Priority", std::to_string(priority));
|
||||
}
|
||||
|
||||
int EditJobTemplateRequest::getGpu()const
|
||||
{
|
||||
return gpu_;
|
||||
}
|
||||
|
||||
void EditJobTemplateRequest::setGpu(int gpu)
|
||||
{
|
||||
gpu_ = gpu;
|
||||
setParameter("Gpu", std::to_string(gpu));
|
||||
}
|
||||
|
||||
int EditJobTemplateRequest::getNode()const
|
||||
{
|
||||
return node_;
|
||||
}
|
||||
|
||||
void EditJobTemplateRequest::setNode(int node)
|
||||
{
|
||||
node_ = node;
|
||||
setParameter("Node", std::to_string(node));
|
||||
}
|
||||
|
||||
int EditJobTemplateRequest::getTask()const
|
||||
{
|
||||
return task_;
|
||||
}
|
||||
|
||||
void EditJobTemplateRequest::setTask(int task)
|
||||
{
|
||||
task_ = task;
|
||||
setParameter("Task", std::to_string(task));
|
||||
}
|
||||
|
||||
std::string EditJobTemplateRequest::getName()const
|
||||
{
|
||||
return name_;
|
||||
@@ -159,3 +225,14 @@ void EditJobTemplateRequest::setName(const std::string& name)
|
||||
setParameter("Name", name);
|
||||
}
|
||||
|
||||
std::string EditJobTemplateRequest::getQueue()const
|
||||
{
|
||||
return queue_;
|
||||
}
|
||||
|
||||
void EditJobTemplateRequest::setQueue(const std::string& queue)
|
||||
{
|
||||
queue_ = queue;
|
||||
setParameter("Queue", queue);
|
||||
}
|
||||
|
||||
|
||||
@@ -65,6 +65,8 @@ void ListClustersMetaResult::parse(const std::string &payload)
|
||||
clustersObject.vpcId = valueClustersClusterInfoSimple["VpcId"].asString();
|
||||
if(!valueClustersClusterInfoSimple["DeployMode"].isNull())
|
||||
clustersObject.deployMode = valueClustersClusterInfoSimple["DeployMode"].asString();
|
||||
if(!valueClustersClusterInfoSimple["IsComputeEss"].isNull())
|
||||
clustersObject.isComputeEss = valueClustersClusterInfoSimple["IsComputeEss"].asString() == "true";
|
||||
clusters_.push_back(clustersObject);
|
||||
}
|
||||
if(!value["TotalCount"].isNull())
|
||||
|
||||
@@ -97,6 +97,8 @@ void ListClustersResult::parse(const std::string &payload)
|
||||
clustersObject.computeSpotPriceLimit = std::stof(valueClustersClusterInfoSimple["ComputeSpotPriceLimit"].asString());
|
||||
if(!valueClustersClusterInfoSimple["ClientVersion"].isNull())
|
||||
clustersObject.clientVersion = valueClustersClusterInfoSimple["ClientVersion"].asString();
|
||||
if(!valueClustersClusterInfoSimple["IsComputeEss"].isNull())
|
||||
clustersObject.isComputeEss = valueClustersClusterInfoSimple["IsComputeEss"].asString() == "true";
|
||||
auto managersNode = value["Managers"];
|
||||
if(!managersNode["Total"].isNull())
|
||||
clustersObject.managers.total = std::stoi(managersNode["Total"].asString());
|
||||
|
||||
@@ -27,6 +27,17 @@ ListCustomImagesRequest::ListCustomImagesRequest() :
|
||||
ListCustomImagesRequest::~ListCustomImagesRequest()
|
||||
{}
|
||||
|
||||
std::string ListCustomImagesRequest::getClusterId()const
|
||||
{
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void ListCustomImagesRequest::setClusterId(const std::string& clusterId)
|
||||
{
|
||||
clusterId_ = clusterId;
|
||||
setParameter("ClusterId", clusterId);
|
||||
}
|
||||
|
||||
std::string ListCustomImagesRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
|
||||
@@ -65,6 +65,20 @@ void ListJobTemplatesResult::parse(const std::string &payload)
|
||||
templatesObject.arrayRequest = valueTemplatesJobTemplates["ArrayRequest"].asString();
|
||||
if(!valueTemplatesJobTemplates["Variables"].isNull())
|
||||
templatesObject.variables = valueTemplatesJobTemplates["Variables"].asString();
|
||||
if(!valueTemplatesJobTemplates["Queue"].isNull())
|
||||
templatesObject.queue = valueTemplatesJobTemplates["Queue"].asString();
|
||||
if(!valueTemplatesJobTemplates["ClockTime"].isNull())
|
||||
templatesObject.clockTime = valueTemplatesJobTemplates["ClockTime"].asString();
|
||||
if(!valueTemplatesJobTemplates["Node"].isNull())
|
||||
templatesObject.node = std::stoi(valueTemplatesJobTemplates["Node"].asString());
|
||||
if(!valueTemplatesJobTemplates["Task"].isNull())
|
||||
templatesObject.task = std::stoi(valueTemplatesJobTemplates["Task"].asString());
|
||||
if(!valueTemplatesJobTemplates["Thread"].isNull())
|
||||
templatesObject.thread = std::stoi(valueTemplatesJobTemplates["Thread"].asString());
|
||||
if(!valueTemplatesJobTemplates["Mem"].isNull())
|
||||
templatesObject.mem = valueTemplatesJobTemplates["Mem"].asString();
|
||||
if(!valueTemplatesJobTemplates["Gpu"].isNull())
|
||||
templatesObject.gpu = std::stoi(valueTemplatesJobTemplates["Gpu"].asString());
|
||||
templates_.push_back(templatesObject);
|
||||
}
|
||||
if(!value["TotalCount"].isNull())
|
||||
|
||||
@@ -38,17 +38,6 @@ void ListNodesRequest::setRole(const std::string& role)
|
||||
setParameter("Role", role);
|
||||
}
|
||||
|
||||
std::string ListNodesRequest::getClusterId()const
|
||||
{
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void ListNodesRequest::setClusterId(const std::string& clusterId)
|
||||
{
|
||||
clusterId_ = clusterId;
|
||||
setParameter("ClusterId", clusterId);
|
||||
}
|
||||
|
||||
int ListNodesRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
@@ -71,6 +60,61 @@ void ListNodesRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string ListNodesRequest::getHostName()const
|
||||
{
|
||||
return hostName_;
|
||||
}
|
||||
|
||||
void ListNodesRequest::setHostName(const std::string& hostName)
|
||||
{
|
||||
hostName_ = hostName;
|
||||
setParameter("HostName", hostName);
|
||||
}
|
||||
|
||||
int ListNodesRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListNodesRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string ListNodesRequest::getHostNamePrefix()const
|
||||
{
|
||||
return hostNamePrefix_;
|
||||
}
|
||||
|
||||
void ListNodesRequest::setHostNamePrefix(const std::string& hostNamePrefix)
|
||||
{
|
||||
hostNamePrefix_ = hostNamePrefix;
|
||||
setParameter("HostNamePrefix", hostNamePrefix);
|
||||
}
|
||||
|
||||
std::string ListNodesRequest::getClusterId()const
|
||||
{
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void ListNodesRequest::setClusterId(const std::string& clusterId)
|
||||
{
|
||||
clusterId_ = clusterId;
|
||||
setParameter("ClusterId", clusterId);
|
||||
}
|
||||
|
||||
std::string ListNodesRequest::getHostNameSuffix()const
|
||||
{
|
||||
return hostNameSuffix_;
|
||||
}
|
||||
|
||||
void ListNodesRequest::setHostNameSuffix(const std::string& hostNameSuffix)
|
||||
{
|
||||
hostNameSuffix_ = hostNameSuffix;
|
||||
setParameter("HostNameSuffix", hostNameSuffix);
|
||||
}
|
||||
|
||||
std::string ListNodesRequest::getFilter()const
|
||||
{
|
||||
return filter_;
|
||||
@@ -104,28 +148,6 @@ void ListNodesRequest::setSequence(const std::string& sequence)
|
||||
setParameter("Sequence", sequence);
|
||||
}
|
||||
|
||||
std::string ListNodesRequest::getHostName()const
|
||||
{
|
||||
return hostName_;
|
||||
}
|
||||
|
||||
void ListNodesRequest::setHostName(const std::string& hostName)
|
||||
{
|
||||
hostName_ = hostName;
|
||||
setParameter("HostName", hostName);
|
||||
}
|
||||
|
||||
int ListNodesRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListNodesRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string ListNodesRequest::getSortBy()const
|
||||
{
|
||||
return sortBy_;
|
||||
|
||||
@@ -49,8 +49,29 @@ void ListQueuesResult::parse(const std::string &payload)
|
||||
queuesObject.type = valueQueuesQueueInfo["Type"].asString();
|
||||
if(!valueQueuesQueueInfo["ResourceGroupId"].isNull())
|
||||
queuesObject.resourceGroupId = valueQueuesQueueInfo["ResourceGroupId"].asString();
|
||||
if(!valueQueuesQueueInfo["ComputeInstanceType"].isNull())
|
||||
queuesObject.computeInstanceType = valueQueuesQueueInfo["ComputeInstanceType"].asString();
|
||||
if(!valueQueuesQueueInfo["HostNamePrefix"].isNull())
|
||||
queuesObject.hostNamePrefix = valueQueuesQueueInfo["HostNamePrefix"].asString();
|
||||
if(!valueQueuesQueueInfo["HostNameSuffix"].isNull())
|
||||
queuesObject.hostNameSuffix = valueQueuesQueueInfo["HostNameSuffix"].asString();
|
||||
if(!valueQueuesQueueInfo["SpotStrategy"].isNull())
|
||||
queuesObject.spotStrategy = valueQueuesQueueInfo["SpotStrategy"].asString();
|
||||
if(!valueQueuesQueueInfo["ImageId"].isNull())
|
||||
queuesObject.imageId = valueQueuesQueueInfo["ImageId"].asString();
|
||||
if(!valueQueuesQueueInfo["EnableAutoGrow"].isNull())
|
||||
queuesObject.enableAutoGrow = valueQueuesQueueInfo["EnableAutoGrow"].asString() == "true";
|
||||
auto allSpotInstanceTypesNode = valueQueuesQueueInfo["SpotInstanceTypes"]["Instance"];
|
||||
for (auto valueQueuesQueueInfoSpotInstanceTypesInstance : allSpotInstanceTypesNode)
|
||||
{
|
||||
QueueInfo::Instance spotInstanceTypesObject;
|
||||
if(!valueQueuesQueueInfoSpotInstanceTypesInstance["InstanceType"].isNull())
|
||||
spotInstanceTypesObject.instanceType = valueQueuesQueueInfoSpotInstanceTypesInstance["InstanceType"].asString();
|
||||
if(!valueQueuesQueueInfoSpotInstanceTypesInstance["SpotPriceLimit"].isNull())
|
||||
spotInstanceTypesObject.spotPriceLimit = std::stof(valueQueuesQueueInfoSpotInstanceTypesInstance["SpotPriceLimit"].asString());
|
||||
queuesObject.spotInstanceTypes.push_back(spotInstanceTypesObject);
|
||||
}
|
||||
auto allComputeInstanceType = value["ComputeInstanceType"]["InstanceType"];
|
||||
for (auto value : allComputeInstanceType)
|
||||
queuesObject.computeInstanceType.push_back(value.asString());
|
||||
queues_.push_back(queuesObject);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user