Class: TestLab::Provider::Local
- Inherits:
-
Object
- Object
- TestLab::Provider::Local
- Defined in:
- lib/testlab/providers/local.rb
Overview
Local Provider Class
Instance Method Summary collapse
-
#alive? ⇒ Boolean
This is a NO-OP.
-
#create ⇒ Object
This is a NO-OP.
-
#dead? ⇒ Boolean
This is a NO-OP.
-
#destroy ⇒ Object
This is a NO-OP.
-
#down ⇒ Object
This is a NO-OP.
-
#exists? ⇒ Boolean
This is a NO-OP.
- #identity ⇒ Object
-
#initialize(config = {}, ui = nil) ⇒ Local
constructor
A new instance of Local.
- #instance_id ⇒ Object
- #ip ⇒ Object
- #port ⇒ Object
-
#reload ⇒ Object
This is a NO-OP.
-
#state ⇒ Object
This is a NO-OP.
-
#up ⇒ Object
This is a NO-OP.
- #user ⇒ Object
Constructor Details
#initialize(config = {}, ui = nil) ⇒ Local
Returns a new instance of Local.
13 14 15 16 17 18 19 20 21 |
# File 'lib/testlab/providers/local.rb', line 13 def initialize(config={}, ui=nil) @config = (config || Hash.new) @ui = (ui || TestLab.ui) # ensure our local key is there @config[:local] ||= Hash.new @ui.stderr.puts("TestLab::Provider::Local is depreciated. Please use TestLab::Provider::BareMetal instead.") end |
Instance Method Details
#alive? ⇒ Boolean
This is a NO-OP
62 63 64 |
# File 'lib/testlab/providers/local.rb', line 62 def alive? true end |
#create ⇒ Object
This is a NO-OP
24 25 26 |
# File 'lib/testlab/providers/local.rb', line 24 def create true end |
#dead? ⇒ Boolean
This is a NO-OP
67 68 69 |
# File 'lib/testlab/providers/local.rb', line 67 def dead? false end |
#destroy ⇒ Object
This is a NO-OP
29 30 31 |
# File 'lib/testlab/providers/local.rb', line 29 def destroy true end |
#down ⇒ Object
This is a NO-OP
39 40 41 |
# File 'lib/testlab/providers/local.rb', line 39 def down true end |
#exists? ⇒ Boolean
This is a NO-OP
57 58 59 |
# File 'lib/testlab/providers/local.rb', line 57 def exists? true end |
#identity ⇒ Object
79 80 81 |
# File 'lib/testlab/providers/local.rb', line 79 def identity (@config[:local][:identity] || File.join(ENV['HOME'], ".ssh", "id_rsa")) end |
#instance_id ⇒ Object
71 72 73 |
# File 'lib/testlab/providers/local.rb', line 71 def instance_id TestLab.hostname end |
#ip ⇒ Object
83 84 85 |
# File 'lib/testlab/providers/local.rb', line 83 def ip (@config[:local][:ip] || "127.0.0.1") end |
#port ⇒ Object
87 88 89 |
# File 'lib/testlab/providers/local.rb', line 87 def port (@config[:local][:port] || 22) end |
#reload ⇒ Object
This is a NO-OP
44 45 46 47 48 49 |
# File 'lib/testlab/providers/local.rb', line 44 def reload self.down self.up true end |
#state ⇒ Object
This is a NO-OP
52 53 54 |
# File 'lib/testlab/providers/local.rb', line 52 def state :running end |
#up ⇒ Object
This is a NO-OP
34 35 36 |
# File 'lib/testlab/providers/local.rb', line 34 def up true end |
#user ⇒ Object
75 76 77 |
# File 'lib/testlab/providers/local.rb', line 75 def user (@config[:local][:user] || ENV['USER']) end |