]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
tools : remove fetch-cloudformation-examples
authorSteven Hardy <shardy@redhat.com>
Tue, 7 May 2013 15:23:29 +0000 (16:23 +0100)
committerSteven Hardy <shardy@redhat.com>
Tue, 7 May 2013 15:58:28 +0000 (16:58 +0100)
This template-related script now lives in the heat-templates repo

Change-Id: Id1940ca1217572145da8eb37b690704a7f06205d

tools/fetch-cloudformation-examples [deleted file]

diff --git a/tools/fetch-cloudformation-examples b/tools/fetch-cloudformation-examples
deleted file mode 100755 (executable)
index 4650dd2..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/env python
-
-import httplib
-import os
-import sys
-import shutil
-import xml.etree.ElementTree as xml
-
-basepath = os.path.abspath(os.path.join(sys.argv[0],
-    os.path.pardir,
-    os.path.pardir,
-    'templates',
-    'cloudformation-examples'))
-
-bucket = 'cloudformation-templates-us-east-1'
-
-def main():
-    conn = httplib.HTTPConnection('s3.amazonaws.com')
-    conn.request('GET', '/%s/' % bucket)
-    resp = conn.getresponse()
-
-    tree = xml.parse(resp)
-    rootElement = tree.getroot()
-
-    if os.path.exists(basepath):
-        print 'Deleting %s' % basepath
-        shutil.rmtree(basepath)
-
-    os.makedirs(basepath)
-    print 'Creating %s' % basepath
-
-    for entry in rootElement.iter('{http://s3.amazonaws.com/doc/2006-03-01/}Key'):
-        key = entry.text
-        if key.endswith('.html'):
-            continue
-        filename = os.path.join(basepath, key)
-
-        print 'Writing to %s' % filename
-        conn.request('GET', '/%s/%s' % (bucket, key))
-        resp = conn.getresponse()
-        contents = resp.read()
-
-        f = open(filename, 'w')
-        f.write(contents)
-        f.close()
-
-if __name__ == '__main__':
-    main()