chef-metal-lxc 0.3 → 0.4
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/chef_metal_lxc/lxc_transport.rb +5 -4
- data/lib/chef_metal_lxc/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 99c02b50b618cb09fbab3b0dd350e97428669196
|
|
4
|
+
data.tar.gz: a4bfc8a2a18d5dc37b83397d414b8563cd6dfe5b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 28e9b881dc2782e2061b70d55a5f97cb68734f57bee784a08110c4c40a05fca05730534ff8bd273cc9add141111e08084b310cdee055798a4ce8e78acb0c02e2
|
|
7
|
+
data.tar.gz: 0cff384fcab3645a5b2d86f9b16eddea3af5552273d8c209e0594b2d46726c45c90693f9ad6c5560582bcf1464e22f1c001c1b85281a9e0e92360c5a39adac53
|
|
@@ -11,9 +11,9 @@ module ChefMetalLXC
|
|
|
11
11
|
class LXCTransport < ChefMetal::Transport
|
|
12
12
|
@@active_transports = []
|
|
13
13
|
|
|
14
|
-
class LXCExecuteResult < Struct.new(:stdout, :stderr, :exitstatus)
|
|
14
|
+
class LXCExecuteResult < Struct.new(:command, :options, :stdout, :stderr, :exitstatus)
|
|
15
15
|
def error!
|
|
16
|
-
raise "Error: code #{exitstatus}.\nSTDOUT:#{stdout}\nSTDERR:#{stderr}" if exitstatus != 0
|
|
16
|
+
raise "Error: '#{command}' failed with exit code #{exitstatus}.\nSTDOUT:#{stdout}\nSTDERR:#{stderr}" if exitstatus != 0
|
|
17
17
|
end
|
|
18
18
|
end
|
|
19
19
|
|
|
@@ -41,12 +41,13 @@ module ChefMetalLXC
|
|
|
41
41
|
File.join(rootfs, path)
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
-
def execute(command)
|
|
44
|
+
def execute(command, options = {})
|
|
45
45
|
Chef::Log.info("Executing #{command} on #{name}")
|
|
46
46
|
container.execute do
|
|
47
47
|
begin
|
|
48
|
+
# TODO support streaming (shell out needs work)
|
|
48
49
|
out = shell_out(command)
|
|
49
|
-
LXCExecuteResult.new(out.stdout,out.stderr, out.exitstatus)
|
|
50
|
+
LXCExecuteResult.new(command, options, out.stdout, out.stderr, out.exitstatus)
|
|
50
51
|
rescue Exception => e
|
|
51
52
|
LXCExecuteResult.new('', e.message, -1)
|
|
52
53
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: chef-metal-lxc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: '0.
|
|
4
|
+
version: '0.4'
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ranjib Dey
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-04-
|
|
11
|
+
date: 2014-04-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: chef
|
|
@@ -30,14 +30,14 @@ dependencies:
|
|
|
30
30
|
requirements:
|
|
31
31
|
- - ~>
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '0.
|
|
33
|
+
version: '0.8'
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - ~>
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '0.
|
|
40
|
+
version: '0.8'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: ruby-lxc
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|