~tribaal/txaws/xss-hardening

« back to all changes in this revision

Viewing changes to txaws/testing/ec2.py

  • Committer: Duncan McGreggor
  • Date: 2009-10-06 18:34:35 UTC
  • mfrom: (33.1.5 444124-describe-zones)
  • Revision ID: duncan@canonical.com-20091006183435-el9j4wdv2229l63f
Merged 444124-describe-zones [r=therve] [f=444124]

Added support for getting a list of availability zones.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 
15
15
    def __init__(self, creds, endpoint, instances=None, keypairs=None,
16
16
                 volumes=None, key_material="", security_groups=None,
17
 
                 snapshots=None, addresses=None):
 
17
                 snapshots=None, addresses=None, availability_zones=None):
18
18
        self.creds = creds
19
19
        self.endpoint = endpoint
20
20
        self.instances = instances or []
28
28
        self.snapshots = snapshots or []
29
29
        self.snapshots_deleted = []
30
30
        self.addresses = addresses or []
 
31
        self.availability_zones = availability_zones or []
31
32
 
32
33
    def describe_instances(self):
33
34
        return succeed(self.instances)
109
110
    def disassociate_address(self, address):
110
111
        return succeed(True)
111
112
 
 
113
    def describe_availability_zones(self, *names):
 
114
        return succeed(self.availability_zones)
 
115
 
112
116
 
113
117
class FakePageGetter(object):
114
118