testlab 1.9.0 → 1.9.1
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.
- data/lib/testlab/container/io.rb +11 -9
- data/lib/testlab/version.rb +1 -1
- metadata +2 -8
data/lib/testlab/container/io.rb
CHANGED
@@ -117,10 +117,20 @@ EOF
|
|
117
117
|
#
|
118
118
|
# @return [Boolean] True if successful.
|
119
119
|
def import(local_file)
|
120
|
-
@ui.logger.debug { "Container Import: #{self.id}
|
120
|
+
@ui.logger.debug { "Container Import: #{self.id}" }
|
121
121
|
|
122
122
|
local_file ||= File.expand_path("#{self.id}.sc")
|
123
123
|
|
124
|
+
import_tempfile = Tempfile.new('import')
|
125
|
+
remote_filename = File.basename(import_tempfile.path.dup)
|
126
|
+
import_tempfile.close!
|
127
|
+
|
128
|
+
remote_file = File.join("", "tmp", remote_filename)
|
129
|
+
local_file = File.expand_path(local_file)
|
130
|
+
root_fs_path = self.lxc.fs_root.split(File::SEPARATOR).last
|
131
|
+
|
132
|
+
@ui.logger.debug { "Local File: #{local_file.inspect}" }
|
133
|
+
|
124
134
|
if !File.exists?(local_file)
|
125
135
|
self.sc_url.nil? and raise ContainerError, "You failed to supply a filename or URL to import from!"
|
126
136
|
|
@@ -137,14 +147,6 @@ EOF
|
|
137
147
|
|
138
148
|
self.create
|
139
149
|
|
140
|
-
import_tempfile = Tempfile.new('import')
|
141
|
-
remote_filename = File.basename(import_tempfile.path.dup)
|
142
|
-
import_tempfile.close!
|
143
|
-
|
144
|
-
remote_file = File.join("", "tmp", remote_filename)
|
145
|
-
local_file = File.expand_path(local_file)
|
146
|
-
root_fs_path = self.lxc.fs_root.split(File::SEPARATOR).last
|
147
|
-
|
148
150
|
self.node.exec(%(sudo rm -fv #{remote_file}), :silence => true, :ignore_exit_status => true)
|
149
151
|
self.node.upload(local_file, remote_file, :on_progress => method(:progress_callback), :read_size => READ_SIZE)
|
150
152
|
|
data/lib/testlab/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: testlab
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-09-
|
12
|
+
date: 2013-09-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: gli
|
@@ -343,18 +343,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
343
343
|
- - ! '>='
|
344
344
|
- !ruby/object:Gem::Version
|
345
345
|
version: '0'
|
346
|
-
segments:
|
347
|
-
- 0
|
348
|
-
hash: 1545777099270245561
|
349
346
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
350
347
|
none: false
|
351
348
|
requirements:
|
352
349
|
- - ! '>='
|
353
350
|
- !ruby/object:Gem::Version
|
354
351
|
version: '0'
|
355
|
-
segments:
|
356
|
-
- 0
|
357
|
-
hash: 1545777099270245561
|
358
352
|
requirements: []
|
359
353
|
rubyforge_project:
|
360
354
|
rubygems_version: 1.8.25
|