EHPC SDK Auto Released By qianzheng.llc,Version:1.32.0

Signed-off-by: yixiong.jxy <yixiong.jxy@alibaba-inc.com>
This commit is contained in:
yixiong.jxy
2018-11-14 18:23:57 +08:00
parent 6072a0309b
commit e93d1a7c5c
23 changed files with 774 additions and 3 deletions

View File

@@ -69,6 +69,8 @@ set(ehpc_public_header_model
include/alibabacloud/ehpc/model/ListCustomImagesResult.h
include/alibabacloud/ehpc/model/InvokeShellCommandRequest.h
include/alibabacloud/ehpc/model/InvokeShellCommandResult.h
include/alibabacloud/ehpc/model/ListFileSystemWithMountTargetsRequest.h
include/alibabacloud/ehpc/model/ListFileSystemWithMountTargetsResult.h
include/alibabacloud/ehpc/model/AddUsersRequest.h
include/alibabacloud/ehpc/model/AddUsersResult.h
include/alibabacloud/ehpc/model/ListJobTemplatesRequest.h
@@ -154,7 +156,9 @@ set(ehpc_public_header_model
include/alibabacloud/ehpc/model/ListClusterLogsRequest.h
include/alibabacloud/ehpc/model/ListClusterLogsResult.h
include/alibabacloud/ehpc/model/RecoverClusterRequest.h
include/alibabacloud/ehpc/model/RecoverClusterResult.h )
include/alibabacloud/ehpc/model/RecoverClusterResult.h
include/alibabacloud/ehpc/model/ListAvailableEcsTypesRequest.h
include/alibabacloud/ehpc/model/ListAvailableEcsTypesResult.h )
set(ehpc_src
src/EHPCClient.cc
@@ -206,6 +210,8 @@ set(ehpc_src
src/model/ListCustomImagesResult.cc
src/model/InvokeShellCommandRequest.cc
src/model/InvokeShellCommandResult.cc
src/model/ListFileSystemWithMountTargetsRequest.cc
src/model/ListFileSystemWithMountTargetsResult.cc
src/model/AddUsersRequest.cc
src/model/AddUsersResult.cc
src/model/ListJobTemplatesRequest.cc
@@ -291,7 +297,9 @@ set(ehpc_src
src/model/ListClusterLogsRequest.cc
src/model/ListClusterLogsResult.cc
src/model/RecoverClusterRequest.cc
src/model/RecoverClusterResult.cc )
src/model/RecoverClusterResult.cc
src/model/ListAvailableEcsTypesRequest.cc
src/model/ListAvailableEcsTypesResult.cc )
add_library(ehpc ${LIB_TYPE}
${ehpc_public_header}

View File

@@ -70,6 +70,8 @@
#include "model/ListCustomImagesResult.h"
#include "model/InvokeShellCommandRequest.h"
#include "model/InvokeShellCommandResult.h"
#include "model/ListFileSystemWithMountTargetsRequest.h"
#include "model/ListFileSystemWithMountTargetsResult.h"
#include "model/AddUsersRequest.h"
#include "model/AddUsersResult.h"
#include "model/ListJobTemplatesRequest.h"
@@ -156,6 +158,8 @@
#include "model/ListClusterLogsResult.h"
#include "model/RecoverClusterRequest.h"
#include "model/RecoverClusterResult.h"
#include "model/ListAvailableEcsTypesRequest.h"
#include "model/ListAvailableEcsTypesResult.h"
namespace AlibabaCloud
@@ -237,6 +241,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::InvokeShellCommandResult> InvokeShellCommandOutcome;
typedef std::future<InvokeShellCommandOutcome> InvokeShellCommandOutcomeCallable;
typedef std::function<void(const EHPCClient*, const Model::InvokeShellCommandRequest&, const InvokeShellCommandOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> InvokeShellCommandAsyncHandler;
typedef Outcome<Error, Model::ListFileSystemWithMountTargetsResult> ListFileSystemWithMountTargetsOutcome;
typedef std::future<ListFileSystemWithMountTargetsOutcome> ListFileSystemWithMountTargetsOutcomeCallable;
typedef std::function<void(const EHPCClient*, const Model::ListFileSystemWithMountTargetsRequest&, const ListFileSystemWithMountTargetsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListFileSystemWithMountTargetsAsyncHandler;
typedef Outcome<Error, Model::AddUsersResult> AddUsersOutcome;
typedef std::future<AddUsersOutcome> AddUsersOutcomeCallable;
typedef std::function<void(const EHPCClient*, const Model::AddUsersRequest&, const AddUsersOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddUsersAsyncHandler;
@@ -366,6 +373,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::RecoverClusterResult> RecoverClusterOutcome;
typedef std::future<RecoverClusterOutcome> RecoverClusterOutcomeCallable;
typedef std::function<void(const EHPCClient*, const Model::RecoverClusterRequest&, const RecoverClusterOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecoverClusterAsyncHandler;
typedef Outcome<Error, Model::ListAvailableEcsTypesResult> ListAvailableEcsTypesOutcome;
typedef std::future<ListAvailableEcsTypesOutcome> ListAvailableEcsTypesOutcomeCallable;
typedef std::function<void(const EHPCClient*, const Model::ListAvailableEcsTypesRequest&, const ListAvailableEcsTypesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListAvailableEcsTypesAsyncHandler;
EHPCClient(const Credentials &credentials, const ClientConfiguration &configuration);
EHPCClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
@@ -443,6 +453,9 @@ namespace AlibabaCloud
InvokeShellCommandOutcome invokeShellCommand(const Model::InvokeShellCommandRequest &request)const;
void invokeShellCommandAsync(const Model::InvokeShellCommandRequest& request, const InvokeShellCommandAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
InvokeShellCommandOutcomeCallable invokeShellCommandCallable(const Model::InvokeShellCommandRequest& request) const;
ListFileSystemWithMountTargetsOutcome listFileSystemWithMountTargets(const Model::ListFileSystemWithMountTargetsRequest &request)const;
void listFileSystemWithMountTargetsAsync(const Model::ListFileSystemWithMountTargetsRequest& request, const ListFileSystemWithMountTargetsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListFileSystemWithMountTargetsOutcomeCallable listFileSystemWithMountTargetsCallable(const Model::ListFileSystemWithMountTargetsRequest& request) const;
AddUsersOutcome addUsers(const Model::AddUsersRequest &request)const;
void addUsersAsync(const Model::AddUsersRequest& request, const AddUsersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
AddUsersOutcomeCallable addUsersCallable(const Model::AddUsersRequest& request) const;
@@ -572,6 +585,9 @@ namespace AlibabaCloud
RecoverClusterOutcome recoverCluster(const Model::RecoverClusterRequest &request)const;
void recoverClusterAsync(const Model::RecoverClusterRequest& request, const RecoverClusterAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RecoverClusterOutcomeCallable recoverClusterCallable(const Model::RecoverClusterRequest& request) const;
ListAvailableEcsTypesOutcome listAvailableEcsTypes(const Model::ListAvailableEcsTypesRequest &request)const;
void listAvailableEcsTypesAsync(const Model::ListAvailableEcsTypesRequest& request, const ListAvailableEcsTypesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListAvailableEcsTypesOutcomeCallable listAvailableEcsTypesCallable(const Model::ListAvailableEcsTypesRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;

View File

@@ -59,6 +59,8 @@ namespace AlibabaCloud
void setAutoRenew(const std::string& autoRenew);
std::string getEcsChargeType()const;
void setEcsChargeType(const std::string& ecsChargeType);
std::string getCreateMode()const;
void setCreateMode(const std::string& createMode);
std::string getInstanceType()const;
void setInstanceType(const std::string& instanceType);
std::string getComputeSpotPriceLimit()const;
@@ -77,6 +79,7 @@ namespace AlibabaCloud
std::string periodUnit_;
std::string autoRenew_;
std::string ecsChargeType_;
std::string createMode_;
std::string instanceType_;
std::string computeSpotPriceLimit_;

View File

@@ -30,6 +30,11 @@ namespace AlibabaCloud
{
class ALIBABACLOUD_EHPC_EXPORT CreateHybridClusterRequest : public RpcServiceRequest
{
struct PostInstallScript
{
std::string args;
std::string url;
};
struct Application
{
std::string tag;
@@ -53,6 +58,8 @@ namespace AlibabaCloud
void setEcsOrderComputeInstanceType(const std::string& ecsOrderComputeInstanceType);
std::string getOnPremiseVolumeRemotePath()const;
void setOnPremiseVolumeRemotePath(const std::string& onPremiseVolumeRemotePath);
std::string getJobQueue()const;
void setJobQueue(const std::string& jobQueue);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getVolumeType()const;
@@ -73,6 +80,8 @@ namespace AlibabaCloud
void setOsTag(const std::string& osTag);
std::string getRemoteDirectory()const;
void setRemoteDirectory(const std::string& remoteDirectory);
std::vector<PostInstallScript> getPostInstallScript()const;
void setPostInstallScript(const std::vector<PostInstallScript>& postInstallScript);
std::string getVSwitchId()const;
void setVSwitchId(const std::string& vSwitchId);
std::string getNodes()const;
@@ -102,6 +111,7 @@ namespace AlibabaCloud
std::string securityGroupName_;
std::string ecsOrderComputeInstanceType_;
std::string onPremiseVolumeRemotePath_;
std::string jobQueue_;
std::string accessKeyId_;
std::string volumeType_;
std::string password_;
@@ -112,6 +122,7 @@ namespace AlibabaCloud
std::string clientVersion_;
std::string osTag_;
std::string remoteDirectory_;
std::vector<PostInstallScript> postInstallScript_;
std::string vSwitchId_;
std::string nodes_;
std::vector<Application> application_;

View File

@@ -34,7 +34,9 @@ namespace AlibabaCloud
public:
struct QueueInfo
{
bool enableAutoGrow;
float spotPriceLimit;
bool enableAutoShrink;
std::string instanceType;
std::string queueName;
std::string spotStrategy;

View File

@@ -0,0 +1,57 @@
/*
* 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_LISTAVAILABLEECSTYPESREQUEST_H_
#define ALIBABACLOUD_EHPC_MODEL_LISTAVAILABLEECSTYPESREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ehpc/EHPCExport.h>
namespace AlibabaCloud
{
namespace EHPC
{
namespace Model
{
class ALIBABACLOUD_EHPC_EXPORT ListAvailableEcsTypesRequest : public RpcServiceRequest
{
public:
ListAvailableEcsTypesRequest();
~ListAvailableEcsTypesRequest();
std::string getSpotStrategy()const;
void setSpotStrategy(const std::string& spotStrategy);
std::string getZoneId()const;
void setZoneId(const std::string& zoneId);
std::string getInstanceChargeType()const;
void setInstanceChargeType(const std::string& instanceChargeType);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
private:
std::string spotStrategy_;
std::string zoneId_;
std::string instanceChargeType_;
std::string accessKeyId_;
};
}
}
}
#endif // !ALIBABACLOUD_EHPC_MODEL_LISTAVAILABLEECSTYPESREQUEST_H_

View File

@@ -0,0 +1,72 @@
/*
* 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_LISTAVAILABLEECSTYPESRESULT_H_
#define ALIBABACLOUD_EHPC_MODEL_LISTAVAILABLEECSTYPESRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ehpc/EHPCExport.h>
namespace AlibabaCloud
{
namespace EHPC
{
namespace Model
{
class ALIBABACLOUD_EHPC_EXPORT ListAvailableEcsTypesResult : public ServiceResult
{
public:
struct InstanceTypeFamilyInfo
{
struct TypesInfo
{
int memorySize;
int instancePpsTx;
int cpuCoreCount;
std::string gPUSpec;
int instancePpsRx;
std::string instanceTypeId;
int instanceBandwidthRx;
int eniQuantity;
int gPUAmount;
int instanceBandwidthTx;
};
std::string instanceTypeFamilyId;
std::vector<InstanceTypeFamilyInfo::TypesInfo> types;
std::string generation;
};
ListAvailableEcsTypesResult();
explicit ListAvailableEcsTypesResult(const std::string &payload);
~ListAvailableEcsTypesResult();
bool getSupportSpotInstance()const;
std::vector<InstanceTypeFamilyInfo> getInstanceTypeFamilies()const;
protected:
void parse(const std::string &payload);
private:
bool supportSpotInstance_;
std::vector<InstanceTypeFamilyInfo> instanceTypeFamilies_;
};
}
}
}
#endif // !ALIBABACLOUD_EHPC_MODEL_LISTAVAILABLEECSTYPESRESULT_H_

View File

@@ -0,0 +1,54 @@
/*
* 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_LISTFILESYSTEMWITHMOUNTTARGETSREQUEST_H_
#define ALIBABACLOUD_EHPC_MODEL_LISTFILESYSTEMWITHMOUNTTARGETSREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ehpc/EHPCExport.h>
namespace AlibabaCloud
{
namespace EHPC
{
namespace Model
{
class ALIBABACLOUD_EHPC_EXPORT ListFileSystemWithMountTargetsRequest : public RpcServiceRequest
{
public:
ListFileSystemWithMountTargetsRequest();
~ListFileSystemWithMountTargetsRequest();
int getPageSize()const;
void setPageSize(int pageSize);
int getPageNumber()const;
void setPageNumber(int pageNumber);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
private:
int pageSize_;
int pageNumber_;
std::string accessKeyId_;
};
}
}
}
#endif // !ALIBABACLOUD_EHPC_MODEL_LISTFILESYSTEMWITHMOUNTTARGETSREQUEST_H_

View File

@@ -0,0 +1,82 @@
/*
* 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_LISTFILESYSTEMWITHMOUNTTARGETSRESULT_H_
#define ALIBABACLOUD_EHPC_MODEL_LISTFILESYSTEMWITHMOUNTTARGETSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ehpc/EHPCExport.h>
namespace AlibabaCloud
{
namespace EHPC
{
namespace Model
{
class ALIBABACLOUD_EHPC_EXPORT ListFileSystemWithMountTargetsResult : public ServiceResult
{
public:
struct FileSystems
{
struct Packages
{
std::string packageId;
};
struct MountTargets
{
std::string status;
std::string vswId;
std::string vpcId;
std::string mountTargetDomain;
std::string networkType;
std::string accessGroup;
};
std::string storageType;
std::string protocolType;
std::vector<FileSystems::Packages> packageList;
std::string createTime;
std::vector<FileSystems::MountTargets> mountTargetList;
std::string destription;
std::string fileSystemId;
std::string regionId;
std::string meteredSize;
};
ListFileSystemWithMountTargetsResult();
explicit ListFileSystemWithMountTargetsResult(const std::string &payload);
~ListFileSystemWithMountTargetsResult();
int getTotalCount()const;
int getPageSize()const;
int getPageNumber()const;
std::vector<FileSystems> getFileSystemList()const;
protected:
void parse(const std::string &payload);
private:
int totalCount_;
int pageSize_;
int pageNumber_;
std::vector<FileSystems> fileSystemList_;
};
}
}
}
#endif // !ALIBABACLOUD_EHPC_MODEL_LISTFILESYSTEMWITHMOUNTTARGETSRESULT_H_

View File

@@ -53,6 +53,7 @@ namespace AlibabaCloud
std::string addTime;
UsedResources usedResources;
bool createdByEhpc;
std::string createMode;
std::string version;
TotalResources totalResources;
std::string expiredTime;

View File

@@ -35,7 +35,9 @@ namespace AlibabaCloud
std::string spotStrategy;
std::string queueName;
std::string instanceType;
bool enableAutoGrow;
float spotPriceLimit;
bool enableAutoShrink;
};
public:

View File

@@ -915,6 +915,42 @@ EHPCClient::InvokeShellCommandOutcomeCallable EHPCClient::invokeShellCommandCall
return task->get_future();
}
EHPCClient::ListFileSystemWithMountTargetsOutcome EHPCClient::listFileSystemWithMountTargets(const ListFileSystemWithMountTargetsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListFileSystemWithMountTargetsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListFileSystemWithMountTargetsOutcome(ListFileSystemWithMountTargetsResult(outcome.result()));
else
return ListFileSystemWithMountTargetsOutcome(outcome.error());
}
void EHPCClient::listFileSystemWithMountTargetsAsync(const ListFileSystemWithMountTargetsRequest& request, const ListFileSystemWithMountTargetsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listFileSystemWithMountTargets(request), context);
};
asyncExecute(new Runnable(fn));
}
EHPCClient::ListFileSystemWithMountTargetsOutcomeCallable EHPCClient::listFileSystemWithMountTargetsCallable(const ListFileSystemWithMountTargetsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListFileSystemWithMountTargetsOutcome()>>(
[this, request]()
{
return this->listFileSystemWithMountTargets(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EHPCClient::AddUsersOutcome EHPCClient::addUsers(const AddUsersRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -2463,3 +2499,39 @@ EHPCClient::RecoverClusterOutcomeCallable EHPCClient::recoverClusterCallable(con
return task->get_future();
}
EHPCClient::ListAvailableEcsTypesOutcome EHPCClient::listAvailableEcsTypes(const ListAvailableEcsTypesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListAvailableEcsTypesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListAvailableEcsTypesOutcome(ListAvailableEcsTypesResult(outcome.result()));
else
return ListAvailableEcsTypesOutcome(outcome.error());
}
void EHPCClient::listAvailableEcsTypesAsync(const ListAvailableEcsTypesRequest& request, const ListAvailableEcsTypesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listAvailableEcsTypes(request), context);
};
asyncExecute(new Runnable(fn));
}
EHPCClient::ListAvailableEcsTypesOutcomeCallable EHPCClient::listAvailableEcsTypesCallable(const ListAvailableEcsTypesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListAvailableEcsTypesOutcome()>>(
[this, request]()
{
return this->listAvailableEcsTypes(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -157,6 +157,17 @@ void AddNodesRequest::setEcsChargeType(const std::string& ecsChargeType)
setParameter("EcsChargeType", ecsChargeType);
}
std::string AddNodesRequest::getCreateMode()const
{
return createMode_;
}
void AddNodesRequest::setCreateMode(const std::string& createMode)
{
createMode_ = createMode;
setParameter("CreateMode", createMode);
}
std::string AddNodesRequest::getInstanceType()const
{
return instanceType_;

View File

@@ -102,6 +102,17 @@ void CreateHybridClusterRequest::setOnPremiseVolumeRemotePath(const std::string&
setParameter("OnPremiseVolumeRemotePath", onPremiseVolumeRemotePath);
}
std::string CreateHybridClusterRequest::getJobQueue()const
{
return jobQueue_;
}
void CreateHybridClusterRequest::setJobQueue(const std::string& jobQueue)
{
jobQueue_ = jobQueue;
setParameter("JobQueue", jobQueue);
}
std::string CreateHybridClusterRequest::getAccessKeyId()const
{
return accessKeyId_;
@@ -212,6 +223,23 @@ void CreateHybridClusterRequest::setRemoteDirectory(const std::string& remoteDir
setParameter("RemoteDirectory", remoteDirectory);
}
std::vector<CreateHybridClusterRequest::PostInstallScript> CreateHybridClusterRequest::getPostInstallScript()const
{
return postInstallScript_;
}
void CreateHybridClusterRequest::setPostInstallScript(const std::vector<PostInstallScript>& postInstallScript)
{
postInstallScript_ = postInstallScript;
int i = 0;
for(int i = 0; i!= postInstallScript.size(); i++) {
auto obj = postInstallScript.at(i);
std::string str ="PostInstallScript."+ std::to_string(i);
setParameter(str + ".Args", obj.args);
setParameter(str + ".Url", obj.url);
}
}
std::string CreateHybridClusterRequest::getVSwitchId()const
{
return vSwitchId_;

View File

@@ -52,6 +52,10 @@ void GetAutoScaleConfigResult::parse(const std::string &payload)
queuesObject.spotStrategy = value["SpotStrategy"].asString();
if(!value["SpotPriceLimit"].isNull())
queuesObject.spotPriceLimit = std::stof(value["SpotPriceLimit"].asString());
if(!value["EnableAutoGrow"].isNull())
queuesObject.enableAutoGrow = value["EnableAutoGrow"].asString() == "true";
if(!value["EnableAutoShrink"].isNull())
queuesObject.enableAutoShrink = value["EnableAutoShrink"].asString() == "true";
queues_.push_back(queuesObject);
}
if(!value["Uid"].isNull())

View File

@@ -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.
*/
#include <alibabacloud/ehpc/model/ListAvailableEcsTypesRequest.h>
using AlibabaCloud::EHPC::Model::ListAvailableEcsTypesRequest;
ListAvailableEcsTypesRequest::ListAvailableEcsTypesRequest() :
RpcServiceRequest("ehpc", "2018-04-12", "ListAvailableEcsTypes")
{}
ListAvailableEcsTypesRequest::~ListAvailableEcsTypesRequest()
{}
std::string ListAvailableEcsTypesRequest::getSpotStrategy()const
{
return spotStrategy_;
}
void ListAvailableEcsTypesRequest::setSpotStrategy(const std::string& spotStrategy)
{
spotStrategy_ = spotStrategy;
setParameter("SpotStrategy", spotStrategy);
}
std::string ListAvailableEcsTypesRequest::getZoneId()const
{
return zoneId_;
}
void ListAvailableEcsTypesRequest::setZoneId(const std::string& zoneId)
{
zoneId_ = zoneId;
setParameter("ZoneId", zoneId);
}
std::string ListAvailableEcsTypesRequest::getInstanceChargeType()const
{
return instanceChargeType_;
}
void ListAvailableEcsTypesRequest::setInstanceChargeType(const std::string& instanceChargeType)
{
instanceChargeType_ = instanceChargeType;
setParameter("InstanceChargeType", instanceChargeType);
}
std::string ListAvailableEcsTypesRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void ListAvailableEcsTypesRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,93 @@
/*
* 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/ListAvailableEcsTypesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::EHPC;
using namespace AlibabaCloud::EHPC::Model;
ListAvailableEcsTypesResult::ListAvailableEcsTypesResult() :
ServiceResult()
{}
ListAvailableEcsTypesResult::ListAvailableEcsTypesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListAvailableEcsTypesResult::~ListAvailableEcsTypesResult()
{}
void ListAvailableEcsTypesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allInstanceTypeFamilies = value["InstanceTypeFamilies"]["InstanceTypeFamilyInfo"];
for (auto value : allInstanceTypeFamilies)
{
InstanceTypeFamilyInfo instanceTypeFamiliesObject;
if(!value["InstanceTypeFamilyId"].isNull())
instanceTypeFamiliesObject.instanceTypeFamilyId = value["InstanceTypeFamilyId"].asString();
if(!value["Generation"].isNull())
instanceTypeFamiliesObject.generation = value["Generation"].asString();
auto allTypes = value["Types"]["TypesInfo"];
for (auto value : allTypes)
{
InstanceTypeFamilyInfo::TypesInfo typesObject;
if(!value["CpuCoreCount"].isNull())
typesObject.cpuCoreCount = std::stoi(value["CpuCoreCount"].asString());
if(!value["MemorySize"].isNull())
typesObject.memorySize = std::stoi(value["MemorySize"].asString());
if(!value["GPUAmount"].isNull())
typesObject.gPUAmount = std::stoi(value["GPUAmount"].asString());
if(!value["InstanceBandwidthRx"].isNull())
typesObject.instanceBandwidthRx = std::stoi(value["InstanceBandwidthRx"].asString());
if(!value["InstancePpsRx"].isNull())
typesObject.instancePpsRx = std::stoi(value["InstancePpsRx"].asString());
if(!value["InstancePpsTx"].isNull())
typesObject.instancePpsTx = std::stoi(value["InstancePpsTx"].asString());
if(!value["EniQuantity"].isNull())
typesObject.eniQuantity = std::stoi(value["EniQuantity"].asString());
if(!value["InstanceBandwidthTx"].isNull())
typesObject.instanceBandwidthTx = std::stoi(value["InstanceBandwidthTx"].asString());
if(!value["InstanceTypeId"].isNull())
typesObject.instanceTypeId = value["InstanceTypeId"].asString();
if(!value["GPUSpec"].isNull())
typesObject.gPUSpec = value["GPUSpec"].asString();
instanceTypeFamiliesObject.types.push_back(typesObject);
}
instanceTypeFamilies_.push_back(instanceTypeFamiliesObject);
}
if(!value["SupportSpotInstance"].isNull())
supportSpotInstance_ = value["SupportSpotInstance"].asString() == "true";
}
bool ListAvailableEcsTypesResult::getSupportSpotInstance()const
{
return supportSpotInstance_;
}
std::vector<ListAvailableEcsTypesResult::InstanceTypeFamilyInfo> ListAvailableEcsTypesResult::getInstanceTypeFamilies()const
{
return instanceTypeFamilies_;
}

View File

@@ -0,0 +1,60 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ehpc/model/ListFileSystemWithMountTargetsRequest.h>
using AlibabaCloud::EHPC::Model::ListFileSystemWithMountTargetsRequest;
ListFileSystemWithMountTargetsRequest::ListFileSystemWithMountTargetsRequest() :
RpcServiceRequest("ehpc", "2018-04-12", "ListFileSystemWithMountTargets")
{}
ListFileSystemWithMountTargetsRequest::~ListFileSystemWithMountTargetsRequest()
{}
int ListFileSystemWithMountTargetsRequest::getPageSize()const
{
return pageSize_;
}
void ListFileSystemWithMountTargetsRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
int ListFileSystemWithMountTargetsRequest::getPageNumber()const
{
return pageNumber_;
}
void ListFileSystemWithMountTargetsRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}
std::string ListFileSystemWithMountTargetsRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void ListFileSystemWithMountTargetsRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,117 @@
/*
* 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/ListFileSystemWithMountTargetsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::EHPC;
using namespace AlibabaCloud::EHPC::Model;
ListFileSystemWithMountTargetsResult::ListFileSystemWithMountTargetsResult() :
ServiceResult()
{}
ListFileSystemWithMountTargetsResult::ListFileSystemWithMountTargetsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListFileSystemWithMountTargetsResult::~ListFileSystemWithMountTargetsResult()
{}
void ListFileSystemWithMountTargetsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allFileSystemList = value["FileSystemList"]["FileSystems"];
for (auto value : allFileSystemList)
{
FileSystems fileSystemListObject;
if(!value["RegionId"].isNull())
fileSystemListObject.regionId = value["RegionId"].asString();
if(!value["FileSystemId"].isNull())
fileSystemListObject.fileSystemId = value["FileSystemId"].asString();
if(!value["ProtocolType"].isNull())
fileSystemListObject.protocolType = value["ProtocolType"].asString();
if(!value["CreateTime"].isNull())
fileSystemListObject.createTime = value["CreateTime"].asString();
if(!value["Destription"].isNull())
fileSystemListObject.destription = value["Destription"].asString();
if(!value["StorageType"].isNull())
fileSystemListObject.storageType = value["StorageType"].asString();
if(!value["MeteredSize"].isNull())
fileSystemListObject.meteredSize = value["MeteredSize"].asString();
auto allPackageList = value["PackageList"]["Packages"];
for (auto value : allPackageList)
{
FileSystems::Packages packageListObject;
if(!value["PackageId"].isNull())
packageListObject.packageId = value["PackageId"].asString();
fileSystemListObject.packageList.push_back(packageListObject);
}
auto allMountTargetList = value["MountTargetList"]["MountTargets"];
for (auto value : allMountTargetList)
{
FileSystems::MountTargets mountTargetListObject;
if(!value["MountTargetDomain"].isNull())
mountTargetListObject.mountTargetDomain = value["MountTargetDomain"].asString();
if(!value["Status"].isNull())
mountTargetListObject.status = value["Status"].asString();
if(!value["NetworkType"].isNull())
mountTargetListObject.networkType = value["NetworkType"].asString();
if(!value["VswId"].isNull())
mountTargetListObject.vswId = value["VswId"].asString();
if(!value["VpcId"].isNull())
mountTargetListObject.vpcId = value["VpcId"].asString();
if(!value["AccessGroup"].isNull())
mountTargetListObject.accessGroup = value["AccessGroup"].asString();
fileSystemListObject.mountTargetList.push_back(mountTargetListObject);
}
fileSystemList_.push_back(fileSystemListObject);
}
if(!value["TotalCount"].isNull())
totalCount_ = std::stoi(value["TotalCount"].asString());
if(!value["PageNumber"].isNull())
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
}
int ListFileSystemWithMountTargetsResult::getTotalCount()const
{
return totalCount_;
}
int ListFileSystemWithMountTargetsResult::getPageSize()const
{
return pageSize_;
}
int ListFileSystemWithMountTargetsResult::getPageNumber()const
{
return pageNumber_;
}
std::vector<ListFileSystemWithMountTargetsResult::FileSystems> ListFileSystemWithMountTargetsResult::getFileSystemList()const
{
return fileSystemList_;
}

View File

@@ -72,6 +72,8 @@ void ListNodesResult::parse(const std::string &payload)
nodesObject.imageId = value["ImageId"].asString();
if(!value["Location"].isNull())
nodesObject.location = value["Location"].asString();
if(!value["CreateMode"].isNull())
nodesObject.createMode = value["CreateMode"].asString();
auto totalResourcesNode = value["TotalResources"];
if(!totalResourcesNode["Cpu"].isNull())
nodesObject.totalResources.cpu = std::stoi(totalResourcesNode["Cpu"].asString());

View File

@@ -161,7 +161,9 @@ void SetAutoScaleConfigRequest::setQueues(const std::vector<Queues>& queues)
setParameter(str + ".SpotStrategy", obj.spotStrategy);
setParameter(str + ".QueueName", obj.queueName);
setParameter(str + ".InstanceType", obj.instanceType);
setParameter(str + ".EnableAutoGrow", std::to_string(obj.enableAutoGrow));
setParameter(str + ".SpotPriceLimit", std::to_string(obj.spotPriceLimit));
setParameter(str + ".EnableAutoShrink", std::to_string(obj.enableAutoShrink));
}
}