Class: UnitHosting::VmRecipe
- Inherits:
-
Object
- Object
- UnitHosting::VmRecipe
- Defined in:
- lib/unit_hosting/vm_recipe.rb
Instance Attribute Summary collapse
-
#display_name ⇒ Object
Returns the value of attribute display_name.
-
#op_mail ⇒ Object
Returns the value of attribute op_mail.
-
#op_user ⇒ Object
Returns the value of attribute op_user.
-
#plan_id ⇒ Object
Returns the value of attribute plan_id.
-
#rootpw ⇒ Object
Returns the value of attribute rootpw.
-
#ssh_key ⇒ Object
Returns the value of attribute ssh_key.
-
#user_script ⇒ Object
Returns the value of attribute user_script.
Instance Method Summary collapse
-
#initialize ⇒ VmRecipe
constructor
A new instance of VmRecipe.
- #load_ssh_key(file) ⇒ Object
- #params ⇒ Object
Constructor Details
#initialize ⇒ VmRecipe
Returns a new instance of VmRecipe.
8 9 10 |
# File 'lib/unit_hosting/vm_recipe.rb', line 8 def initialize @op_user = ENV['USER'] end |
Instance Attribute Details
#display_name ⇒ Object
Returns the value of attribute display_name.
7 8 9 |
# File 'lib/unit_hosting/vm_recipe.rb', line 7 def display_name @display_name end |
#op_mail ⇒ Object
Returns the value of attribute op_mail.
7 8 9 |
# File 'lib/unit_hosting/vm_recipe.rb', line 7 def op_mail @op_mail end |
#op_user ⇒ Object
Returns the value of attribute op_user.
7 8 9 |
# File 'lib/unit_hosting/vm_recipe.rb', line 7 def op_user @op_user end |
#plan_id ⇒ Object
Returns the value of attribute plan_id.
6 7 8 |
# File 'lib/unit_hosting/vm_recipe.rb', line 6 def plan_id @plan_id end |
#rootpw ⇒ Object
Returns the value of attribute rootpw.
6 7 8 |
# File 'lib/unit_hosting/vm_recipe.rb', line 6 def rootpw @rootpw end |
#ssh_key ⇒ Object
Returns the value of attribute ssh_key.
6 7 8 |
# File 'lib/unit_hosting/vm_recipe.rb', line 6 def ssh_key @ssh_key end |
#user_script ⇒ Object
Returns the value of attribute user_script.
7 8 9 |
# File 'lib/unit_hosting/vm_recipe.rb', line 7 def user_script @user_script end |
Instance Method Details
#load_ssh_key(file) ⇒ Object
11 12 13 14 15 |
# File 'lib/unit_hosting/vm_recipe.rb', line 11 def load_ssh_key file File::open(file) do |f| @ssh_key = f.read end end |
#params ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/unit_hosting/vm_recipe.rb', line 16 def params param = { "rootpw" => @rootpw, "ssh_key" => @ssh_key, "op_user" => @op_user, "op_mail" => @op_mail, "user_script" => @user_script, "plan_id" => @plan_id, "display_name" => @display_name } end |