From 4e8da023b866dfc4fd5e4082c60aa9407f14f504 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Tue, 29 Dec 2020 06:30:30 +0000 Subject: [PATCH] ListNodesNoPaging return with instance type. --- CHANGELOG | 3 + ehpc/CMakeLists.txt | 8 ++ ehpc/include/alibabacloud/ehpc/EHPCClient.h | 16 ++++ .../alibabacloud/ehpc/model/AddNodesRequest.h | 3 + .../ehpc/model/ApplyNodesRequest.h | 3 + .../ehpc/model/CreateClusterRequest.h | 3 + .../ehpc/model/GetHealthMonitorLogsRequest.h | 63 ++++++++++++ .../ehpc/model/GetHealthMonitorLogsResult.h | 71 ++++++++++++++ .../ehpc/model/InitializeEHPCRequest.h | 48 ++++++++++ .../ehpc/model/InitializeEHPCResult.h | 49 ++++++++++ .../ehpc/model/ListClustersMetaResult.h | 6 ++ .../ehpc/model/ListClustersResult.h | 1 + .../ehpc/model/ListNodesNoPagingResult.h | 1 + .../ehpc/model/ListNodesRequest.h | 9 ++ .../alibabacloud/ehpc/model/ListNodesResult.h | 21 ++-- .../ehpc/model/SubmitJobRequest.h | 18 ++++ ehpc/src/EHPCClient.cc | 72 ++++++++++++++ ehpc/src/model/AddNodesRequest.cc | 11 +++ ehpc/src/model/ApplyNodesRequest.cc | 11 +++ ehpc/src/model/CreateClusterRequest.cc | 11 +++ ehpc/src/model/DescribeGWSInstancesResult.cc | 16 ++-- ehpc/src/model/GetAutoScaleConfigResult.cc | 28 +++--- ehpc/src/model/GetClusterVolumesResult.cc | 8 +- ehpc/src/model/GetHealthMonitorLogsRequest.cc | 95 +++++++++++++++++++ ehpc/src/model/GetHealthMonitorLogsResult.cc | 87 +++++++++++++++++ ehpc/src/model/InitializeEHPCRequest.cc | 40 ++++++++ ehpc/src/model/InitializeEHPCResult.cc | 44 +++++++++ ehpc/src/model/ListAvailableEcsTypesResult.cc | 48 +++++----- ehpc/src/model/ListClustersMetaResult.cc | 12 +++ ehpc/src/model/ListClustersResult.cc | 2 + ehpc/src/model/ListCpfsFileSystemsResult.cc | 24 ++--- .../ListFileSystemWithMountTargetsResult.cc | 36 +++---- ehpc/src/model/ListNodesNoPagingResult.cc | 2 + ehpc/src/model/ListNodesRequest.cc | 33 +++++++ ehpc/src/model/ListNodesResult.cc | 2 + ehpc/src/model/ListSoftwaresResult.cc | 20 ++-- ehpc/src/model/ListVolumesResult.cc | 40 ++++---- ehpc/src/model/SubmitJobRequest.cc | 66 +++++++++++++ 38 files changed, 911 insertions(+), 120 deletions(-) create mode 100644 ehpc/include/alibabacloud/ehpc/model/GetHealthMonitorLogsRequest.h create mode 100644 ehpc/include/alibabacloud/ehpc/model/GetHealthMonitorLogsResult.h create mode 100644 ehpc/include/alibabacloud/ehpc/model/InitializeEHPCRequest.h create mode 100644 ehpc/include/alibabacloud/ehpc/model/InitializeEHPCResult.h create mode 100644 ehpc/src/model/GetHealthMonitorLogsRequest.cc create mode 100644 ehpc/src/model/GetHealthMonitorLogsResult.cc create mode 100644 ehpc/src/model/InitializeEHPCRequest.cc create mode 100644 ehpc/src/model/InitializeEHPCResult.cc diff --git a/CHANGELOG b/CHANGELOG index f82583162..cbaa5367c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2020-12-29 Version: patch +- ListNodesNoPaging return with instance type. + 2020-12-28 Version: patch - Generated 2020-05-18 for `dataworks-public`. diff --git a/ehpc/CMakeLists.txt b/ehpc/CMakeLists.txt index a8362f889..0fc218a7d 100644 --- a/ehpc/CMakeLists.txt +++ b/ehpc/CMakeLists.txt @@ -113,6 +113,8 @@ set(ehpc_public_header_model include/alibabacloud/ehpc/model/GetClusterVolumesResult.h include/alibabacloud/ehpc/model/GetGWSConnectTicketRequest.h include/alibabacloud/ehpc/model/GetGWSConnectTicketResult.h + include/alibabacloud/ehpc/model/GetHealthMonitorLogsRequest.h + include/alibabacloud/ehpc/model/GetHealthMonitorLogsResult.h include/alibabacloud/ehpc/model/GetHybridClusterConfigRequest.h include/alibabacloud/ehpc/model/GetHybridClusterConfigResult.h include/alibabacloud/ehpc/model/GetIfEcsTypeSupportHtConfigRequest.h @@ -121,6 +123,8 @@ set(ehpc_public_header_model include/alibabacloud/ehpc/model/GetVisualServiceStatusResult.h include/alibabacloud/ehpc/model/GetWorkbenchTokenRequest.h include/alibabacloud/ehpc/model/GetWorkbenchTokenResult.h + include/alibabacloud/ehpc/model/InitializeEHPCRequest.h + include/alibabacloud/ehpc/model/InitializeEHPCResult.h include/alibabacloud/ehpc/model/InstallSoftwareRequest.h include/alibabacloud/ehpc/model/InstallSoftwareResult.h include/alibabacloud/ehpc/model/InvokeShellCommandRequest.h @@ -350,6 +354,8 @@ set(ehpc_src src/model/GetClusterVolumesResult.cc src/model/GetGWSConnectTicketRequest.cc src/model/GetGWSConnectTicketResult.cc + src/model/GetHealthMonitorLogsRequest.cc + src/model/GetHealthMonitorLogsResult.cc src/model/GetHybridClusterConfigRequest.cc src/model/GetHybridClusterConfigResult.cc src/model/GetIfEcsTypeSupportHtConfigRequest.cc @@ -358,6 +364,8 @@ set(ehpc_src src/model/GetVisualServiceStatusResult.cc src/model/GetWorkbenchTokenRequest.cc src/model/GetWorkbenchTokenResult.cc + src/model/InitializeEHPCRequest.cc + src/model/InitializeEHPCResult.cc src/model/InstallSoftwareRequest.cc src/model/InstallSoftwareResult.cc src/model/InvokeShellCommandRequest.cc diff --git a/ehpc/include/alibabacloud/ehpc/EHPCClient.h b/ehpc/include/alibabacloud/ehpc/EHPCClient.h index ba0e9b894..df45e29d4 100644 --- a/ehpc/include/alibabacloud/ehpc/EHPCClient.h +++ b/ehpc/include/alibabacloud/ehpc/EHPCClient.h @@ -114,6 +114,8 @@ #include "model/GetClusterVolumesResult.h" #include "model/GetGWSConnectTicketRequest.h" #include "model/GetGWSConnectTicketResult.h" +#include "model/GetHealthMonitorLogsRequest.h" +#include "model/GetHealthMonitorLogsResult.h" #include "model/GetHybridClusterConfigRequest.h" #include "model/GetHybridClusterConfigResult.h" #include "model/GetIfEcsTypeSupportHtConfigRequest.h" @@ -122,6 +124,8 @@ #include "model/GetVisualServiceStatusResult.h" #include "model/GetWorkbenchTokenRequest.h" #include "model/GetWorkbenchTokenResult.h" +#include "model/InitializeEHPCRequest.h" +#include "model/InitializeEHPCResult.h" #include "model/InstallSoftwareRequest.h" #include "model/InstallSoftwareResult.h" #include "model/InvokeShellCommandRequest.h" @@ -403,6 +407,9 @@ namespace AlibabaCloud typedef Outcome GetGWSConnectTicketOutcome; typedef std::future GetGWSConnectTicketOutcomeCallable; typedef std::function&)> GetGWSConnectTicketAsyncHandler; + typedef Outcome GetHealthMonitorLogsOutcome; + typedef std::future GetHealthMonitorLogsOutcomeCallable; + typedef std::function&)> GetHealthMonitorLogsAsyncHandler; typedef Outcome GetHybridClusterConfigOutcome; typedef std::future GetHybridClusterConfigOutcomeCallable; typedef std::function&)> GetHybridClusterConfigAsyncHandler; @@ -415,6 +422,9 @@ namespace AlibabaCloud typedef Outcome GetWorkbenchTokenOutcome; typedef std::future GetWorkbenchTokenOutcomeCallable; typedef std::function&)> GetWorkbenchTokenAsyncHandler; + typedef Outcome InitializeEHPCOutcome; + typedef std::future InitializeEHPCOutcomeCallable; + typedef std::function&)> InitializeEHPCAsyncHandler; typedef Outcome InstallSoftwareOutcome; typedef std::future InstallSoftwareOutcomeCallable; typedef std::function&)> InstallSoftwareAsyncHandler; @@ -759,6 +769,9 @@ namespace AlibabaCloud GetGWSConnectTicketOutcome getGWSConnectTicket(const Model::GetGWSConnectTicketRequest &request)const; void getGWSConnectTicketAsync(const Model::GetGWSConnectTicketRequest& request, const GetGWSConnectTicketAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetGWSConnectTicketOutcomeCallable getGWSConnectTicketCallable(const Model::GetGWSConnectTicketRequest& request) const; + GetHealthMonitorLogsOutcome getHealthMonitorLogs(const Model::GetHealthMonitorLogsRequest &request)const; + void getHealthMonitorLogsAsync(const Model::GetHealthMonitorLogsRequest& request, const GetHealthMonitorLogsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetHealthMonitorLogsOutcomeCallable getHealthMonitorLogsCallable(const Model::GetHealthMonitorLogsRequest& request) const; GetHybridClusterConfigOutcome getHybridClusterConfig(const Model::GetHybridClusterConfigRequest &request)const; void getHybridClusterConfigAsync(const Model::GetHybridClusterConfigRequest& request, const GetHybridClusterConfigAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetHybridClusterConfigOutcomeCallable getHybridClusterConfigCallable(const Model::GetHybridClusterConfigRequest& request) const; @@ -771,6 +784,9 @@ namespace AlibabaCloud GetWorkbenchTokenOutcome getWorkbenchToken(const Model::GetWorkbenchTokenRequest &request)const; void getWorkbenchTokenAsync(const Model::GetWorkbenchTokenRequest& request, const GetWorkbenchTokenAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetWorkbenchTokenOutcomeCallable getWorkbenchTokenCallable(const Model::GetWorkbenchTokenRequest& request) const; + InitializeEHPCOutcome initializeEHPC(const Model::InitializeEHPCRequest &request)const; + void initializeEHPCAsync(const Model::InitializeEHPCRequest& request, const InitializeEHPCAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + InitializeEHPCOutcomeCallable initializeEHPCCallable(const Model::InitializeEHPCRequest& request) const; InstallSoftwareOutcome installSoftware(const Model::InstallSoftwareRequest &request)const; void installSoftwareAsync(const Model::InstallSoftwareRequest& request, const InstallSoftwareAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; InstallSoftwareOutcomeCallable installSoftwareCallable(const Model::InstallSoftwareRequest& request) const; diff --git a/ehpc/include/alibabacloud/ehpc/model/AddNodesRequest.h b/ehpc/include/alibabacloud/ehpc/model/AddNodesRequest.h index 8edfb8cff..d7f4886de 100644 --- a/ehpc/include/alibabacloud/ehpc/model/AddNodesRequest.h +++ b/ehpc/include/alibabacloud/ehpc/model/AddNodesRequest.h @@ -37,6 +37,8 @@ namespace AlibabaCloud std::string getImageId()const; void setImageId(const std::string& imageId); + std::string getSystemDiskLevel()const; + void setSystemDiskLevel(const std::string& systemDiskLevel); std::string getClientToken()const; void setClientToken(const std::string& clientToken); bool getAllocatePublicAddress()const; @@ -92,6 +94,7 @@ namespace AlibabaCloud private: std::string imageId_; + std::string systemDiskLevel_; std::string clientToken_; bool allocatePublicAddress_; int internetMaxBandWidthOut_; diff --git a/ehpc/include/alibabacloud/ehpc/model/ApplyNodesRequest.h b/ehpc/include/alibabacloud/ehpc/model/ApplyNodesRequest.h index d39d9139f..e7e7aba63 100644 --- a/ehpc/include/alibabacloud/ehpc/model/ApplyNodesRequest.h +++ b/ehpc/include/alibabacloud/ehpc/model/ApplyNodesRequest.h @@ -51,6 +51,8 @@ namespace AlibabaCloud void setImageId(const std::string& imageId); int getMemory()const; void setMemory(int memory); + std::string getSystemDiskLevel()const; + void setSystemDiskLevel(const std::string& systemDiskLevel); bool getAllocatePublicAddress()const; void setAllocatePublicAddress(bool allocatePublicAddress); int getInternetMaxBandWidthOut()const; @@ -95,6 +97,7 @@ namespace AlibabaCloud private: std::string imageId_; int memory_; + std::string systemDiskLevel_; bool allocatePublicAddress_; int internetMaxBandWidthOut_; std::string resourceAmountType_; diff --git a/ehpc/include/alibabacloud/ehpc/model/CreateClusterRequest.h b/ehpc/include/alibabacloud/ehpc/model/CreateClusterRequest.h index 7fae6805a..6e643414e 100644 --- a/ehpc/include/alibabacloud/ehpc/model/CreateClusterRequest.h +++ b/ehpc/include/alibabacloud/ehpc/model/CreateClusterRequest.h @@ -119,6 +119,8 @@ namespace AlibabaCloud void setSccClusterId(const std::string& sccClusterId); std::string getImageId()const; void setImageId(const std::string& imageId); + std::string getSystemDiskLevel()const; + void setSystemDiskLevel(const std::string& systemDiskLevel); std::string getClientToken()const; void setClientToken(const std::string& clientToken); std::string getEhpcVersion()const; @@ -192,6 +194,7 @@ namespace AlibabaCloud std::string zoneId_; std::string sccClusterId_; std::string imageId_; + std::string systemDiskLevel_; std::string clientToken_; std::string ehpcVersion_; std::string accountType_; diff --git a/ehpc/include/alibabacloud/ehpc/model/GetHealthMonitorLogsRequest.h b/ehpc/include/alibabacloud/ehpc/model/GetHealthMonitorLogsRequest.h new file mode 100644 index 000000000..4d2dc2e08 --- /dev/null +++ b/ehpc/include/alibabacloud/ehpc/model/GetHealthMonitorLogsRequest.h @@ -0,0 +1,63 @@ +/* + * 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. + */ + +#ifndef ALIBABACLOUD_EHPC_MODEL_GETHEALTHMONITORLOGSREQUEST_H_ +#define ALIBABACLOUD_EHPC_MODEL_GETHEALTHMONITORLOGSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace EHPC + { + namespace Model + { + class ALIBABACLOUD_EHPC_EXPORT GetHealthMonitorLogsRequest : public RpcServiceRequest + { + + public: + GetHealthMonitorLogsRequest(); + ~GetHealthMonitorLogsRequest(); + + int getEndTime()const; + void setEndTime(int endTime); + std::string getClusterId()const; + void setClusterId(const std::string& clusterId); + int getStartTime()const; + void setStartTime(int startTime); + std::string getAccessKeyId()const; + void setAccessKeyId(const std::string& accessKeyId); + bool getEnableReverse()const; + void setEnableReverse(bool enableReverse); + std::string getFilter()const; + void setFilter(const std::string& filter); + + private: + int endTime_; + std::string clusterId_; + int startTime_; + std::string accessKeyId_; + bool enableReverse_; + std::string filter_; + + }; + } + } +} +#endif // !ALIBABACLOUD_EHPC_MODEL_GETHEALTHMONITORLOGSREQUEST_H_ \ No newline at end of file diff --git a/ehpc/include/alibabacloud/ehpc/model/GetHealthMonitorLogsResult.h b/ehpc/include/alibabacloud/ehpc/model/GetHealthMonitorLogsResult.h new file mode 100644 index 000000000..c408ae505 --- /dev/null +++ b/ehpc/include/alibabacloud/ehpc/model/GetHealthMonitorLogsResult.h @@ -0,0 +1,71 @@ +/* + * 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. + */ + +#ifndef ALIBABACLOUD_EHPC_MODEL_GETHEALTHMONITORLOGSRESULT_H_ +#define ALIBABACLOUD_EHPC_MODEL_GETHEALTHMONITORLOGSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace EHPC + { + namespace Model + { + class ALIBABACLOUD_EHPC_EXPORT GetHealthMonitorLogsResult : public ServiceResult + { + public: + struct Logs + { + struct CheckListItem + { + std::string checkName; + std::string checkSolution; + std::string checkInfo; + std::string checkDescription; + }; + std::string sceneName; + std::string instanceId; + std::vector checkList; + std::string sceneDescription; + std::string itemName; + std::string level; + int time; + std::string itemDescription; + std::string hostName; + std::string healthId; + }; + + + GetHealthMonitorLogsResult(); + explicit GetHealthMonitorLogsResult(const std::string &payload); + ~GetHealthMonitorLogsResult(); + std::vector getLogInfo()const; + + protected: + void parse(const std::string &payload); + private: + std::vector logInfo_; + + }; + } + } +} +#endif // !ALIBABACLOUD_EHPC_MODEL_GETHEALTHMONITORLOGSRESULT_H_ \ No newline at end of file diff --git a/ehpc/include/alibabacloud/ehpc/model/InitializeEHPCRequest.h b/ehpc/include/alibabacloud/ehpc/model/InitializeEHPCRequest.h new file mode 100644 index 000000000..470c21222 --- /dev/null +++ b/ehpc/include/alibabacloud/ehpc/model/InitializeEHPCRequest.h @@ -0,0 +1,48 @@ +/* + * 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. + */ + +#ifndef ALIBABACLOUD_EHPC_MODEL_INITIALIZEEHPCREQUEST_H_ +#define ALIBABACLOUD_EHPC_MODEL_INITIALIZEEHPCREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace EHPC + { + namespace Model + { + class ALIBABACLOUD_EHPC_EXPORT InitializeEHPCRequest : public RpcServiceRequest + { + + public: + InitializeEHPCRequest(); + ~InitializeEHPCRequest(); + + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + + private: + std::string regionId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_EHPC_MODEL_INITIALIZEEHPCREQUEST_H_ \ No newline at end of file diff --git a/ehpc/include/alibabacloud/ehpc/model/InitializeEHPCResult.h b/ehpc/include/alibabacloud/ehpc/model/InitializeEHPCResult.h new file mode 100644 index 000000000..36f6528c7 --- /dev/null +++ b/ehpc/include/alibabacloud/ehpc/model/InitializeEHPCResult.h @@ -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. + */ + +#ifndef ALIBABACLOUD_EHPC_MODEL_INITIALIZEEHPCRESULT_H_ +#define ALIBABACLOUD_EHPC_MODEL_INITIALIZEEHPCRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace EHPC + { + namespace Model + { + class ALIBABACLOUD_EHPC_EXPORT InitializeEHPCResult : public ServiceResult + { + public: + + + InitializeEHPCResult(); + explicit InitializeEHPCResult(const std::string &payload); + ~InitializeEHPCResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_EHPC_MODEL_INITIALIZEEHPCRESULT_H_ \ No newline at end of file diff --git a/ehpc/include/alibabacloud/ehpc/model/ListClustersMetaResult.h b/ehpc/include/alibabacloud/ehpc/model/ListClustersMetaResult.h index ec664fd05..43bc5dc45 100644 --- a/ehpc/include/alibabacloud/ehpc/model/ListClustersMetaResult.h +++ b/ehpc/include/alibabacloud/ehpc/model/ListClustersMetaResult.h @@ -36,7 +36,13 @@ namespace AlibabaCloud { std::string status; std::string description; + std::string vpcId; + std::string deployMode; + std::string osTag; std::string id; + std::string schedulerType; + std::string clientVersion; + std::string accountType; std::string name; std::string location; }; diff --git a/ehpc/include/alibabacloud/ehpc/model/ListClustersResult.h b/ehpc/include/alibabacloud/ehpc/model/ListClustersResult.h index 61d34dc8d..286f3bfa5 100644 --- a/ehpc/include/alibabacloud/ehpc/model/ListClustersResult.h +++ b/ehpc/include/alibabacloud/ehpc/model/ListClustersResult.h @@ -69,6 +69,7 @@ namespace AlibabaCloud float computeSpotPriceLimit; std::string nodeSuffix; int count; + std::string clientVersion; std::string name; std::string deployMode; TotalResources totalResources; diff --git a/ehpc/include/alibabacloud/ehpc/model/ListNodesNoPagingResult.h b/ehpc/include/alibabacloud/ehpc/model/ListNodesNoPagingResult.h index c70d33c6c..3bbed8dac 100644 --- a/ehpc/include/alibabacloud/ehpc/model/ListNodesNoPagingResult.h +++ b/ehpc/include/alibabacloud/ehpc/model/ListNodesNoPagingResult.h @@ -61,6 +61,7 @@ namespace AlibabaCloud std::string id; std::string regionId; std::string lockReason; + std::string instanceType; std::string hostName; std::string spotStrategy; }; diff --git a/ehpc/include/alibabacloud/ehpc/model/ListNodesRequest.h b/ehpc/include/alibabacloud/ehpc/model/ListNodesRequest.h index 1f863655e..491a52549 100644 --- a/ehpc/include/alibabacloud/ehpc/model/ListNodesRequest.h +++ b/ehpc/include/alibabacloud/ehpc/model/ListNodesRequest.h @@ -43,21 +43,30 @@ namespace AlibabaCloud void setPageNumber(int pageNumber); std::string getAccessKeyId()const; void setAccessKeyId(const std::string& accessKeyId); + std::string getFilter()const; + void setFilter(const std::string& filter); + std::string getPrivateIpAddress()const; + void setPrivateIpAddress(const std::string& privateIpAddress); std::string getSequence()const; void setSequence(const std::string& sequence); std::string getHostName()const; void setHostName(const std::string& hostName); int getPageSize()const; void setPageSize(int pageSize); + std::string getSortBy()const; + void setSortBy(const std::string& sortBy); private: std::string role_; std::string clusterId_; int pageNumber_; std::string accessKeyId_; + std::string filter_; + std::string privateIpAddress_; std::string sequence_; std::string hostName_; int pageSize_; + std::string sortBy_; }; } diff --git a/ehpc/include/alibabacloud/ehpc/model/ListNodesResult.h b/ehpc/include/alibabacloud/ehpc/model/ListNodesResult.h index b77d0be9e..201bea607 100644 --- a/ehpc/include/alibabacloud/ehpc/model/ListNodesResult.h +++ b/ehpc/include/alibabacloud/ehpc/model/ListNodesResult.h @@ -46,29 +46,30 @@ namespace AlibabaCloud int cpu; int gpu; }; - std::string status; std::string imageOwnerAlias; + std::string publicIpAddress; + bool createdByEhpc; + std::string version; + TotalResources totalResources; + std::string expiredTime; + std::string imageId; + std::string lockReason; + std::string instanceType; + std::string hostName; + std::string spotStrategy; + std::string status; std::string zoneId; std::string vSwitchId; bool expired; std::vector roles; std::string addTime; UsedResources usedResources; - std::string publicIpAddress; - bool createdByEhpc; std::string createMode; std::string vpcId; - std::string version; - TotalResources totalResources; - std::string expiredTime; - std::string imageId; std::string ipAddress; bool htEnabled; std::string id; std::string regionId; - std::string lockReason; - std::string hostName; - std::string spotStrategy; std::string location; }; diff --git a/ehpc/include/alibabacloud/ehpc/model/SubmitJobRequest.h b/ehpc/include/alibabacloud/ehpc/model/SubmitJobRequest.h index 0f5477361..5b8a2279b 100644 --- a/ehpc/include/alibabacloud/ehpc/model/SubmitJobRequest.h +++ b/ehpc/include/alibabacloud/ehpc/model/SubmitJobRequest.h @@ -39,6 +39,8 @@ namespace AlibabaCloud void setStderrRedirectPath(const std::string& stderrRedirectPath); std::string getRunasUserPassword()const; void setRunasUserPassword(const std::string& runasUserPassword); + std::string getClockTime()const; + void setClockTime(const std::string& clockTime); std::string getCommandLine()const; void setCommandLine(const std::string& commandLine); std::string getJobQueue()const; @@ -51,6 +53,8 @@ namespace AlibabaCloud void setUnzipCmd(const std::string& unzipCmd); std::string getPackagePath()const; void setPackagePath(const std::string& packagePath); + std::string getMem()const; + void setMem(const std::string& mem); std::string getStdoutRedirectPath()const; void setStdoutRedirectPath(const std::string& stdoutRedirectPath); std::string getVariables()const; @@ -63,8 +67,16 @@ namespace AlibabaCloud void setClusterId(const std::string& clusterId); bool getReRunable()const; void setReRunable(bool reRunable); + int getThread()const; + void setThread(int thread); int getPriority()const; void setPriority(int priority); + int getGpu()const; + void setGpu(int gpu); + int getNode()const; + void setNode(int node); + int getTask()const; + void setTask(int task); std::string getInputFileUrl()const; void setInputFileUrl(const std::string& inputFileUrl); std::string getName()const; @@ -75,19 +87,25 @@ namespace AlibabaCloud private: std::string stderrRedirectPath_; std::string runasUserPassword_; + std::string clockTime_; std::string commandLine_; std::string jobQueue_; std::string accessKeyId_; std::string arrayRequest_; std::string unzipCmd_; std::string packagePath_; + std::string mem_; std::string stdoutRedirectPath_; std::string variables_; std::string postCmdLine_; std::string runasUser_; std::string clusterId_; bool reRunable_; + int thread_; int priority_; + int gpu_; + int node_; + int task_; std::string inputFileUrl_; std::string name_; std::string containerId_; diff --git a/ehpc/src/EHPCClient.cc b/ehpc/src/EHPCClient.cc index ed0927699..22971c9f1 100644 --- a/ehpc/src/EHPCClient.cc +++ b/ehpc/src/EHPCClient.cc @@ -1707,6 +1707,42 @@ EHPCClient::GetGWSConnectTicketOutcomeCallable EHPCClient::getGWSConnectTicketCa return task->get_future(); } +EHPCClient::GetHealthMonitorLogsOutcome EHPCClient::getHealthMonitorLogs(const GetHealthMonitorLogsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetHealthMonitorLogsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetHealthMonitorLogsOutcome(GetHealthMonitorLogsResult(outcome.result())); + else + return GetHealthMonitorLogsOutcome(outcome.error()); +} + +void EHPCClient::getHealthMonitorLogsAsync(const GetHealthMonitorLogsRequest& request, const GetHealthMonitorLogsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getHealthMonitorLogs(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +EHPCClient::GetHealthMonitorLogsOutcomeCallable EHPCClient::getHealthMonitorLogsCallable(const GetHealthMonitorLogsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getHealthMonitorLogs(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + EHPCClient::GetHybridClusterConfigOutcome EHPCClient::getHybridClusterConfig(const GetHybridClusterConfigRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -1851,6 +1887,42 @@ EHPCClient::GetWorkbenchTokenOutcomeCallable EHPCClient::getWorkbenchTokenCallab return task->get_future(); } +EHPCClient::InitializeEHPCOutcome EHPCClient::initializeEHPC(const InitializeEHPCRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return InitializeEHPCOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return InitializeEHPCOutcome(InitializeEHPCResult(outcome.result())); + else + return InitializeEHPCOutcome(outcome.error()); +} + +void EHPCClient::initializeEHPCAsync(const InitializeEHPCRequest& request, const InitializeEHPCAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, initializeEHPC(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +EHPCClient::InitializeEHPCOutcomeCallable EHPCClient::initializeEHPCCallable(const InitializeEHPCRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->initializeEHPC(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + EHPCClient::InstallSoftwareOutcome EHPCClient::installSoftware(const InstallSoftwareRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/ehpc/src/model/AddNodesRequest.cc b/ehpc/src/model/AddNodesRequest.cc index 807e8beae..4309da8c7 100644 --- a/ehpc/src/model/AddNodesRequest.cc +++ b/ehpc/src/model/AddNodesRequest.cc @@ -38,6 +38,17 @@ void AddNodesRequest::setImageId(const std::string& imageId) setParameter("ImageId", imageId); } +std::string AddNodesRequest::getSystemDiskLevel()const +{ + return systemDiskLevel_; +} + +void AddNodesRequest::setSystemDiskLevel(const std::string& systemDiskLevel) +{ + systemDiskLevel_ = systemDiskLevel; + setParameter("SystemDiskLevel", systemDiskLevel); +} + std::string AddNodesRequest::getClientToken()const { return clientToken_; diff --git a/ehpc/src/model/ApplyNodesRequest.cc b/ehpc/src/model/ApplyNodesRequest.cc index 61831547e..e658bb803 100644 --- a/ehpc/src/model/ApplyNodesRequest.cc +++ b/ehpc/src/model/ApplyNodesRequest.cc @@ -49,6 +49,17 @@ void ApplyNodesRequest::setMemory(int memory) setParameter("Memory", std::to_string(memory)); } +std::string ApplyNodesRequest::getSystemDiskLevel()const +{ + return systemDiskLevel_; +} + +void ApplyNodesRequest::setSystemDiskLevel(const std::string& systemDiskLevel) +{ + systemDiskLevel_ = systemDiskLevel; + setParameter("SystemDiskLevel", systemDiskLevel); +} + bool ApplyNodesRequest::getAllocatePublicAddress()const { return allocatePublicAddress_; diff --git a/ehpc/src/model/CreateClusterRequest.cc b/ehpc/src/model/CreateClusterRequest.cc index 0b91ebe12..c560a927c 100644 --- a/ehpc/src/model/CreateClusterRequest.cc +++ b/ehpc/src/model/CreateClusterRequest.cc @@ -367,6 +367,17 @@ void CreateClusterRequest::setImageId(const std::string& imageId) setParameter("ImageId", imageId); } +std::string CreateClusterRequest::getSystemDiskLevel()const +{ + return systemDiskLevel_; +} + +void CreateClusterRequest::setSystemDiskLevel(const std::string& systemDiskLevel) +{ + systemDiskLevel_ = systemDiskLevel; + setParameter("SystemDiskLevel", systemDiskLevel); +} + std::string CreateClusterRequest::getClientToken()const { return clientToken_; diff --git a/ehpc/src/model/DescribeGWSInstancesResult.cc b/ehpc/src/model/DescribeGWSInstancesResult.cc index ee63a8aa5..359315503 100644 --- a/ehpc/src/model/DescribeGWSInstancesResult.cc +++ b/ehpc/src/model/DescribeGWSInstancesResult.cc @@ -61,16 +61,16 @@ void DescribeGWSInstancesResult::parse(const std::string &payload) instancesObject.name = valueInstancesInstanceInfo["Name"].asString(); if(!valueInstancesInstanceInfo["UserName"].isNull()) instancesObject.userName = valueInstancesInstanceInfo["UserName"].asString(); - auto allAppListNode = allInstancesNode["AppList"]["AppInfo"]; - for (auto allInstancesNodeAppListAppInfo : allAppListNode) + auto allAppListNode = valueInstancesInstanceInfo["AppList"]["AppInfo"]; + for (auto valueInstancesInstanceInfoAppListAppInfo : allAppListNode) { InstanceInfo::AppInfo appListObject; - if(!allInstancesNodeAppListAppInfo["AppName"].isNull()) - appListObject.appName = allInstancesNodeAppListAppInfo["AppName"].asString(); - if(!allInstancesNodeAppListAppInfo["AppPath"].isNull()) - appListObject.appPath = allInstancesNodeAppListAppInfo["AppPath"].asString(); - if(!allInstancesNodeAppListAppInfo["AppArgs"].isNull()) - appListObject.appArgs = allInstancesNodeAppListAppInfo["AppArgs"].asString(); + if(!valueInstancesInstanceInfoAppListAppInfo["AppName"].isNull()) + appListObject.appName = valueInstancesInstanceInfoAppListAppInfo["AppName"].asString(); + if(!valueInstancesInstanceInfoAppListAppInfo["AppPath"].isNull()) + appListObject.appPath = valueInstancesInstanceInfoAppListAppInfo["AppPath"].asString(); + if(!valueInstancesInstanceInfoAppListAppInfo["AppArgs"].isNull()) + appListObject.appArgs = valueInstancesInstanceInfoAppListAppInfo["AppArgs"].asString(); instancesObject.appList.push_back(appListObject); } instances_.push_back(instancesObject); diff --git a/ehpc/src/model/GetAutoScaleConfigResult.cc b/ehpc/src/model/GetAutoScaleConfigResult.cc index b612ab037..a36854811 100644 --- a/ehpc/src/model/GetAutoScaleConfigResult.cc +++ b/ehpc/src/model/GetAutoScaleConfigResult.cc @@ -63,22 +63,22 @@ void GetAutoScaleConfigResult::parse(const std::string &payload) queuesObject.minNodesInQueue = std::stoi(valueQueuesQueueInfo["MinNodesInQueue"].asString()); if(!valueQueuesQueueInfo["QueueImageId"].isNull()) queuesObject.queueImageId = valueQueuesQueueInfo["QueueImageId"].asString(); - auto allInstanceTypesNode = allQueuesNode["InstanceTypes"]["InstanceTypeInfo"]; - for (auto allQueuesNodeInstanceTypesInstanceTypeInfo : allInstanceTypesNode) + auto allInstanceTypesNode = valueQueuesQueueInfo["InstanceTypes"]["InstanceTypeInfo"]; + for (auto valueQueuesQueueInfoInstanceTypesInstanceTypeInfo : allInstanceTypesNode) { QueueInfo::InstanceTypeInfo instanceTypesObject; - if(!allQueuesNodeInstanceTypesInstanceTypeInfo["InstanceType"].isNull()) - instanceTypesObject.instanceType = allQueuesNodeInstanceTypesInstanceTypeInfo["InstanceType"].asString(); - if(!allQueuesNodeInstanceTypesInstanceTypeInfo["SpotStrategy"].isNull()) - instanceTypesObject.spotStrategy = allQueuesNodeInstanceTypesInstanceTypeInfo["SpotStrategy"].asString(); - if(!allQueuesNodeInstanceTypesInstanceTypeInfo["SpotPriceLimit"].isNull()) - instanceTypesObject.spotPriceLimit = std::stof(allQueuesNodeInstanceTypesInstanceTypeInfo["SpotPriceLimit"].asString()); - if(!allQueuesNodeInstanceTypesInstanceTypeInfo["ZoneId"].isNull()) - instanceTypesObject.zoneId = allQueuesNodeInstanceTypesInstanceTypeInfo["ZoneId"].asString(); - if(!allQueuesNodeInstanceTypesInstanceTypeInfo["VSwitchId"].isNull()) - instanceTypesObject.vSwitchId = allQueuesNodeInstanceTypesInstanceTypeInfo["VSwitchId"].asString(); - if(!allQueuesNodeInstanceTypesInstanceTypeInfo["HostNamePrefix"].isNull()) - instanceTypesObject.hostNamePrefix = allQueuesNodeInstanceTypesInstanceTypeInfo["HostNamePrefix"].asString(); + if(!valueQueuesQueueInfoInstanceTypesInstanceTypeInfo["InstanceType"].isNull()) + instanceTypesObject.instanceType = valueQueuesQueueInfoInstanceTypesInstanceTypeInfo["InstanceType"].asString(); + if(!valueQueuesQueueInfoInstanceTypesInstanceTypeInfo["SpotStrategy"].isNull()) + instanceTypesObject.spotStrategy = valueQueuesQueueInfoInstanceTypesInstanceTypeInfo["SpotStrategy"].asString(); + if(!valueQueuesQueueInfoInstanceTypesInstanceTypeInfo["SpotPriceLimit"].isNull()) + instanceTypesObject.spotPriceLimit = std::stof(valueQueuesQueueInfoInstanceTypesInstanceTypeInfo["SpotPriceLimit"].asString()); + if(!valueQueuesQueueInfoInstanceTypesInstanceTypeInfo["ZoneId"].isNull()) + instanceTypesObject.zoneId = valueQueuesQueueInfoInstanceTypesInstanceTypeInfo["ZoneId"].asString(); + if(!valueQueuesQueueInfoInstanceTypesInstanceTypeInfo["VSwitchId"].isNull()) + instanceTypesObject.vSwitchId = valueQueuesQueueInfoInstanceTypesInstanceTypeInfo["VSwitchId"].asString(); + if(!valueQueuesQueueInfoInstanceTypesInstanceTypeInfo["HostNamePrefix"].isNull()) + instanceTypesObject.hostNamePrefix = valueQueuesQueueInfoInstanceTypesInstanceTypeInfo["HostNamePrefix"].asString(); queuesObject.instanceTypes.push_back(instanceTypesObject); } queues_.push_back(queuesObject); diff --git a/ehpc/src/model/GetClusterVolumesResult.cc b/ehpc/src/model/GetClusterVolumesResult.cc index ee742099c..55158271b 100644 --- a/ehpc/src/model/GetClusterVolumesResult.cc +++ b/ehpc/src/model/GetClusterVolumesResult.cc @@ -61,12 +61,12 @@ void GetClusterVolumesResult::parse(const std::string &payload) volumesObject.jobQueue = valueVolumesVolumeInfo["JobQueue"].asString(); if(!valueVolumesVolumeInfo["MustKeep"].isNull()) volumesObject.mustKeep = valueVolumesVolumeInfo["MustKeep"].asString() == "true"; - auto allRolesNode = allVolumesNode["Roles"]["RoleInfo"]; - for (auto allVolumesNodeRolesRoleInfo : allRolesNode) + auto allRolesNode = valueVolumesVolumeInfo["Roles"]["RoleInfo"]; + for (auto valueVolumesVolumeInfoRolesRoleInfo : allRolesNode) { VolumeInfo::RoleInfo rolesObject; - if(!allVolumesNodeRolesRoleInfo["Name"].isNull()) - rolesObject.name = allVolumesNodeRolesRoleInfo["Name"].asString(); + if(!valueVolumesVolumeInfoRolesRoleInfo["Name"].isNull()) + rolesObject.name = valueVolumesVolumeInfoRolesRoleInfo["Name"].asString(); volumesObject.roles.push_back(rolesObject); } volumes_.push_back(volumesObject); diff --git a/ehpc/src/model/GetHealthMonitorLogsRequest.cc b/ehpc/src/model/GetHealthMonitorLogsRequest.cc new file mode 100644 index 000000000..433bb109a --- /dev/null +++ b/ehpc/src/model/GetHealthMonitorLogsRequest.cc @@ -0,0 +1,95 @@ +/* + * 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 + +using AlibabaCloud::EHPC::Model::GetHealthMonitorLogsRequest; + +GetHealthMonitorLogsRequest::GetHealthMonitorLogsRequest() : + RpcServiceRequest("ehpc", "2018-04-12", "GetHealthMonitorLogs") +{ + setMethod(HttpRequest::Method::Get); +} + +GetHealthMonitorLogsRequest::~GetHealthMonitorLogsRequest() +{} + +int GetHealthMonitorLogsRequest::getEndTime()const +{ + return endTime_; +} + +void GetHealthMonitorLogsRequest::setEndTime(int endTime) +{ + endTime_ = endTime; + setParameter("EndTime", std::to_string(endTime)); +} + +std::string GetHealthMonitorLogsRequest::getClusterId()const +{ + return clusterId_; +} + +void GetHealthMonitorLogsRequest::setClusterId(const std::string& clusterId) +{ + clusterId_ = clusterId; + setParameter("ClusterId", clusterId); +} + +int GetHealthMonitorLogsRequest::getStartTime()const +{ + return startTime_; +} + +void GetHealthMonitorLogsRequest::setStartTime(int startTime) +{ + startTime_ = startTime; + setParameter("StartTime", std::to_string(startTime)); +} + +std::string GetHealthMonitorLogsRequest::getAccessKeyId()const +{ + return accessKeyId_; +} + +void GetHealthMonitorLogsRequest::setAccessKeyId(const std::string& accessKeyId) +{ + accessKeyId_ = accessKeyId; + setParameter("AccessKeyId", accessKeyId); +} + +bool GetHealthMonitorLogsRequest::getEnableReverse()const +{ + return enableReverse_; +} + +void GetHealthMonitorLogsRequest::setEnableReverse(bool enableReverse) +{ + enableReverse_ = enableReverse; + setParameter("EnableReverse", enableReverse ? "true" : "false"); +} + +std::string GetHealthMonitorLogsRequest::getFilter()const +{ + return filter_; +} + +void GetHealthMonitorLogsRequest::setFilter(const std::string& filter) +{ + filter_ = filter; + setParameter("Filter", filter); +} + diff --git a/ehpc/src/model/GetHealthMonitorLogsResult.cc b/ehpc/src/model/GetHealthMonitorLogsResult.cc new file mode 100644 index 000000000..bf4e5ee8a --- /dev/null +++ b/ehpc/src/model/GetHealthMonitorLogsResult.cc @@ -0,0 +1,87 @@ +/* + * 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 +#include + +using namespace AlibabaCloud::EHPC; +using namespace AlibabaCloud::EHPC::Model; + +GetHealthMonitorLogsResult::GetHealthMonitorLogsResult() : + ServiceResult() +{} + +GetHealthMonitorLogsResult::GetHealthMonitorLogsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetHealthMonitorLogsResult::~GetHealthMonitorLogsResult() +{} + +void GetHealthMonitorLogsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allLogInfoNode = value["LogInfo"]["Logs"]; + for (auto valueLogInfoLogs : allLogInfoNode) + { + Logs logInfoObject; + if(!valueLogInfoLogs["HealthId"].isNull()) + logInfoObject.healthId = valueLogInfoLogs["HealthId"].asString(); + if(!valueLogInfoLogs["HostName"].isNull()) + logInfoObject.hostName = valueLogInfoLogs["HostName"].asString(); + if(!valueLogInfoLogs["InstanceId"].isNull()) + logInfoObject.instanceId = valueLogInfoLogs["InstanceId"].asString(); + if(!valueLogInfoLogs["ItemDescription"].isNull()) + logInfoObject.itemDescription = valueLogInfoLogs["ItemDescription"].asString(); + if(!valueLogInfoLogs["ItemName"].isNull()) + logInfoObject.itemName = valueLogInfoLogs["ItemName"].asString(); + if(!valueLogInfoLogs["Level"].isNull()) + logInfoObject.level = valueLogInfoLogs["Level"].asString(); + if(!valueLogInfoLogs["SceneDescription"].isNull()) + logInfoObject.sceneDescription = valueLogInfoLogs["SceneDescription"].asString(); + if(!valueLogInfoLogs["SceneName"].isNull()) + logInfoObject.sceneName = valueLogInfoLogs["SceneName"].asString(); + if(!valueLogInfoLogs["Time"].isNull()) + logInfoObject.time = std::stoi(valueLogInfoLogs["Time"].asString()); + auto allCheckListNode = valueLogInfoLogs["CheckList"]["CheckListItem"]; + for (auto valueLogInfoLogsCheckListCheckListItem : allCheckListNode) + { + Logs::CheckListItem checkListObject; + if(!valueLogInfoLogsCheckListCheckListItem["CheckDescription"].isNull()) + checkListObject.checkDescription = valueLogInfoLogsCheckListCheckListItem["CheckDescription"].asString(); + if(!valueLogInfoLogsCheckListCheckListItem["CheckInfo"].isNull()) + checkListObject.checkInfo = valueLogInfoLogsCheckListCheckListItem["CheckInfo"].asString(); + if(!valueLogInfoLogsCheckListCheckListItem["CheckName"].isNull()) + checkListObject.checkName = valueLogInfoLogsCheckListCheckListItem["CheckName"].asString(); + if(!valueLogInfoLogsCheckListCheckListItem["CheckSolution"].isNull()) + checkListObject.checkSolution = valueLogInfoLogsCheckListCheckListItem["CheckSolution"].asString(); + logInfoObject.checkList.push_back(checkListObject); + } + logInfo_.push_back(logInfoObject); + } + +} + +std::vector GetHealthMonitorLogsResult::getLogInfo()const +{ + return logInfo_; +} + diff --git a/ehpc/src/model/InitializeEHPCRequest.cc b/ehpc/src/model/InitializeEHPCRequest.cc new file mode 100644 index 000000000..d627e27ef --- /dev/null +++ b/ehpc/src/model/InitializeEHPCRequest.cc @@ -0,0 +1,40 @@ +/* + * 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 + +using AlibabaCloud::EHPC::Model::InitializeEHPCRequest; + +InitializeEHPCRequest::InitializeEHPCRequest() : + RpcServiceRequest("ehpc", "2018-04-12", "InitializeEHPC") +{ + setMethod(HttpRequest::Method::Get); +} + +InitializeEHPCRequest::~InitializeEHPCRequest() +{} + +std::string InitializeEHPCRequest::getRegionId()const +{ + return regionId_; +} + +void InitializeEHPCRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + diff --git a/ehpc/src/model/InitializeEHPCResult.cc b/ehpc/src/model/InitializeEHPCResult.cc new file mode 100644 index 000000000..9ff5a4048 --- /dev/null +++ b/ehpc/src/model/InitializeEHPCResult.cc @@ -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 +#include + +using namespace AlibabaCloud::EHPC; +using namespace AlibabaCloud::EHPC::Model; + +InitializeEHPCResult::InitializeEHPCResult() : + ServiceResult() +{} + +InitializeEHPCResult::InitializeEHPCResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +InitializeEHPCResult::~InitializeEHPCResult() +{} + +void InitializeEHPCResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/ehpc/src/model/ListAvailableEcsTypesResult.cc b/ehpc/src/model/ListAvailableEcsTypesResult.cc index e8ee65ab1..2ce2933c2 100644 --- a/ehpc/src/model/ListAvailableEcsTypesResult.cc +++ b/ehpc/src/model/ListAvailableEcsTypesResult.cc @@ -47,32 +47,32 @@ void ListAvailableEcsTypesResult::parse(const std::string &payload) instanceTypeFamiliesObject.instanceTypeFamilyId = valueInstanceTypeFamiliesInstanceTypeFamilyInfo["InstanceTypeFamilyId"].asString(); if(!valueInstanceTypeFamiliesInstanceTypeFamilyInfo["Generation"].isNull()) instanceTypeFamiliesObject.generation = valueInstanceTypeFamiliesInstanceTypeFamilyInfo["Generation"].asString(); - auto allTypesNode = allInstanceTypeFamiliesNode["Types"]["TypesInfo"]; - for (auto allInstanceTypeFamiliesNodeTypesTypesInfo : allTypesNode) + auto allTypesNode = valueInstanceTypeFamiliesInstanceTypeFamilyInfo["Types"]["TypesInfo"]; + for (auto valueInstanceTypeFamiliesInstanceTypeFamilyInfoTypesTypesInfo : allTypesNode) { InstanceTypeFamilyInfo::TypesInfo typesObject; - if(!allInstanceTypeFamiliesNodeTypesTypesInfo["CpuCoreCount"].isNull()) - typesObject.cpuCoreCount = std::stoi(allInstanceTypeFamiliesNodeTypesTypesInfo["CpuCoreCount"].asString()); - if(!allInstanceTypeFamiliesNodeTypesTypesInfo["MemorySize"].isNull()) - typesObject.memorySize = std::stoi(allInstanceTypeFamiliesNodeTypesTypesInfo["MemorySize"].asString()); - if(!allInstanceTypeFamiliesNodeTypesTypesInfo["GPUAmount"].isNull()) - typesObject.gPUAmount = std::stoi(allInstanceTypeFamiliesNodeTypesTypesInfo["GPUAmount"].asString()); - if(!allInstanceTypeFamiliesNodeTypesTypesInfo["InstanceBandwidthRx"].isNull()) - typesObject.instanceBandwidthRx = std::stoi(allInstanceTypeFamiliesNodeTypesTypesInfo["InstanceBandwidthRx"].asString()); - if(!allInstanceTypeFamiliesNodeTypesTypesInfo["InstancePpsRx"].isNull()) - typesObject.instancePpsRx = std::stoi(allInstanceTypeFamiliesNodeTypesTypesInfo["InstancePpsRx"].asString()); - if(!allInstanceTypeFamiliesNodeTypesTypesInfo["InstancePpsTx"].isNull()) - typesObject.instancePpsTx = std::stoi(allInstanceTypeFamiliesNodeTypesTypesInfo["InstancePpsTx"].asString()); - if(!allInstanceTypeFamiliesNodeTypesTypesInfo["EniQuantity"].isNull()) - typesObject.eniQuantity = std::stoi(allInstanceTypeFamiliesNodeTypesTypesInfo["EniQuantity"].asString()); - if(!allInstanceTypeFamiliesNodeTypesTypesInfo["InstanceBandwidthTx"].isNull()) - typesObject.instanceBandwidthTx = std::stoi(allInstanceTypeFamiliesNodeTypesTypesInfo["InstanceBandwidthTx"].asString()); - if(!allInstanceTypeFamiliesNodeTypesTypesInfo["InstanceTypeId"].isNull()) - typesObject.instanceTypeId = allInstanceTypeFamiliesNodeTypesTypesInfo["InstanceTypeId"].asString(); - if(!allInstanceTypeFamiliesNodeTypesTypesInfo["GPUSpec"].isNull()) - typesObject.gPUSpec = allInstanceTypeFamiliesNodeTypesTypesInfo["GPUSpec"].asString(); - if(!allInstanceTypeFamiliesNodeTypesTypesInfo["Status"].isNull()) - typesObject.status = allInstanceTypeFamiliesNodeTypesTypesInfo["Status"].asString(); + if(!valueInstanceTypeFamiliesInstanceTypeFamilyInfoTypesTypesInfo["CpuCoreCount"].isNull()) + typesObject.cpuCoreCount = std::stoi(valueInstanceTypeFamiliesInstanceTypeFamilyInfoTypesTypesInfo["CpuCoreCount"].asString()); + if(!valueInstanceTypeFamiliesInstanceTypeFamilyInfoTypesTypesInfo["MemorySize"].isNull()) + typesObject.memorySize = std::stoi(valueInstanceTypeFamiliesInstanceTypeFamilyInfoTypesTypesInfo["MemorySize"].asString()); + if(!valueInstanceTypeFamiliesInstanceTypeFamilyInfoTypesTypesInfo["GPUAmount"].isNull()) + typesObject.gPUAmount = std::stoi(valueInstanceTypeFamiliesInstanceTypeFamilyInfoTypesTypesInfo["GPUAmount"].asString()); + if(!valueInstanceTypeFamiliesInstanceTypeFamilyInfoTypesTypesInfo["InstanceBandwidthRx"].isNull()) + typesObject.instanceBandwidthRx = std::stoi(valueInstanceTypeFamiliesInstanceTypeFamilyInfoTypesTypesInfo["InstanceBandwidthRx"].asString()); + if(!valueInstanceTypeFamiliesInstanceTypeFamilyInfoTypesTypesInfo["InstancePpsRx"].isNull()) + typesObject.instancePpsRx = std::stoi(valueInstanceTypeFamiliesInstanceTypeFamilyInfoTypesTypesInfo["InstancePpsRx"].asString()); + if(!valueInstanceTypeFamiliesInstanceTypeFamilyInfoTypesTypesInfo["InstancePpsTx"].isNull()) + typesObject.instancePpsTx = std::stoi(valueInstanceTypeFamiliesInstanceTypeFamilyInfoTypesTypesInfo["InstancePpsTx"].asString()); + if(!valueInstanceTypeFamiliesInstanceTypeFamilyInfoTypesTypesInfo["EniQuantity"].isNull()) + typesObject.eniQuantity = std::stoi(valueInstanceTypeFamiliesInstanceTypeFamilyInfoTypesTypesInfo["EniQuantity"].asString()); + if(!valueInstanceTypeFamiliesInstanceTypeFamilyInfoTypesTypesInfo["InstanceBandwidthTx"].isNull()) + typesObject.instanceBandwidthTx = std::stoi(valueInstanceTypeFamiliesInstanceTypeFamilyInfoTypesTypesInfo["InstanceBandwidthTx"].asString()); + if(!valueInstanceTypeFamiliesInstanceTypeFamilyInfoTypesTypesInfo["InstanceTypeId"].isNull()) + typesObject.instanceTypeId = valueInstanceTypeFamiliesInstanceTypeFamilyInfoTypesTypesInfo["InstanceTypeId"].asString(); + if(!valueInstanceTypeFamiliesInstanceTypeFamilyInfoTypesTypesInfo["GPUSpec"].isNull()) + typesObject.gPUSpec = valueInstanceTypeFamiliesInstanceTypeFamilyInfoTypesTypesInfo["GPUSpec"].asString(); + if(!valueInstanceTypeFamiliesInstanceTypeFamilyInfoTypesTypesInfo["Status"].isNull()) + typesObject.status = valueInstanceTypeFamiliesInstanceTypeFamilyInfoTypesTypesInfo["Status"].asString(); instanceTypeFamiliesObject.types.push_back(typesObject); } instanceTypeFamilies_.push_back(instanceTypeFamiliesObject); diff --git a/ehpc/src/model/ListClustersMetaResult.cc b/ehpc/src/model/ListClustersMetaResult.cc index ec86fe3a6..e8925c029 100644 --- a/ehpc/src/model/ListClustersMetaResult.cc +++ b/ehpc/src/model/ListClustersMetaResult.cc @@ -53,6 +53,18 @@ void ListClustersMetaResult::parse(const std::string &payload) clustersObject.status = valueClustersClusterInfoSimple["Status"].asString(); if(!valueClustersClusterInfoSimple["Location"].isNull()) clustersObject.location = valueClustersClusterInfoSimple["Location"].asString(); + if(!valueClustersClusterInfoSimple["OsTag"].isNull()) + clustersObject.osTag = valueClustersClusterInfoSimple["OsTag"].asString(); + if(!valueClustersClusterInfoSimple["ClientVersion"].isNull()) + clustersObject.clientVersion = valueClustersClusterInfoSimple["ClientVersion"].asString(); + if(!valueClustersClusterInfoSimple["AccountType"].isNull()) + clustersObject.accountType = valueClustersClusterInfoSimple["AccountType"].asString(); + if(!valueClustersClusterInfoSimple["SchedulerType"].isNull()) + clustersObject.schedulerType = valueClustersClusterInfoSimple["SchedulerType"].asString(); + if(!valueClustersClusterInfoSimple["VpcId"].isNull()) + clustersObject.vpcId = valueClustersClusterInfoSimple["VpcId"].asString(); + if(!valueClustersClusterInfoSimple["DeployMode"].isNull()) + clustersObject.deployMode = valueClustersClusterInfoSimple["DeployMode"].asString(); clusters_.push_back(clustersObject); } if(!value["TotalCount"].isNull()) diff --git a/ehpc/src/model/ListClustersResult.cc b/ehpc/src/model/ListClustersResult.cc index 00cece95e..3abac0afc 100644 --- a/ehpc/src/model/ListClustersResult.cc +++ b/ehpc/src/model/ListClustersResult.cc @@ -95,6 +95,8 @@ void ListClustersResult::parse(const std::string &payload) clustersObject.computeSpotStrategy = valueClustersClusterInfoSimple["ComputeSpotStrategy"].asString(); if(!valueClustersClusterInfoSimple["ComputeSpotPriceLimit"].isNull()) clustersObject.computeSpotPriceLimit = std::stof(valueClustersClusterInfoSimple["ComputeSpotPriceLimit"].asString()); + if(!valueClustersClusterInfoSimple["ClientVersion"].isNull()) + clustersObject.clientVersion = valueClustersClusterInfoSimple["ClientVersion"].asString(); auto managersNode = value["Managers"]; if(!managersNode["Total"].isNull()) clustersObject.managers.total = std::stoi(managersNode["Total"].asString()); diff --git a/ehpc/src/model/ListCpfsFileSystemsResult.cc b/ehpc/src/model/ListCpfsFileSystemsResult.cc index 64d2a6769..24ab3110e 100644 --- a/ehpc/src/model/ListCpfsFileSystemsResult.cc +++ b/ehpc/src/model/ListCpfsFileSystemsResult.cc @@ -57,20 +57,20 @@ void ListCpfsFileSystemsResult::parse(const std::string &payload) fileSystemListObject.protocolType = valueFileSystemListFileSystems["ProtocolType"].asString(); if(!valueFileSystemListFileSystems["Capacity"].isNull()) fileSystemListObject.capacity = valueFileSystemListFileSystems["Capacity"].asString(); - auto allMountTargetListNode = allFileSystemListNode["MountTargetList"]["MountTargets"]; - for (auto allFileSystemListNodeMountTargetListMountTargets : allMountTargetListNode) + auto allMountTargetListNode = valueFileSystemListFileSystems["MountTargetList"]["MountTargets"]; + for (auto valueFileSystemListFileSystemsMountTargetListMountTargets : allMountTargetListNode) { FileSystems::MountTargets mountTargetListObject; - if(!allFileSystemListNodeMountTargetListMountTargets["MountTargetDomain"].isNull()) - mountTargetListObject.mountTargetDomain = allFileSystemListNodeMountTargetListMountTargets["MountTargetDomain"].asString(); - if(!allFileSystemListNodeMountTargetListMountTargets["Status"].isNull()) - mountTargetListObject.status = allFileSystemListNodeMountTargetListMountTargets["Status"].asString(); - if(!allFileSystemListNodeMountTargetListMountTargets["NetworkType"].isNull()) - mountTargetListObject.networkType = allFileSystemListNodeMountTargetListMountTargets["NetworkType"].asString(); - if(!allFileSystemListNodeMountTargetListMountTargets["VswId"].isNull()) - mountTargetListObject.vswId = allFileSystemListNodeMountTargetListMountTargets["VswId"].asString(); - if(!allFileSystemListNodeMountTargetListMountTargets["VpcId"].isNull()) - mountTargetListObject.vpcId = allFileSystemListNodeMountTargetListMountTargets["VpcId"].asString(); + if(!valueFileSystemListFileSystemsMountTargetListMountTargets["MountTargetDomain"].isNull()) + mountTargetListObject.mountTargetDomain = valueFileSystemListFileSystemsMountTargetListMountTargets["MountTargetDomain"].asString(); + if(!valueFileSystemListFileSystemsMountTargetListMountTargets["Status"].isNull()) + mountTargetListObject.status = valueFileSystemListFileSystemsMountTargetListMountTargets["Status"].asString(); + if(!valueFileSystemListFileSystemsMountTargetListMountTargets["NetworkType"].isNull()) + mountTargetListObject.networkType = valueFileSystemListFileSystemsMountTargetListMountTargets["NetworkType"].asString(); + if(!valueFileSystemListFileSystemsMountTargetListMountTargets["VswId"].isNull()) + mountTargetListObject.vswId = valueFileSystemListFileSystemsMountTargetListMountTargets["VswId"].asString(); + if(!valueFileSystemListFileSystemsMountTargetListMountTargets["VpcId"].isNull()) + mountTargetListObject.vpcId = valueFileSystemListFileSystemsMountTargetListMountTargets["VpcId"].asString(); fileSystemListObject.mountTargetList.push_back(mountTargetListObject); } fileSystemList_.push_back(fileSystemListObject); diff --git a/ehpc/src/model/ListFileSystemWithMountTargetsResult.cc b/ehpc/src/model/ListFileSystemWithMountTargetsResult.cc index a3985b68c..6f2085675 100644 --- a/ehpc/src/model/ListFileSystemWithMountTargetsResult.cc +++ b/ehpc/src/model/ListFileSystemWithMountTargetsResult.cc @@ -67,30 +67,30 @@ void ListFileSystemWithMountTargetsResult::parse(const std::string &payload) fileSystemListObject.bandWidth = std::stoi(valueFileSystemListFileSystems["BandWidth"].asString()); if(!valueFileSystemListFileSystems["Status"].isNull()) fileSystemListObject.status = valueFileSystemListFileSystems["Status"].asString(); - auto allPackageListNode = allFileSystemListNode["PackageList"]["Packages"]; - for (auto allFileSystemListNodePackageListPackages : allPackageListNode) + auto allPackageListNode = valueFileSystemListFileSystems["PackageList"]["Packages"]; + for (auto valueFileSystemListFileSystemsPackageListPackages : allPackageListNode) { FileSystems::Packages packageListObject; - if(!allFileSystemListNodePackageListPackages["PackageId"].isNull()) - packageListObject.packageId = allFileSystemListNodePackageListPackages["PackageId"].asString(); + if(!valueFileSystemListFileSystemsPackageListPackages["PackageId"].isNull()) + packageListObject.packageId = valueFileSystemListFileSystemsPackageListPackages["PackageId"].asString(); fileSystemListObject.packageList.push_back(packageListObject); } - auto allMountTargetListNode = allFileSystemListNode["MountTargetList"]["MountTargets"]; - for (auto allFileSystemListNodeMountTargetListMountTargets : allMountTargetListNode) + auto allMountTargetListNode = valueFileSystemListFileSystems["MountTargetList"]["MountTargets"]; + for (auto valueFileSystemListFileSystemsMountTargetListMountTargets : allMountTargetListNode) { FileSystems::MountTargets mountTargetListObject; - if(!allFileSystemListNodeMountTargetListMountTargets["MountTargetDomain"].isNull()) - mountTargetListObject.mountTargetDomain = allFileSystemListNodeMountTargetListMountTargets["MountTargetDomain"].asString(); - if(!allFileSystemListNodeMountTargetListMountTargets["Status"].isNull()) - mountTargetListObject.status = allFileSystemListNodeMountTargetListMountTargets["Status"].asString(); - if(!allFileSystemListNodeMountTargetListMountTargets["NetworkType"].isNull()) - mountTargetListObject.networkType = allFileSystemListNodeMountTargetListMountTargets["NetworkType"].asString(); - if(!allFileSystemListNodeMountTargetListMountTargets["VswId"].isNull()) - mountTargetListObject.vswId = allFileSystemListNodeMountTargetListMountTargets["VswId"].asString(); - if(!allFileSystemListNodeMountTargetListMountTargets["VpcId"].isNull()) - mountTargetListObject.vpcId = allFileSystemListNodeMountTargetListMountTargets["VpcId"].asString(); - if(!allFileSystemListNodeMountTargetListMountTargets["AccessGroup"].isNull()) - mountTargetListObject.accessGroup = allFileSystemListNodeMountTargetListMountTargets["AccessGroup"].asString(); + if(!valueFileSystemListFileSystemsMountTargetListMountTargets["MountTargetDomain"].isNull()) + mountTargetListObject.mountTargetDomain = valueFileSystemListFileSystemsMountTargetListMountTargets["MountTargetDomain"].asString(); + if(!valueFileSystemListFileSystemsMountTargetListMountTargets["Status"].isNull()) + mountTargetListObject.status = valueFileSystemListFileSystemsMountTargetListMountTargets["Status"].asString(); + if(!valueFileSystemListFileSystemsMountTargetListMountTargets["NetworkType"].isNull()) + mountTargetListObject.networkType = valueFileSystemListFileSystemsMountTargetListMountTargets["NetworkType"].asString(); + if(!valueFileSystemListFileSystemsMountTargetListMountTargets["VswId"].isNull()) + mountTargetListObject.vswId = valueFileSystemListFileSystemsMountTargetListMountTargets["VswId"].asString(); + if(!valueFileSystemListFileSystemsMountTargetListMountTargets["VpcId"].isNull()) + mountTargetListObject.vpcId = valueFileSystemListFileSystemsMountTargetListMountTargets["VpcId"].asString(); + if(!valueFileSystemListFileSystemsMountTargetListMountTargets["AccessGroup"].isNull()) + mountTargetListObject.accessGroup = valueFileSystemListFileSystemsMountTargetListMountTargets["AccessGroup"].asString(); fileSystemListObject.mountTargetList.push_back(mountTargetListObject); } fileSystemList_.push_back(fileSystemListObject); diff --git a/ehpc/src/model/ListNodesNoPagingResult.cc b/ehpc/src/model/ListNodesNoPagingResult.cc index 77438b463..69d5611cc 100644 --- a/ehpc/src/model/ListNodesNoPagingResult.cc +++ b/ehpc/src/model/ListNodesNoPagingResult.cc @@ -71,6 +71,8 @@ void ListNodesNoPagingResult::parse(const std::string &payload) nodesObject.imageId = valueNodesNodeInfo["ImageId"].asString(); if(!valueNodesNodeInfo["HtEnabled"].isNull()) nodesObject.htEnabled = valueNodesNodeInfo["HtEnabled"].asString() == "true"; + if(!valueNodesNodeInfo["InstanceType"].isNull()) + nodesObject.instanceType = valueNodesNodeInfo["InstanceType"].asString(); auto totalResourcesNode = value["TotalResources"]; if(!totalResourcesNode["Cpu"].isNull()) nodesObject.totalResources.cpu = std::stoi(totalResourcesNode["Cpu"].asString()); diff --git a/ehpc/src/model/ListNodesRequest.cc b/ehpc/src/model/ListNodesRequest.cc index f4e358410..96821a660 100644 --- a/ehpc/src/model/ListNodesRequest.cc +++ b/ehpc/src/model/ListNodesRequest.cc @@ -71,6 +71,28 @@ void ListNodesRequest::setAccessKeyId(const std::string& accessKeyId) setParameter("AccessKeyId", accessKeyId); } +std::string ListNodesRequest::getFilter()const +{ + return filter_; +} + +void ListNodesRequest::setFilter(const std::string& filter) +{ + filter_ = filter; + setParameter("Filter", filter); +} + +std::string ListNodesRequest::getPrivateIpAddress()const +{ + return privateIpAddress_; +} + +void ListNodesRequest::setPrivateIpAddress(const std::string& privateIpAddress) +{ + privateIpAddress_ = privateIpAddress; + setParameter("PrivateIpAddress", privateIpAddress); +} + std::string ListNodesRequest::getSequence()const { return sequence_; @@ -104,3 +126,14 @@ void ListNodesRequest::setPageSize(int pageSize) setParameter("PageSize", std::to_string(pageSize)); } +std::string ListNodesRequest::getSortBy()const +{ + return sortBy_; +} + +void ListNodesRequest::setSortBy(const std::string& sortBy) +{ + sortBy_ = sortBy; + setParameter("SortBy", sortBy); +} + diff --git a/ehpc/src/model/ListNodesResult.cc b/ehpc/src/model/ListNodesResult.cc index 7878d1d31..9ef3e16df 100644 --- a/ehpc/src/model/ListNodesResult.cc +++ b/ehpc/src/model/ListNodesResult.cc @@ -85,6 +85,8 @@ void ListNodesResult::parse(const std::string &payload) nodesObject.htEnabled = valueNodesNodeInfo["HtEnabled"].asString() == "true"; if(!valueNodesNodeInfo["PublicIpAddress"].isNull()) nodesObject.publicIpAddress = valueNodesNodeInfo["PublicIpAddress"].asString(); + if(!valueNodesNodeInfo["InstanceType"].isNull()) + nodesObject.instanceType = valueNodesNodeInfo["InstanceType"].asString(); auto totalResourcesNode = value["TotalResources"]; if(!totalResourcesNode["Cpu"].isNull()) nodesObject.totalResources.cpu = std::stoi(totalResourcesNode["Cpu"].asString()); diff --git a/ehpc/src/model/ListSoftwaresResult.cc b/ehpc/src/model/ListSoftwaresResult.cc index 93ffe1bd9..b4cc317f6 100644 --- a/ehpc/src/model/ListSoftwaresResult.cc +++ b/ehpc/src/model/ListSoftwaresResult.cc @@ -55,18 +55,18 @@ void ListSoftwaresResult::parse(const std::string &payload) softwaresObject.accountType = valueSoftwaresSoftwareInfo["AccountType"].asString(); if(!valueSoftwaresSoftwareInfo["AccountVersion"].isNull()) softwaresObject.accountVersion = valueSoftwaresSoftwareInfo["AccountVersion"].asString(); - auto allApplicationsNode = allSoftwaresNode["Applications"]["ApplicationInfo"]; - for (auto allSoftwaresNodeApplicationsApplicationInfo : allApplicationsNode) + auto allApplicationsNode = valueSoftwaresSoftwareInfo["Applications"]["ApplicationInfo"]; + for (auto valueSoftwaresSoftwareInfoApplicationsApplicationInfo : allApplicationsNode) { SoftwareInfo::ApplicationInfo applicationsObject; - if(!allSoftwaresNodeApplicationsApplicationInfo["Tag"].isNull()) - applicationsObject.tag = allSoftwaresNodeApplicationsApplicationInfo["Tag"].asString(); - if(!allSoftwaresNodeApplicationsApplicationInfo["Name"].isNull()) - applicationsObject.name = allSoftwaresNodeApplicationsApplicationInfo["Name"].asString(); - if(!allSoftwaresNodeApplicationsApplicationInfo["Version"].isNull()) - applicationsObject.version = allSoftwaresNodeApplicationsApplicationInfo["Version"].asString(); - if(!allSoftwaresNodeApplicationsApplicationInfo["Required"].isNull()) - applicationsObject.required = allSoftwaresNodeApplicationsApplicationInfo["Required"].asString() == "true"; + if(!valueSoftwaresSoftwareInfoApplicationsApplicationInfo["Tag"].isNull()) + applicationsObject.tag = valueSoftwaresSoftwareInfoApplicationsApplicationInfo["Tag"].asString(); + if(!valueSoftwaresSoftwareInfoApplicationsApplicationInfo["Name"].isNull()) + applicationsObject.name = valueSoftwaresSoftwareInfoApplicationsApplicationInfo["Name"].asString(); + if(!valueSoftwaresSoftwareInfoApplicationsApplicationInfo["Version"].isNull()) + applicationsObject.version = valueSoftwaresSoftwareInfoApplicationsApplicationInfo["Version"].asString(); + if(!valueSoftwaresSoftwareInfoApplicationsApplicationInfo["Required"].isNull()) + applicationsObject.required = valueSoftwaresSoftwareInfoApplicationsApplicationInfo["Required"].asString() == "true"; softwaresObject.applications.push_back(applicationsObject); } softwares_.push_back(softwaresObject); diff --git a/ehpc/src/model/ListVolumesResult.cc b/ehpc/src/model/ListVolumesResult.cc index 4d112c7da..941a83434 100644 --- a/ehpc/src/model/ListVolumesResult.cc +++ b/ehpc/src/model/ListVolumesResult.cc @@ -59,28 +59,28 @@ void ListVolumesResult::parse(const std::string &payload) volumesObject.volumeMountpoint = valueVolumesVolumeInfo["VolumeMountpoint"].asString(); if(!valueVolumesVolumeInfo["RemoteDirectory"].isNull()) volumesObject.remoteDirectory = valueVolumesVolumeInfo["RemoteDirectory"].asString(); - auto allAdditionalVolumesNode = allVolumesNode["AdditionalVolumes"]["VolumeInfo"]; - for (auto allVolumesNodeAdditionalVolumesVolumeInfo : allAdditionalVolumesNode) + auto allAdditionalVolumesNode = valueVolumesVolumeInfo["AdditionalVolumes"]["VolumeInfo"]; + for (auto valueVolumesVolumeInfoAdditionalVolumesVolumeInfo : allAdditionalVolumesNode) { VolumeInfo::VolumeInfo1 additionalVolumesObject; - if(!allVolumesNodeAdditionalVolumesVolumeInfo["VolumeType"].isNull()) - additionalVolumesObject.volumeType = allVolumesNodeAdditionalVolumesVolumeInfo["VolumeType"].asString(); - if(!allVolumesNodeAdditionalVolumesVolumeInfo["VolumeId"].isNull()) - additionalVolumesObject.volumeId = allVolumesNodeAdditionalVolumesVolumeInfo["VolumeId"].asString(); - if(!allVolumesNodeAdditionalVolumesVolumeInfo["VolumeProtocol"].isNull()) - additionalVolumesObject.volumeProtocol = allVolumesNodeAdditionalVolumesVolumeInfo["VolumeProtocol"].asString(); - if(!allVolumesNodeAdditionalVolumesVolumeInfo["VolumeMountpoint"].isNull()) - additionalVolumesObject.volumeMountpoint = allVolumesNodeAdditionalVolumesVolumeInfo["VolumeMountpoint"].asString(); - if(!allVolumesNodeAdditionalVolumesVolumeInfo["RemoteDirectory"].isNull()) - additionalVolumesObject.remoteDirectory = allVolumesNodeAdditionalVolumesVolumeInfo["RemoteDirectory"].asString(); - if(!allVolumesNodeAdditionalVolumesVolumeInfo["LocalDirectory"].isNull()) - additionalVolumesObject.localDirectory = allVolumesNodeAdditionalVolumesVolumeInfo["LocalDirectory"].asString(); - if(!allVolumesNodeAdditionalVolumesVolumeInfo["Role"].isNull()) - additionalVolumesObject.role = allVolumesNodeAdditionalVolumesVolumeInfo["Role"].asString(); - if(!allVolumesNodeAdditionalVolumesVolumeInfo["Location"].isNull()) - additionalVolumesObject.location = allVolumesNodeAdditionalVolumesVolumeInfo["Location"].asString(); - if(!allVolumesNodeAdditionalVolumesVolumeInfo["JobQueue"].isNull()) - additionalVolumesObject.jobQueue = allVolumesNodeAdditionalVolumesVolumeInfo["JobQueue"].asString(); + if(!valueVolumesVolumeInfoAdditionalVolumesVolumeInfo["VolumeType"].isNull()) + additionalVolumesObject.volumeType = valueVolumesVolumeInfoAdditionalVolumesVolumeInfo["VolumeType"].asString(); + if(!valueVolumesVolumeInfoAdditionalVolumesVolumeInfo["VolumeId"].isNull()) + additionalVolumesObject.volumeId = valueVolumesVolumeInfoAdditionalVolumesVolumeInfo["VolumeId"].asString(); + if(!valueVolumesVolumeInfoAdditionalVolumesVolumeInfo["VolumeProtocol"].isNull()) + additionalVolumesObject.volumeProtocol = valueVolumesVolumeInfoAdditionalVolumesVolumeInfo["VolumeProtocol"].asString(); + if(!valueVolumesVolumeInfoAdditionalVolumesVolumeInfo["VolumeMountpoint"].isNull()) + additionalVolumesObject.volumeMountpoint = valueVolumesVolumeInfoAdditionalVolumesVolumeInfo["VolumeMountpoint"].asString(); + if(!valueVolumesVolumeInfoAdditionalVolumesVolumeInfo["RemoteDirectory"].isNull()) + additionalVolumesObject.remoteDirectory = valueVolumesVolumeInfoAdditionalVolumesVolumeInfo["RemoteDirectory"].asString(); + if(!valueVolumesVolumeInfoAdditionalVolumesVolumeInfo["LocalDirectory"].isNull()) + additionalVolumesObject.localDirectory = valueVolumesVolumeInfoAdditionalVolumesVolumeInfo["LocalDirectory"].asString(); + if(!valueVolumesVolumeInfoAdditionalVolumesVolumeInfo["Role"].isNull()) + additionalVolumesObject.role = valueVolumesVolumeInfoAdditionalVolumesVolumeInfo["Role"].asString(); + if(!valueVolumesVolumeInfoAdditionalVolumesVolumeInfo["Location"].isNull()) + additionalVolumesObject.location = valueVolumesVolumeInfoAdditionalVolumesVolumeInfo["Location"].asString(); + if(!valueVolumesVolumeInfoAdditionalVolumesVolumeInfo["JobQueue"].isNull()) + additionalVolumesObject.jobQueue = valueVolumesVolumeInfoAdditionalVolumesVolumeInfo["JobQueue"].asString(); volumesObject.additionalVolumes.push_back(additionalVolumesObject); } volumes_.push_back(volumesObject); diff --git a/ehpc/src/model/SubmitJobRequest.cc b/ehpc/src/model/SubmitJobRequest.cc index 918ba8bfd..f58fa38f5 100644 --- a/ehpc/src/model/SubmitJobRequest.cc +++ b/ehpc/src/model/SubmitJobRequest.cc @@ -49,6 +49,17 @@ void SubmitJobRequest::setRunasUserPassword(const std::string& runasUserPassword setParameter("RunasUserPassword", runasUserPassword); } +std::string SubmitJobRequest::getClockTime()const +{ + return clockTime_; +} + +void SubmitJobRequest::setClockTime(const std::string& clockTime) +{ + clockTime_ = clockTime; + setParameter("ClockTime", clockTime); +} + std::string SubmitJobRequest::getCommandLine()const { return commandLine_; @@ -115,6 +126,17 @@ void SubmitJobRequest::setPackagePath(const std::string& packagePath) setParameter("PackagePath", packagePath); } +std::string SubmitJobRequest::getMem()const +{ + return mem_; +} + +void SubmitJobRequest::setMem(const std::string& mem) +{ + mem_ = mem; + setParameter("Mem", mem); +} + std::string SubmitJobRequest::getStdoutRedirectPath()const { return stdoutRedirectPath_; @@ -181,6 +203,17 @@ void SubmitJobRequest::setReRunable(bool reRunable) setParameter("ReRunable", reRunable ? "true" : "false"); } +int SubmitJobRequest::getThread()const +{ + return thread_; +} + +void SubmitJobRequest::setThread(int thread) +{ + thread_ = thread; + setParameter("Thread", std::to_string(thread)); +} + int SubmitJobRequest::getPriority()const { return priority_; @@ -192,6 +225,39 @@ void SubmitJobRequest::setPriority(int priority) setParameter("Priority", std::to_string(priority)); } +int SubmitJobRequest::getGpu()const +{ + return gpu_; +} + +void SubmitJobRequest::setGpu(int gpu) +{ + gpu_ = gpu; + setParameter("Gpu", std::to_string(gpu)); +} + +int SubmitJobRequest::getNode()const +{ + return node_; +} + +void SubmitJobRequest::setNode(int node) +{ + node_ = node; + setParameter("Node", std::to_string(node)); +} + +int SubmitJobRequest::getTask()const +{ + return task_; +} + +void SubmitJobRequest::setTask(int task) +{ + task_ = task; + setParameter("Task", std::to_string(task)); +} + std::string SubmitJobRequest::getInputFileUrl()const { return inputFileUrl_;