lib/vagrant-conoha/config.rb in vagrant-conoha-0.1.7 vs lib/vagrant-conoha/config.rb in vagrant-conoha-0.1.8
- old
+ new
@@ -221,10 +221,14 @@
#
# @return [Integer]
attr_accessor :stack_delete_timeout
#
+ # @return [Integer]
+ attr_accessor :floating_ip_assign_timeout
+
+ #
# @return [HttpConfig]
attr_accessor :http
#
# @return [Boolean]
@@ -242,10 +246,20 @@
# @deprecated Use standard Vagrant synced folders instead.
#
# @return [Boolean]
attr_accessor :use_legacy_synced_folders
+ # Specify the certificate to use.
+ #
+ # @return [String]
+ attr_accessor :ssl_ca_file
+
+ # Verify ssl peer certificate when connecting. Set to false (! unsecure) to disable
+ #
+ # @return [Boolean]
+ attr_accessor :ssl_verify_peer
+
def initialize
@password = UNSET_VALUE
@openstack_compute_url = UNSET_VALUE
@openstack_network_url = UNSET_VALUE
@openstack_volume_url = UNSET_VALUE
@@ -286,13 +300,16 @@
@server_active_timeout = UNSET_VALUE
@server_stop_timeout = UNSET_VALUE
@server_delete_timeout = UNSET_VALUE
@stack_create_timeout = UNSET_VALUE
@stack_delete_timeout = UNSET_VALUE
+ @floating_ip_assign_timeout = UNSET_VALUE
@meta_args_support = UNSET_VALUE
@http = HttpConfig.new
@use_legacy_synced_folders = UNSET_VALUE
+ @ssl_ca_file = UNSET_VALUE
+ @ssl_verify_peer = UNSET_VALUE
end
def merge(other)
result = self.class.new
@@ -395,15 +412,18 @@
@server_active_timeout = 200 if @server_active_timeout == UNSET_VALUE
@server_stop_timeout = 200 if @server_stop_timeout == UNSET_VALUE
@server_delete_timeout = 200 if @server_delete_timeout == UNSET_VALUE
@stack_create_timeout = 200 if @stack_create_timeout == UNSET_VALUE
@stack_delete_timeout = 200 if @stack_delete_timeout == UNSET_VALUE
+ @floating_ip_assign_timeout = 200 if @floating_ip_assign_timeout == UNSET_VALUE
@meta_args_support = false if @meta_args_support == UNSET_VALUE
@networks = nil if @networks.empty?
@volumes = nil if @volumes.empty?
@stacks = nil if @stacks.empty?
@http.finalize!
+ @ssl_ca_file = nil if @ssl_ca_file == UNSET_VALUE
+ @ssl_verify_peer = true if @ssl_verify_peer == UNSET_VALUE
end
# rubocop:enable Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity
#
# @deprecated Use standard Vagrant synced folders instead.
@@ -421,13 +441,15 @@
validate_api_version(errors)
validate_ssh_username(machine, errors)
validate_stack_config(errors)
validate_ssh_timeout(errors)
- if machine.config.ssh.private_key_path
- puts I18n.t('vagrant_openstack.config.keypair_name_required').yellow unless @keypair_name || @public_key_path
- else
- errors << I18n.t('vagrant_openstack.config.private_key_missing') if @keypair_name || @public_key_path
+ if machine.config.ssh.insert_key
+ if machine.config.ssh.private_key_path
+ puts I18n.t('vagrant_openstack.config.keypair_name_required').yellow unless @keypair_name || @public_key_path
+ else
+ errors << I18n.t('vagrant_openstack.config.private_key_missing') if @keypair_name || @public_key_path
+ end
end
{
openstack_compute_url: @openstack_compute_url,
openstack_network_url: @openstack_network_url,