Class: VagrantPlugins::VCloud::Config
- Inherits:
-
Object
- Object
- VagrantPlugins::VCloud::Config
- Defined in:
- lib/vagrant-vcloud/config.rb
Instance Attribute Summary collapse
-
#catalog ⇒ Object
catalog object (Hash).
-
#catalog_id ⇒ Object
catalog id (String).
-
#catalog_item ⇒ Object
catalog item object (Hash).
-
#catalog_item_name ⇒ String
Catalog Item to be used as a template.
-
#catalog_name ⇒ String
Catalog Name where the item resides.
-
#cpus ⇒ Object
VM number of cpus (Integer).
-
#hostname ⇒ String
The vCloud Director hostname.
-
#ip_allocation_type ⇒ String
IP allocation type.
-
#ip_dns ⇒ Array
DNS.
-
#ip_subnet ⇒ String
IP subnet.
-
#memory ⇒ Object
VM memory size in MB (Integer).
-
#nested_hypervisor ⇒ Object
NestedHypervisor (Bool).
-
#network_bridge ⇒ Bool
Bridge Mode.
-
#org ⇒ Object
org object (Hash).
-
#org_id ⇒ Object
org id (String).
-
#org_name ⇒ String
The Organization Name to log in to.
-
#password ⇒ String
The password used to log in.
-
#port_forwarding_rules ⇒ Hash
readonly
Port forwarding rules.
-
#upload_chunksize ⇒ Integer
Chunksize for upload in bytes (default 1048576 == 1M).
-
#username ⇒ String
The username used to log in.
-
#vapp_prefix ⇒ String
Name of the vApp prefix [optional, defaults to ‘Vagrant’ ].
-
#vAppId ⇒ Object
vApp Id (String).
-
#vAppName ⇒ Object
vApp Name (String).
-
#vcloud_cnx ⇒ Object
connection handle.
-
#vdc ⇒ Object
vdc object (Hash).
-
#vdc_edge_gateway ⇒ String
Name of the edge gateway [optional].
-
#vdc_edge_gateway_ip ⇒ String
Public IP of the edge gateway [optional, required if :vdc_edge_gateway is specified].
-
#vdc_id ⇒ Object
vdc id (String).
-
#vdc_name ⇒ String
Virtual Data Center to be used.
-
#vdc_network_id ⇒ String
Virtual Data Center Network Id to be used.
-
#vdc_network_name ⇒ String
Virtual Data Center Network to be used.
Instance Method Summary collapse
Instance Attribute Details
#catalog ⇒ Object
catalog object (Hash)
122 123 124 |
# File 'lib/vagrant-vcloud/config.rb', line 122 def catalog @catalog end |
#catalog_id ⇒ Object
catalog id (String)
125 126 127 |
# File 'lib/vagrant-vcloud/config.rb', line 125 def catalog_id @catalog_id end |
#catalog_item ⇒ Object
catalog item object (Hash)
128 129 130 |
# File 'lib/vagrant-vcloud/config.rb', line 128 def catalog_item @catalog_item end |
#catalog_item_name ⇒ String
Catalog Item to be used as a template
38 39 40 |
# File 'lib/vagrant-vcloud/config.rb', line 38 def catalog_item_name @catalog_item_name end |
#catalog_name ⇒ String
Catalog Name where the item resides
33 34 35 |
# File 'lib/vagrant-vcloud/config.rb', line 33 def catalog_name @catalog_name end |
#cpus ⇒ Object
VM number of cpus (Integer)
140 141 142 |
# File 'lib/vagrant-vcloud/config.rb', line 140 def cpus @cpus end |
#hostname ⇒ String
The vCloud Director hostname
11 12 13 |
# File 'lib/vagrant-vcloud/config.rb', line 11 def hostname @hostname end |
#ip_allocation_type ⇒ String
IP allocation type
63 64 65 |
# File 'lib/vagrant-vcloud/config.rb', line 63 def ip_allocation_type @ip_allocation_type end |
#ip_dns ⇒ Array
DNS
73 74 75 |
# File 'lib/vagrant-vcloud/config.rb', line 73 def ip_dns @ip_dns end |
#ip_subnet ⇒ String
IP subnet
68 69 70 |
# File 'lib/vagrant-vcloud/config.rb', line 68 def ip_subnet @ip_subnet end |
#memory ⇒ Object
VM memory size in MB (Integer)
137 138 139 |
# File 'lib/vagrant-vcloud/config.rb', line 137 def memory @memory end |
#nested_hypervisor ⇒ Object
NestedHypervisor (Bool)
143 144 145 |
# File 'lib/vagrant-vcloud/config.rb', line 143 def nested_hypervisor @nested_hypervisor end |
#network_bridge ⇒ Bool
Bridge Mode
78 79 80 |
# File 'lib/vagrant-vcloud/config.rb', line 78 def network_bridge @network_bridge end |
#org ⇒ Object
org object (Hash)
110 111 112 |
# File 'lib/vagrant-vcloud/config.rb', line 110 def org @org end |
#org_id ⇒ Object
org id (String)
113 114 115 |
# File 'lib/vagrant-vcloud/config.rb', line 113 def org_id @org_id end |
#org_name ⇒ String
The Organization Name to log in to
16 17 18 |
# File 'lib/vagrant-vcloud/config.rb', line 16 def org_name @org_name end |
#password ⇒ String
The password used to log in
26 27 28 |
# File 'lib/vagrant-vcloud/config.rb', line 26 def password @password end |
#port_forwarding_rules ⇒ Hash (readonly)
Port forwarding rules
83 84 85 |
# File 'lib/vagrant-vcloud/config.rb', line 83 def port_forwarding_rules @port_forwarding_rules end |
#upload_chunksize ⇒ Integer
Chunksize for upload in bytes (default 1048576 == 1M)
43 44 45 |
# File 'lib/vagrant-vcloud/config.rb', line 43 def upload_chunksize @upload_chunksize end |
#username ⇒ String
The username used to log in
21 22 23 |
# File 'lib/vagrant-vcloud/config.rb', line 21 def username @username end |
#vapp_prefix ⇒ String
Name of the vApp prefix [optional, defaults to ‘Vagrant’ ]
99 100 101 |
# File 'lib/vagrant-vcloud/config.rb', line 99 def vapp_prefix @vapp_prefix end |
#vAppId ⇒ Object
vApp Id (String)
134 135 136 |
# File 'lib/vagrant-vcloud/config.rb', line 134 def vAppId @vAppId end |
#vAppName ⇒ Object
vApp Name (String)
131 132 133 |
# File 'lib/vagrant-vcloud/config.rb', line 131 def vAppName @vAppName end |
#vcloud_cnx ⇒ Object
connection handle
107 108 109 |
# File 'lib/vagrant-vcloud/config.rb', line 107 def vcloud_cnx @vcloud_cnx end |
#vdc ⇒ Object
vdc object (Hash)
116 117 118 |
# File 'lib/vagrant-vcloud/config.rb', line 116 def vdc @vdc end |
#vdc_edge_gateway ⇒ String
Name of the edge gateway [optional]
88 89 90 |
# File 'lib/vagrant-vcloud/config.rb', line 88 def vdc_edge_gateway @vdc_edge_gateway end |
#vdc_edge_gateway_ip ⇒ String
Public IP of the edge gateway [optional, required if :vdc_edge_gateway is specified]
94 95 96 |
# File 'lib/vagrant-vcloud/config.rb', line 94 def vdc_edge_gateway_ip @vdc_edge_gateway_ip end |
#vdc_id ⇒ Object
vdc id (String)
119 120 121 |
# File 'lib/vagrant-vcloud/config.rb', line 119 def vdc_id @vdc_id end |
#vdc_name ⇒ String
Virtual Data Center to be used
48 49 50 |
# File 'lib/vagrant-vcloud/config.rb', line 48 def vdc_name @vdc_name end |
#vdc_network_id ⇒ String
Virtual Data Center Network Id to be used
58 59 60 |
# File 'lib/vagrant-vcloud/config.rb', line 58 def vdc_network_id @vdc_network_id end |
#vdc_network_name ⇒ String
Virtual Data Center Network to be used
53 54 55 |
# File 'lib/vagrant-vcloud/config.rb', line 53 def vdc_network_name @vdc_network_name end |
Instance Method Details
#validate(machine) ⇒ Object
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/vagrant-vcloud/config.rb', line 145 def validate(machine) errors = _detected_errors # TODO: add blank? errors << I18n.t('vagrant_vcloud.config.hostname') if hostname.nil? errors << I18n.t('vagrant_vcloud.config.org_name') if org_name.nil? errors << I18n.t('vagrant_vcloud.config.username') if username.nil? errors << I18n.t('vagrant_vcloud.config.password') if password.nil? unless ip_dns.nil? unless ip_dns.kind_of?(Array) errors << I18n.t('vagrant_vcloud.config.ip_dns') end end if catalog_name.nil? errors << I18n.t('vagrant_vcloud.config.catalog_name') end if vdc_name.nil? errors << I18n.t('vagrant_vcloud.config.vdc_name') end if vdc_network_name.nil? errors << I18n.t('vagrant_vcloud.config.vdc_network_name') end { 'vCloud Provider' => errors } end |