summaryrefslogtreecommitdiffstats
path: root/src/ceph/qa/qa_scripts/openstack/execs/libvirt-secret.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/ceph/qa/qa_scripts/openstack/execs/libvirt-secret.sh')
-rwxr-xr-xsrc/ceph/qa/qa_scripts/openstack/execs/libvirt-secret.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ceph/qa/qa_scripts/openstack/execs/libvirt-secret.sh b/src/ceph/qa/qa_scripts/openstack/execs/libvirt-secret.sh
new file mode 100755
index 0000000..63ef679
--- /dev/null
+++ b/src/ceph/qa/qa_scripts/openstack/execs/libvirt-secret.sh
@@ -0,0 +1,18 @@
+#!/bin/bash -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}