~tribaal/txaws/xss-hardening

« back to all changes in this revision

Viewing changes to txaws/testing/service.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:
9
9
 
10
10
    def __init__(self, access_key="", secret_key="", uri="",
11
11
                 ec2_client_factory=None, keypairs=None, security_groups=None,
12
 
                 instances=None, volumes=None, snapshots=None):
 
12
                 instances=None, volumes=None, snapshots=None,
 
13
                 availability_zones=None):
13
14
        self.access_key = access_key
14
15
        self.secret_key = secret_key
15
16
        self.uri = uri
22
23
        self.instances = instances
23
24
        self.volumes = volumes
24
25
        self.snapshots = snapshots
 
26
        self.availability_zones = availability_zones
25
27
 
26
28
    def get_ec2_client(self, *args, **kwds):
27
29
 
31
33
        self.ec2_client = self.ec2_client_factory(
32
34
            creds, endpoint, instances=self.instances, keypairs=self.keypairs,
33
35
            volumes=self.volumes, key_material=self.key_material,
34
 
            security_groups=self.security_groups, snapshots=self.snapshots)
 
36
            security_groups=self.security_groups, snapshots=self.snapshots,
 
37
            availability_zones=self.availability_zones)
35
38
        return self.ec2_client