From 419d2ef5e81f7503942a23ae128c178c14034b38 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Tue, 5 Mar 2024 07:33:35 +0000 Subject: [PATCH] Support UserData parameter for ApplyNodes interface. --- VERSION | 2 +- ehpc/include/alibabacloud/ehpc/model/ApplyNodesRequest.h | 3 +++ .../alibabacloud/ehpc/model/DescribeClusterResult.h | 1 + .../alibabacloud/ehpc/model/InitializeEHPCRequest.h | 3 +++ .../alibabacloud/ehpc/model/ListClustersMetaResult.h | 1 + ehpc/src/EHPCClient.cc | 6 +++--- ehpc/src/model/ApplyNodesRequest.cc | 9 +++++++++ ehpc/src/model/DescribeClusterResult.cc | 2 ++ ehpc/src/model/InitializeEHPCRequest.cc | 9 +++++++++ ehpc/src/model/ListClustersMetaResult.cc | 2 ++ 10 files changed, 34 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 77486c392..98779abcf 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1868 \ No newline at end of file +1.36.1869 \ No newline at end of file diff --git a/ehpc/include/alibabacloud/ehpc/model/ApplyNodesRequest.h b/ehpc/include/alibabacloud/ehpc/model/ApplyNodesRequest.h index 70e2a521c..0dab52077 100644 --- a/ehpc/include/alibabacloud/ehpc/model/ApplyNodesRequest.h +++ b/ehpc/include/alibabacloud/ehpc/model/ApplyNodesRequest.h @@ -63,6 +63,8 @@ public: void setAccessKeyId(const std::string &accessKeyId); std::string getSystemDiskType() const; void setSystemDiskType(const std::string &systemDiskType); + std::string getUserData() const; + void setUserData(const std::string &userData); int getCores() const; void setCores(int cores); int getSystemDiskSize() const; @@ -111,6 +113,7 @@ private: std::string jobQueue_; std::string accessKeyId_; std::string systemDiskType_; + std::string userData_; int cores_; int systemDiskSize_; std::vector zoneInfos_; diff --git a/ehpc/include/alibabacloud/ehpc/model/DescribeClusterResult.h b/ehpc/include/alibabacloud/ehpc/model/DescribeClusterResult.h index d51bf8e0a..2a99b33a7 100644 --- a/ehpc/include/alibabacloud/ehpc/model/DescribeClusterResult.h +++ b/ehpc/include/alibabacloud/ehpc/model/DescribeClusterResult.h @@ -147,6 +147,7 @@ namespace AlibabaCloud std::string baseOsTag; int withoutAgent; std::string imageName; + std::string schedulerVersion; bool haEnable; std::string osTag; std::string ecsChargeType; diff --git a/ehpc/include/alibabacloud/ehpc/model/InitializeEHPCRequest.h b/ehpc/include/alibabacloud/ehpc/model/InitializeEHPCRequest.h index 972515b98..c4ef1c46e 100644 --- a/ehpc/include/alibabacloud/ehpc/model/InitializeEHPCRequest.h +++ b/ehpc/include/alibabacloud/ehpc/model/InitializeEHPCRequest.h @@ -32,9 +32,12 @@ public: ~InitializeEHPCRequest(); std::string getRegionId() const; void setRegionId(const std::string ®ionId); + std::string getServiceName() const; + void setServiceName(const std::string &serviceName); private: std::string regionId_; + std::string serviceName_; }; } // namespace Model } // namespace EHPC diff --git a/ehpc/include/alibabacloud/ehpc/model/ListClustersMetaResult.h b/ehpc/include/alibabacloud/ehpc/model/ListClustersMetaResult.h index b3a8d4d8e..e34c3b6c7 100644 --- a/ehpc/include/alibabacloud/ehpc/model/ListClustersMetaResult.h +++ b/ehpc/include/alibabacloud/ehpc/model/ListClustersMetaResult.h @@ -41,6 +41,7 @@ namespace AlibabaCloud std::string schedulerType; std::string clientVersion; std::string accountType; + std::string ehpcVersion; std::string name; std::string vpcId; std::string deployMode; diff --git a/ehpc/src/EHPCClient.cc b/ehpc/src/EHPCClient.cc index 0b4fa2978..b8e9e6b20 100644 --- a/ehpc/src/EHPCClient.cc +++ b/ehpc/src/EHPCClient.cc @@ -31,21 +31,21 @@ EHPCClient::EHPCClient(const Credentials &credentials, const ClientConfiguration RpcServiceClient(SERVICE_NAME, std::make_shared(credentials), configuration) { auto locationClient = std::make_shared(credentials, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "ehs"); } EHPCClient::EHPCClient(const std::shared_ptr& credentialsProvider, const ClientConfiguration & configuration) : RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration) { auto locationClient = std::make_shared(credentialsProvider, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "ehs"); } EHPCClient::EHPCClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) : RpcServiceClient(SERVICE_NAME, std::make_shared(accessKeyId, accessKeySecret), configuration) { auto locationClient = std::make_shared(accessKeyId, accessKeySecret, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "ehs"); } EHPCClient::~EHPCClient() diff --git a/ehpc/src/model/ApplyNodesRequest.cc b/ehpc/src/model/ApplyNodesRequest.cc index 177f0897d..916ed1646 100644 --- a/ehpc/src/model/ApplyNodesRequest.cc +++ b/ehpc/src/model/ApplyNodesRequest.cc @@ -115,6 +115,15 @@ void ApplyNodesRequest::setSystemDiskType(const std::string &systemDiskType) { setParameter(std::string("SystemDiskType"), systemDiskType); } +std::string ApplyNodesRequest::getUserData() const { + return userData_; +} + +void ApplyNodesRequest::setUserData(const std::string &userData) { + userData_ = userData; + setParameter(std::string("UserData"), userData); +} + int ApplyNodesRequest::getCores() const { return cores_; } diff --git a/ehpc/src/model/DescribeClusterResult.cc b/ehpc/src/model/DescribeClusterResult.cc index 37bf566a6..781ad1de7 100644 --- a/ehpc/src/model/DescribeClusterResult.cc +++ b/ehpc/src/model/DescribeClusterResult.cc @@ -72,6 +72,8 @@ void DescribeClusterResult::parse(const std::string &payload) clusterInfo_.imageId = clusterInfoNode["ImageId"].asString(); if(!clusterInfoNode["SchedulerType"].isNull()) clusterInfo_.schedulerType = clusterInfoNode["SchedulerType"].asString(); + if(!clusterInfoNode["SchedulerVersion"].isNull()) + clusterInfo_.schedulerVersion = clusterInfoNode["SchedulerVersion"].asString(); if(!clusterInfoNode["DeployMode"].isNull()) clusterInfo_.deployMode = clusterInfoNode["DeployMode"].asString(); if(!clusterInfoNode["ImageOwnerAlias"].isNull()) diff --git a/ehpc/src/model/InitializeEHPCRequest.cc b/ehpc/src/model/InitializeEHPCRequest.cc index eb5a8fd92..67f851790 100644 --- a/ehpc/src/model/InitializeEHPCRequest.cc +++ b/ehpc/src/model/InitializeEHPCRequest.cc @@ -34,3 +34,12 @@ void InitializeEHPCRequest::setRegionId(const std::string ®ionId) { setParameter(std::string("RegionId"), regionId); } +std::string InitializeEHPCRequest::getServiceName() const { + return serviceName_; +} + +void InitializeEHPCRequest::setServiceName(const std::string &serviceName) { + serviceName_ = serviceName; + setParameter(std::string("ServiceName"), serviceName); +} + diff --git a/ehpc/src/model/ListClustersMetaResult.cc b/ehpc/src/model/ListClustersMetaResult.cc index fa126565b..6b7e654ee 100644 --- a/ehpc/src/model/ListClustersMetaResult.cc +++ b/ehpc/src/model/ListClustersMetaResult.cc @@ -69,6 +69,8 @@ void ListClustersMetaResult::parse(const std::string &payload) clustersObject.clientVersion = valueClustersClusterInfoSimple["ClientVersion"].asString(); if(!valueClustersClusterInfoSimple["HasPlugin"].isNull()) clustersObject.hasPlugin = valueClustersClusterInfoSimple["HasPlugin"].asString() == "true"; + if(!valueClustersClusterInfoSimple["EhpcVersion"].isNull()) + clustersObject.ehpcVersion = valueClustersClusterInfoSimple["EhpcVersion"].asString(); clusters_.push_back(clustersObject); } if(!value["PageSize"].isNull())