lib/vagrant-vultr/config.rb in vagrant-vultr-0.1.2 vs lib/vagrant-vultr/config.rb in vagrant-vultr-0.1.3
- old
+ new
@@ -4,27 +4,42 @@
attr_accessor :token
attr_accessor :region
attr_accessor :os
attr_accessor :snapshot
attr_accessor :plan
+ attr_accessor :enable_ipv6
+ attr_accessor :enable_private_network
+ attr_accessor :label
+ attr_accessor :tag
+ attr_accessor :hostname
# @api private
attr_accessor :ssh_key_id
def initialize
@token = UNSET_VALUE
@region = UNSET_VALUE
@os = UNSET_VALUE
@snapshot = UNSET_VALUE
@plan = UNSET_VALUE
+ @enable_ipv6 = UNSET_VALUE
+ @enable_private_network = UNSET_VALUE
+ @label = UNSET_VALUE
+ @tag = UNSET_VALUE
+ @hostname = UNSET_VALUE
end
def finalize!
@token = ENV['VULTR_TOKEN'] if @token == UNSET_VALUE
@region = 'Seattle' if @region == UNSET_VALUE
@os = 'Ubuntu 14.04 x64' if @os == UNSET_VALUE && @snapshot == UNSET_VALUE
@plan = '768 MB RAM,15 GB SSD,1.00 TB BW' if @plan == UNSET_VALUE
@snapshot = nil if @snapshot == UNSET_VALUE
+ @enable_ipv6 = 'no' if @enable_ipv6 == UNSET_VALUE
+ @enable_private_network = 'no' if @enable_private_network == UNSET_VALUE
+ @label = '' if @label == UNSET_VALUE
+ @tag = '' if @tag == UNSET_VALUE
+ @hostname = '' if @hostname == UNSET_VALUE
end
def validate(machine)
errors = []