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/elb | |
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/elb')
-rw-r--r-- | boto/ec2/elb/__init__.py | 7 | ||||
-rw-r--r-- | boto/ec2/elb/attributes.py | 31 | ||||
-rw-r--r-- | boto/ec2/elb/instancestate.py | 1 | ||||
-rw-r--r-- | boto/ec2/elb/listener.py | 4 | ||||
-rw-r--r-- | boto/ec2/elb/policies.py | 1 | ||||
-rw-r--r-- | boto/ec2/elb/securitygroup.py | 2 |
6 files changed, 40 insertions, 6 deletions
diff --git a/boto/ec2/elb/__init__.py b/boto/ec2/elb/__init__.py index 9971e060..6123909c 100644 --- a/boto/ec2/elb/__init__.py +++ b/boto/ec2/elb/__init__.py @@ -400,6 +400,7 @@ class ELBConnection(AWSQueryConnection): :param attribute: The attribute you wish to change. * crossZoneLoadBalancing - Boolean (true) + * connectingSettings - :py:class:`ConnectionSettingAttribute` instance * accessLog - :py:class:`AccessLogAttribute` instance * connectionDraining - :py:class:`ConnectionDrainingAttribute` instance @@ -436,6 +437,9 @@ class ELBConnection(AWSQueryConnection): value.enabled and 'true' or 'false' params['LoadBalancerAttributes.ConnectionDraining.Timeout'] = \ value.timeout + elif attribute.lower() == 'connectingsettings': + params['LoadBalancerAttributes.ConnectionSettings.IdleTimeout'] = \ + value.idle_timeout else: raise ValueError('InvalidAttribute', attribute) return self.get_status('ModifyLoadBalancerAttributes', params, @@ -468,6 +472,7 @@ class ELBConnection(AWSQueryConnection): * accessLog - :py:class:`AccessLogAttribute` instance * crossZoneLoadBalancing - Boolean + * connectingSettings - :py:class:`ConnectionSettingAttribute` instance * connectionDraining - :py:class:`ConnectionDrainingAttribute` instance @@ -481,6 +486,8 @@ class ELBConnection(AWSQueryConnection): return attributes.cross_zone_load_balancing.enabled if attribute.lower() == 'connectiondraining': return attributes.connection_draining + if attribute.lower() == 'connectingsettings': + return attributes.connecting_settings return None def register_instances(self, load_balancer_name, instances): diff --git a/boto/ec2/elb/attributes.py b/boto/ec2/elb/attributes.py index 05ca8f82..605e5d54 100644 --- a/boto/ec2/elb/attributes.py +++ b/boto/ec2/elb/attributes.py @@ -19,6 +19,24 @@ # # Created by Chris Huegle for TellApart, Inc. +class ConnectionSettingAttribute(object): + """ + Represents the ConnectionSetting segment of ELB Attributes. + """ + def __init__(self, connection=None): + self.idle_timeout = None + + def __repr__(self): + return 'ConnectionSettingAttribute(%s)' % ( + self.idle_timeout) + + def startElement(self, name, attrs, connection): + pass + + def endElement(self, name, value, connection): + if name == 'IdleTimeout': + self.idle_timeout = int(value) + class CrossZoneLoadBalancingAttribute(object): """ Represents the CrossZoneLoadBalancing segement of ELB Attributes. @@ -40,6 +58,7 @@ class CrossZoneLoadBalancingAttribute(object): else: self.enabled = False + class AccessLogAttribute(object): """ Represents the AccessLog segment of ELB attributes. @@ -74,6 +93,7 @@ class AccessLogAttribute(object): elif name == 'EmitInterval': self.emit_interval = int(value) + class ConnectionDrainingAttribute(object): """ Represents the ConnectionDraining segment of ELB attributes. @@ -100,6 +120,7 @@ class ConnectionDrainingAttribute(object): elif name == 'Timeout': self.timeout = int(value) + class LbAttributes(object): """ Represents the Attributes of an Elastic Load Balancer. @@ -107,15 +128,17 @@ class LbAttributes(object): def __init__(self, connection=None): self.connection = connection self.cross_zone_load_balancing = CrossZoneLoadBalancingAttribute( - self.connection) + self.connection) self.access_log = AccessLogAttribute(self.connection) self.connection_draining = ConnectionDrainingAttribute(self.connection) + self.connecting_settings = ConnectionSettingAttribute(self.connection) def __repr__(self): - return 'LbAttributes(%s, %s, %s)' % ( + return 'LbAttributes(%s, %s, %s, %s)' % ( repr(self.cross_zone_load_balancing), repr(self.access_log), - repr(self.connection_draining)) + repr(self.connection_draining), + repr(self.connecting_settings)) def startElement(self, name, attrs, connection): if name == 'CrossZoneLoadBalancing': @@ -124,6 +147,8 @@ class LbAttributes(object): return self.access_log if name == 'ConnectionDraining': return self.connection_draining + if name == 'ConnectionSettings': + return self.connecting_settings def endElement(self, name, value, connection): pass diff --git a/boto/ec2/elb/instancestate.py b/boto/ec2/elb/instancestate.py index 40f4cbe6..dd61c123 100644 --- a/boto/ec2/elb/instancestate.py +++ b/boto/ec2/elb/instancestate.py @@ -19,6 +19,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. + class InstanceState(object): """ Represents the state of an EC2 Load Balancer Instance diff --git a/boto/ec2/elb/listener.py b/boto/ec2/elb/listener.py index cf26c41c..ed33b131 100644 --- a/boto/ec2/elb/listener.py +++ b/boto/ec2/elb/listener.py @@ -80,6 +80,8 @@ class Listener(object): return self.instance_port if key == 2: return self.protocol - if key == 4: + if key == 3: return self.instance_protocol + if key == 4: + return self.ssl_certificate_id raise KeyError diff --git a/boto/ec2/elb/policies.py b/boto/ec2/elb/policies.py index faea1c78..50fac0af 100644 --- a/boto/ec2/elb/policies.py +++ b/boto/ec2/elb/policies.py @@ -106,4 +106,3 @@ class Policies(object): def endElement(self, name, value, connection): return - diff --git a/boto/ec2/elb/securitygroup.py b/boto/ec2/elb/securitygroup.py index 4f377907..65f981f8 100644 --- a/boto/ec2/elb/securitygroup.py +++ b/boto/ec2/elb/securitygroup.py @@ -19,6 +19,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. + class SecurityGroup(object): def __init__(self, connection=None): self.name = None @@ -35,4 +36,3 @@ class SecurityGroup(object): self.name = value elif name == 'OwnerAlias': self.owner_alias = value - |