manageiq-smartstate 0.6.1 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +5 -5
  2. data/.codeclimate.yml +34 -35
  3. data/.rubocop.yml +3 -3
  4. data/.rubocop_cc.yml +3 -4
  5. data/.rubocop_local.yml +1 -1
  6. data/.travis.yml +3 -3
  7. data/README.md +1 -1
  8. data/lib/db/MiqBdb/MiqBdb.rb +0 -2
  9. data/lib/db/MiqBdb/MiqBdbPage.rb +0 -2
  10. data/lib/db/MiqSqlite/MiqSqlite3.rb +0 -2
  11. data/lib/db/MiqSqlite/MiqSqlite3Cell.rb +0 -2
  12. data/lib/db/MiqSqlite/MiqSqlite3Page.rb +0 -2
  13. data/lib/db/MiqSqlite/MiqSqlite3Table.rb +0 -2
  14. data/lib/disk/modules/MSCommon.rb +3 -1
  15. data/lib/disk/modules/VhdxDisk.rb +3 -1
  16. data/lib/fs/MiqMountManager.rb +2 -29
  17. data/lib/fs/VimDatastoreFS/VimDatastoreFS.rb +1 -6
  18. data/lib/fs/fat32/directory_entry.rb +540 -540
  19. data/lib/fs/iso9660/boot_sector.rb +3 -2
  20. data/lib/fs/iso9660/directory_entry.rb +3 -2
  21. data/lib/fs/iso9660/rock_ridge.rb +3 -1
  22. data/lib/fs/ntfs/attrib_attribute_list.rb +3 -1
  23. data/lib/fs/ntfs/attrib_file_name.rb +3 -1
  24. data/lib/fs/ntfs/attrib_header.rb +3 -1
  25. data/lib/fs/ntfs/attrib_index_root.rb +3 -1
  26. data/lib/fs/ntfs/attrib_volume_name.rb +3 -1
  27. data/lib/manageiq/smartstate/util.rb +18 -0
  28. data/lib/manageiq/smartstate/version.rb +1 -1
  29. data/lib/metadata/MIQExtract/MIQExtract.rb +1 -2
  30. data/lib/metadata/VmConfig/GetNativeCfg.rb +2 -4
  31. data/lib/metadata/VmConfig/VmConfig.rb +5 -4
  32. data/lib/metadata/VmConfig/cfgConfig.rb +4 -0
  33. data/lib/metadata/VmConfig/xmlConfig.rb +3 -3
  34. data/lib/metadata/linux/MiqRpmPackages.rb +3 -1
  35. data/lib/metadata/util/win32/Win32Accounts.rb +3 -1
  36. data/lib/metadata/util/win32/Win32EventLog.rb +3 -1
  37. data/lib/metadata/util/win32/Win32Software.rb +5 -3
  38. data/lib/metadata/util/win32/decode.rb +0 -0
  39. data/lib/metadata/util/win32/fleece_hives.rb +0 -9
  40. data/lib/metadata/util/win32/ms-registry.rb +3 -2
  41. data/lib/metadata/util/win32/peheader.rb +3 -2
  42. data/lib/metadata/util/win32/system_path_win.rb +0 -2
  43. data/lib/miq_unicode.rb +45 -0
  44. data/manageiq-smartstate.gemspec +8 -7
  45. metadata +60 -32
  46. data/lib/fs/MetakitFS/MetakitFS.rb +0 -530
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: ad98b0da6ec85622b240995d35201dd26577b187
4
- data.tar.gz: 882b7ae61688928df8d57adba2a93444a370e490
2
+ SHA256:
3
+ metadata.gz: 3d4105de210c11ceac8351237b58fcc039ee297700d4bfd82e027c1fc4785986
4
+ data.tar.gz: 878913f7d24bc556e29546b6441e305aeaa2fe0a945841c655c685dde9554927
5
5
  SHA512:
6
- metadata.gz: e3d1ea4dbeae6ffe6cc9599feb7f6724b17fe59539b3cc55d38886a67ae33205db180e9fd13916d2ea243249118c6157fc07e0c97dfcbe7450306292c33d3bd4
7
- data.tar.gz: 250ec76ecf1e7f900f59c23130273e566a691f1becf54766c12a0e0f6ff533a47e1efac2f56d8b501e01b8fe4edd5e607e7f466be4600a32ddff93b20e26b3f0
6
+ metadata.gz: ce177c539d5925c377b856538e44f6b8640215163c265540578659253338d57e12b3318ad1146b50a7ef220aa836b0fd5f81cb7436da153de4a3224743696012
7
+ data.tar.gz: 9076cb1e8bdd796a4ae8d5d56d343962676f704a8a4a5d7757244b8d311ea1f44f665c88f8b5ba0fd23bfe81ee03cb6d7e806ac3734cb2bfd593b10445fdb11d
data/.codeclimate.yml CHANGED
@@ -1,17 +1,23 @@
1
- ---
2
- exclude_paths:
3
- - ".git/"
4
- - "**.xml"
5
- - "**.yaml"
6
- - "**.yml"
7
- - lib/metadata/linux/test/Packages
8
- - lib/metadata/linux/test/tc_LinuxUtils.rb
9
- - locale/
10
- - spec/
11
- - test/
12
- - tools/
13
- - tmp/
14
- engines:
1
+ checks:
2
+ method-complexity:
3
+ enabled: true
4
+ config:
5
+ threshold: 8
6
+ prepare:
7
+ fetch:
8
+ - url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/.rubocop_base.yml
9
+ path: ".rubocop_base.yml"
10
+ - url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/.rubocop_cc_base.yml
11
+ path: ".rubocop_cc_base.yml"
12
+ - url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/styles/base.yml
13
+ path: styles/base.yml
14
+ - url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/styles/cc_base.yml
15
+ path: styles/cc_base.yml
16
+ plugins:
17
+ rubocop:
18
+ enabled: true
19
+ config: ".rubocop_cc.yml"
20
+ channel: rubocop-0-82
15
21
  brakeman:
16
22
  enabled: false
17
23
  bundler-audit:
@@ -25,7 +31,7 @@ engines:
25
31
  ruby:
26
32
  mass_threshold: 25
27
33
  count_threshold: 5
28
- javascript:
34
+ javascript:
29
35
  eslint:
30
36
  enabled: false
31
37
  channel: eslint-3
@@ -33,23 +39,16 @@ engines:
33
39
  enabled: false
34
40
  markdownlint:
35
41
  enabled: false
36
- rubocop:
37
- enabled: true
38
- config: ".rubocop_cc.yml"
39
- channel: rubocop-0-69
40
- checks:
41
- method-complexity:
42
- enabled: true
43
- config:
44
- threshold: 8
45
- prepare:
46
- fetch:
47
- - url: https://raw.githubusercontent.com/ManageIQ/guides/master/.rubocop_base.yml
48
- path: ".rubocop_base.yml"
49
- - url: https://raw.githubusercontent.com/ManageIQ/guides/master/.rubocop_cc_base.yml
50
- path: ".rubocop_cc_base.yml"
51
- ratings:
52
- paths:
53
- - Gemfile.lock
54
- - "**.rake"
55
- - "**.rb"
42
+ exclude_patterns:
43
+ - ".git/"
44
+ - "**.xml"
45
+ - "**.yaml"
46
+ - "**.yml"
47
+ - lib/metadata/linux/test/Packages
48
+ - lib/metadata/linux/test/tc_LinuxUtils.rb
49
+ - locale/
50
+ - spec/
51
+ - test/
52
+ - tools/
53
+ - tmp/
54
+ version: '2'
data/.rubocop.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  inherit_from:
2
- - https://raw.githubusercontent.com/ManageIQ/guides/master/.rubocop_base.yml
3
- # put all local rubocop config into .rubocop_local.yml as it will be loaded by .rubocop_cc.yml as well
4
- - .rubocop_local.yml
2
+ - ".rubocop_local.yml"
3
+ inherit_gem:
4
+ manageiq-style: ".rubocop_base.yml"
data/.rubocop_cc.yml CHANGED
@@ -1,5 +1,4 @@
1
1
  inherit_from:
2
- # this is downloaded by .codeclimate.yml
3
- - .rubocop_base.yml
4
- - .rubocop_cc_base.yml
5
- - .rubocop_local.yml
2
+ - ".rubocop_base.yml"
3
+ - ".rubocop_cc_base.yml"
4
+ - ".rubocop_local.yml"
data/.rubocop_local.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # Overrides
3
3
  #
4
- GlobalVars:
4
+ Style/GlobalVars:
5
5
  AllowedVariables:
6
6
  # Loggers
7
7
  - $log
data/.travis.yml CHANGED
@@ -1,10 +1,9 @@
1
1
  ---
2
- sudo: false
3
2
  cache: bundler
4
3
  language: ruby
5
4
  rvm:
6
- - 2.5.7
7
- - 2.6.5
5
+ - 2.6.6
6
+ - 2.7.2
8
7
  after_script: bundle exec codeclimate-test-reporter
9
8
  notifications:
10
9
  webhooks:
@@ -13,3 +12,4 @@ notifications:
13
12
  on_success: change
14
13
  on_failure: always
15
14
  on_start: never
15
+ dist: bionic
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # ManageIQ::Smartstate
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/manageiq-smartstate.svg)](http://badge.fury.io/rb/manageiq-smartstate)
4
- [![Build Status](https://travis-ci.com/ManageIQ/manageiq-smartstate.svg)](https://travis-ci.com/ManageIQ/manageiq-smartstate)
4
+ [![Build Status](https://travis-ci.com/ManageIQ/manageiq-smartstate.svg)](https://travis-ci.com/github/ManageIQ/manageiq-smartstate)
5
5
  [![Code Climate](https://codeclimate.com/github/ManageIQ/manageiq-smartstate.svg)](https://codeclimate.com/github/ManageIQ/manageiq-smartstate)
6
6
  [![Test Coverage](https://codeclimate.com/github/ManageIQ/manageiq-smartstate/badges/coverage.svg)](https://codeclimate.com/github/ManageIQ/manageiq-smartstate/coverage)
7
7
  [![Security](https://hakiri.io/github/ManageIQ/manageiq-smartstate/master.svg)](https://hakiri.io/github/ManageIQ/manageiq-smartstate/master)
@@ -89,8 +89,6 @@
89
89
  #
90
90
  ############################################################################################
91
91
 
92
- require 'enumerator'
93
-
94
92
  require 'binary_struct'
95
93
  require 'util/miq-hash_struct'
96
94
 
@@ -1,5 +1,3 @@
1
- require 'enumerator'
2
-
3
1
  require 'binary_struct'
4
2
  require 'util/miq-hash_struct'
5
3
 
@@ -195,8 +195,6 @@
195
195
  # * zero or more pages numbers of leaves
196
196
 
197
197
  require 'ostruct'
198
- require 'enumerator'
199
-
200
198
  require 'binary_struct'
201
199
 
202
200
  require_relative 'MiqSqlite3Page'
@@ -1,8 +1,6 @@
1
1
  # encoding: US-ASCII
2
2
 
3
3
  require 'ostruct'
4
- require 'enumerator'
5
-
6
4
  require 'binary_struct'
7
5
  require_relative 'MiqSqlite3Util'
8
6
 
@@ -1,6 +1,4 @@
1
1
  require 'ostruct'
2
- require 'enumerator'
3
-
4
2
  require 'binary_struct'
5
3
  require_relative 'MiqSqlite3Util'
6
4
  require_relative 'MiqSqlite3Cell'
@@ -1,6 +1,4 @@
1
1
  require 'ostruct'
2
- require 'enumerator'
3
-
4
2
  require 'binary_struct'
5
3
  require_relative 'MiqSqlite3Util'
6
4
  require_relative 'MiqSqlite3Page'
@@ -1,10 +1,12 @@
1
1
  require 'disk/modules/MiqLargeFile'
2
- require 'util/miq-unicode'
2
+ require 'miq_unicode'
3
3
  require 'binary_struct'
4
4
  require 'memory_buffer'
5
5
  require 'Scvmm/miq_hyperv_disk'
6
6
 
7
7
  module MSCommon
8
+ using ManageIQ::UnicodeString
9
+
8
10
  # NOTE: All values are stored in network byte order.
9
11
 
10
12
  FOOTER = BinaryStruct.new([
@@ -1,6 +1,6 @@
1
1
  # encoding: US-ASCII
2
2
 
3
- require 'util/miq-unicode'
3
+ require 'miq_unicode'
4
4
  require 'binary_struct'
5
5
  require 'disk/MiqDisk'
6
6
  require 'memory_buffer'
@@ -8,6 +8,8 @@ require 'disk/modules/MiqLargeFile'
8
8
  require 'disk/modules/vhdx_bat_entry'
9
9
 
10
10
  module VhdxDisk
11
+ using ManageIQ::UnicodeString
12
+
11
13
  # NOTE: All values are stored in network byte order.
12
14
 
13
15
  VHDX_FILE_IDENTIFIER = BinaryStruct.new([
@@ -8,6 +8,7 @@ class MiqMountManager < MiqFS
8
8
  def self.mountVolumes(volMgr, vmCfg, ost = nil)
9
9
  rootTrees = []
10
10
  noFsVolumes = []
11
+
11
12
  volMgr.visibleVolumes.each do |dobj|
12
13
  $log.debug("MiqMountManager.mountVolumes >> fileName=#{dobj.dInfo.fileName}, partition=#{dobj.partNum}") if $log
13
14
  fs = MiqFS.getFS(dobj)
@@ -20,10 +21,7 @@ class MiqMountManager < MiqFS
20
21
  rootTrees << new(rsm, dobj, volMgr, vmCfg, ost)
21
22
  end
22
23
  end
23
- if volMgr.kind_of?(MiqNativeVolumeManager)
24
- require 'MetakitFS'
25
- rootTrees.each { |rt| rt.findPayload(noFsVolumes) } unless noFsVolumes.empty?
26
- end
24
+
27
25
  rootTrees
28
26
  end # def self.mountVolumes
29
27
 
@@ -41,31 +39,6 @@ class MiqMountManager < MiqFS
41
39
  super(rootModule, rootVolume)
42
40
  end # def initialize
43
41
 
44
- def findPayload(noFsVolumes)
45
- $log.debug "MiqMountManager.findPayload: searching for payloads:" if $log
46
- noFsVolumes.each do |v|
47
- next unless v.respond_to?(:devFile)
48
- if v.devFile
49
- $log.debug "\tMiqMountManager.findPayload: devFile = #{v.devFile}" if $log
50
- v.mkfile = v.devFile
51
- unless MetakitFS.supported?(v)
52
- $log.debug "\tMiqMountManager.findPayload: devFile = #{v.devFile} not mkfs, skipping" if $log
53
- v.mkfile = nil
54
- next
55
- end
56
- mkFs = MiqFS.new(MetakitFS, v)
57
- if mkFs.fsId == "MIQPAYLOAD"
58
- $log.debug "\tMiqMountManager.findPayload: payload found devFile = #{v.devFile}" if $log
59
- @payloads << mkFs
60
- else
61
- $log.debug "\tMiqMountManager.findPayload: devFile = #{v.devFile} not payload, fsId = #{mkFs.fsId}" if $log
62
- end
63
- else
64
- $log.debug "\tMiqMountManager.findPayload: devFile not set, fileName = #{v.dInfo.fileName}" if $log
65
- end
66
- end
67
- end
68
-
69
42
  #
70
43
  # Override standard MiqFS methods to account for mount indirection.
71
44
  # The getFsPath method is defined by the OS-specific mount modules.
@@ -105,12 +105,7 @@ module VimDatastoreFS
105
105
  #
106
106
  # fpos = 0
107
107
  # fsize = @pSize.get(fileRow)
108
- # if ftruncate && fsize != 0
109
- # @pSize.set fileRow, 0
110
- # @pData.set fileRow, Metakit::Bytes.new("", 0)
111
- # elsif fappend
112
- # fpos = fsize
113
- # end
108
+ # fpos = fsize if fappend
114
109
  #
115
110
  # return(MkFile.new(p, fileRow, fpos, fread, fwrite))
116
111
  # end # def fs_fileOpen