| Index: third_party/boto/boto/ec2/elb/attributes.py
|
| ===================================================================
|
| --- third_party/boto/boto/ec2/elb/attributes.py (revision 33376)
|
| +++ third_party/boto/boto/ec2/elb/attributes.py (working copy)
|
| @@ -40,6 +40,66 @@
|
| else:
|
| self.enabled = False
|
|
|
| +class AccessLogAttribute(object):
|
| + """
|
| + Represents the AccessLog segment of ELB attributes.
|
| + """
|
| + def __init__(self, connection=None):
|
| + self.enabled = None
|
| + self.s3_bucket_name = None
|
| + self.s3_bucket_prefix = None
|
| + self.emit_interval = None
|
| +
|
| + def __repr__(self):
|
| + return 'AccessLog(%s, %s, %s, %s)' % (
|
| + self.enabled,
|
| + self.s3_bucket_name,
|
| + self.s3_bucket_prefix,
|
| + self.emit_interval
|
| + )
|
| +
|
| + def startElement(self, name, attrs, connection):
|
| + pass
|
| +
|
| + def endElement(self, name, value, connection):
|
| + if name == 'Enabled':
|
| + if value.lower() == 'true':
|
| + self.enabled = True
|
| + else:
|
| + self.enabled = False
|
| + elif name == 'S3BucketName':
|
| + self.s3_bucket_name = value
|
| + elif name == 'S3BucketPrefix':
|
| + self.s3_bucket_prefix = value
|
| + elif name == 'EmitInterval':
|
| + self.emit_interval = int(value)
|
| +
|
| +class ConnectionDrainingAttribute(object):
|
| + """
|
| + Represents the ConnectionDraining segment of ELB attributes.
|
| + """
|
| + def __init__(self, connection=None):
|
| + self.enabled = None
|
| + self.timeout = None
|
| +
|
| + def __repr__(self):
|
| + return 'ConnectionDraining(%s, %s)' % (
|
| + self.enabled,
|
| + self.timeout
|
| + )
|
| +
|
| + def startElement(self, name, attrs, connection):
|
| + pass
|
| +
|
| + def endElement(self, name, value, connection):
|
| + if name == 'Enabled':
|
| + if value.lower() == 'true':
|
| + self.enabled = True
|
| + else:
|
| + self.enabled = False
|
| + elif name == 'Timeout':
|
| + self.timeout = int(value)
|
| +
|
| class LbAttributes(object):
|
| """
|
| Represents the Attributes of an Elastic Load Balancer.
|
| @@ -48,14 +108,22 @@
|
| self.connection = connection
|
| self.cross_zone_load_balancing = CrossZoneLoadBalancingAttribute(
|
| self.connection)
|
| + self.access_log = AccessLogAttribute(self.connection)
|
| + self.connection_draining = ConnectionDrainingAttribute(self.connection)
|
|
|
| def __repr__(self):
|
| - return 'LbAttributes(%s)' % (
|
| - repr(self.cross_zone_load_balancing))
|
| + return 'LbAttributes(%s, %s, %s)' % (
|
| + repr(self.cross_zone_load_balancing),
|
| + repr(self.access_log),
|
| + repr(self.connection_draining))
|
|
|
| def startElement(self, name, attrs, connection):
|
| if name == 'CrossZoneLoadBalancing':
|
| return self.cross_zone_load_balancing
|
| -
|
| + if name == 'AccessLog':
|
| + return self.access_log
|
| + if name == 'ConnectionDraining':
|
| + return self.connection_draining
|
| +
|
| def endElement(self, name, value, connection):
|
| pass
|
|
|