lxc 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/lxc/config.rb +1 -1
- data/lib/lxc/container.rb +17 -1
- data/lib/lxc/version.rb +1 -1
- metadata +4 -4
data/lib/lxc/config.rb
CHANGED
data/lib/lxc/container.rb
CHANGED
@@ -202,6 +202,22 @@ class LXC
|
|
202
202
|
@lxc.exists?(self.name)
|
203
203
|
end
|
204
204
|
|
205
|
+
# Run an application inside a container
|
206
|
+
#
|
207
|
+
# Launches the container, executing the supplied application inside it.
|
208
|
+
#
|
209
|
+
# @see lxc-execute
|
210
|
+
def execute(*args)
|
211
|
+
self.exec("lxc-execute", "-f", self.config.filename, "--", *args)
|
212
|
+
end
|
213
|
+
|
214
|
+
# Launch a console for the container
|
215
|
+
#
|
216
|
+
# @see lxc-console
|
217
|
+
def console
|
218
|
+
self.exec("lxc-console")
|
219
|
+
end
|
220
|
+
|
205
221
|
# Wait for a specific container state
|
206
222
|
#
|
207
223
|
# Runs the "lxc-wait" command.
|
@@ -244,7 +260,7 @@ class LXC
|
|
244
260
|
def exec(*args)
|
245
261
|
arguments = Array.new
|
246
262
|
arguments << args.shift
|
247
|
-
arguments << %(
|
263
|
+
arguments << %(-n #{self.name})
|
248
264
|
arguments << args
|
249
265
|
arguments.flatten!.compact!
|
250
266
|
|
data/lib/lxc/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lxc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.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-04-
|
12
|
+
date: 2013-04-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ztk
|
@@ -182,7 +182,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
182
182
|
version: '0'
|
183
183
|
segments:
|
184
184
|
- 0
|
185
|
-
hash:
|
185
|
+
hash: -2074872461255389873
|
186
186
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
187
187
|
none: false
|
188
188
|
requirements:
|
@@ -191,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
191
191
|
version: '0'
|
192
192
|
segments:
|
193
193
|
- 0
|
194
|
-
hash:
|
194
|
+
hash: -2074872461255389873
|
195
195
|
requirements: []
|
196
196
|
rubyforge_project:
|
197
197
|
rubygems_version: 1.8.25
|