manageiq-smartstate 0.8.1 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yaml +31 -0
- data/.rspec +0 -1
- data/.whitesource +3 -0
- data/Gemfile +1 -1
- data/README.md +1 -2
- data/lib/MiqVm/MiqRhevmVm.rb +1 -0
- data/lib/MiqVm/MiqVm.rb +0 -7
- data/lib/blackbox/VmBlackBox.rb +1 -0
- data/lib/db/MiqBdb/MiqBdb.rb +1 -0
- data/lib/db/MiqBdb/MiqBdbBtree.rb +1 -0
- data/lib/db/MiqBdb/MiqBdbHash.rb +1 -0
- data/lib/db/MiqBdb/MiqBdbPage.rb +1 -0
- data/lib/disk/DiskProbe.rb +2 -1
- data/lib/disk/modules/MiqLargeFile.rb +1 -0
- data/lib/fs/ntfs/attrib_file_name.rb +1 -0
- data/lib/fs/ntfs/attrib_standard_information.rb +1 -0
- data/lib/manageiq/smartstate/version.rb +1 -1
- data/lib/metadata/MIQExtract/MIQExtract.rb +1 -0
- data/lib/metadata/ScanProfile/ScanProfilesBase.rb +1 -0
- data/lib/metadata/VmConfig/GetNativeCfg.rb +1 -0
- data/lib/metadata/VmConfig/VmConfig.rb +1 -0
- data/lib/metadata/VmConfig/ovfConfig.rb +1 -0
- data/lib/metadata/VmConfig/vmcConfig.rb +1 -0
- data/lib/metadata/VmConfig/xmlConfig.rb +1 -6
- data/lib/metadata/linux/LinuxInitProcs.rb +1 -0
- data/lib/metadata/linux/LinuxOSInfo.rb +1 -0
- data/lib/metadata/linux/LinuxPackages.rb +1 -0
- data/lib/metadata/linux/LinuxSystemd.rb +1 -0
- data/lib/metadata/linux/LinuxUsers.rb +1 -0
- data/lib/metadata/linux/MiqConaryPackages.rb +1 -0
- data/lib/metadata/linux/MiqRpmPackages.rb +1 -0
- data/lib/metadata/util/md5deep.rb +1 -0
- data/lib/metadata/util/win32/Win32Accounts.rb +1 -0
- data/lib/metadata/util/win32/Win32EventLog.rb +1 -0
- data/lib/metadata/util/win32/Win32Services.rb +1 -0
- data/lib/metadata/util/win32/Win32Software.rb +1 -0
- data/lib/metadata/util/win32/Win32System.rb +1 -0
- data/lib/metadata/util/win32/fleece_hives.rb +1 -0
- data/lib/metadata/util/win32/ms-registry.rb +1 -0
- data/lib/metadata/util/win32/remote-registry.rb +1 -0
- data/manageiq-smartstate.gemspec +4 -5
- metadata +7 -32
- data/.travis.yml +0 -15
- data/lib/MiqVm/miq_scvmm_vm.rb +0 -39
- data/lib/Scvmm/miq_hyperv_disk.rb +0 -274
- data/lib/Scvmm/miq_scvmm_parse_powershell.rb +0 -75
- data/lib/Scvmm/miq_scvmm_vm_ssa_info.rb +0 -135
- data/lib/disk/modules/MSCommon.rb +0 -354
- data/lib/disk/modules/MSVSDiffDisk.rb +0 -85
- data/lib/disk/modules/MSVSDiskProbe.rb +0 -61
- data/lib/disk/modules/MSVSDynamicDisk.rb +0 -36
- data/lib/disk/modules/MSVSFixedDisk.rb +0 -39
- data/lib/disk/modules/VhdxDisk.rb +0 -629
- data/lib/disk/modules/VhdxDiskProbe.rb +0 -46
- data/lib/metadata/VmConfig/xmlMsHyperVConfig.rb +0 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6eb99759a729e78c638ca24d3d18d0e56fb85e87cd69ddd962087ec4b12cd734
|
4
|
+
data.tar.gz: 311f7086a407f541ec64b3380cff54b9b011a4fad2234cb9fef01fda488669ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08c48060bd2cf691c32fab0ed798971dc3d6f49e2cf2bfc1575e636b08bea8d5cbfd2ee7096c8a0b6ec83a40bc1f5ea86f2f008e8767867589750f35ed1035a2'
|
7
|
+
data.tar.gz: 8e244a6f579ad84c7796a96de17ed12b4da3ba70bdb910113abbb88bc5866b001edb3abbbe52f493d31a9215c04e9221282319e353497bd8ee929caf28f99711
|
@@ -0,0 +1,31 @@
|
|
1
|
+
---
|
2
|
+
name: CI
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
pull_request:
|
6
|
+
schedule:
|
7
|
+
- cron: 0 0 * * 0
|
8
|
+
jobs:
|
9
|
+
ci:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
strategy:
|
12
|
+
matrix:
|
13
|
+
ruby-version:
|
14
|
+
- '3.0'
|
15
|
+
- '3.1'
|
16
|
+
env:
|
17
|
+
CC_TEST_REPORTER_ID: "${{ secrets.CC_TEST_REPORTER_ID }}"
|
18
|
+
steps:
|
19
|
+
- uses: actions/checkout@v4
|
20
|
+
- name: Set up Ruby
|
21
|
+
uses: ruby/setup-ruby@v1
|
22
|
+
with:
|
23
|
+
ruby-version: "${{ matrix.ruby-version }}"
|
24
|
+
bundler-cache: true
|
25
|
+
timeout-minutes: 30
|
26
|
+
- name: Run tests
|
27
|
+
run: bundle exec rake
|
28
|
+
- name: Report code coverage
|
29
|
+
if: "${{ github.ref == 'refs/heads/master' && matrix.ruby-version == '3.0' }}"
|
30
|
+
continue-on-error: true
|
31
|
+
uses: paambaati/codeclimate-action@v5
|
data/.rspec
CHANGED
data/.whitesource
ADDED
data/Gemfile
CHANGED
@@ -6,4 +6,4 @@ gemspec
|
|
6
6
|
gem "manageiq-gems-pending", :git => "https://github.com/ManageIQ/manageiq-gems-pending.git", :branch => "master"
|
7
7
|
|
8
8
|
# Modified gems for vmware_web_service. Setting sources here since they are git references
|
9
|
-
gem "handsoap", "=0.2.5.5", :require => false, :source => "
|
9
|
+
gem "handsoap", "=0.2.5.5", :require => false, :source => "https://rubygems.manageiq.org"
|
data/README.md
CHANGED
@@ -1,10 +1,9 @@
|
|
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
|
-
[![
|
4
|
+
[![CI](https://github.com/ManageIQ/manageiq-smartstate/actions/workflows/ci.yaml/badge.svg)](https://github.com/ManageIQ/manageiq-smartstate/actions/workflows/ci.yaml)
|
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
|
-
[![Security](https://hakiri.io/github/ManageIQ/manageiq-smartstate/master.svg)](https://hakiri.io/github/ManageIQ/manageiq-smartstate/master)
|
8
7
|
|
9
8
|
[![Chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ManageIQ/manageiq-smartstate?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
10
9
|
|
data/lib/MiqVm/MiqRhevmVm.rb
CHANGED
data/lib/MiqVm/MiqVm.rb
CHANGED
@@ -48,11 +48,6 @@ class MiqVm
|
|
48
48
|
@vmConfig = VmConfig.new(getCfg(@ost.snapId))
|
49
49
|
$log.debug "MiqVm::initialize: @vmConfig.getHash = #{@vmConfig.getHash.inspect}"
|
50
50
|
$log.debug "MiqVm::initialize: @vmConfig.getDiskFileHash = #{@vmConfig.getDiskFileHash.inspect}"
|
51
|
-
# TODO: move this to miq_scvmm_vm
|
52
|
-
elsif (@scvmm = @ost.miq_scvmm)
|
53
|
-
$log.debug "MiqVm::initialize: accessing VM through HyperV server" if $log.debug?
|
54
|
-
@vmConfig = VmConfig.new(getCfg(@ost.snapId))
|
55
|
-
$log.debug "MiqVm::initialize: setting @ost.miq_scvmm_vm = #{@scvmm_vm.class}" if $log.debug?
|
56
51
|
else
|
57
52
|
@vimVm = nil
|
58
53
|
@vmConfig = VmConfig.new(vmCfg)
|
@@ -90,8 +85,6 @@ class MiqVm
|
|
90
85
|
end
|
91
86
|
$log.debug "openDisks: using disk file path: #{dInfo.vixDiskInfo[:fileName]}"
|
92
87
|
dInfo.vixDiskInfo[:connection] = @vdlConnection
|
93
|
-
elsif @ost.miq_hyperv
|
94
|
-
init_disk_info(dInfo, df)
|
95
88
|
else
|
96
89
|
dInfo.fileName = df
|
97
90
|
disk_format = @vmConfig.getHash["#{dtag}.format"] # Set by rhevm for iscsi and fcp disks
|
data/lib/blackbox/VmBlackBox.rb
CHANGED
data/lib/db/MiqBdb/MiqBdb.rb
CHANGED
data/lib/db/MiqBdb/MiqBdbHash.rb
CHANGED
data/lib/db/MiqBdb/MiqBdbPage.rb
CHANGED
data/lib/disk/DiskProbe.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
module DiskProbe
|
2
|
+
require 'manageiq/gems/pending'
|
2
3
|
require 'util/miq-exception'
|
3
4
|
MODDIR = File.expand_path(File.join(File.dirname(__FILE__), "modules"))
|
4
5
|
|
@@ -9,7 +10,7 @@ module DiskProbe
|
|
9
10
|
p.chomp!(".rb")
|
10
11
|
end
|
11
12
|
# Reorder known probes for optimization
|
12
|
-
%w(VixDiskProbe VMWareDiskProbe RhevmDiskProbe
|
13
|
+
%w(VixDiskProbe VMWareDiskProbe RhevmDiskProbe).reverse_each do |probe|
|
13
14
|
PROBE_FILES.unshift(probe) if PROBE_FILES.delete(probe)
|
14
15
|
end
|
15
16
|
PROBE_FILES.push("LocalDevProbe") if PROBE_FILES.delete("LocalDevProbe")
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'manageiq/gems/pending'
|
1
2
|
require 'util/miq-xml'
|
2
3
|
require 'awesome_spawn'
|
3
4
|
|
@@ -37,16 +38,10 @@ module XmlConfig
|
|
37
38
|
end
|
38
39
|
xml_type = nil
|
39
40
|
xml_type = :xen unless xml.find_first("//vm/thinsyVmm").nil?
|
40
|
-
xml_type = :ms_hyperv unless xml.find_first("//configuration/properties/type_id").nil?
|
41
41
|
xml_type = :kvm if xml.root.name == 'domain' && ['kvm', 'qemu'].include?(xml.root.attributes['type'])
|
42
42
|
|
43
43
|
raise "Specified XML file [#{filename}] is not a valid VM configuration file." if xml_type.nil?
|
44
44
|
|
45
|
-
if xml_type == :ms_hyperv
|
46
|
-
require "metadata/VmConfig/xmlMsHyperVConfig"
|
47
|
-
extend XmlMsHyperVConfig
|
48
|
-
end
|
49
|
-
|
50
45
|
xml_to_config(xml)
|
51
46
|
|
52
47
|
@convertText
|
data/manageiq-smartstate.gemspec
CHANGED
@@ -35,12 +35,11 @@ Gem::Specification.new do |spec|
|
|
35
35
|
|
36
36
|
spec.add_development_dependency "bundler"
|
37
37
|
spec.add_development_dependency "camcorder"
|
38
|
-
spec.add_development_dependency "codeclimate-test-reporter", "~> 1.0.0"
|
39
38
|
spec.add_development_dependency "manageiq-style"
|
40
39
|
spec.add_development_dependency "rake"
|
41
|
-
spec.add_development_dependency "rspec",
|
42
|
-
spec.add_development_dependency "simplecov"
|
40
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
41
|
+
spec.add_development_dependency "simplecov", ">= 0.21.2"
|
43
42
|
spec.add_development_dependency "sqlite3"
|
44
|
-
spec.add_development_dependency "vcr",
|
45
|
-
spec.add_development_dependency "webmock",
|
43
|
+
spec.add_development_dependency "vcr", "~>3.0.2"
|
44
|
+
spec.add_development_dependency "webmock", "~>2.3.1"
|
46
45
|
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.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ManageIQ Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -206,20 +206,6 @@ dependencies:
|
|
206
206
|
- - ">="
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '0'
|
209
|
-
- !ruby/object:Gem::Dependency
|
210
|
-
name: codeclimate-test-reporter
|
211
|
-
requirement: !ruby/object:Gem::Requirement
|
212
|
-
requirements:
|
213
|
-
- - "~>"
|
214
|
-
- !ruby/object:Gem::Version
|
215
|
-
version: 1.0.0
|
216
|
-
type: :development
|
217
|
-
prerelease: false
|
218
|
-
version_requirements: !ruby/object:Gem::Requirement
|
219
|
-
requirements:
|
220
|
-
- - "~>"
|
221
|
-
- !ruby/object:Gem::Version
|
222
|
-
version: 1.0.0
|
223
209
|
- !ruby/object:Gem::Dependency
|
224
210
|
name: manageiq-style
|
225
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -268,14 +254,14 @@ dependencies:
|
|
268
254
|
requirements:
|
269
255
|
- - ">="
|
270
256
|
- !ruby/object:Gem::Version
|
271
|
-
version:
|
257
|
+
version: 0.21.2
|
272
258
|
type: :development
|
273
259
|
prerelease: false
|
274
260
|
version_requirements: !ruby/object:Gem::Requirement
|
275
261
|
requirements:
|
276
262
|
- - ">="
|
277
263
|
- !ruby/object:Gem::Version
|
278
|
-
version:
|
264
|
+
version: 0.21.2
|
279
265
|
- !ruby/object:Gem::Dependency
|
280
266
|
name: sqlite3
|
281
267
|
requirement: !ruby/object:Gem::Requirement
|
@@ -325,13 +311,14 @@ extensions: []
|
|
325
311
|
extra_rdoc_files: []
|
326
312
|
files:
|
327
313
|
- ".codeclimate.yml"
|
314
|
+
- ".github/workflows/ci.yaml"
|
328
315
|
- ".gitignore"
|
329
316
|
- ".rspec"
|
330
317
|
- ".rspec_ci"
|
331
318
|
- ".rubocop.yml"
|
332
319
|
- ".rubocop_cc.yml"
|
333
320
|
- ".rubocop_local.yml"
|
334
|
-
- ".
|
321
|
+
- ".whitesource"
|
335
322
|
- Gemfile
|
336
323
|
- LICENSE.txt
|
337
324
|
- README.md
|
@@ -343,13 +330,9 @@ files:
|
|
343
330
|
- lib/MiqVm/MiqRhevmVm.rb
|
344
331
|
- lib/MiqVm/MiqVm.rb
|
345
332
|
- lib/MiqVm/miq_azure_vm.rb
|
346
|
-
- lib/MiqVm/miq_scvmm_vm.rb
|
347
333
|
- lib/OpenStackExtract/MiqOpenStackVm/MiqOpenStackCommon.rb
|
348
334
|
- lib/OpenStackExtract/MiqOpenStackVm/MiqOpenStackImage.rb
|
349
335
|
- lib/OpenStackExtract/MiqOpenStackVm/MiqOpenStackInstance.rb
|
350
|
-
- lib/Scvmm/miq_hyperv_disk.rb
|
351
|
-
- lib/Scvmm/miq_scvmm_parse_powershell.rb
|
352
|
-
- lib/Scvmm/miq_scvmm_vm_ssa_info.rb
|
353
336
|
- lib/VolumeManager/LVM.rb
|
354
337
|
- lib/VolumeManager/LVM/logical_volume.rb
|
355
338
|
- lib/VolumeManager/LVM/lv_segment.rb
|
@@ -392,11 +375,6 @@ files:
|
|
392
375
|
- lib/disk/modules/AzureManagedDisk.rb
|
393
376
|
- lib/disk/modules/LocalDevMod.rb
|
394
377
|
- lib/disk/modules/LocalDevProbe.rb
|
395
|
-
- lib/disk/modules/MSCommon.rb
|
396
|
-
- lib/disk/modules/MSVSDiffDisk.rb
|
397
|
-
- lib/disk/modules/MSVSDiskProbe.rb
|
398
|
-
- lib/disk/modules/MSVSDynamicDisk.rb
|
399
|
-
- lib/disk/modules/MSVSFixedDisk.rb
|
400
378
|
- lib/disk/modules/MiqLargeFile.rb
|
401
379
|
- lib/disk/modules/QcowDisk.rb
|
402
380
|
- lib/disk/modules/QcowDiskProbe.rb
|
@@ -409,8 +387,6 @@ files:
|
|
409
387
|
- lib/disk/modules/VMWareDescriptor.rb
|
410
388
|
- lib/disk/modules/VMWareDiskProbe.rb
|
411
389
|
- lib/disk/modules/VMWareSparseDisk.rb
|
412
|
-
- lib/disk/modules/VhdxDisk.rb
|
413
|
-
- lib/disk/modules/VhdxDiskProbe.rb
|
414
390
|
- lib/disk/modules/VixDiskMod.rb
|
415
391
|
- lib/disk/modules/VixDiskProbe.rb
|
416
392
|
- lib/disk/modules/miq_disk_cache.rb
|
@@ -568,7 +544,6 @@ files:
|
|
568
544
|
- lib/metadata/VmConfig/vmtxConfig.rb
|
569
545
|
- lib/metadata/VmConfig/vmxConfig.rb
|
570
546
|
- lib/metadata/VmConfig/xmlConfig.rb
|
571
|
-
- lib/metadata/VmConfig/xmlMsHyperVConfig.rb
|
572
547
|
- lib/metadata/linux/InitProcHash.rb
|
573
548
|
- lib/metadata/linux/LinuxInitProcs.rb
|
574
549
|
- lib/metadata/linux/LinuxOSInfo.rb
|
@@ -618,7 +593,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
618
593
|
- !ruby/object:Gem::Version
|
619
594
|
version: '0'
|
620
595
|
requirements: []
|
621
|
-
rubygems_version: 3.
|
596
|
+
rubygems_version: 3.4.20
|
622
597
|
signing_key:
|
623
598
|
specification_version: 4
|
624
599
|
summary: ManageIQ SmartState Analysis
|
data/.travis.yml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
cache: bundler
|
3
|
-
language: ruby
|
4
|
-
rvm:
|
5
|
-
- 2.6.6
|
6
|
-
- 2.7.2
|
7
|
-
after_script: bundle exec codeclimate-test-reporter
|
8
|
-
notifications:
|
9
|
-
webhooks:
|
10
|
-
urls:
|
11
|
-
- https://webhooks.gitter.im/e/32a0b937854e89d6ae58
|
12
|
-
on_success: change
|
13
|
-
on_failure: always
|
14
|
-
on_start: never
|
15
|
-
dist: bionic
|
data/lib/MiqVm/miq_scvmm_vm.rb
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
require 'MiqVm/MiqVm'
|
2
|
-
require 'Scvmm/miq_scvmm_vm_ssa_info'
|
3
|
-
|
4
|
-
class MiqScvmmVm < MiqVm
|
5
|
-
def getCfg(_snap = nil)
|
6
|
-
cfg_hash = {}
|
7
|
-
# Collect disk information
|
8
|
-
vhds = @scvmm.vm_all_harddisks(@ost.miq_vm)
|
9
|
-
raise "Unable to get Hard Disk Info from VM #{@ost.miq_vm}." unless vhds.any?
|
10
|
-
vhds.each do |vhd_attributes|
|
11
|
-
vhd = vhd_attributes["Path"]
|
12
|
-
type = vhd_attributes["ControllerType"].downcase
|
13
|
-
number = vhd_attributes["ControllerNumber"]
|
14
|
-
index = vhd_attributes["ControllerLocation"]
|
15
|
-
tag = "#{type}#{number}:#{index}"
|
16
|
-
cfg_hash["#{tag}.present"] = "true"
|
17
|
-
cfg_hash["#{tag}.devicetype"] = "disk"
|
18
|
-
cfg_hash["#{tag}.filename"] = vhd
|
19
|
-
end
|
20
|
-
cfg_hash
|
21
|
-
end
|
22
|
-
|
23
|
-
private
|
24
|
-
|
25
|
-
def init_disk_info(disk_info, disk_file)
|
26
|
-
disk_info.hyperv_connection = {}
|
27
|
-
disk_info.fileName = disk_file
|
28
|
-
disk_info.driveType = @scvmm.get_drivetype(disk_file)
|
29
|
-
disk_info.scvmm = @scvmm
|
30
|
-
disk_info.hyperv_connection[:host] = @ost.miq_hyperv[:host]
|
31
|
-
disk_info.hyperv_connection[:port] = @ost.miq_hyperv[:port]
|
32
|
-
if @ost.miq_hyperv[:domain].nil?
|
33
|
-
disk_info.hyperv_connection[:user] = @ost.miq_hyperv[:user]
|
34
|
-
else
|
35
|
-
disk_info.hyperv_connection[:user] = @ost.miq_hyperv[:domain] + "\\" + @ost.miq_hyperv[:user]
|
36
|
-
end
|
37
|
-
disk_info.hyperv_connection[:password] = @ost.miq_hyperv[:password]
|
38
|
-
end
|
39
|
-
end
|