Support RamRoleName and RamNodeTypes parameter in ModifyClusterAttributes APIs.
This commit is contained in:
@@ -66,6 +66,8 @@ public:
|
||||
void setInstanceType(const std::string &instanceType);
|
||||
std::string getHostNamePrefix() const;
|
||||
void setHostNamePrefix(const std::string &hostNamePrefix);
|
||||
std::string getComputeSpotInterruptionBehavior() const;
|
||||
void setComputeSpotInterruptionBehavior(const std::string &computeSpotInterruptionBehavior);
|
||||
std::string getComputeSpotPriceLimit() const;
|
||||
void setComputeSpotPriceLimit(const std::string &computeSpotPriceLimit);
|
||||
int getAutoRenewPeriod() const;
|
||||
@@ -84,6 +86,8 @@ public:
|
||||
void setSync(bool sync);
|
||||
std::string getVSwitchId() const;
|
||||
void setVSwitchId(const std::string &vSwitchId);
|
||||
int getComputeSpotDuration() const;
|
||||
void setComputeSpotDuration(int computeSpotDuration);
|
||||
std::string getPeriodUnit() const;
|
||||
void setPeriodUnit(const std::string &periodUnit);
|
||||
bool getComputeEnableHt() const;
|
||||
@@ -116,6 +120,7 @@ private:
|
||||
int systemDiskSize_;
|
||||
std::string instanceType_;
|
||||
std::string hostNamePrefix_;
|
||||
std::string computeSpotInterruptionBehavior_;
|
||||
std::string computeSpotPriceLimit_;
|
||||
int autoRenewPeriod_;
|
||||
int period_;
|
||||
@@ -125,6 +130,7 @@ private:
|
||||
std::string hostNameSuffix_;
|
||||
bool sync_;
|
||||
std::string vSwitchId_;
|
||||
int computeSpotDuration_;
|
||||
std::string periodUnit_;
|
||||
bool computeEnableHt_;
|
||||
std::string autoRenew_;
|
||||
|
||||
@@ -81,11 +81,13 @@ namespace AlibabaCloud
|
||||
std::string volumeProtocol;
|
||||
std::string imageOwnerAlias;
|
||||
std::string description;
|
||||
std::string ramNodeTypes;
|
||||
std::string clientVersion;
|
||||
std::vector<OnPremiseInfoItem> onPremiseInfo;
|
||||
std::string name;
|
||||
std::string volumeId;
|
||||
std::string volumeType;
|
||||
std::string ramRoleName;
|
||||
std::string deployMode;
|
||||
std::string imageId;
|
||||
std::string status;
|
||||
|
||||
@@ -36,10 +36,12 @@ namespace AlibabaCloud
|
||||
{
|
||||
struct InstanceTypeInfo
|
||||
{
|
||||
std::string spotInterruptionBehavior;
|
||||
std::string zoneId;
|
||||
std::string vSwitchId;
|
||||
std::string hostNamePrefix;
|
||||
float spotPriceLimit;
|
||||
int spotDuration;
|
||||
std::string instanceType;
|
||||
std::string spotStrategy;
|
||||
};
|
||||
|
||||
@@ -34,21 +34,30 @@ public:
|
||||
void setImageId(const std::string &imageId);
|
||||
std::string getDescription() const;
|
||||
void setDescription(const std::string &description);
|
||||
std::string getRamRoleName() const;
|
||||
void setRamRoleName(const std::string &ramRoleName);
|
||||
std::string getClusterId() const;
|
||||
void setClusterId(const std::string &clusterId);
|
||||
std::string getAccessKeyId() const;
|
||||
void setAccessKeyId(const std::string &accessKeyId);
|
||||
std::string getImageOwnerAlias() const;
|
||||
void setImageOwnerAlias(const std::string &imageOwnerAlias);
|
||||
std::vector<std::string> getRamNodeTypes() const;
|
||||
void setRamNodeTypes(const std::vector<std::string> &ramNodeTypes);
|
||||
std::string getPassword() const;
|
||||
void setPassword(const std::string &password);
|
||||
std::string getName() const;
|
||||
void setName(const std::string &name);
|
||||
|
||||
private:
|
||||
std::string imageId_;
|
||||
std::string description_;
|
||||
std::string ramRoleName_;
|
||||
std::string clusterId_;
|
||||
std::string accessKeyId_;
|
||||
std::string imageOwnerAlias_;
|
||||
std::vector<std::string> ramNodeTypes_;
|
||||
std::string password_;
|
||||
std::string name_;
|
||||
};
|
||||
} // namespace Model
|
||||
|
||||
@@ -34,9 +34,11 @@ public:
|
||||
struct InstanceTypes {
|
||||
std::string vSwitchId;
|
||||
std::string spotStrategy;
|
||||
std::string spotInterruptionBehavior;
|
||||
std::string zoneId;
|
||||
std::string instanceType;
|
||||
float spotPriceLimit;
|
||||
int spotDuration;
|
||||
};
|
||||
std::vector<InstanceTypes> instanceTypes;
|
||||
bool enableAutoGrow;
|
||||
|
||||
@@ -160,6 +160,15 @@ void AddNodesRequest::setHostNamePrefix(const std::string &hostNamePrefix) {
|
||||
setParameter(std::string("HostNamePrefix"), hostNamePrefix);
|
||||
}
|
||||
|
||||
std::string AddNodesRequest::getComputeSpotInterruptionBehavior() const {
|
||||
return computeSpotInterruptionBehavior_;
|
||||
}
|
||||
|
||||
void AddNodesRequest::setComputeSpotInterruptionBehavior(const std::string &computeSpotInterruptionBehavior) {
|
||||
computeSpotInterruptionBehavior_ = computeSpotInterruptionBehavior;
|
||||
setParameter(std::string("ComputeSpotInterruptionBehavior"), computeSpotInterruptionBehavior);
|
||||
}
|
||||
|
||||
std::string AddNodesRequest::getComputeSpotPriceLimit() const {
|
||||
return computeSpotPriceLimit_;
|
||||
}
|
||||
@@ -241,6 +250,15 @@ void AddNodesRequest::setVSwitchId(const std::string &vSwitchId) {
|
||||
setParameter(std::string("VSwitchId"), vSwitchId);
|
||||
}
|
||||
|
||||
int AddNodesRequest::getComputeSpotDuration() const {
|
||||
return computeSpotDuration_;
|
||||
}
|
||||
|
||||
void AddNodesRequest::setComputeSpotDuration(int computeSpotDuration) {
|
||||
computeSpotDuration_ = computeSpotDuration;
|
||||
setParameter(std::string("ComputeSpotDuration"), std::to_string(computeSpotDuration));
|
||||
}
|
||||
|
||||
std::string AddNodesRequest::getPeriodUnit() const {
|
||||
return periodUnit_;
|
||||
}
|
||||
|
||||
@@ -96,6 +96,10 @@ void DescribeClusterResult::parse(const std::string &payload)
|
||||
clusterInfo_.id = clusterInfoNode["Id"].asString();
|
||||
if(!clusterInfoNode["ClientVersion"].isNull())
|
||||
clusterInfo_.clientVersion = clusterInfoNode["ClientVersion"].asString();
|
||||
if(!clusterInfoNode["RamRoleName"].isNull())
|
||||
clusterInfo_.ramRoleName = clusterInfoNode["RamRoleName"].asString();
|
||||
if(!clusterInfoNode["RamNodeTypes"].isNull())
|
||||
clusterInfo_.ramNodeTypes = clusterInfoNode["RamNodeTypes"].asString();
|
||||
auto allApplicationsNode = clusterInfoNode["Applications"]["ApplicationInfo"];
|
||||
for (auto clusterInfoNodeApplicationsApplicationInfo : allApplicationsNode)
|
||||
{
|
||||
|
||||
@@ -93,6 +93,10 @@ void GetAutoScaleConfigResult::parse(const std::string &payload)
|
||||
instanceTypesObject.instanceType = valueQueuesQueueInfoInstanceTypesInstanceTypeInfo["InstanceType"].asString();
|
||||
if(!valueQueuesQueueInfoInstanceTypesInstanceTypeInfo["SpotStrategy"].isNull())
|
||||
instanceTypesObject.spotStrategy = valueQueuesQueueInfoInstanceTypesInstanceTypeInfo["SpotStrategy"].asString();
|
||||
if(!valueQueuesQueueInfoInstanceTypesInstanceTypeInfo["SpotDuration"].isNull())
|
||||
instanceTypesObject.spotDuration = std::stoi(valueQueuesQueueInfoInstanceTypesInstanceTypeInfo["SpotDuration"].asString());
|
||||
if(!valueQueuesQueueInfoInstanceTypesInstanceTypeInfo["SpotInterruptionBehavior"].isNull())
|
||||
instanceTypesObject.spotInterruptionBehavior = valueQueuesQueueInfoInstanceTypesInstanceTypeInfo["SpotInterruptionBehavior"].asString();
|
||||
queuesObject.instanceTypes.push_back(instanceTypesObject);
|
||||
}
|
||||
auto allDataDisksNode = valueQueuesQueueInfo["DataDisks"]["DataDisksInfo"];
|
||||
|
||||
@@ -43,6 +43,15 @@ void ModifyClusterAttributesRequest::setDescription(const std::string &descripti
|
||||
setParameter(std::string("Description"), description);
|
||||
}
|
||||
|
||||
std::string ModifyClusterAttributesRequest::getRamRoleName() const {
|
||||
return ramRoleName_;
|
||||
}
|
||||
|
||||
void ModifyClusterAttributesRequest::setRamRoleName(const std::string &ramRoleName) {
|
||||
ramRoleName_ = ramRoleName;
|
||||
setParameter(std::string("RamRoleName"), ramRoleName);
|
||||
}
|
||||
|
||||
std::string ModifyClusterAttributesRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
@@ -70,6 +79,23 @@ void ModifyClusterAttributesRequest::setImageOwnerAlias(const std::string &image
|
||||
setParameter(std::string("ImageOwnerAlias"), imageOwnerAlias);
|
||||
}
|
||||
|
||||
std::vector<std::string> ModifyClusterAttributesRequest::getRamNodeTypes() const {
|
||||
return ramNodeTypes_;
|
||||
}
|
||||
|
||||
void ModifyClusterAttributesRequest::setRamNodeTypes(const std::vector<std::string> &ramNodeTypes) {
|
||||
ramNodeTypes_ = ramNodeTypes;
|
||||
}
|
||||
|
||||
std::string ModifyClusterAttributesRequest::getPassword() const {
|
||||
return password_;
|
||||
}
|
||||
|
||||
void ModifyClusterAttributesRequest::setPassword(const std::string &password) {
|
||||
password_ = password;
|
||||
setParameter(std::string("Password"), password);
|
||||
}
|
||||
|
||||
std::string ModifyClusterAttributesRequest::getName() const {
|
||||
return name_;
|
||||
}
|
||||
|
||||
@@ -158,9 +158,11 @@ void SetAutoScaleConfigRequest::setQueues(const std::vector<SetAutoScaleConfigRe
|
||||
std::string instanceTypesObjStr = queuesObjStr + ".InstanceTypes" + "." + std::to_string(dep2 + 1);
|
||||
setParameter(instanceTypesObjStr + ".VSwitchId", instanceTypesObj.vSwitchId);
|
||||
setParameter(instanceTypesObjStr + ".SpotStrategy", instanceTypesObj.spotStrategy);
|
||||
setParameter(instanceTypesObjStr + ".SpotInterruptionBehavior", instanceTypesObj.spotInterruptionBehavior);
|
||||
setParameter(instanceTypesObjStr + ".ZoneId", instanceTypesObj.zoneId);
|
||||
setParameter(instanceTypesObjStr + ".InstanceType", instanceTypesObj.instanceType);
|
||||
setParameter(instanceTypesObjStr + ".SpotPriceLimit", std::to_string(instanceTypesObj.spotPriceLimit));
|
||||
setParameter(instanceTypesObjStr + ".SpotDuration", std::to_string(instanceTypesObj.spotDuration));
|
||||
}
|
||||
setParameter(queuesObjStr + ".EnableAutoGrow", queuesObj.enableAutoGrow ? "true" : "false");
|
||||
setParameter(queuesObjStr + ".HostNameSuffix", queuesObj.hostNameSuffix);
|
||||
|
||||
Reference in New Issue
Block a user