diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 18:24:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 18:24:20 +0000 |
commit | 483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch) | |
tree | e5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /qa/qa_scripts/openstack/execs/libvirt-secret.sh | |
parent | Initial commit. (diff) | |
download | ceph-upstream.tar.xz ceph-upstream.zip |
Adding upstream version 14.2.21.upstream/14.2.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'qa/qa_scripts/openstack/execs/libvirt-secret.sh')
-rwxr-xr-x | qa/qa_scripts/openstack/execs/libvirt-secret.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/qa/qa_scripts/openstack/execs/libvirt-secret.sh b/qa/qa_scripts/openstack/execs/libvirt-secret.sh new file mode 100755 index 00000000..75e9e91a --- /dev/null +++ b/qa/qa_scripts/openstack/execs/libvirt-secret.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -f + +# +# Generate a libvirt secret on the Openstack node. +# +openstack_node=${1} +uuid=`uuidgen` +cat > secret.xml <<EOF +<secret ephemeral='no' private='no'> + <uuid>${uuid}</uuid> + <usage type='ceph'> + <name>client.cinder secret</name> + </usage> +</secret> +EOF +sudo virsh secret-define --file secret.xml +sudo virsh secret-set-value --secret ${uuid} --base64 $(cat client.cinder.key) +echo ${uuid} |