Add check for update only name and/or description of disk offering (#6410)

* Add check for update only name and/or description of disk offering

* Add check to update only name and/or description of service offerings as well
This commit is contained in:
Bryan Lima 2022-06-27 08:24:37 -03:00 committed by GitHub
parent 8448fe27a6
commit e1fb2be835
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

View File

@ -1358,6 +1358,20 @@ export default {
if ('id' in this.resource && action.params.map(i => { return i.name }).includes('id')) {
params.id = this.resource.id
}
if (['updateDiskOffering'].includes(action.api) && values.tags === this.resource.tags) {
delete values.tags
}
if (['updateServiceOffering'].includes(action.api)) {
if (values.hosttags === this.resource.hosttags) {
delete values.hosttags
}
if (values.storagetags === this.resource.storagetags) {
delete values.tags
}
}
for (const key in values) {
const input = values[key]
for (const param of action.params) {