From 34e47b64d926c055d9895c5b3f27949eaca68999 Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Mon, 22 Jul 2013 16:01:44 +1200 Subject: [PATCH] Move heat-cfn, heat-boto, heat-watch to new repo The new home for these tools is https://github.com/openstack-dev/heat-cfnclient These tools are now aimed at heat developers only and they will not be released or packaged. Change-Id: I1ea62ef17e81ab53cacb5e4940f0c4e2516ed383 --- bin/heat-boto | 1 - bin/heat-cfn | 693 ---------------------- bin/heat-watch | 281 --------- doc/source/conf.py | 9 - doc/source/man/heat-boto.rst | 194 ------ doc/source/man/heat-cfn.rst | 199 ------- doc/source/man/heat-watch.rst | 95 --- doc/source/man/index.rst | 3 - etc/bash_completion.d/heat-cfn | 22 - etc/boto.cfg | 26 - heat/cfn_client/__init__.py | 0 heat/cfn_client/boto_client.py | 317 ---------- heat/cfn_client/boto_client_cloudwatch.py | 210 ------- heat/cfn_client/client.py | 188 ------ heat/cfn_client/utils.py | 56 -- heat/common/auth.py | 273 --------- heat/common/client.py | 548 ----------------- heat/common/utils.py | 52 -- heat/tests/test_cli.py | 45 -- requirements.txt | 1 - setup.cfg | 3 - tools/uninstall-heat | 1 - 22 files changed, 3217 deletions(-) delete mode 120000 bin/heat-boto delete mode 100755 bin/heat-cfn delete mode 100755 bin/heat-watch delete mode 100644 doc/source/man/heat-boto.rst delete mode 100644 doc/source/man/heat-cfn.rst delete mode 100644 doc/source/man/heat-watch.rst delete mode 100644 etc/bash_completion.d/heat-cfn delete mode 100644 etc/boto.cfg delete mode 100644 heat/cfn_client/__init__.py delete mode 100644 heat/cfn_client/boto_client.py delete mode 100644 heat/cfn_client/boto_client_cloudwatch.py delete mode 100644 heat/cfn_client/client.py delete mode 100644 heat/cfn_client/utils.py delete mode 100644 heat/common/auth.py delete mode 100644 heat/common/client.py delete mode 100644 heat/common/utils.py delete mode 100644 heat/tests/test_cli.py diff --git a/bin/heat-boto b/bin/heat-boto deleted file mode 120000 index 4b4c848ea..000000000 --- a/bin/heat-boto +++ /dev/null @@ -1 +0,0 @@ -heat-cfn \ No newline at end of file diff --git a/bin/heat-cfn b/bin/heat-cfn deleted file mode 100755 index 34a5bd0d8..000000000 --- a/bin/heat-cfn +++ /dev/null @@ -1,693 +0,0 @@ -#!/usr/bin/env python -# vim: tabstop=4 shiftwidth=4 softtabstop=4 -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -""" -This is the administration program for heat. It is simply a command-line -interface for adding, modifying, and retrieving information about the stacks -belonging to a user. It is a convenience application that talks to the heat -API server. -""" - -import optparse -import os -import os.path -import sys -import time -import logging - -import httplib -from urlparse import urlparse -# If ../heat/__init__.py exists, add ../ to Python search path, so that -# it will override what happens to be installed in /usr/(local/)lib/python... -possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), - os.pardir, - os.pardir)) -if os.path.exists(os.path.join(possible_topdir, 'heat', '__init__.py')): - sys.path.insert(0, possible_topdir) - -scriptname = os.path.basename(sys.argv[0]) - -from heat.openstack.common import gettextutils - -gettextutils.install('heat', lazy=True) - -if scriptname == 'heat-boto': - from heat.cfn_client import boto_client as heat_client -else: - from heat.cfn_client import client as heat_client -from heat.version import version_info as version -from heat.common import config -from heat.common import exception -from heat.cfn_client import utils -from keystoneclient.v2_0 import client - - -def get_swift_template(options): - ''' - Retrieve a template from the swift object store, using - the provided URL. We request a keystone token to authenticate - ''' - template_body = None - if options.auth_strategy == 'keystone': - # we use the keystone credentials to get a token - # to pass in the request header - keystone = client.Client(username=options.username, - password=options.password, - tenant_name=options.tenant, - auth_url=options.auth_url) - logging.info("Getting template from swift URL: %s" % - options.template_object) - url = urlparse(options.template_object) - if url.scheme == 'https': - conn = httplib.HTTPSConnection(url.netloc) - else: - conn = httplib.HTTPConnection(url.netloc) - headers = {'X-Auth-Token': keystone.auth_token} - conn.request("GET", url.path, headers=headers) - r1 = conn.getresponse() - logging.info('status %d' % r1.status) - if r1.status == 200: - template_body = r1.read() - conn.close() - else: - logging.error("template-object option requires keystone") - - return template_body - - -def get_template_param(options): - ''' - Helper function to extract the template in whatever - format has been specified by the cli options - ''' - param = {} - if options.template_file: - param['TemplateBody'] = open(options.template_file).read() - elif options.template_url: - param['TemplateUrl'] = options.template_url - elif options.template_object: - template_body = get_swift_template(options) - if template_body: - param['TemplateBody'] = template_body - else: - logging.error("Error reading swift template") - - return param - - -@utils.catch_error('validate') -def template_validate(options, arguments): - ''' - Validate a template. This command parses a template and verifies that - it is in the correct format. - - Usage: heat-cfn validate \\ - [--template-file=