Support UserData parameter for ApplyNodes interface.
This commit is contained in:
@@ -63,6 +63,8 @@ public:
|
||||
void setAccessKeyId(const std::string &accessKeyId);
|
||||
std::string getSystemDiskType() const;
|
||||
void setSystemDiskType(const std::string &systemDiskType);
|
||||
std::string getUserData() const;
|
||||
void setUserData(const std::string &userData);
|
||||
int getCores() const;
|
||||
void setCores(int cores);
|
||||
int getSystemDiskSize() const;
|
||||
@@ -111,6 +113,7 @@ private:
|
||||
std::string jobQueue_;
|
||||
std::string accessKeyId_;
|
||||
std::string systemDiskType_;
|
||||
std::string userData_;
|
||||
int cores_;
|
||||
int systemDiskSize_;
|
||||
std::vector<ZoneInfos> zoneInfos_;
|
||||
|
||||
@@ -147,6 +147,7 @@ namespace AlibabaCloud
|
||||
std::string baseOsTag;
|
||||
int withoutAgent;
|
||||
std::string imageName;
|
||||
std::string schedulerVersion;
|
||||
bool haEnable;
|
||||
std::string osTag;
|
||||
std::string ecsChargeType;
|
||||
|
||||
@@ -32,9 +32,12 @@ public:
|
||||
~InitializeEHPCRequest();
|
||||
std::string getRegionId() const;
|
||||
void setRegionId(const std::string ®ionId);
|
||||
std::string getServiceName() const;
|
||||
void setServiceName(const std::string &serviceName);
|
||||
|
||||
private:
|
||||
std::string regionId_;
|
||||
std::string serviceName_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace EHPC
|
||||
|
||||
@@ -41,6 +41,7 @@ namespace AlibabaCloud
|
||||
std::string schedulerType;
|
||||
std::string clientVersion;
|
||||
std::string accountType;
|
||||
std::string ehpcVersion;
|
||||
std::string name;
|
||||
std::string vpcId;
|
||||
std::string deployMode;
|
||||
|
||||
@@ -31,21 +31,21 @@ EHPCClient::EHPCClient(const Credentials &credentials, const ClientConfiguration
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "ehs");
|
||||
}
|
||||
|
||||
EHPCClient::EHPCClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "ehs");
|
||||
}
|
||||
|
||||
EHPCClient::EHPCClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "ehs");
|
||||
}
|
||||
|
||||
EHPCClient::~EHPCClient()
|
||||
|
||||
@@ -115,6 +115,15 @@ void ApplyNodesRequest::setSystemDiskType(const std::string &systemDiskType) {
|
||||
setParameter(std::string("SystemDiskType"), systemDiskType);
|
||||
}
|
||||
|
||||
std::string ApplyNodesRequest::getUserData() const {
|
||||
return userData_;
|
||||
}
|
||||
|
||||
void ApplyNodesRequest::setUserData(const std::string &userData) {
|
||||
userData_ = userData;
|
||||
setParameter(std::string("UserData"), userData);
|
||||
}
|
||||
|
||||
int ApplyNodesRequest::getCores() const {
|
||||
return cores_;
|
||||
}
|
||||
|
||||
@@ -72,6 +72,8 @@ void DescribeClusterResult::parse(const std::string &payload)
|
||||
clusterInfo_.imageId = clusterInfoNode["ImageId"].asString();
|
||||
if(!clusterInfoNode["SchedulerType"].isNull())
|
||||
clusterInfo_.schedulerType = clusterInfoNode["SchedulerType"].asString();
|
||||
if(!clusterInfoNode["SchedulerVersion"].isNull())
|
||||
clusterInfo_.schedulerVersion = clusterInfoNode["SchedulerVersion"].asString();
|
||||
if(!clusterInfoNode["DeployMode"].isNull())
|
||||
clusterInfo_.deployMode = clusterInfoNode["DeployMode"].asString();
|
||||
if(!clusterInfoNode["ImageOwnerAlias"].isNull())
|
||||
|
||||
@@ -34,3 +34,12 @@ void InitializeEHPCRequest::setRegionId(const std::string ®ionId) {
|
||||
setParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
std::string InitializeEHPCRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void InitializeEHPCRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
|
||||
@@ -69,6 +69,8 @@ void ListClustersMetaResult::parse(const std::string &payload)
|
||||
clustersObject.clientVersion = valueClustersClusterInfoSimple["ClientVersion"].asString();
|
||||
if(!valueClustersClusterInfoSimple["HasPlugin"].isNull())
|
||||
clustersObject.hasPlugin = valueClustersClusterInfoSimple["HasPlugin"].asString() == "true";
|
||||
if(!valueClustersClusterInfoSimple["EhpcVersion"].isNull())
|
||||
clustersObject.ehpcVersion = valueClustersClusterInfoSimple["EhpcVersion"].asString();
|
||||
clusters_.push_back(clustersObject);
|
||||
}
|
||||
if(!value["PageSize"].isNull())
|
||||
|
||||
Reference in New Issue
Block a user