From b1800ef54d0b0ecd85f73ab08f27831670ce5302 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Wed, 7 Dec 2022 08:55:04 +0000 Subject: [PATCH] Support async parameter in Job APIs. --- VERSION | 2 +- .../ehpc/model/CreateJobFileRequest.h | 3 +++ .../ehpc/model/DeleteJobsRequest.h | 3 +++ .../alibabacloud/ehpc/model/RerunJobsRequest.h | 3 +++ .../alibabacloud/ehpc/model/StopJobsRequest.h | 3 +++ .../alibabacloud/ehpc/model/SubmitJobRequest.h | 6 ++++++ ehpc/src/model/CreateJobFileRequest.cc | 9 +++++++++ ehpc/src/model/DeleteJobsRequest.cc | 9 +++++++++ ehpc/src/model/RerunJobsRequest.cc | 9 +++++++++ ehpc/src/model/StopJobsRequest.cc | 9 +++++++++ ehpc/src/model/SubmitJobRequest.cc | 18 ++++++++++++++++++ 11 files changed, 73 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index a20878fa1..fb29fad68 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1377 \ No newline at end of file +1.36.1378 \ No newline at end of file diff --git a/ehpc/include/alibabacloud/ehpc/model/CreateJobFileRequest.h b/ehpc/include/alibabacloud/ehpc/model/CreateJobFileRequest.h index 9b86f8b48..dbacd4c3c 100644 --- a/ehpc/include/alibabacloud/ehpc/model/CreateJobFileRequest.h +++ b/ehpc/include/alibabacloud/ehpc/model/CreateJobFileRequest.h @@ -42,6 +42,8 @@ public: void setContent(const std::string &content); std::string getAccessKeyId() const; void setAccessKeyId(const std::string &accessKeyId); + bool getAsync() const; + void setAsync(bool async); private: std::string targetFile_; @@ -50,6 +52,7 @@ private: std::string clusterId_; std::string content_; std::string accessKeyId_; + bool async_; }; } // namespace Model } // namespace EHPC diff --git a/ehpc/include/alibabacloud/ehpc/model/DeleteJobsRequest.h b/ehpc/include/alibabacloud/ehpc/model/DeleteJobsRequest.h index f657d3495..939cb3c29 100644 --- a/ehpc/include/alibabacloud/ehpc/model/DeleteJobsRequest.h +++ b/ehpc/include/alibabacloud/ehpc/model/DeleteJobsRequest.h @@ -36,11 +36,14 @@ public: void setClusterId(const std::string &clusterId); std::string getAccessKeyId() const; void setAccessKeyId(const std::string &accessKeyId); + bool getAsync() const; + void setAsync(bool async); private: std::string jobs_; std::string clusterId_; std::string accessKeyId_; + bool async_; }; } // namespace Model } // namespace EHPC diff --git a/ehpc/include/alibabacloud/ehpc/model/RerunJobsRequest.h b/ehpc/include/alibabacloud/ehpc/model/RerunJobsRequest.h index 6701ffd80..350759510 100644 --- a/ehpc/include/alibabacloud/ehpc/model/RerunJobsRequest.h +++ b/ehpc/include/alibabacloud/ehpc/model/RerunJobsRequest.h @@ -36,11 +36,14 @@ public: void setClusterId(const std::string &clusterId); std::string getAccessKeyId() const; void setAccessKeyId(const std::string &accessKeyId); + bool getAsync() const; + void setAsync(bool async); private: std::string jobs_; std::string clusterId_; std::string accessKeyId_; + bool async_; }; } // namespace Model } // namespace EHPC diff --git a/ehpc/include/alibabacloud/ehpc/model/StopJobsRequest.h b/ehpc/include/alibabacloud/ehpc/model/StopJobsRequest.h index 7926a3e56..e30d06eb0 100644 --- a/ehpc/include/alibabacloud/ehpc/model/StopJobsRequest.h +++ b/ehpc/include/alibabacloud/ehpc/model/StopJobsRequest.h @@ -36,11 +36,14 @@ public: void setClusterId(const std::string &clusterId); std::string getAccessKeyId() const; void setAccessKeyId(const std::string &accessKeyId); + bool getAsync() const; + void setAsync(bool async); private: std::string jobs_; std::string clusterId_; std::string accessKeyId_; + bool async_; }; } // namespace Model } // namespace EHPC diff --git a/ehpc/include/alibabacloud/ehpc/model/SubmitJobRequest.h b/ehpc/include/alibabacloud/ehpc/model/SubmitJobRequest.h index d9d53e176..7dd78535b 100644 --- a/ehpc/include/alibabacloud/ehpc/model/SubmitJobRequest.h +++ b/ehpc/include/alibabacloud/ehpc/model/SubmitJobRequest.h @@ -58,6 +58,8 @@ public: void setPostCmdLine(const std::string &postCmdLine); std::string getRunasUser() const; void setRunasUser(const std::string &runasUser); + int getCpu() const; + void setCpu(int cpu); std::string getClusterId() const; void setClusterId(const std::string &clusterId); bool getReRunable() const; @@ -70,6 +72,8 @@ public: void setGpu(int gpu); int getNode() const; void setNode(int node); + bool getAsync() const; + void setAsync(bool async); int getTask() const; void setTask(int task); std::string getInputFileUrl() const; @@ -94,12 +98,14 @@ private: std::string variables_; std::string postCmdLine_; std::string runasUser_; + int cpu_; std::string clusterId_; bool reRunable_; int thread_; int priority_; int gpu_; int node_; + bool async_; int task_; std::string inputFileUrl_; std::string name_; diff --git a/ehpc/src/model/CreateJobFileRequest.cc b/ehpc/src/model/CreateJobFileRequest.cc index fabc8c710..15a946fa3 100644 --- a/ehpc/src/model/CreateJobFileRequest.cc +++ b/ehpc/src/model/CreateJobFileRequest.cc @@ -79,3 +79,12 @@ void CreateJobFileRequest::setAccessKeyId(const std::string &accessKeyId) { setParameter(std::string("AccessKeyId"), accessKeyId); } +bool CreateJobFileRequest::getAsync() const { + return async_; +} + +void CreateJobFileRequest::setAsync(bool async) { + async_ = async; + setParameter(std::string("Async"), async ? "true" : "false"); +} + diff --git a/ehpc/src/model/DeleteJobsRequest.cc b/ehpc/src/model/DeleteJobsRequest.cc index 949a53aeb..7d9f2667c 100644 --- a/ehpc/src/model/DeleteJobsRequest.cc +++ b/ehpc/src/model/DeleteJobsRequest.cc @@ -52,3 +52,12 @@ void DeleteJobsRequest::setAccessKeyId(const std::string &accessKeyId) { setParameter(std::string("AccessKeyId"), accessKeyId); } +bool DeleteJobsRequest::getAsync() const { + return async_; +} + +void DeleteJobsRequest::setAsync(bool async) { + async_ = async; + setParameter(std::string("Async"), async ? "true" : "false"); +} + diff --git a/ehpc/src/model/RerunJobsRequest.cc b/ehpc/src/model/RerunJobsRequest.cc index 319d4f6bd..d65024410 100644 --- a/ehpc/src/model/RerunJobsRequest.cc +++ b/ehpc/src/model/RerunJobsRequest.cc @@ -52,3 +52,12 @@ void RerunJobsRequest::setAccessKeyId(const std::string &accessKeyId) { setParameter(std::string("AccessKeyId"), accessKeyId); } +bool RerunJobsRequest::getAsync() const { + return async_; +} + +void RerunJobsRequest::setAsync(bool async) { + async_ = async; + setParameter(std::string("Async"), async ? "true" : "false"); +} + diff --git a/ehpc/src/model/StopJobsRequest.cc b/ehpc/src/model/StopJobsRequest.cc index ae9726ec7..9f55eb80d 100644 --- a/ehpc/src/model/StopJobsRequest.cc +++ b/ehpc/src/model/StopJobsRequest.cc @@ -52,3 +52,12 @@ void StopJobsRequest::setAccessKeyId(const std::string &accessKeyId) { setParameter(std::string("AccessKeyId"), accessKeyId); } +bool StopJobsRequest::getAsync() const { + return async_; +} + +void StopJobsRequest::setAsync(bool async) { + async_ = async; + setParameter(std::string("Async"), async ? "true" : "false"); +} + diff --git a/ehpc/src/model/SubmitJobRequest.cc b/ehpc/src/model/SubmitJobRequest.cc index 7b85efcbd..16e69ee9d 100644 --- a/ehpc/src/model/SubmitJobRequest.cc +++ b/ehpc/src/model/SubmitJobRequest.cc @@ -151,6 +151,15 @@ void SubmitJobRequest::setRunasUser(const std::string &runasUser) { setParameter(std::string("RunasUser"), runasUser); } +int SubmitJobRequest::getCpu() const { + return cpu_; +} + +void SubmitJobRequest::setCpu(int cpu) { + cpu_ = cpu; + setParameter(std::string("Cpu"), std::to_string(cpu)); +} + std::string SubmitJobRequest::getClusterId() const { return clusterId_; } @@ -205,6 +214,15 @@ void SubmitJobRequest::setNode(int node) { setParameter(std::string("Node"), std::to_string(node)); } +bool SubmitJobRequest::getAsync() const { + return async_; +} + +void SubmitJobRequest::setAsync(bool async) { + async_ = async; + setParameter(std::string("Async"), async ? "true" : "false"); +} + int SubmitJobRequest::getTask() const { return task_; }