Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Unified Diff: third_party/boto/boto/ec2/autoscale/__init__.py

Issue 698893003: Update checked in version of gsutil to version 4.6 (Closed) Base URL: http://dart.googlecode.com/svn/third_party/gsutil/
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/boto/boto/ec2/address.py ('k') | third_party/boto/boto/ec2/autoscale/group.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/boto/boto/ec2/autoscale/__init__.py
===================================================================
--- third_party/boto/boto/ec2/autoscale/__init__.py (revision 33376)
+++ third_party/boto/boto/ec2/autoscale/__init__.py (working copy)
@@ -31,7 +31,7 @@
import boto
from boto.connection import AWSQueryConnection
-from boto.ec2.regioninfo import RegionInfo
+from boto.regioninfo import RegionInfo, get_regions, load_regions
from boto.ec2.autoscale.request import Request
from boto.ec2.autoscale.launchconfig import LaunchConfiguration
from boto.ec2.autoscale.group import AutoScalingGroup
@@ -46,18 +46,7 @@
from boto.ec2.autoscale.tag import Tag
from boto.ec2.autoscale.limits import AccountLimits
-RegionData = {
- 'us-east-1': 'autoscaling.us-east-1.amazonaws.com',
- 'us-gov-west-1': 'autoscaling.us-gov-west-1.amazonaws.com',
- 'us-west-1': 'autoscaling.us-west-1.amazonaws.com',
- 'us-west-2': 'autoscaling.us-west-2.amazonaws.com',
- 'sa-east-1': 'autoscaling.sa-east-1.amazonaws.com',
- 'eu-west-1': 'autoscaling.eu-west-1.amazonaws.com',
- 'ap-northeast-1': 'autoscaling.ap-northeast-1.amazonaws.com',
- 'ap-southeast-1': 'autoscaling.ap-southeast-1.amazonaws.com',
- 'ap-southeast-2': 'autoscaling.ap-southeast-2.amazonaws.com',
- 'cn-north-1': 'autoscaling.cn-north-1.amazonaws.com.cn',
-}
+RegionData = load_regions().get('autoscaling', {})
def regions():
@@ -67,13 +56,7 @@
: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=AutoScaleConnection)
- regions.append(region)
- return regions
+ return get_regions('autoscaling', connection_cls=AutoScaleConnection)
def connect_to_region(region_name, **kw_params):
@@ -104,18 +87,22 @@
is_secure=True, port=None, proxy=None, proxy_port=None,
proxy_user=None, proxy_pass=None, debug=0,
https_connection_factory=None, region=None, path='/',
- security_token=None, validate_certs=True):
+ security_token=None, validate_certs=True, profile_name=None,
+ use_block_device_types=False):
"""
Init method to create a new connection to the AutoScaling service.
B{Note:} The host argument is overridden by the host specified in the
boto configuration file.
+
+
"""
if not region:
region = RegionInfo(self, self.DefaultRegionName,
self.DefaultRegionEndpoint,
AutoScaleConnection)
self.region = region
+ self.use_block_device_types = use_block_device_types
super(AutoScaleConnection, self).__init__(aws_access_key_id,
aws_secret_access_key,
is_secure, port, proxy, proxy_port,
@@ -123,7 +110,8 @@
self.region.endpoint, debug,
https_connection_factory, path=path,
security_token=security_token,
- validate_certs=validate_certs)
+ validate_certs=validate_certs,
+ profile_name=profile_name)
def _required_auth_capability(self):
return ['hmac-v4']
« no previous file with comments | « third_party/boto/boto/ec2/address.py ('k') | third_party/boto/boto/ec2/autoscale/group.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698