From 2aa1fcbaf5ff064367b3a5330269234729850140 Mon Sep 17 00:00:00 2001 From: kwadronaut Date: Sun, 2 Feb 2014 13:27:55 +0100 Subject: make all images public --- public-images | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 public-images 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