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.
-
#hostname ⇒ String
The vCloud Director hostname.
-
#ip_allocation_type ⇒ String
IP allocation type.
-
#ip_dns ⇒ Array
DNS.
-
#ip_subnet ⇒ String
IP subnet.
-
#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.
-
#username ⇒ String
The username used to log in.
-
#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)
106 107 108 |
# File 'lib/vagrant-vcloud/config.rb', line 106 def catalog @catalog end |
#catalog_id ⇒ Object
catalog id (String)
109 110 111 |
# File 'lib/vagrant-vcloud/config.rb', line 109 def catalog_id @catalog_id end |
#catalog_item ⇒ Object
catalog item object (Hash)
112 113 114 |
# File 'lib/vagrant-vcloud/config.rb', line 112 def catalog_item @catalog_item end |
#catalog_item_name ⇒ String
Catalog Item to be used as a template
39 40 41 |
# File 'lib/vagrant-vcloud/config.rb', line 39 def catalog_item_name @catalog_item_name end |
#catalog_name ⇒ String
Catalog Name where the item resides
34 35 36 |
# File 'lib/vagrant-vcloud/config.rb', line 34 def catalog_name @catalog_name end |
#hostname ⇒ String
The vCloud Director hostname
12 13 14 |
# File 'lib/vagrant-vcloud/config.rb', line 12 def hostname @hostname end |
#ip_allocation_type ⇒ String
IP allocation type
59 60 61 |
# File 'lib/vagrant-vcloud/config.rb', line 59 def ip_allocation_type @ip_allocation_type end |
#ip_dns ⇒ Array
DNS
69 70 71 |
# File 'lib/vagrant-vcloud/config.rb', line 69 def ip_dns @ip_dns end |
#ip_subnet ⇒ String
IP subnet
64 65 66 |
# File 'lib/vagrant-vcloud/config.rb', line 64 def ip_subnet @ip_subnet end |
#org ⇒ Object
org object (Hash)
94 95 96 |
# File 'lib/vagrant-vcloud/config.rb', line 94 def org @org end |
#org_id ⇒ Object
org id (String)
97 98 99 |
# File 'lib/vagrant-vcloud/config.rb', line 97 def org_id @org_id end |
#org_name ⇒ String
The Organization Name to log in to
17 18 19 |
# File 'lib/vagrant-vcloud/config.rb', line 17 def org_name @org_name end |
#password ⇒ String
The password used to log in
27 28 29 |
# File 'lib/vagrant-vcloud/config.rb', line 27 def password @password end |
#port_forwarding_rules ⇒ Hash (readonly)
Port forwarding rules
74 75 76 |
# File 'lib/vagrant-vcloud/config.rb', line 74 def port_forwarding_rules @port_forwarding_rules end |
#username ⇒ String
The username used to log in
22 23 24 |
# File 'lib/vagrant-vcloud/config.rb', line 22 def username @username end |
#vAppId ⇒ Object
vApp Id (String)
118 119 120 |
# File 'lib/vagrant-vcloud/config.rb', line 118 def vAppId @vAppId end |
#vAppName ⇒ Object
vApp Name (String)
115 116 117 |
# File 'lib/vagrant-vcloud/config.rb', line 115 def vAppName @vAppName end |
#vcloud_cnx ⇒ Object
connection handle
91 92 93 |
# File 'lib/vagrant-vcloud/config.rb', line 91 def vcloud_cnx @vcloud_cnx end |
#vdc ⇒ Object
vdc object (Hash)
100 101 102 |
# File 'lib/vagrant-vcloud/config.rb', line 100 def vdc @vdc end |
#vdc_edge_gateway ⇒ String
Name of the edge gateway [optional]
79 80 81 |
# File 'lib/vagrant-vcloud/config.rb', line 79 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]
84 85 86 |
# File 'lib/vagrant-vcloud/config.rb', line 84 def vdc_edge_gateway_ip @vdc_edge_gateway_ip end |
#vdc_id ⇒ Object
vdc id (String)
103 104 105 |
# File 'lib/vagrant-vcloud/config.rb', line 103 def vdc_id @vdc_id end |
#vdc_name ⇒ String
Virtual Data Center to be used
44 45 46 |
# File 'lib/vagrant-vcloud/config.rb', line 44 def vdc_name @vdc_name end |
#vdc_network_id ⇒ String
Virtual Data Center Network Id to be used
54 55 56 |
# File 'lib/vagrant-vcloud/config.rb', line 54 def vdc_network_id @vdc_network_id end |
#vdc_network_name ⇒ String
Virtual Data Center Network to be used
49 50 51 |
# File 'lib/vagrant-vcloud/config.rb', line 49 def vdc_network_name @vdc_network_name end |
Instance Method Details
#validate(machine) ⇒ Object
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/vagrant-vcloud/config.rb', line 120 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? if !ip_dns.nil? errors << I18n.t("vagrant_vcloud.config.ip_dns") if !ip_dns.kind_of?(Array) end errors << I18n.t("vagrant_vcloud.config.catalog_name") if catalog_name.nil? errors << I18n.t("vagrant_vcloud.config.vdc_name") if vdc_name.nil? errors << I18n.t("vagrant_vcloud.config.vdc_network_name") if vdc_network_name.nil? { "vCloud Provider" => errors } end |