Skip to content

Commit

Permalink
Deprecate ssh_username in provider config
Browse files Browse the repository at this point in the history
  • Loading branch information
julienvey committed Sep 17, 2014
1 parent 0e4b086 commit f574e12
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions source/lib/vagrant-openstack-provider/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ def validate(machine)
errors << I18n.t('vagrant_openstack.config.password_required') unless @password
errors << I18n.t('vagrant_openstack.config.username_required') unless @username

validate_ssh_username

if machine.config.ssh.private_key_path
puts I18n.t('vagrant_openstack.config.keypair_name_required').yellow unless @keypair_name || @public_key_path
else
Expand All @@ -201,6 +203,10 @@ def validate(machine)
{ 'Openstack Provider' => errors }
end

def validate_ssh_username
puts I18n.t('vagrant_openstack.config.ssh_username_deprecated').yellow if @ssh_username
end

private

def valid_uri?(value)
Expand Down
4 changes: 4 additions & 0 deletions source/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ en:
private_key_missing: |-
config.ssh.private_key_path is required when either keypair_name or
public_key_path is set in Vagrantfile
ssh_username_deprecated: |-
ssh_username provider config is deprecated for vagrant-openstack provider.
If you are using it, it will continue to work but we recommend to switch to the
standard vagrant configuration option `config.ssh.username` instead
errors:
default: |-
Expand Down

0 comments on commit f574e12

Please sign in to comment.