diff options
author | kyleknap <kyleknap@amazon.com> | 2014-10-08 12:41:04 -0700 |
---|---|---|
committer | kyleknap <kyleknap@amazon.com> | 2014-10-08 12:41:04 -0700 |
commit | 2517f660f8ef9012708d46da3a36ab967993d2f6 (patch) | |
tree | d90281aecdf962a2c7342938ac0a20d57fb74088 /boto/ec2/autoscale | |
parent | ff3d8159af3c816303785e023a4182aacb6aabf5 (diff) | |
parent | 8f500ce75fea1ba1446195b26dddbe90b52223d8 (diff) | |
download | boto-2517f660f8ef9012708d46da3a36ab967993d2f6.tar.gz |
Merge branch 'release-2.33.0'2.33.0
Diffstat (limited to 'boto/ec2/autoscale')
-rw-r--r-- | boto/ec2/autoscale/__init__.py | 21 | ||||
-rw-r--r-- | boto/ec2/autoscale/activity.py | 1 | ||||
-rw-r--r-- | boto/ec2/autoscale/instance.py | 1 | ||||
-rw-r--r-- | boto/ec2/autoscale/launchconfig.py | 5 | ||||
-rw-r--r-- | boto/ec2/autoscale/limits.py | 4 | ||||
-rw-r--r-- | boto/ec2/autoscale/policy.py | 7 | ||||
-rw-r--r-- | boto/ec2/autoscale/request.py | 2 | ||||
-rw-r--r-- | boto/ec2/autoscale/scheduled.py | 1 |
8 files changed, 24 insertions, 18 deletions
diff --git a/boto/ec2/autoscale/__init__.py b/boto/ec2/autoscale/__init__.py index fc0534b4..5a58748d 100644 --- a/boto/ec2/autoscale/__init__.py +++ b/boto/ec2/autoscale/__init__.py @@ -105,14 +105,14 @@ class AutoScaleConnection(AWSQueryConnection): 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, - proxy_user, proxy_pass, - self.region.endpoint, debug, - https_connection_factory, path=path, - security_token=security_token, - validate_certs=validate_certs, - profile_name=profile_name) + aws_secret_access_key, + is_secure, port, proxy, proxy_port, + proxy_user, proxy_pass, + self.region.endpoint, debug, + https_connection_factory, path=path, + security_token=security_token, + validate_certs=validate_certs, + profile_name=profile_name) def _required_auth_capability(self): return ['hmac-v4'] @@ -222,7 +222,10 @@ class AutoScaleConnection(AWSQueryConnection): if launch_config.key_name: params['KeyName'] = launch_config.key_name if launch_config.user_data: - params['UserData'] = base64.b64encode(launch_config.user_data).decode('utf-8') + user_data = launch_config.user_data + if isinstance(user_data, six.text_type): + user_data = user_data.encode('utf-8') + params['UserData'] = base64.b64encode(user_data).decode('utf-8') if launch_config.kernel_id: params['KernelId'] = launch_config.kernel_id if launch_config.ramdisk_id: diff --git a/boto/ec2/autoscale/activity.py b/boto/ec2/autoscale/activity.py index 3f23d05d..bfe32f43 100644 --- a/boto/ec2/autoscale/activity.py +++ b/boto/ec2/autoscale/activity.py @@ -71,4 +71,3 @@ class Activity(object): self.status_code = value else: setattr(self, name, value) - diff --git a/boto/ec2/autoscale/instance.py b/boto/ec2/autoscale/instance.py index 6eb89c2c..6095c17b 100644 --- a/boto/ec2/autoscale/instance.py +++ b/boto/ec2/autoscale/instance.py @@ -57,4 +57,3 @@ class Instance(object): self.group_name = value else: setattr(self, name, value) - diff --git a/boto/ec2/autoscale/launchconfig.py b/boto/ec2/autoscale/launchconfig.py index a4e6ce9a..889cee21 100644 --- a/boto/ec2/autoscale/launchconfig.py +++ b/boto/ec2/autoscale/launchconfig.py @@ -20,7 +20,6 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. -from datetime import datetime from boto.ec2.elb.listelement import ListElement # Namespacing issue with deprecated local class from boto.ec2.blockdevicemapping import BlockDeviceMapping as BDM @@ -129,8 +128,8 @@ class LaunchConfiguration(object): :type instance_type: str :param instance_type: The instance type - :type kern_id: str - :param kern_id: Kernel id for instance + :type kernel_id: str + :param kernel_id: Kernel id for instance :type ramdisk_id: str :param ramdisk_id: RAM disk id for instance diff --git a/boto/ec2/autoscale/limits.py b/boto/ec2/autoscale/limits.py index 8472a201..89ece672 100644 --- a/boto/ec2/autoscale/limits.py +++ b/boto/ec2/autoscale/limits.py @@ -19,6 +19,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. + class AccountLimits(object): def __init__(self, connection=None): self.connection = connection @@ -27,7 +28,7 @@ class AccountLimits(object): def __repr__(self): return 'AccountLimits: [%s, %s]' % (self.max_autoscaling_groups, - self.max_launch_configurations) + self.max_launch_configurations) def startElement(self, name, attrs, connection): return None @@ -41,4 +42,3 @@ class AccountLimits(object): self.max_launch_configurations = int(value) else: setattr(self, name, value) - diff --git a/boto/ec2/autoscale/policy.py b/boto/ec2/autoscale/policy.py index fbe7dc5f..191ac496 100644 --- a/boto/ec2/autoscale/policy.py +++ b/boto/ec2/autoscale/policy.py @@ -23,6 +23,7 @@ from boto.resultset import ResultSet from boto.ec2.elb.listelement import ListElement + class Alarm(object): def __init__(self, connection=None): self.connection = connection @@ -64,18 +65,24 @@ class AdjustmentType(object): class MetricCollectionTypes(object): class BaseType(object): arg = '' + def __init__(self, connection): self.connection = connection self.val = None + def __repr__(self): return '%s:%s' % (self.arg, self.val) + def startElement(self, name, attrs, connection): return + def endElement(self, name, value, connection): if name == self.arg: self.val = value + class Metric(BaseType): arg = 'Metric' + class Granularity(BaseType): arg = 'Granularity' diff --git a/boto/ec2/autoscale/request.py b/boto/ec2/autoscale/request.py index c066dff5..b17b534f 100644 --- a/boto/ec2/autoscale/request.py +++ b/boto/ec2/autoscale/request.py @@ -19,6 +19,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. + class Request(object): def __init__(self, connection=None): self.connection = connection @@ -35,4 +36,3 @@ class Request(object): self.request_id = value else: setattr(self, name, value) - diff --git a/boto/ec2/autoscale/scheduled.py b/boto/ec2/autoscale/scheduled.py index 8e307c20..8d2eda40 100644 --- a/boto/ec2/autoscale/scheduled.py +++ b/boto/ec2/autoscale/scheduled.py @@ -75,4 +75,3 @@ class ScheduledUpdateGroupAction(object): self.end_time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ') else: setattr(self, name, value) - |