virsh secret uuid are case insensitive

Change-Id: I3d2f13e3b4a3c4b9ef8e49cd19d12d3e866ad69b
Closes-bug: #1671029
This commit is contained in:
Valery Tschopp 2017-03-08 10:10:26 +01:00
parent 091320ac30
commit 1003a8fd86
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(