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.
- checksums.yaml +5 -5
- data/.codeclimate.yml +34 -35
- data/.rubocop.yml +3 -3
- data/.rubocop_cc.yml +3 -4
- data/.rubocop_local.yml +1 -1
- data/.travis.yml +3 -3
- data/README.md +1 -1
- data/lib/db/MiqBdb/MiqBdb.rb +0 -2
- data/lib/db/MiqBdb/MiqBdbPage.rb +0 -2
- data/lib/db/MiqSqlite/MiqSqlite3.rb +0 -2
- data/lib/db/MiqSqlite/MiqSqlite3Cell.rb +0 -2
- data/lib/db/MiqSqlite/MiqSqlite3Page.rb +0 -2
- data/lib/db/MiqSqlite/MiqSqlite3Table.rb +0 -2
- data/lib/disk/modules/MSCommon.rb +3 -1
- data/lib/disk/modules/VhdxDisk.rb +3 -1
- data/lib/fs/MiqMountManager.rb +2 -29
- data/lib/fs/VimDatastoreFS/VimDatastoreFS.rb +1 -6
- data/lib/fs/fat32/directory_entry.rb +540 -540
- data/lib/fs/iso9660/boot_sector.rb +3 -2
- data/lib/fs/iso9660/directory_entry.rb +3 -2
- data/lib/fs/iso9660/rock_ridge.rb +3 -1
- data/lib/fs/ntfs/attrib_attribute_list.rb +3 -1
- data/lib/fs/ntfs/attrib_file_name.rb +3 -1
- data/lib/fs/ntfs/attrib_header.rb +3 -1
- data/lib/fs/ntfs/attrib_index_root.rb +3 -1
- data/lib/fs/ntfs/attrib_volume_name.rb +3 -1
- data/lib/manageiq/smartstate/util.rb +18 -0
- data/lib/manageiq/smartstate/version.rb +1 -1
- data/lib/metadata/MIQExtract/MIQExtract.rb +1 -2
- data/lib/metadata/VmConfig/GetNativeCfg.rb +2 -4
- data/lib/metadata/VmConfig/VmConfig.rb +5 -4
- data/lib/metadata/VmConfig/cfgConfig.rb +4 -0
- data/lib/metadata/VmConfig/xmlConfig.rb +3 -3
- data/lib/metadata/linux/MiqRpmPackages.rb +3 -1
- data/lib/metadata/util/win32/Win32Accounts.rb +3 -1
- data/lib/metadata/util/win32/Win32EventLog.rb +3 -1
- data/lib/metadata/util/win32/Win32Software.rb +5 -3
- data/lib/metadata/util/win32/decode.rb +0 -0
- data/lib/metadata/util/win32/fleece_hives.rb +0 -9
- data/lib/metadata/util/win32/ms-registry.rb +3 -2
- data/lib/metadata/util/win32/peheader.rb +3 -2
- data/lib/metadata/util/win32/system_path_win.rb +0 -2
- data/lib/miq_unicode.rb +45 -0
- data/manageiq-smartstate.gemspec +8 -7
- metadata +60 -32
- data/lib/fs/MetakitFS/MetakitFS.rb +0 -530
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3d4105de210c11ceac8351237b58fcc039ee297700d4bfd82e027c1fc4785986
|
4
|
+
data.tar.gz: 878913f7d24bc556e29546b6441e305aeaa2fe0a945841c655c685dde9554927
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce177c539d5925c377b856538e44f6b8640215163c265540578659253338d57e12b3318ad1146b50a7ef220aa836b0fd5f81cb7436da153de4a3224743696012
|
7
|
+
data.tar.gz: 9076cb1e8bdd796a4ae8d5d56d343962676f704a8a4a5d7757244b8d311ea1f44f665c88f8b5ba0fd23bfe81ee03cb6d7e806ac3734cb2bfd593b10445fdb11d
|
data/.codeclimate.yml
CHANGED
@@ -1,17 +1,23 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
-
|
9
|
-
|
10
|
-
-
|
11
|
-
|
12
|
-
-
|
13
|
-
|
14
|
-
|
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
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
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
|
-
-
|
3
|
-
|
4
|
-
- .
|
2
|
+
- ".rubocop_local.yml"
|
3
|
+
inherit_gem:
|
4
|
+
manageiq-style: ".rubocop_base.yml"
|
data/.rubocop_cc.yml
CHANGED
data/.rubocop_local.yml
CHANGED
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.
|
7
|
-
- 2.
|
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)
|
data/lib/db/MiqBdb/MiqBdb.rb
CHANGED
data/lib/db/MiqBdb/MiqBdbPage.rb
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
require 'disk/modules/MiqLargeFile'
|
2
|
-
require '
|
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 '
|
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([
|
data/lib/fs/MiqMountManager.rb
CHANGED
@@ -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
|
-
|
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
|
-
#
|
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
|