Class: VagrantPlugins::ProviderOpenStack::Config
- Inherits:
-
Object
- Object
- VagrantPlugins::ProviderOpenStack::Config
- Defined in:
- lib/vagrant-openstack/config.rb
Instance Attribute Summary collapse
-
#flavor ⇒ Object
Returns the value of attribute flavor.
-
#floating_ip ⇒ Object
Returns the value of attribute floating_ip.
-
#image ⇒ Object
Returns the value of attribute image.
-
#keypair ⇒ Object
Returns the value of attribute keypair.
-
#name ⇒ Object
Returns the value of attribute name.
-
#password ⇒ Object
Returns the value of attribute password.
-
#public_key_path ⇒ Object
Returns the value of attribute public_key_path.
-
#security_groups ⇒ Object
Returns the value of attribute security_groups.
-
#ssh_port ⇒ Object
Returns the value of attribute ssh_port.
-
#ssh_private_key ⇒ Object
Returns the value of attribute ssh_private_key.
-
#ssh_username ⇒ Object
Returns the value of attribute ssh_username.
-
#tenant ⇒ Object
Returns the value of attribute tenant.
-
#url ⇒ Object
Returns the value of attribute url.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/vagrant-openstack/config.rb', line 23 def initialize() # OpenStack related parameters @url = UNSET_VALUE @user = UNSET_VALUE @tenant = UNSET_VALUE @password = UNSET_VALUE # Nova / Instance related # parameters @name = UNSET_VALUE @image = UNSET_VALUE @flavor = UNSET_VALUE @keypair = nil @security_groups = [] @floating_ip = nil # Instance access related # parameters @ssh_port = 22 @ssh_username = UNSET_VALUE # Default to current's user id_rsa # if it exists in the standard path pub_users_key = File.("~/.ssh/id_rsa.pub") @public_key_path = (File.exist?(pub_users_key) && pub_users_key) || UNSET_VALUE priv_users_key = File.("~/.ssh/id_rsa") @ssh_private_key = (File.exist?(priv_users_key) && priv_users_key) || UNSET_VALUE end |
Instance Attribute Details
#flavor ⇒ Object
Returns the value of attribute flavor.
12 13 14 |
# File 'lib/vagrant-openstack/config.rb', line 12 def flavor @flavor end |
#floating_ip ⇒ Object
Returns the value of attribute floating_ip.
16 17 18 |
# File 'lib/vagrant-openstack/config.rb', line 16 def floating_ip @floating_ip end |
#image ⇒ Object
Returns the value of attribute image.
11 12 13 |
# File 'lib/vagrant-openstack/config.rb', line 11 def image @image end |
#keypair ⇒ Object
Returns the value of attribute keypair.
13 14 15 |
# File 'lib/vagrant-openstack/config.rb', line 13 def keypair @keypair end |
#name ⇒ Object
Returns the value of attribute name.
10 11 12 |
# File 'lib/vagrant-openstack/config.rb', line 10 def name @name end |
#password ⇒ Object
Returns the value of attribute password.
7 8 9 |
# File 'lib/vagrant-openstack/config.rb', line 7 def password @password end |
#public_key_path ⇒ Object
Returns the value of attribute public_key_path.
20 21 22 |
# File 'lib/vagrant-openstack/config.rb', line 20 def public_key_path @public_key_path end |
#security_groups ⇒ Object
Returns the value of attribute security_groups.
14 15 16 |
# File 'lib/vagrant-openstack/config.rb', line 14 def security_groups @security_groups end |
#ssh_port ⇒ Object
Returns the value of attribute ssh_port.
18 19 20 |
# File 'lib/vagrant-openstack/config.rb', line 18 def ssh_port @ssh_port end |
#ssh_private_key ⇒ Object
Returns the value of attribute ssh_private_key.
21 22 23 |
# File 'lib/vagrant-openstack/config.rb', line 21 def ssh_private_key @ssh_private_key end |
#ssh_username ⇒ Object
Returns the value of attribute ssh_username.
19 20 21 |
# File 'lib/vagrant-openstack/config.rb', line 19 def ssh_username @ssh_username end |
#tenant ⇒ Object
Returns the value of attribute tenant.
5 6 7 |
# File 'lib/vagrant-openstack/config.rb', line 5 def tenant @tenant end |
#url ⇒ Object
Returns the value of attribute url.
4 5 6 |
# File 'lib/vagrant-openstack/config.rb', line 4 def url @url end |
#user ⇒ Object
Returns the value of attribute user.
6 7 8 |
# File 'lib/vagrant-openstack/config.rb', line 6 def user @user end |