{"id":392,"date":"2016-01-24T19:51:01","date_gmt":"2016-01-24T19:51:01","guid":{"rendered":"http:\/\/www.haxed.me.uk\/?p=392"},"modified":"2016-01-24T19:58:20","modified_gmt":"2016-01-24T19:58:20","slug":"deleting-glance-images-one-liner","status":"publish","type":"post","link":"https:\/\/haxed.me.uk\/index.php\/2016\/01\/24\/deleting-glance-images-one-liner\/","title":{"rendered":"Deleting Glance Images one liner"},"content":{"rendered":"<p>I&#8217;ve been working on some glance automation and I wanted to quickly delete all the glance images so I can test if my ansible playbook is downloading all the reference cloud qcow2 images and populating glance with them correctly.<\/p>\n<pre>\r\nbash-4.2# glance image-list | awk '{print $2}' | grep -v ID | xargs -i echo glance image-delete {}\r\nglance image-delete 8d73249e-c616-4481-8256-f634877eb5a2\r\nglance image-delete 2ea3faef-530c-4679-9faf-b11c7e7889eb\r\nglance image-delete 697efb18-72fe-4305-8e1d-18e0f1481bd6\r\nglance image-delete 555811e2-f941-4cb5-bba2-6ed8751bf188\r\nglance image-delete 7182dca4-f0f4-4176-a706-d8ca0598ef9f\r\nglance image-delete 0f5f2bc5-94a4-4361-a17e-3fed96f07c4e\r\nglance image-delete a01580c2-f264-4058-a366-30d726c2c496\r\nglance image-delete 92a39f49-b6e5-4d32-9856-37bbdac6c285\r\nglance image-delete c01a6464-8e2c-4edb-829e-6d123bc3c8f4\r\n-bash-4.2# glance image-delete 8d73249e-c616-4481-8256-f634877eb5a2\r\n-bash-4.2# glance image-delete 2ea3faef-530c-4679-9faf-b11c7e7889eb\r\n-bash-4.2# glance image-delete 697efb18-72fe-4305-8e1d-18e0f1481bd6\r\n-bash-4.2# glance image-delete 555811e2-f941-4cb5-bba2-6ed8751bf188\r\n-bash-4.2# glance image-delete 7182dca4-f0f4-4176-a706-d8ca0598ef9f\r\n-bash-4.2# glance image-delete 0f5f2bc5-94a4-4361-a17e-3fed96f07c4e\r\n-bash-4.2# glance image-delete a01580c2-f264-4058-a366-30d726c2c496\r\n-bash-4.2# glance image-delete 92a39f49-b6e5-4d32-9856-37bbdac6c285\r\n-bash-4.2# glance image-delete c01a6464-8e2c-4edb-829e-6d123bc3c8f4\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been working on some glance automation and I wanted to quickly delete all the glance images so I can test if my ansible playbook is downloading all the reference cloud qcow2 images and populating glance with them correctly. bash-4.2# &hellip; <a href=\"https:\/\/haxed.me.uk\/index.php\/2016\/01\/24\/deleting-glance-images-one-liner\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26,19,15,30,11],"tags":[],"class_list":["post-392","post","type-post","status-publish","format-standard","hentry","category-ansible","category-bash","category-cloud","category-glance-api","category-openstack"],"_links":{"self":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/392","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/comments?post=392"}],"version-history":[{"count":1,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/392\/revisions"}],"predecessor-version":[{"id":393,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/392\/revisions\/393"}],"wp:attachment":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/media?parent=392"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/categories?post=392"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/tags?post=392"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}