virsh secret uuid are case insensitive

Change-Id: I85b53dc2cc81a6a434da7722cdceb5733a99d2ce
Closes-bug: #1671029
(cherry picked from commit 1003a8fd86)
This commit is contained in:
Valery Tschopp 2017-03-08 10:10:26 +01:00 committed by Saverio Proto
parent 35d5c5a86d
commit a64ddc7f28
3 changed files with 7 additions and 3 deletions

View File

@ -107,7 +107,7 @@ class nova::compute::rbd (
$cm = '/usr/bin/virsh secret-define --file /etc/nova/secret.xml | /usr/bin/awk \'{print $2}\' | sed \'/^$/d\' > /etc/nova/virsh.secret'
exec { 'get-or-set virsh secret':
command => "${cm}",
unless => "/usr/bin/virsh secret-list | grep ${libvirt_rbd_secret_uuid}",
unless => "/usr/bin/virsh secret-list | grep -i ${libvirt_rbd_secret_uuid}",
require => [File['/etc/nova/secret.xml'], Service['libvirt']],
}

View File

@ -0,0 +1,4 @@
---
features:
- |
Case insensitive 'libvirt_rbd_secret_uuid' option for nova compute rbd.

View File

@ -89,7 +89,7 @@ describe 'nova::compute::rbd' do
])
is_expected.to contain_exec('get-or-set virsh secret').with(
:command => '/usr/bin/virsh secret-define --file /etc/nova/secret.xml | /usr/bin/awk \'{print $2}\' | sed \'/^$/d\' > /etc/nova/virsh.secret',
:unless => '/usr/bin/virsh secret-list | grep UUID',
:unless => '/usr/bin/virsh secret-list | grep -i UUID',
:require => ['File[/etc/nova/secret.xml]', 'Service[libvirt]'],
)
is_expected.to contain_exec('set-secret-value virsh').with(
@ -140,7 +140,7 @@ describe 'nova::compute::rbd' do
])
is_expected.to contain_exec('get-or-set virsh secret').with(
:command => '/usr/bin/virsh secret-define --file /etc/nova/secret.xml | /usr/bin/awk \'{print $2}\' | sed \'/^$/d\' > /etc/nova/virsh.secret',
:unless => '/usr/bin/virsh secret-list | grep UUID',
:unless => '/usr/bin/virsh secret-list | grep -i UUID',
:require => ['File[/etc/nova/secret.xml]', 'Service[libvirt]'],
)
is_expected.to contain_exec('set-secret-value virsh').with(