Skip to content

Commit 3819ae2

Browse files
authored
Merge pull request #547 from sjyu1/ablestack-diplo
[Mold API] ABLESTACK 인스턴스 가져오기 기능에서 볼륨이 rbd일경우 오류수정
2 parents 759a692 + 0d33ea0 commit 3819ae2

File tree

4 files changed

+15
-14
lines changed

4 files changed

+15
-14
lines changed

server/src/main/java/com/cloud/template/TemplateManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2043,7 +2043,7 @@ public VMTemplateVO createPrivateTemplateRecord(CreateTemplateCmd cmd, Account t
20432043
Boolean isPublic = cmd.isPublic();
20442044
Boolean featured = cmd.isFeatured();
20452045
int bitsValue = ((bits == null) ? 64 : bits.intValue());
2046-
boolean requiresHvmValue = ((requiresHvm == null) ? true : requiresHvm.booleanValue());
2046+
boolean requiresHvmValue = ((requiresHvm == null) ? false : requiresHvm.booleanValue());
20472047
boolean passwordEnabledValue = ((passwordEnabled == null) ? false : passwordEnabled.booleanValue());
20482048
boolean sshKeyEnabledValue = ((sshKeyEnabled == null) ? false : sshKeyEnabled.booleanValue());
20492049
if (isPublic == null) {

server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,11 @@ private StoragePool getStoragePool(final UnmanagedInstanceTO.Disk disk, final Da
558558
pools.addAll(primaryDataStoreDao.listByDataCenterId(zone.getId()));
559559
for (StoragePool pool : pools) {
560560
String searchPoolParam = StringUtils.isNotBlank(dsPath) ? dsPath : dsName;
561+
if (Storage.StoragePoolType.RBD.equals(pool.getPoolType())) {
562+
String[] rbdPath = dsName.split("/");
563+
searchPoolParam = rbdPath[2];
564+
}
565+
561566
if (StringUtils.contains(pool.getPath(), searchPoolParam)) {
562567
storagePool = pool;
563568
break;

ui/src/views/network/UpdateNetwork.vue

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,7 @@
132132
</template>
133133
<a-input
134134
v-model:value="form.guestvmcidr"
135-
:placeholder="apiParams.guestvmcidr.description"
136-
@change="(e) => { cidrChanged = e.target.value !== resource.cidr }" />
137-
</a-form-item>
138-
<a-form-item name="changecidr" ref="changecidr" v-if="cidrChanged">
139-
<template #label>
140-
<tooltip-label :title="$t('label.changecidr')" :tooltip="apiParams.changecidr.description"/>
141-
</template>
142-
<a-switch v-model:checked="form.changecidr" />
135+
:placeholder="apiParams.guestvmcidr.description"/>
143136
</a-form-item>
144137
<a-form-item name="networkdomain" ref="networkdomain" v-if="isUpdatingIsolatedNetwork">
145138
<template #label>

ui/src/views/tools/ImportUnmanagedInstance.vue

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@
222222
:cpuNumberInputDecorator="cpuNumberKey"
223223
:cpuSpeedInputDecorator="cpuSpeedKey"
224224
:memoryInputDecorator="memoryKey"
225-
:computeOfferingId="computeOffering.id"
225+
:serviceofferingId="computeOffering.id"
226226
:preFillContent="dataPreFill"
227227
:isConstrained="'serviceofferingdetails' in computeOffering"
228228
:minCpu="getMinCpu()"
@@ -715,6 +715,7 @@ export default {
715715
this.rules = reactive({
716716
displayname: [{ required: true, message: this.$t('message.error.input.value') }],
717717
templateid: [{ required: this.templateType !== 'auto', message: this.$t('message.error.input.value') }],
718+
serviceofferingid: [{ required: true, message: this.$t('message.error.input.value') }],
718719
rootdiskid: [{ required: this.templateType !== 'auto', message: this.$t('message.error.input.value') }]
719720
})
720721
},
@@ -852,7 +853,7 @@ export default {
852853
this.form[name] = value
853854
},
854855
updateComputeOffering (id) {
855-
this.updateFieldValue('computeofferingid', id)
856+
this.updateFieldValue('serviceofferingid', id)
856857
this.computeOffering = this.computeOfferings.filter(x => x.id === id)[0]
857858
if (this.computeOffering && !this.computeOffering.iscustomizediops) {
858859
this.updateFieldValue(this.minIopsKey, undefined)
@@ -879,6 +880,7 @@ export default {
879880
this.rules = reactive({
880881
displayname: [{ required: true, message: this.$t('message.error.input.value') }],
881882
templateid: [{ required: this.templateType !== 'auto', message: this.$t('message.error.input.value') }],
883+
serviceofferingid: [{ required: true, message: this.$t('message.error.input.value') }],
882884
rootdiskid: [{ required: this.templateType !== 'auto', message: this.$t('message.error.input.value') }]
883885
})
884886
},
@@ -1040,7 +1042,7 @@ export default {
10401042
})
10411043
return
10421044
}
1043-
params.serviceofferingid = values.computeofferingid
1045+
params.serviceofferingid = values.serviceofferingid
10441046
if (this.computeOffering.iscustomized) {
10451047
var details = [this.cpuNumberKey, this.cpuSpeedKey, this.memoryKey]
10461048
for (var detail of details) {
@@ -1188,6 +1190,7 @@ export default {
11881190
successMethod: result => {
11891191
this.$emit('refresh-data')
11901192
resolve(result)
1193+
this.closeAction()
11911194
},
11921195
errorMethod: (result) => {
11931196
this.updateLoading(false)
@@ -1198,7 +1201,7 @@ export default {
11981201
this.updateLoading(false)
11991202
this.$notifyError(error)
12001203
}).finally(() => {
1201-
this.closeAction()
1204+
// this.closeAction()
12021205
this.updateLoading(false)
12031206
})
12041207
})
@@ -1211,7 +1214,7 @@ export default {
12111214
this.$emit('loading-changed', value)
12121215
},
12131216
resetForm () {
1214-
var fields = ['displayname', 'hostname', 'domainid', 'account', 'projectid', 'computeofferingid']
1217+
var fields = ['displayname', 'hostname', 'domainid', 'account', 'projectid', 'serviceofferingid']
12151218
for (var field of fields) {
12161219
this.updateFieldValue(field, undefined)
12171220
}

0 commit comments

Comments
 (0)