summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkwadronaut <kwadronaut@leap.se>2014-02-02 13:27:55 +0100
committerkwadronaut <kwadronaut@leap.se>2014-02-02 13:27:55 +0100
commit2aa1fcbaf5ff064367b3a5330269234729850140 (patch)
treeef82daa8fe25f565cd18e4676b6d025091cf7556
parentb2000c4ca029ec6c601094729111cad9fedf541e (diff)
make all images public
-rwxr-xr-xpublic-images18
1 files changed, 18 insertions, 0 deletions
diff --git a/public-images b/public-images
new file mode 100755
index 0000000..3776212
--- /dev/null
+++ b/public-images
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# change backed up images to be public
+
+#glance image-list | awk '{ ID[$2]++; } END{ for (var in ID) system("glance image-update --is-public True print var}'
+
+#glance image-list >/tmp/image-list
+
+#sleep 3
+while read -r LINE
+do
+ ID=$(echo $LINE | awk '{print $2}');
+ if echo $LINE | grep -q 'active'
+ then glance image-update --is-public True $ID;
+ fi
+done </tmp/image-list
+
+#rm /tmp/image-list