manageiq-smartstate 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/manageiq/smartstate/version.rb +1 -1
- data/lib/metadata/VmConfig/VmConfig.rb +18 -15
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f43ae766750f3806637203402e8854fc3a04ecd
|
4
|
+
data.tar.gz: d095b81850e3ac86139c57abf2ded99987a175b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dab2eb64ac72a70bf8cad523f23a19fff4866664965cbb4430f2156005bebbdd7b2958a9e604652a9f4146591a8414350db070384664ccc8f7e3d3f733492b3d
|
7
|
+
data.tar.gz: e98c541ba547c02da75752fe66bfd099f54615159a3cefaba881ef4e485237d20892e1bcd097688b0f5d7be619ad7d0d826cb375bfb4ed9adef77bcd4ba32576
|
@@ -478,10 +478,15 @@ class VmConfig
|
|
478
478
|
end
|
479
479
|
elsif miqvm.rhevm
|
480
480
|
# First add the VM's active disk files.
|
481
|
-
miqvm.
|
481
|
+
disks = miqvm.rhevm.collect_vm_disks(miqvm.rhevmVm)
|
482
|
+
disks.each { |disk| @files << rhevm_disk_file_entry(disk) }
|
482
483
|
# Then add the files associtaed with inactive snapshots.
|
483
|
-
miqvm.rhevmVm.
|
484
|
-
|
484
|
+
miqvm.rhevm.collect_snapshots(miqvm.rhevmVm).each do |snap|
|
485
|
+
next if snap.snapshot_type == 'active'
|
486
|
+
|
487
|
+
miqvm.rhevm.collect_disks_of_snapshot(snap).each do |disk|
|
488
|
+
@files << rhevm_disk_file_entry(disk)
|
489
|
+
end
|
485
490
|
end
|
486
491
|
end
|
487
492
|
rescue => err
|
@@ -493,12 +498,10 @@ class VmConfig
|
|
493
498
|
end
|
494
499
|
|
495
500
|
def rhevm_disk_file_entry(disk)
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
{:path => fullPath, :name => disk[disk_key], :size => disk[:actual_size].to_i}
|
501
|
+
storage_id = disk.storage_domains.first&.id
|
502
|
+
disk_id = disk.image_id || disk.id
|
503
|
+
full_path = storage_id && File.join('/dev', storage_id, disk_id)
|
504
|
+
{:path => full_path, :name => disk_id, :size => disk.actual_size.to_i}
|
502
505
|
end
|
503
506
|
private :rhevm_disk_file_entry
|
504
507
|
|
@@ -545,12 +548,12 @@ class VmConfig
|
|
545
548
|
end
|
546
549
|
end
|
547
550
|
elsif miqvm.rhevmVm
|
548
|
-
miqvm.
|
549
|
-
|
550
|
-
storage_id =
|
551
|
-
|
552
|
-
|
553
|
-
d = {:path =>
|
551
|
+
disks = miqvm.rhevm.collect_vm_disks(miqvm.rhevmVm)
|
552
|
+
disks.each do |disk|
|
553
|
+
storage_id = disk.storage_domains.first&.id
|
554
|
+
disk_id = disk.image_id || disk.id
|
555
|
+
full_path = storage_id && File.join('/dev', storage_id, disk_id)
|
556
|
+
d = {:path => full_path, :name => disk.name.to_s, :size => disk.actual_size.to_i}
|
554
557
|
@disk_files << d
|
555
558
|
end
|
556
559
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: manageiq-smartstate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ManageIQ Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: azure-armrest
|