~tribaal/txaws/xss-hardening

« back to all changes in this revision

Viewing changes to txaws/testing/ec2.py

  • Committer: Jamu Kakar
  • Author(s): Frank Wierzbikci
  • Date: 2011-04-19 17:42:18 UTC
  • mfrom: (79.1.5 break-out-parse-instance)
  • Revision ID: jkakar@kakar.ca-20110419174218-wkudu1rw2k4kf9an
Merged break-out-parse-instance [a=fwierzbicki] [r=jkakar,oubiwann] [f=766216]

The instance parsing logic in EC2Client has been broken into two
methods, one to parse individual instances and another to parse all
instances in a payload.

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
 
11
11
from txaws.ec2.model import Keypair, SecurityGroup
12
12
 
 
13
 
13
14
class FakeEC2Client(object):
14
15
 
15
16
    def __init__(self, creds, endpoint, instances=None, keypairs=None,
16
17
                 volumes=None, key_material="", security_groups=None,
17
 
                 snapshots=None, addresses=None, availability_zones=None):
 
18
                 snapshots=None, addresses=None, availability_zones=None,
 
19
                 query_factory=None):
 
20
 
18
21
        self.creds = creds
19
22
        self.endpoint = endpoint
 
23
        self.query_factory = query_factory
 
24
 
20
25
        self.instances = instances or []
21
26
        self.keypairs = keypairs or []
22
27
        self.keypairs_deleted = []
141
146
        except:
142
147
            failure = Failure()
143
148
        return fail(failure)
144