manageiq-smartstate 0.5.1 → 0.5.2
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 +4 -4
- data/lib/manageiq/smartstate/version.rb +1 -1
- data/lib/metadata/VmConfig/VmConfig.rb +2 -2
- data/lib/metadata/util/md5deep.rb +27 -24
- 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: 4ee1b8fd08ac112af3f9c643ac6ae7a41b6dfef7
|
4
|
+
data.tar.gz: 973ebff243838e870439abc1996354f14159ba7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1c82c83f6d311c98352f940d501e0a2e20fccd15436e05755fc245c95eb3406eea3c5c8c79338dce41321d22c488a248b7ded0d9731a80147bd5ec64ba7488e
|
7
|
+
data.tar.gz: 257dc3420aaccfdeba53bb3359c313e9d13514757427514119e201cd6a0eea189d0cc8a979986570a4824f9de15111ea607ec7afdfbec2ca5a5b40b452bfd75a
|
@@ -409,10 +409,10 @@ class VmConfig
|
|
409
409
|
ems_display_text = "host(#{ems_host['use_vim_broker'] ? 'via broker' : 'directly'}):#{ems_host['host']}"
|
410
410
|
$log.info "#{conn_reason}: Connecting to [#{ems_display_text}] for VM:[#{vmCfgFile}]"
|
411
411
|
|
412
|
-
require 'VMwareWebService/
|
412
|
+
require 'VMwareWebService/MiqVim'
|
413
413
|
|
414
414
|
password_decrypt = ManageIQ::Password.decrypt(ems_host['password'])
|
415
|
-
hostVim =
|
415
|
+
hostVim = MiqVim.new(ems_host['host'], ems_host['user'], password_decrypt)
|
416
416
|
$log.info "#{conn_reason}: Connection to [#{ems_display_text}] completed for VM:[#{vmCfgFile}] in [#{Time.now - st}] seconds"
|
417
417
|
return hostVim
|
418
418
|
rescue Timeout::Error => err
|
@@ -126,37 +126,40 @@ class MD5deep
|
|
126
126
|
|
127
127
|
begin
|
128
128
|
# unless File.directory?(currFile) then
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
xmlFileNode.add_element("versioninfo", peHdr.versioninfo) if @opts.versioninfo && !peHdr.versioninfo.blank?
|
146
|
-
xmlFileNode.add_element("libraries", "imports" => peHdr.getImportList) if @opts.imports && !peHdr.imports.blank?
|
147
|
-
end
|
148
|
-
end
|
149
|
-
end
|
150
|
-
|
151
|
-
getFileContents(fh, xmlFileNode) if @opts.contents == true
|
152
|
-
fh.close
|
129
|
+
return if isDir?(currFile)
|
130
|
+
|
131
|
+
# File we have an exclusion list and the current file is in it, skip to the next file
|
132
|
+
@fullFileCount += 1
|
133
|
+
fh = fileOpen(currFile)
|
134
|
+
|
135
|
+
xmlFileNode = xmlNode.add_element("file", "name" => x, "fqname" => currFile)
|
136
|
+
statHash = {}
|
137
|
+
statHash.merge!(getFileStats(fh))
|
138
|
+
statHash.merge!(calculate_digest(fh))
|
139
|
+
xmlFileNode.add_attributes(statHash)
|
140
|
+
|
141
|
+
ext = File.extname(currFile).downcase
|
142
|
+
if @opts.winVerList.include?(ext)
|
143
|
+
pe_hdr = PEheader.new(fh) rescue nil
|
144
|
+
process_pe_header(pe_hdr, xmlFileNode) unless pe_hdr.nil?
|
153
145
|
end
|
146
|
+
|
147
|
+
getFileContents(fh, xmlFileNode) if @opts.contents == true
|
148
|
+
fh.close
|
154
149
|
rescue Errno::EACCES, RuntimeError, SystemCallError
|
155
150
|
fh.close if fh.kind_of?(File) && !fh.closed?
|
156
151
|
end
|
157
152
|
end
|
158
153
|
end
|
159
154
|
|
155
|
+
def process_pe_header(pe_hdr, xml_file_node)
|
156
|
+
xml_file_node.add_element("versioninfo", pe_hdr.versioninfo) if @opts.versioninfo && pe_hdr.versioninfo.present?
|
157
|
+
xml_file_node.add_element("libraries", "imports" => pe_hdr.getImportList) if @opts.imports && pe_hdr.imports.present?
|
158
|
+
rescue TypeError => err
|
159
|
+
$log.info "processFile: TypeError handling PEheader; skipping PEheader info"
|
160
|
+
$log.debug err.backtrace.join("\n")
|
161
|
+
end
|
162
|
+
|
160
163
|
def isDir?(currFile)
|
161
164
|
if @fs
|
162
165
|
@fs.fileDirectory?(currFile)
|
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.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ManageIQ Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: azure-armrest
|