~tribaal/txaws/xss-hardening

« back to all changes in this revision

Viewing changes to txaws/testing/ec2.py

Merged 424018-add-keypair-support [r=jkakar] [f=424018]

This change implements three keypair methods in the EC2 client:
 1. describe_keypairs
 2. create_keypair
 3. delete_keypair

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
class FakeEC2Client(object):
5
5
 
6
 
    def __init__(self, creds, endpoint, instances=None):
 
6
    def __init__(self, creds, endpoint, instances=None, keypairs=[]):
7
7
        self.creds = creds
8
8
        self.endpoint = endpoint
9
9
        self.instances = instances or []
 
10
        self.keypairs = keypairs
10
11
 
11
12
    def describe_instances(self):
12
13
        return succeed(self.instances)
 
14
 
 
15
    def describe_keypairs(self):
 
16
        return succeed(self.keypairs)