manageiq-smartstate 0.2.21 → 0.2.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +3 -0
- data/lib/fs/xfs/inode.rb +15 -0
- data/lib/manageiq/smartstate/version.rb +1 -1
- data/lib/metadata/util/md5deep.rb +21 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b1d24be0511290fa29a5fff5cb44781de61848c8
|
4
|
+
data.tar.gz: 6f5919a4cfdd3a9aa96a8bccf32e2542c46374da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5b7055d8ad41d06ffcfb088d9b15ecc4e71e869de043ae19f7ee37956b51d6c3e09513ecaff4841bf144f287bdaec61e4d6219a4f88c67094a3d4980956cdf5
|
7
|
+
data.tar.gz: 7a981805bcdbe3ca58aaa6ba0957f9294607ac31dc5313a29d5a59e50b4ad5c612daf3800f7dabb6899fb7aa31a5dc06548f3ea7f043b8e7cc9e8086a7f0aa93
|
data/.gitignore
CHANGED
data/lib/fs/xfs/inode.rb
CHANGED
@@ -302,14 +302,29 @@ module XFS
|
|
302
302
|
@access_time ||= Time.at(@in['atime_secs'])
|
303
303
|
end
|
304
304
|
|
305
|
+
# For compatibility with other filesystem methods
|
306
|
+
def aTime
|
307
|
+
access_time
|
308
|
+
end
|
309
|
+
|
305
310
|
def create_time
|
306
311
|
@create_time ||= Time.at(@in['ctime_secs'])
|
307
312
|
end
|
308
313
|
|
314
|
+
# For compatibility with other filesystem methods
|
315
|
+
def cTime
|
316
|
+
create_time
|
317
|
+
end
|
318
|
+
|
309
319
|
def modification_time
|
310
320
|
@modification_time ||= Time.at(@in['mtime_secs'])
|
311
321
|
end
|
312
322
|
|
323
|
+
# For compatibility with other filesystem methods
|
324
|
+
def mTime
|
325
|
+
modification_time
|
326
|
+
end
|
327
|
+
|
313
328
|
def permissions
|
314
329
|
@permissions ||= @in['file_mode'] & (MSK_PERM_OWNER | MSK_PERM_GROUP | MSK_PERM_USER)
|
315
330
|
end
|
@@ -60,7 +60,7 @@ class MD5deep
|
|
60
60
|
|
61
61
|
# First check if we are passed a fully qualifed file name
|
62
62
|
if @fs.fileExists?(filename)
|
63
|
-
processFile(startDir, globPattern, @xml.root)
|
63
|
+
isDir?(filename) ? process_dir_as_file(startDir, globPattern, @xml.root) : processFile(startDir, globPattern, @xml.root)
|
64
64
|
else
|
65
65
|
# If the file is not found then process the data as a glob pattern.
|
66
66
|
@fs.dirGlob(globPattern) do |f|
|
@@ -108,6 +108,18 @@ class MD5deep
|
|
108
108
|
end
|
109
109
|
end
|
110
110
|
|
111
|
+
def process_dir_as_file(path, x, xml_node)
|
112
|
+
if x != "." && x != ".."
|
113
|
+
curr_dir = File.join(path, x)
|
114
|
+
if isDir?(curr_dir)
|
115
|
+
xml_file_node = xml_node.add_element("file", "name" => x, "fqname" => curr_dir)
|
116
|
+
stat_hash = {}
|
117
|
+
stat_hash.merge!(get_dir_stats(curr_dir))
|
118
|
+
xml_file_node.add_attributes(stat_hash)
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
111
123
|
def processFile(path, x, xmlNode)
|
112
124
|
if (@opts.exclude.include?(x) == false) && x[0..0] != "$"
|
113
125
|
currFile = File.join(path, x)
|
@@ -167,6 +179,14 @@ class MD5deep
|
|
167
179
|
{"size" => fh.size, "atime" => fh.atime.getutc.iso8601, "ctime" => fh.ctime.getutc.iso8601, "mtime" => fh.mtime.getutc.iso8601}
|
168
180
|
end
|
169
181
|
|
182
|
+
def get_dir_stats(dir)
|
183
|
+
if @fs
|
184
|
+
{"size" => @fs.fileSize(dir), "atime" => @fs.fileAtime(dir).getutc.iso8601, "ctime" => @fs.fileCtime(dir).getutc.iso8601, "mtime" => @fs.fileMtime(dir).getutc.iso8601}
|
185
|
+
else
|
186
|
+
{"size" => File.size(dir), "atime" => File.stat(dir).atime.getutc.iso8601, "ctime" => File.stat(dir).ctime.getutc.iso8601, "mtime" => File.stat(dir).mtime.getutc.iso8601}
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
170
190
|
def calculate_sums(xmlNode)
|
171
191
|
rollup = create_digest_hash
|
172
192
|
# Add size to the hash as a Fixnum
|
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.
|
4
|
+
version: 0.2.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ManageIQ Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: azure-armrest
|
@@ -598,7 +598,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
598
598
|
version: '0'
|
599
599
|
requirements: []
|
600
600
|
rubyforge_project:
|
601
|
-
rubygems_version: 2.
|
601
|
+
rubygems_version: 2.6.12
|
602
602
|
signing_key:
|
603
603
|
specification_version: 4
|
604
604
|
summary: ManageIQ SmartState Analysis
|