Browse Source

Replace deprecated get_secret

Use get_password 'token' instead.

Change-Id: If7b01ecaed9b51798acc53c9ea4833cb74250f62
Partial-Bug: #1467662
Mark Vanderwiel 3 years ago
parent
commit
7386afb7c0
4 changed files with 9 additions and 9 deletions
  1. 1
    1
      metadata.rb
  2. 1
    1
      recipes/cinder-common.rb
  3. 1
    1
      recipes/identity_registration.rb
  4. 6
    6
      spec/spec_helper.rb

+ 1
- 1
metadata.rb View File

@@ -20,7 +20,7 @@ recipe 'openstack-block-storage::backup', 'Installs the cinder-backup service'
20 20
 end
21 21
 
22 22
 depends 'apt', '~> 2.6.1'
23
-depends 'openstack-common', '>= 11.4.0'
23
+depends 'openstack-common', '>= 11.5.0'
24 24
 depends 'openstack-identity', '>= 11.0.0'
25 25
 depends 'openstack-image', '>= 11.0.0'
26 26
 depends 'selinux', '~> 0.9.0'

+ 1
- 1
recipes/cinder-common.rb View File

@@ -57,7 +57,7 @@ when 'cinder.volume.drivers.ibm.flashsystem.FlashSystemDriver'
57 57
 when 'cinder.volume.drivers.ibm.ibmnas.IBMNAS_NFSDriver'
58 58
   ibmnas_pass = get_password 'user', node['openstack']['block-storage']['ibmnas']['nas_login']
59 59
 when 'cinder.volume.drivers.vmware.vmdk.VMwareVcVmdkDriver'
60
-  vmware_host_pass = get_secret node['openstack']['block-storage']['vmware']['secret_name']
60
+  vmware_host_pass = get_password 'token', node['openstack']['block-storage']['vmware']['secret_name']
61 61
 end
62 62
 
63 63
 glance_api_endpoint = internal_endpoint 'image-api'

+ 1
- 1
recipes/identity_registration.rb View File

@@ -27,7 +27,7 @@ class ::Chef::Recipe # rubocop:disable Documentation
27 27
 end
28 28
 
29 29
 identity_admin_endpoint = admin_endpoint 'identity-admin'
30
-bootstrap_token = get_secret 'openstack_identity_bootstrap_token'
30
+bootstrap_token = get_password 'token', 'openstack_identity_bootstrap_token'
31 31
 auth_uri = ::URI.decode identity_admin_endpoint.to_s
32 32
 admin_cinder_api_endpoint = admin_endpoint 'block-storage-api'
33 33
 internal_cinder_api_endpoint = internal_endpoint 'block-storage-api'

+ 6
- 6
spec/spec_helper.rb View File

@@ -36,14 +36,14 @@ shared_context 'block-storage-stubs' do
36 36
     allow_any_instance_of(Chef::Recipe).to receive(:get_password)
37 37
       .with('db', anything)
38 38
       .and_return('')
39
-    allow_any_instance_of(Chef::Recipe).to receive(:get_secret)
40
-      .with('openstack_identity_bootstrap_token')
39
+    allow_any_instance_of(Chef::Recipe).to receive(:get_password)
40
+      .with('token', 'openstack_identity_bootstrap_token')
41 41
       .and_return('bootstrap-token')
42
-    allow_any_instance_of(Chef::Recipe).to receive(:get_secret)
43
-      .with('rbd_secret_uuid')
42
+    allow_any_instance_of(Chef::Recipe).to receive(:get_password)
43
+      .with('token', 'rbd_secret_uuid')
44 44
       .and_return('b0ff3bba-e07b-49b1-beed-09a45552b1ad')
45
-    allow_any_instance_of(Chef::Recipe).to receive(:get_secret)
46
-      .with('openstack_vmware_secret_name')
45
+    allow_any_instance_of(Chef::Recipe).to receive(:get_password)
46
+      .with('token', 'openstack_vmware_secret_name')
47 47
       .and_return 'vmware_secret_name'
48 48
     allow_any_instance_of(Chef::Recipe).to receive(:get_password)
49 49
       .with('user', 'guest')

Loading…
Cancel
Save