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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 11032df3064dd6bfea58f94c9faadd8ca7754ffa
4
- data.tar.gz: 89cb13d1c70f2cc7c517ab608c55768172ca803b
3
+ metadata.gz: a86f74cac38fa3647f1d1ce4d7f17da7815bc0a4
4
+ data.tar.gz: 077114a2fe79de9d59713054d3c35ddf51dea59d
5
5
  SHA512:
6
- metadata.gz: c341e6c9aa91ba1e01f7ce6ddf5af758905194066e075362764ca5764fe7fe2ac088f217e00a32e23b59ac3f0e4917ea73a371cd59b34dcbb98e2b1c84e963ad
7
- data.tar.gz: ba6be78fc63d4ae2cb0a86cfc3e3c0f850c45c9fd380edbc9a325b3077e1a222020afb661d2dd0dbb4601d60c189d9eb688038a669a630440dcb426dffbd0d73
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.metadata_dir,
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: stderr
8
- process_log: stderr
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: '0660'
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
@@ -1,3 +1,3 @@
1
1
  module Itchy
2
- VERSION = '0.2.4' unless defined?(::Itchy::VERSION)
2
+ VERSION = '0.2.5' unless defined?(::Itchy::VERSION)
3
3
  end
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
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-09 00:00:00.000000000 Z
12
+ date: 2016-03-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: opennebula