Drop deprecated fallback to openrc

It was deprecated 3 years ago when we introduced the logic to use
clouds.yaml [1].

[1] 08bf393ee48723cd344ff5bce37843c41878914c

Change-Id: Idac578f2a1ee37b51bfb1320340315154fe2871d
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami
2025-11-08 02:50:57 +09:00
parent 1288c1189c
commit 1afd841505
2 changed files with 3 additions and 14 deletions

View File

@@ -155,14 +155,11 @@ class Puppet::Provider::Keystone < Puppet::Provider::Openstack
end
def self.get_auth_url
auth_url = nil
if ENV['OS_AUTH_URL']
auth_url = ENV['OS_AUTH_URL'].dup
elsif auth_url = get_os_vars_from_rcfile(rc_filename)['OS_AUTH_URL']
ENV['OS_AUTH_URL'].dup
else
auth_url = auth_endpoint
auth_endpoint
end
return auth_url
end
def self.project_request(service, action, properties=nil, options={})

View File

@@ -110,15 +110,7 @@ id="the_user_id"
expect(klass.get_auth_url).to eq('http://127.0.0.1:5001')
end
it 'should return the OS_AUTH_URL from the openrc file when there is no OS_AUTH_URL in the environment' do
home = ENV['HOME']
ENV.clear
mock = {'OS_AUTH_URL' => 'http://127.0.0.1:5001'}
expect(klass).to receive(:get_os_vars_from_rcfile).with("#{home}/openrc").and_return(mock)
expect(klass.get_auth_url).to eq('http://127.0.0.1:5001')
end
it 'should use auth_endpoint when nothing else is available' do
it 'should use auth_endpoint when OS_AUTH_URL is not set' do
ENV.clear
mock = 'http://127.0.0.1:5001'
expect(klass).to receive(:auth_endpoint).and_return(mock)