manageiq-smartstate 0.2.8 → 0.2.9

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bb3a8cbd47ea506835fe8f9945c8b2a9e3a9d567
4
- data.tar.gz: 7551eec8bf0e551ef965d367f815b16dfbdbdf47
3
+ metadata.gz: 6eb97c180a24d90e1c1ddf4967219d6a4c6dc454
4
+ data.tar.gz: 045130c52ec03cdbf3df0972bda3b1b2dd22633f
5
5
  SHA512:
6
- metadata.gz: a35ea5d4d2ae00b832ec7e8d6a20f5691b436014a4ffc964868481b3ff8d0417522942b80da165faf710b93f6b6484b6461c57320212ddc5ba5e661ecc71d342
7
- data.tar.gz: 12b80f47b85ee9560d7971678bb1960d7dc3e4e29b2f88e581b33ecac80a2f11824dee9b4c0a9523cc0a7c98da74e77c5585b5a046d83d6671b9ce34e47a37b0
6
+ metadata.gz: abd7b68aab062cc0af0f1afc108a614d0eaad41990e4899e71eef0d420385b4d3ae2a1156bde5deda1a12a77a242109af227e3a24fa222d13b2e53ba38569139
7
+ data.tar.gz: e8e5ce33b6b7859b9698354e407e4ec6f93f8a64e44d458f90c96f41ea864cd71b5329d80b2f29357185c3cd8d80acd4d2f42afcd899f35147f0bc72b120102f
@@ -26,6 +26,7 @@ class MiqScvmmVm < MiqVm
26
26
  disk_info.hyperv_connection = {}
27
27
  disk_info.fileName = disk_file
28
28
  disk_info.driveType = @scvmm.get_drivetype(disk_file)
29
+ disk_info.scvmm = @scvmm
29
30
  disk_info.hyperv_connection[:host] = @ost.miq_hyperv[:host]
30
31
  disk_info.hyperv_connection[:port] = @ost.miq_hyperv[:port]
31
32
  if @ost.miq_hyperv[:domain].nil?
@@ -40,25 +40,27 @@ module VolMgrPlatformSupportLinux
40
40
  desc = @ost.snapshotDescription ? @ost.snapshotDescription : "EVM Snapshot"
41
41
  st = Time.now
42
42
  @snMor = @vimVm.createEvmSnapshot(desc, "false", true, @ost.snapshot_create_free_space)
43
- $log.info "VolMgrPlatformSupportLinux.preMount: VM snapshot created in [#{Time.now - st}] seconds"
43
+ $log.info "VolMgrPlatformSupportLinux.preMount: VM snapshot [#{@snMor}] created in [#{Time.now - st}] seconds"
44
44
  $log.debug "VolMgrPlatformSupportLinux.preMount: snMor = \"#{@snMor}\""
45
45
  end
46
46
 
47
47
  def postMount
48
- $log.debug "VolMgrPlatformSupportLinux.postMount Enter: force = #{@ost.force}, @vimVm.nil? = #{@vimVm.nil?}"
48
+ log_prefix = "VolMgrPlatformSupportLinux.postMount"
49
+ $log.debug "#{log_prefix} Enter: force = #{@ost.force}, @vimVm.nil? = #{@vimVm.nil?}"
49
50
  return unless @ost.force
50
51
  return unless @vimVm
51
52
 
52
53
  if @ost.force
53
54
  if !@snMor
54
- $log.warn "VolMgrPlatformSupportLinux.postMount: VM not snapped: #{@cfgFile}"
55
+ $log.warn "#{log_prefix}: VM not snapped: #{@cfgFile}"
55
56
  else
56
- $log.debug "VolMgrPlatformSupportLinux.postMount: removing snapshot snMor = \"#{@snMor}\""
57
+ $log.debug "#{log_prefix}: removing snapshot snMor = \"#{@snMor}\""
57
58
  begin
58
59
  @vimVm.removeSnapshot(@snMor, "false", true, @ost.snapshot_remove_free_space)
60
+ $log.info "#{log_prefix}: VM snapshot [#{@snMor}] removed"
59
61
  rescue => err
60
- $log.warn "VolMgrPlatformSupportLinux.postMount: failed to remove snapshot for VM: #{@cfgFile}"
61
- $log.warn "VolMgrPlatformSupportLinux.postMount: #{err}"
62
+ $log.warn "#{log_prefix}: failed to remove snapshot for VM: #{@cfgFile}"
63
+ $log.warn "#{log_prefix}: #{err}"
62
64
  end
63
65
  end
64
66
  end
@@ -182,6 +182,7 @@ module VhdxDisk
182
182
  @has_parent = nil
183
183
  @parent_locator = nil
184
184
  @file_name = dInfo.fileName
185
+ @scvmm = dInfo.scvmm
185
186
  @hyperv_connection = nil
186
187
  @vhdx_file = connection_to_file(dInfo)
187
188
  @converter = Encoding::Converter.new("UTF-16LE", "UTF-8")
@@ -518,7 +519,7 @@ module VhdxDisk
518
519
  def parent_disk(path)
519
520
  @parent_ostruct = OpenStruct.new
520
521
  @parent_ostruct.fileName = path
521
- @parent_ostruct.driveType = dInfo.driveType
522
+ @parent_ostruct.driveType = @scvmm.get_drivetype(path)
522
523
  @parent_ostruct.hyperv_connection = @hyperv_connection if @hyperv_connection
523
524
  parent = MiqDisk.getDisk(@parent_ostruct)
524
525
  raise "Unable to access parent disk #{path}" if parent.nil?
@@ -1,5 +1,5 @@
1
1
  module ManageIQ
2
2
  module Smartstate
3
- VERSION = "0.2.8".freeze
3
+ VERSION = "0.2.9".freeze
4
4
  end
5
5
  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.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - ManageIQ Developers
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-02-09 00:00:00.000000000 Z
11
+ date: 2018-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: azure-armrest