Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
Merge pull request #107 from rackspace/pass_rename
Browse files Browse the repository at this point in the history
changing admin_pass to admin_password
  • Loading branch information
krames committed Jun 20, 2014
2 parents 0feb862 + b1b39da commit 6021743
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "dummy"
config.vm.provider :rackspace do |rs|
rs.username = ENV['RAX_USERNAME']
rs.admin_pass = ENV['VAGRANT_ADMIN_PASS']
rs.admin_password = ENV['VAGRANT_ADMIN_PASSWORD']
rs.api_key = ENV['RAX_API_KEY']
rs.flavor = /1 GB Performance/
rs.image = /Ubuntu/
Expand Down
12 changes: 2 additions & 10 deletions lib/vagrant-rackspace/action/create_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,8 @@ def call(env)
:metadata => config.metadata
}

if config.admin_pass
options[:password] = config.admin_pass
end

if config.user_data
options[:user_data] = File.read(config.user_data)
end

if config.config_drive
options[:config_drive] = config.config_drive
if config.admin_password
options[:password] = config.admin_password
end

if config.key_name
Expand Down
4 changes: 2 additions & 2 deletions lib/vagrant-rackspace/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ class Config < Vagrant.plugin("2", :config)
attr_accessor :rsync_includes

# Password to set for root (on Linux) or Administrator (on Windows)
# A random password will be generated if admin_pass is not set or
# A random password will be generated if admin_password is not set or
# does not meet the password requirements of the operating system.
#
# @return [String]
attr_accessor :admin_pass
attr_accessor :admin_password

# Default Rackspace Cloud Network IDs
SERVICE_NET_ID = '11111111-1111-1111-1111-111111111111'
Expand Down
4 changes: 2 additions & 2 deletions spec/vagrant-rackspace/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
its(:disk_config) { should be_nil }
its(:networks) { should be_nil }
its(:rsync_includes) { should be_nil }
its(:admin_pass) { should be_nil }
its(:admin_password) { should be_nil }
end

describe "overriding defaults" do
Expand All @@ -39,7 +39,7 @@
:server_name,
:disk_config,
:username,
:admin_pass].each do |attribute|
:admin_password].each do |attribute|
it "should not default #{attribute} if overridden" do
subject.send("#{attribute}=".to_sym, "foo")
subject.finalize!
Expand Down

0 comments on commit 6021743

Please sign in to comment.