testlab 0.4.11 → 0.4.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -76,7 +76,7 @@ class TestLab
76
76
  # ensure our container is in "static" mode
77
77
  self.to_static
78
78
 
79
- self.lxc.start
79
+ self.lxc.start(%(--daemon))
80
80
  self.lxc.wait(:running)
81
81
 
82
82
  (self.lxc.state != :running) and raise ContainerError, "The container failed to online!"
@@ -95,16 +95,6 @@ class TestLab
95
95
  true
96
96
  end
97
97
 
98
- # ZTK:SSH object
99
- #
100
- # Returns a *ZTK:SSH* class instance configured for this container.
101
- #
102
- # @return [ZTK::SSH] An instance of ZTK::SSH configured for this
103
- # container.
104
- def ssh(options={})
105
- self.node.container_ssh(self, options)
106
- end
107
-
108
98
  # Does the container exist?
109
99
  #
110
100
  # @return [Boolean] True if the containers exists, false otherwise.
@@ -0,0 +1,19 @@
1
+ class TestLab
2
+ class Container
3
+
4
+ module SSH
5
+
6
+ # ZTK:SSH object
7
+ #
8
+ # Returns a *ZTK:SSH* class instance configured for this container.
9
+ #
10
+ # @return [ZTK::SSH] An instance of ZTK::SSH configured for this
11
+ # container.
12
+ def ssh(options={})
13
+ self.node.container_ssh(self, options)
14
+ end
15
+
16
+ end
17
+
18
+ end
19
+ end
@@ -68,6 +68,7 @@ class TestLab
68
68
  autoload :Lifecycle, 'testlab/container/lifecycle'
69
69
  autoload :LXC, 'testlab/container/lxc'
70
70
  autoload :MethodMissing, 'testlab/container/method_missing'
71
+ autoload :SSH, 'testlab/container/ssh'
71
72
  autoload :Status, 'testlab/container/status'
72
73
 
73
74
  include TestLab::Container::Actions
@@ -76,6 +77,7 @@ class TestLab
76
77
  include TestLab::Container::Lifecycle
77
78
  include TestLab::Container::LXC
78
79
  include TestLab::Container::MethodMissing
80
+ include TestLab::Container::SSH
79
81
  include TestLab::Container::Status
80
82
 
81
83
  extend TestLab::Container::ClassMethods
@@ -19,7 +19,7 @@ Vagrant.configure("2") do |config|
19
19
  end
20
20
 
21
21
  testlab.ssh.username = <%= @user.inspect %>
22
- testlab.ssh.port = <%= @port.inspect %>
22
+ testlab.ssh.guest_port = <%= @port.inspect %>
23
23
  testlab.ssh.forward_agent = true
24
24
  end
25
25
  end
@@ -1,6 +1,6 @@
1
1
  class TestLab
2
2
  unless const_defined?(:VERSION)
3
3
  # TestLab Gem Version
4
- VERSION = "0.4.11"
4
+ VERSION = "0.4.12"
5
5
  end
6
6
  end
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: 0.4.11
4
+ version: 0.4.12
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-05-21 00:00:00.000000000 Z
12
+ date: 2013-05-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gli
@@ -215,6 +215,7 @@ files:
215
215
  - lib/testlab/container/lifecycle.rb
216
216
  - lib/testlab/container/lxc.rb
217
217
  - lib/testlab/container/method_missing.rb
218
+ - lib/testlab/container/ssh.rb
218
219
  - lib/testlab/container/status.rb
219
220
  - lib/testlab/interface.rb
220
221
  - lib/testlab/labfile.rb
@@ -281,7 +282,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
281
282
  version: '0'
282
283
  segments:
283
284
  - 0
284
- hash: -4607919379801357092
285
+ hash: 1331388284135904281
285
286
  required_rubygems_version: !ruby/object:Gem::Requirement
286
287
  none: false
287
288
  requirements:
@@ -290,7 +291,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
290
291
  version: '0'
291
292
  segments:
292
293
  - 0
293
- hash: -4607919379801357092
294
+ hash: 1331388284135904281
294
295
  requirements: []
295
296
  rubyforge_project:
296
297
  rubygems_version: 1.8.25