bfg-common 1.2.119 → 1.2.121

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -366,7 +366,7 @@ watch(
366
366
  create: props.hardDisk.create,
367
367
  attach: props.hardDisk.attach,
368
368
  source: props.hardDisk.source,
369
- size: sizeInMb.value,
369
+ size: Math.ceil(sizeInMb.value),
370
370
  bus: bus.value,
371
371
  target: target.value,
372
372
  storage: storageLocal,
@@ -380,7 +380,7 @@ watch(
380
380
  io: io.value,
381
381
  limit_iops: limitIopsLocal,
382
382
  discard: discard.value,
383
- capacity: sizeInMb.value,
383
+ capacity: Math.ceil(sizeInMb.value),
384
384
  boot_order: props.hardDisk.boot_order,
385
385
  detach: props.type === 'removed',
386
386
  remove: props.type === 'removed' && deleteFilesFromDatastore.value, // Проверяем если удалили диск и указали Delete files from datastore
@@ -64,26 +64,13 @@ export const constructDiskDevicesFunc = (
64
64
  io: hardDisk.io ?? '',
65
65
  limit_iops: hardDisk.limit_iops ?? 0,
66
66
  }
67
- if (!hardDisk.create) {
68
- // result = {
69
- // create: false,
70
- // // source: hardDisk.source,
71
- // size: hardDisk.size,
72
- // bus: hardDisk.bus || '',
73
- // // device_type: hardDisk.device_type || '',
74
- // storage_id: hardDisk.storage?.id || '',
75
- // provision_type: hardDisk.provision_type || '',
76
- // disk_mode: hardDisk.disk_mode || '',
77
- // boot_order: hardDisk.boot_order || 0,
78
- // }
79
- // }
80
- // TODO refactoring
67
+ if (!hardDisk.create) { // hardDisk.device_type === 'disk'
81
68
  result = {
82
69
  create: false,
83
- // source: hardDisk.source,
84
- size: Math.ceil(hardDisk.size),
70
+ source: hardDisk.source,
71
+ size: hardDisk.size,
85
72
  bus: hardDisk.bus || '',
86
- // device_type: hardDisk.device_type || '',
73
+ device_type: hardDisk.device_type || '',
87
74
  storage_id: hardDisk.storage?.id || '',
88
75
  provision_type: hardDisk.provision_type || '',
89
76
  disk_mode: hardDisk.disk_mode || '',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.2.119",
4
+ "version": "1.2.121",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",