Skip to content
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.

Commit

Permalink
initial bits for adding DNS record creation support
Browse files Browse the repository at this point in the history
  • Loading branch information
chrissnell committed Jun 5, 2013
1 parent 3389199 commit d887825
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/chef/knife/rackspace_base.rb
Expand Up @@ -88,6 +88,14 @@ def connection
:rackspace_endpoint => Chef::Config[:knife][:rackspace_endpoint] || config[:rackspace_endpoint]
)
end
@dnsconnection ||= begin
dnsconnection = Fog::DNS.new(
:provider => 'Rackspace',
:rackspace_api_key => Chef::Config[:knife][:rackspace_api_key],
:rackspace_username => (Chef::Config[:knife][:rackspace_username] || Chef::Config[:knife][:rackspace_api_username]),
:rackspace_auth_url => Chef::Config[:knife][:rackspace_api_auth_url] || config[:rackspace_api_auth_url]
)
end
else
@connection ||= begin
connection = Fog::Compute.new(
Expand All @@ -98,6 +106,14 @@ def connection
:rackspace_auth_url => Chef::Config[:knife][:rackspace_api_auth_url] || config[:rackspace_api_auth_url]
)
end
@dnsconnection ||= begin
dnsconnection = Fog::DNS.new(
:provider => 'Rackspace',
:rackspace_api_key => Chef::Config[:knife][:rackspace_api_key],
:rackspace_username => (Chef::Config[:knife][:rackspace_username] || Chef::Config[:knife][:rackspace_api_username]),
:rackspace_auth_url => Chef::Config[:knife][:rackspace_api_auth_url] || config[:rackspace_api_auth_url]
)
end
end
end

Expand Down

0 comments on commit d887825

Please sign in to comment.