Skip to content

Commit 1218da8

Browse files
authored
Merge pull request #326 from ablecloud-team/ablestack-diplo
diplo merge
2 parents 48c5948 + f8220ca commit 1218da8

File tree

35 files changed

+883
-162
lines changed

35 files changed

+883
-162
lines changed

api/src/main/java/org/apache/cloudstack/api/ApiConstants.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,6 +1254,7 @@ public class ApiConstants {
12541254

12551255
public static final String SHAREABLE = "shareable";
12561256
public static final String KVDO_ENABLE = "kvdoenable";
1257+
public static final String KVDO_IN_USE = "kvdoinuse";
12571258
public static final String VBMC_PORT = "vbmcport";
12581259
public static final String IS_TAG_A_RULE = "istagarule";
12591260
public static final String LINK_STATE = "linkstate";

api/src/main/java/org/apache/cloudstack/api/command/user/offering/ListServiceOfferingsCmd.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ public class ListServiceOfferingsCmd extends BaseListProjectAndAccountResourcesC
110110
since = "4.20.0")
111111
private Long templateId;
112112

113+
@Parameter(name = ApiConstants.KVDO_ENABLE, type = CommandType.BOOLEAN,
114+
required=false, description = "Whether to KVDO compression and deduplication the volume",
115+
since = "4.20")
116+
private Boolean kvdoEnable;
117+
113118
/////////////////////////////////////////////////////
114119
/////////////////// Accessors ///////////////////////
115120
/////////////////////////////////////////////////////
@@ -171,6 +176,10 @@ public Long getTemplateId() {
171176
return templateId;
172177
}
173178

179+
public Boolean getKvdoEnable() {
180+
return kvdoEnable;
181+
}
182+
174183
/////////////////////////////////////////////////////
175184
/////////////// API Implementation///////////////////
176185
/////////////////////////////////////////////////////

api/src/main/java/org/apache/cloudstack/api/command/user/template/GetUploadParamsForTemplateCmd.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public class GetUploadParamsForTemplateCmd extends AbstractGetUploadParamsCmd {
9595
private String templateTag;
9696

9797
@Parameter(name = ApiConstants.KVDO_ENABLE, type = CommandType.BOOLEAN, description = "Whether to KVDO compression and deduplication the volume", since = "4.20")
98-
private Boolean kvodEnable;
98+
private Boolean kvdoEnable;
9999

100100
@Parameter(name=ApiConstants.DEPLOY_AS_IS,
101101
type = CommandType.BOOLEAN,
@@ -167,7 +167,7 @@ public String getTemplateTag() {
167167
}
168168

169169
public Boolean isKvdoEnable() {
170-
return kvodEnable;
170+
return kvdoEnable;
171171
}
172172

173173
public boolean isDeployAsIs() {

api/src/main/java/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ public class ListTemplatesCmd extends BaseListTaggedResourcesCmd implements User
111111
since = "4.20")
112112
private String arch;
113113

114+
@Parameter(name = ApiConstants.KVDO_ENABLE, type = CommandType.BOOLEAN,
115+
required=false, description = "Whether to KVDO compression and deduplication the volume",
116+
since = "4.20")
117+
private Boolean kvdoEnable;
118+
114119
/////////////////////////////////////////////////////
115120
/////////////////// Accessors ///////////////////////
116121
/////////////////////////////////////////////////////
@@ -183,6 +188,10 @@ public boolean listInReadyState() {
183188
return onlyReady;
184189
}
185190

191+
public Boolean getKvdoEnable() {
192+
return kvdoEnable;
193+
}
194+
186195
@Parameter(name = ApiConstants.SHOW_RESOURCE_ICON, type = CommandType.BOOLEAN, description = "flag to display the resource image for the templates")
187196
private Boolean showIcon;
188197

api/src/main/java/org/apache/cloudstack/api/command/user/vm/CloneVMCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public class CloneVMCmd extends BaseAsyncCreateCmd implements UserCmd {
7373
@Parameter(name = ApiConstants.START_VM, type = CommandType.BOOLEAN, required = true, description = "true if start vm after creating; defaulted to false if not specified")
7474
private Boolean startVm;
7575

76-
@Parameter(name = ApiConstants.CLONE_TYPE, type = CommandType.STRING, description = "select fast(linked) clone type or full clone type(default is fast clone)")
76+
@Parameter(name = ApiConstants.CLONE_TYPE, type = CommandType.STRING, description = "select fast(linked) clone type or full clone type(default is full clone)")
7777
private String type;
7878

7979
@Parameter(name=ApiConstants.COUNT, type=CommandType.INTEGER, description="count of clone vm")

api/src/main/java/org/apache/cloudstack/api/response/UserVmResponse.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,10 @@ public class UserVmResponse extends BaseResponseWithTagInformation implements Co
412412
@Param(description = "Whether to KVDO compression and deduplication the volume", since = "4.20")
413413
private Boolean kvdoEnable;
414414

415+
@SerializedName(ApiConstants.KVDO_IN_USE)
416+
@Param(description = "Whether the virtual machine uses a compressed/deduplicated volume", since = "4.20")
417+
private Boolean kvdoInUse;
418+
415419
@SerializedName((ApiConstants.VM_TYPE))
416420
@Param(description = "User VM type", since = "4.20.0")
417421
private String vmType;
@@ -1206,6 +1210,7 @@ public String getQemuAgentVersion() {
12061210
public void setQemuAgentVersion(String qemuAgentVersion) {
12071211
this.qemuAgentVersion = qemuAgentVersion;
12081212
}
1213+
12091214
public boolean getKvdoEnable() {
12101215
return kvdoEnable;
12111216
}
@@ -1214,6 +1219,14 @@ public void setKvdoEnable(boolean kvdoEnable) {
12141219
this.kvdoEnable = kvdoEnable;
12151220
}
12161221

1222+
public boolean getKvdoInUse() {
1223+
return kvdoInUse;
1224+
}
1225+
1226+
public void setKvdoInUse(boolean kvdoInUse) {
1227+
this.kvdoInUse = kvdoInUse;
1228+
}
1229+
12171230
public void setVmType(String vmType) {
12181231
this.vmType = vmType;
12191232
}

engine/schema/src/main/resources/META-INF/db/schema-2213to2214.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Storage', 'DEFAULT', 'UserVm
5050
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Storage', 'DEFAULT', 'StorageManager', 'create.volume.from.snapshot.wait', '10800', 'In second, timeout for create template from snapshot');
5151
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Storage', 'DEFAULT', 'TemplateManager', 'primary.storage.download.wait', '10800', 'In second, timeout for download template to primary storage');
5252

53-
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Premium', 'DEFAULT', 'management-server', 'usage.execution.timezone', null, 'The timezone to use for usage job execution time');
53+
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Premium', 'DEFAULT', 'management-server', 'usage.execution.timezone', 'Asia/Seoul', 'The timezone to use for usage job execution time');
5454
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Premium', 'DEFAULT', 'management-server', 'usage.stats.job.aggregation.range', '1440', 'The range of time for aggregating the user statistics specified in minutes (e.g. 1440 for daily, 60 for hourly.');
5555
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Premium', 'DEFAULT', 'management-server', 'usage.stats.job.exec.time', '00:15', 'The time at which the usage statistics aggregation job will run as an HH24:MM time, e.g. 00:30 to run at 12:30am.');
5656
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Premium', 'DEFAULT', 'management-server', 'enable.usage.server', 'true', 'Flag for enabling usage');
5757
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Premium', 'DEFAULT', 'management-server', 'direct.network.stats.interval', '86400', 'Interval (in seconds) to collect stats from Traffic Monitor');
58-
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Premium', 'DEFAULT', 'management-server', 'usage.aggregation.timezone', 'GMT', 'The timezone to use for usage stats aggregation');
58+
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Premium', 'DEFAULT', 'management-server', 'usage.aggregation.timezone', 'Asia/Seoul', 'The timezone to use for usage stats aggregation');
5959

6060

6161
INSERT IGNORE INTO `cloud`.`guest_os` (category_id, name, display_name) VALUES (6, NULL, "Windows PV");

framework/quota/src/main/java/org/apache/cloudstack/quota/constant/QuotaConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public interface QuotaConfig {
2727
public static final ConfigKey<String> QuotaEnableEnforcement = new ConfigKey<String>("Advanced", String.class, "quota.enable.enforcement", "false",
2828
"Enable the usage quota enforcement, i.e. on true when exceeding quota the respective account will be locked.", true);
2929

30-
public static final ConfigKey<String> QuotaCurrencySymbol = new ConfigKey<String>("Advanced", String.class, "quota.currency.symbol", "$",
30+
public static final ConfigKey<String> QuotaCurrencySymbol = new ConfigKey<String>("Advanced", String.class, "quota.currency.symbol", "",
3131
"The symbol for the currency in use to measure usage.", true);
3232

3333
public static final ConfigKey<String> QuotaCurrencyLocale = new ConfigKey<String>("Advanced", String.class, "quota.currency.locale", null,

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5672,10 +5672,6 @@ public String mapRbdDevice(final KVMPhysicalDisk disk, boolean kvdoEnable){
56725672
Script.runSimpleBashScript("rbd map " + disk.getPath() + " --id " + pool.getAuthUserName());
56735673
device = Script.runSimpleBashScript("rbd showmapped | grep \""+splitPoolImage[0]+"[ ]*"+splitPoolImage[1]+"\" | grep -o \"[^ ]*[ ]*$\"");
56745674
}
5675-
5676-
// kvdo가 활성화 되어있음
5677-
device = Script.runSimpleBashScript("rbd showmapped | grep \""+splitPoolImage[0]+"[ ]*"+splitPoolImage[1]+"\" | grep -o \"[^ ]*[ ]*$\"");
5678-
56795675
if(kvdoEnable){
56805676
try {
56815677
createKvdoCmdLine(splitPoolImage[0], pool.getAuthUserName(), splitPoolImage[1], String.valueOf(disk.getSize()));

plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
public class KubernetesClusterManagerImpl extends ManagerBase implements KubernetesClusterService {
186186

187187
private static final String DEFAULT_NETWORK_OFFERING_FOR_KUBERNETES_SERVICE_NAME = "쿠버네테스 서비스에 대한 기본 네트워크오퍼링";
188-
private static final String DEFAULT_NETWORK_OFFERING_FOR_KUBERNETES_SERVICE_DISPLAY_TEXT = "Network Offering used for CloudStack Kubernetes service";
188+
private static final String DEFAULT_NETWORK_OFFERING_FOR_KUBERNETES_SERVICE_DISPLAY_TEXT = "쿠버네테스 서비스에 대한 기본 네트워크오퍼링";
189189
private static final String DEFAULT_NSX_NETWORK_OFFERING_FOR_KUBERNETES_SERVICE_NAME = "DefaultNSXNetworkOfferingforKubernetesService";
190190
private static final String DEFAULT_NSX_VPC_TIER_NETWORK_OFFERING_FOR_KUBERNETES_SERVICE_NAME = "DefaultNSXVPCNetworkOfferingforKubernetesService";
191191
private static final String DEFAULT_NSX_NETWORK_OFFERING_FOR_KUBERNETES_SERVICE_DISPLAY_TEXT = "Network Offering for NSX CloudStack Kubernetes Service";

0 commit comments

Comments
 (0)