Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed patch9d3c9f0.py meanwhile included in upstream version 2.6.0 …

…(see boto/boto#891).

[Issue #4]
  • Loading branch information...
commit 7c88cc98486003a6f165ecab6d0f43cbc10e4cf6 1 parent f0c1db9
@sopel authored
View
1  .gitignore
@@ -1,3 +1,4 @@
+botocross.egg-info
build
dist
virtualenv*/
View
5 create-stacks.py
@@ -7,11 +7,6 @@
log = logging.getLogger('botocross')
from pprint import pprint
-# NOTE: equivalent of https://github.com/boto/boto/pull/891 until upstream release catches up.
-import patch9d3c9f0
-boto.cloudformation.regions = patch9d3c9f0.regions
-boto.cloudformation.connect_to_region = patch9d3c9f0.connect_to_region
-
# configure command line argument parsing
parser = argparse.ArgumentParser(description='Create a CloudFormation stack in all/some available CloudFormation regions')
parser.add_argument("stack_name", help="A stack name")
View
5 delete-stacks.py
@@ -7,11 +7,6 @@
log = logging.getLogger('botocross')
from pprint import pprint
-# NOTE: equivalent of https://github.com/boto/boto/pull/891 until upstream release catches up.
-import patch9d3c9f0
-boto.cloudformation.regions = patch9d3c9f0.regions
-boto.cloudformation.connect_to_region = patch9d3c9f0.connect_to_region
-
# configure command line argument parsing
parser = argparse.ArgumentParser(description='Delete a CloudFormation stack in all/some available CloudFormation regions')
parser.add_argument("stack_name_or_id", metavar='stack_name', help="A stack name or id (ARN)")
View
7 describe-stacks.py
@@ -7,11 +7,6 @@
log = logging.getLogger('botocross')
from pprint import pprint
-# NOTE: equivalent of https://github.com/boto/boto/pull/891 until upstream release catches up.
-import patch9d3c9f0
-boto.cloudformation.regions = patch9d3c9f0.regions
-boto.cloudformation.connect_to_region = patch9d3c9f0.connect_to_region
-
# configure command line argument parsing
parser = argparse.ArgumentParser(description='Describe CloudFormation stacks in all/some available CloudFormation regions')
parser.add_argument("-r", "--region", help="A region substring selector (e.g. 'us-west')")
@@ -55,7 +50,7 @@ def isSelected(region):
if not args.xml:
print stack.stack_name
if args.xml:
- print stack.connection._pool.host_to_pool.values()[0].queue[0][0]._HTTPConnection__response._cached_response.replace("xmlns=\"http://cloudformation.amazonaws.com/doc/2010-05-15/\"","")
+ print stack.connection._pool.host_to_pool.values()[0].queue[0][0]._HTTPConnection__response._cached_response.replace("xmlns=\"http://cloudformation.amazonaws.com/doc/2010-05-15/\"", "")
if args.verbose:
pprint(vars(stack), indent=2)
log.debug(vars(stack))
View
45 patch9d3c9f0.py
@@ -1,45 +0,0 @@
-# NOTE: equivalent of https://github.com/boto/boto/pull/891 until upstream release catches up.
-from boto.cloudformation.connection import CloudFormationConnection
-from boto.regioninfo import RegionInfo
-
-RegionData = {
- 'us-east-1': 'cloudformation.us-east-1.amazonaws.com',
- 'us-west-1': 'cloudformation.us-west-1.amazonaws.com',
- 'us-west-2': 'cloudformation.us-west-2.amazonaws.com',
- 'sa-east-1': 'cloudformation.sa-east-1.amazonaws.com',
- 'eu-west-1': 'cloudformation.eu-west-1.amazonaws.com',
- 'ap-northeast-1': 'cloudformation.ap-northeast-1.amazonaws.com',
- 'ap-southeast-1': 'cloudformation.ap-southeast-1.amazonaws.com'}
-
-
-def regions():
- """
- Get all available regions for the CloudFormation service.
-
- :rtype: list
- :return: A list of :class:`boto.RegionInfo` instances
- """
- regions = []
- for region_name in RegionData:
- region = RegionInfo(name=region_name,
- endpoint=RegionData[region_name],
- connection_cls=CloudFormationConnection)
- regions.append(region)
- return regions
-
-
-def connect_to_region(region_name, **kw_params):
- """
- Given a valid region name, return a
- :class:`boto.cloudformation.CloudFormationConnection`.
-
- :param str region_name: The name of the region to connect to.
-
- :rtype: :class:`boto.cloudformation.CloudFormationConnection` or ``None``
- :return: A connection to the given region, or None if an invalid region
- name is given
- """
- for region in regions():
- if region.name == region_name:
- return region.connect(**kw_params)
- return None
View
4 setup.py
@@ -3,7 +3,7 @@
from setuptools import find_packages
setup(name='botocross',
- version='1.0.1',
+ version='1.0.2',
packages=find_packages(),
scripts=[
'authorize-securitygroups.py',
@@ -41,6 +41,6 @@
],
license='LICENSE',
install_requires=[
- "boto >= 2.5.2",
+ "boto >= 2.6.0",
],
)
View
5 update-stacks.py
@@ -7,11 +7,6 @@
log = logging.getLogger('botocross')
from pprint import pprint
-# NOTE: equivalent of https://github.com/boto/boto/pull/891 until upstream release catches up.
-import patch9d3c9f0
-boto.cloudformation.regions = patch9d3c9f0.regions
-boto.cloudformation.connect_to_region = patch9d3c9f0.connect_to_region
-
# configure command line argument parsing
parser = argparse.ArgumentParser(description='Create a CloudFormation stack in all/some available CloudFormation regions')
parser.add_argument("stack_name", help="A stack name")
Please sign in to comment.
Something went wrong with that request. Please try again.