Class: VagrantPlugins::ProviderOpenStack::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-openstack/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

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.expand_path("~/.ssh/id_rsa.pub")
  @public_key_path = (File.exist?(pub_users_key) && pub_users_key) || UNSET_VALUE

  priv_users_key = File.expand_path("~/.ssh/id_rsa")
  @ssh_private_key = (File.exist?(priv_users_key) && priv_users_key) || UNSET_VALUE
end

Instance Attribute Details

#flavorObject

Returns the value of attribute flavor.



12
13
14
# File 'lib/vagrant-openstack/config.rb', line 12

def flavor
  @flavor
end

#floating_ipObject

Returns the value of attribute floating_ip.



16
17
18
# File 'lib/vagrant-openstack/config.rb', line 16

def floating_ip
  @floating_ip
end

#imageObject

Returns the value of attribute image.



11
12
13
# File 'lib/vagrant-openstack/config.rb', line 11

def image
  @image
end

#keypairObject

Returns the value of attribute keypair.



13
14
15
# File 'lib/vagrant-openstack/config.rb', line 13

def keypair
  @keypair
end

#nameObject

Returns the value of attribute name.



10
11
12
# File 'lib/vagrant-openstack/config.rb', line 10

def name
  @name
end

#passwordObject

Returns the value of attribute password.



7
8
9
# File 'lib/vagrant-openstack/config.rb', line 7

def password
  @password
end

#public_key_pathObject

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_groupsObject

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_portObject

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_keyObject

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_usernameObject

Returns the value of attribute ssh_username.



19
20
21
# File 'lib/vagrant-openstack/config.rb', line 19

def ssh_username
  @ssh_username
end

#tenantObject

Returns the value of attribute tenant.



5
6
7
# File 'lib/vagrant-openstack/config.rb', line 5

def tenant
  @tenant
end

#urlObject

Returns the value of attribute url.



4
5
6
# File 'lib/vagrant-openstack/config.rb', line 4

def url
  @url
end

#userObject

Returns the value of attribute user.



6
7
8
# File 'lib/vagrant-openstack/config.rb', line 6

def user
  @user
end