itchy 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/itchy +1 -1
- data/config/itchy.yml +3 -3
- data/lib/itchy/image_transformer.rb +10 -0
- data/lib/itchy/version.rb +1 -1
- 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: a86f74cac38fa3647f1d1ce4d7f17da7815bc0a4
|
4
|
+
data.tar.gz: 077114a2fe79de9d59713054d3c35ddf51dea59d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a4f026036966cbdaf0bbc703985edd37ac3aced1bf6796edbefdf87b641922788a3e2a30117794be4ce59868cb48e9c0e0be444698c32e75aec672f3b5da2fb
|
7
|
+
data.tar.gz: d8debf3428818e35bff502852ca50ce4a7123f7d8f90b3727d6dc38934c5734e50cc9fe773c04e491397b70ee15f8379cedf6f4d4de602232fe3b5b61704751d
|
data/bin/itchy
CHANGED
@@ -75,7 +75,7 @@ class ItchyRunnable < Thor
|
|
75
75
|
aliases: '-m', desc: 'Path to a metadata directory for stored events'
|
76
76
|
method_option :required_format, type: :string, default: Itchy::Settings.output_image_format,
|
77
77
|
aliases: '-f', desc: 'Required output format of converted images'
|
78
|
-
method_option :output_dir, type: :string, default: Itchy::Settings.
|
78
|
+
method_option :output_dir, type: :string, default: Itchy::Settings.output_dir,
|
79
79
|
aliases: '-o', desc: 'Path to a directory where processed events descriptors will be stored'
|
80
80
|
method_option :descriptor_dir, type: :string, default: Itchy::Settings.descriptor_dir,
|
81
81
|
aliases: '-e', desc: 'Path to a directory where appliance descriptors will be stored'
|
data/config/itchy.yml
CHANGED
@@ -4,12 +4,12 @@ defaults: &defaults
|
|
4
4
|
output_dir: /var/spool/itchy/output
|
5
5
|
descriptor_dir: /var/spool/itchy/descriptors
|
6
6
|
log_to:
|
7
|
-
archive_log:
|
8
|
-
process_log:
|
7
|
+
archive_log: /var/log/itchy/archive.log
|
8
|
+
process_log: /var/log/itchy/process.log
|
9
9
|
log_level: error
|
10
10
|
debug: false
|
11
11
|
permissions:
|
12
|
-
file: '
|
12
|
+
file: '0664'
|
13
13
|
output_image_format: qcow2
|
14
14
|
qemu_img_binary: /usr/bin/qemu-img
|
15
15
|
|
@@ -48,6 +48,7 @@ module Itchy
|
|
48
48
|
converter = Itchy::FormatConverter.new(unpacking_dir, metadata, vmcatcher_configuration)
|
49
49
|
new_file_name = converter.convert!(file_format, @options.required_format, @options.output_dir)
|
50
50
|
end
|
51
|
+
remove_dir(unpacking_dir)
|
51
52
|
rescue Itchy::Errors::FileInspectError, Itchy::Errors::FormatConversionError,
|
52
53
|
Itchy::Errors::PrepareEnvError => ex
|
53
54
|
fail Itchy::Errors::ImageTransformationError, ex
|
@@ -153,6 +154,15 @@ module Itchy
|
|
153
154
|
new_file_name
|
154
155
|
end
|
155
156
|
|
157
|
+
def remove_dir(path)
|
158
|
+
Itchy::Log.debug "[#{self.class.name}] Deleting temporary image dir #{path}."
|
159
|
+
begin
|
160
|
+
::FileUtils.remove_dir(path)
|
161
|
+
rescue SystemCallError => ex
|
162
|
+
Itchy::Log.error "[#{self.class.name}] Failed to delete temporary dir #{path}!"
|
163
|
+
fail Itchy::Errors::PrepareEnvError, ex
|
164
|
+
end
|
165
|
+
end
|
156
166
|
# Method for copying image file from vmCatcher cache to processing places
|
157
167
|
#
|
158
168
|
# @param metadata [Itchy::VmcatcherEvent] event metadata
|
data/lib/itchy/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itchy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lubomir Kosaristan
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-03-
|
12
|
+
date: 2016-03-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: opennebula
|