Merge "Fix behaviour of 'set-secret-value virsh' exec"

This commit is contained in:
Jenkins 2015-03-31 13:07:06 +00:00 committed by Gerrit Code Review
commit 2aa85630db
2 changed files with 3 additions and 3 deletions

View File

@ -76,8 +76,8 @@ class nova::compute::rbd (
}
exec { 'set-secret-value virsh':
command => "/usr/bin/virsh secret-set-value --secret $(cat /etc/nova/virsh.secret) --base64 $(ceph auth get-key ${rbd_keyring})",
unless => "/usr/bin/virsh secret-list | grep ${libvirt_rbd_secret_uuid}",
command => "/usr/bin/virsh secret-set-value --secret ${libvirt_rbd_secret_uuid} --base64 $(ceph auth get-key ${rbd_keyring})",
unless => "/usr/bin/virsh secret-get-value ${libvirt_rbd_secret_uuid}",
require => Exec['get-or-set virsh secret']
}

View File

@ -85,7 +85,7 @@ describe 'nova::compute::rbd' do
:require => 'File[/etc/nova/secret.xml]'
)
is_expected.to contain_exec('set-secret-value virsh').with(
:command => "/usr/bin/virsh secret-set-value --secret $(cat /etc/nova/virsh.secret) --base64 $(ceph auth get-key client.rbd_test)"
:command => "/usr/bin/virsh secret-set-value --secret UUID --base64 $(ceph auth get-key client.rbd_test)"
)
end
end