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

Side by Side Diff: boto/ec2/elb/policies.py

Issue 8386013: Merging in latest boto. (Closed) Base URL: svn://svn.chromium.org/boto
Patch Set: Redoing vendor drop by deleting and then merging. Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « boto/ec2/elb/loadbalancer.py ('k') | boto/ec2/elb/securitygroup.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2010 Reza Lotun http://reza.lotun.name 1 # Copyright (c) 2010 Reza Lotun http://reza.lotun.name
2 # 2 #
3 # Permission is hereby granted, free of charge, to any person obtaining a 3 # Permission is hereby granted, free of charge, to any person obtaining a
4 # copy of this software and associated documentation files (the 4 # copy of this software and associated documentation files (the
5 # "Software"), to deal in the Software without restriction, including 5 # "Software"), to deal in the Software without restriction, including
6 # without limitation the rights to use, copy, modify, merge, publish, dis- 6 # without limitation the rights to use, copy, modify, merge, publish, dis-
7 # tribute, sublicense, and/or sell copies of the Software, and to permit 7 # tribute, sublicense, and/or sell copies of the Software, and to permit
8 # persons to whom the Software is furnished to do so, subject to the fol- 8 # persons to whom the Software is furnished to do so, subject to the fol-
9 # lowing conditions: 9 # lowing conditions:
10 # 10 #
(...skipping 10 matching lines...) Expand all
21 21
22 from boto.resultset import ResultSet 22 from boto.resultset import ResultSet
23 23
24 24
25 class AppCookieStickinessPolicy(object): 25 class AppCookieStickinessPolicy(object):
26 def __init__(self, connection=None): 26 def __init__(self, connection=None):
27 self.cookie_name = None 27 self.cookie_name = None
28 self.policy_name = None 28 self.policy_name = None
29 29
30 def __repr__(self): 30 def __repr__(self):
31 return 'AppCookieStickiness(%s, %s)' % (self.policy_name, self.cookie_na me) 31 return 'AppCookieStickiness(%s, %s)' % (self.policy_name,
32 self.cookie_name)
32 33
33 def startElement(self, name, attrs, connection): 34 def startElement(self, name, attrs, connection):
34 pass 35 pass
35 36
36 def endElement(self, name, value, connection): 37 def endElement(self, name, value, connection):
37 if name == 'CookieName': 38 if name == 'CookieName':
38 self.cookie_name = value 39 self.cookie_name = value
39 elif name == 'PolicyName': 40 elif name == 'PolicyName':
40 self.policy_name = value 41 self.policy_name = value
41 42
42 43
43 class LBCookieStickinessPolicy(object): 44 class LBCookieStickinessPolicy(object):
44 def __init__(self, connection=None): 45 def __init__(self, connection=None):
45 self.policy_name = None 46 self.policy_name = None
46 self.cookie_expiration_period = None 47 self.cookie_expiration_period = None
47 48
48 def __repr__(self): 49 def __repr__(self):
49 return 'LBCookieStickiness(%s, %s)' % (self.policy_name, self.cookie_exp iration_period) 50 return 'LBCookieStickiness(%s, %s)' % (self.policy_name,
51 self.cookie_expiration_period)
50 52
51 def startElement(self, name, attrs, connection): 53 def startElement(self, name, attrs, connection):
52 pass 54 pass
53 55
54 def endElement(self, name, value, connection): 56 def endElement(self, name, value, connection):
55 if name == 'CookieExpirationPeriod': 57 if name == 'CookieExpirationPeriod':
56 self.cookie_expiration_period = value 58 self.cookie_expiration_period = value
57 elif name == 'PolicyName': 59 elif name == 'PolicyName':
58 self.policy_name = value 60 self.policy_name = value
59 61
60 62
61 class Policies(object): 63 class Policies(object):
62 """ 64 """
63 ELB Policies 65 ELB Policies
64 """ 66 """
65 def __init__(self, connection=None): 67 def __init__(self, connection=None):
66 self.connection = connection 68 self.connection = connection
67 self.app_cookie_stickiness_policies = None 69 self.app_cookie_stickiness_policies = None
68 self.lb_cookie_stickiness_policies = None 70 self.lb_cookie_stickiness_policies = None
69 71
70 def __repr__(self): 72 def __repr__(self):
71 return 'Policies(AppCookieStickiness%s, LBCookieStickiness%s)' % (self.a pp_cookie_stickiness_policies, 73 app = 'AppCookieStickiness%s' % self.app_cookie_stickiness_policies
72 self. lb_cookie_stickiness_policies) 74 lb = 'LBCookieStickiness%s' % self.lb_cookie_stickiness_policies
75 return 'Policies(%s,%s)' % (app, lb)
73 76
74 def startElement(self, name, attrs, connection): 77 def startElement(self, name, attrs, connection):
75 if name == 'AppCookieStickinessPolicies': 78 if name == 'AppCookieStickinessPolicies':
76 self.app_cookie_stickiness_policies = ResultSet([('member', AppCooki eStickinessPolicy)]) 79 rs = ResultSet([('member', AppCookieStickinessPolicy)])
80 self.app_cookie_stickiness_policies = rs
77 elif name == 'LBCookieStickinessPolicies': 81 elif name == 'LBCookieStickinessPolicies':
78 self.lb_cookie_stickiness_policies = ResultSet([('member', LBCookieS tickinessPolicy)]) 82 rs = ResultSet([('member', LBCookieStickinessPolicy)])
83 self.lb_cookie_stickiness_policies = rs
79 84
80 def endElement(self, name, value, connection): 85 def endElement(self, name, value, connection):
81 return 86 return
82 87
OLDNEW
« no previous file with comments | « boto/ec2/elb/loadbalancer.py ('k') | boto/ec2/elb/securitygroup.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698