Class: TestLab::Provider::BareMetal
- Inherits:
-
Object
- Object
- TestLab::Provider::BareMetal
- Defined in:
- lib/testlab/providers/bare_metal.rb
Overview
BareMetal 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) ⇒ BareMetal
constructor
A new instance of BareMetal.
- #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) ⇒ BareMetal
Returns a new instance of BareMetal.
13 14 15 16 17 18 19 |
# File 'lib/testlab/providers/bare_metal.rb', line 13 def initialize(config={}, ui=nil) @config = (config || Hash.new) @ui = (ui || TestLab.ui) # ensure our bare_metal key exists @config[:bare_metal] ||= Hash.new end |
Instance Method Details
#alive? ⇒ Boolean
This is a NO-OP
60 61 62 |
# File 'lib/testlab/providers/bare_metal.rb', line 60 def alive? true end |
#create ⇒ Object
This is a NO-OP
22 23 24 |
# File 'lib/testlab/providers/bare_metal.rb', line 22 def create true end |
#dead? ⇒ Boolean
This is a NO-OP
65 66 67 |
# File 'lib/testlab/providers/bare_metal.rb', line 65 def dead? false end |
#destroy ⇒ Object
This is a NO-OP
27 28 29 |
# File 'lib/testlab/providers/bare_metal.rb', line 27 def destroy true end |
#down ⇒ Object
This is a NO-OP
37 38 39 |
# File 'lib/testlab/providers/bare_metal.rb', line 37 def down true end |
#exists? ⇒ Boolean
This is a NO-OP
55 56 57 |
# File 'lib/testlab/providers/bare_metal.rb', line 55 def exists? true end |
#identity ⇒ Object
77 78 79 |
# File 'lib/testlab/providers/bare_metal.rb', line 77 def identity (@config[:bare_metal][:identity] || File.join(ENV['HOME'], ".ssh", "id_rsa")) end |
#instance_id ⇒ Object
69 70 71 |
# File 'lib/testlab/providers/bare_metal.rb', line 69 def instance_id TestLab.hostname end |
#ip ⇒ Object
81 82 83 |
# File 'lib/testlab/providers/bare_metal.rb', line 81 def ip (@config[:bare_metal][:ip] || "127.0.0.1") end |
#port ⇒ Object
85 86 87 |
# File 'lib/testlab/providers/bare_metal.rb', line 85 def port (@config[:bare_metal][:port] || 22) end |
#reload ⇒ Object
This is a NO-OP
42 43 44 45 46 47 |
# File 'lib/testlab/providers/bare_metal.rb', line 42 def reload self.down self.up true end |
#state ⇒ Object
This is a NO-OP
50 51 52 |
# File 'lib/testlab/providers/bare_metal.rb', line 50 def state :running end |
#up ⇒ Object
This is a NO-OP
32 33 34 |
# File 'lib/testlab/providers/bare_metal.rb', line 32 def up true end |
#user ⇒ Object
73 74 75 |
# File 'lib/testlab/providers/bare_metal.rb', line 73 def user (@config[:bare_metal][:user] || ENV['USER']) end |