~txawsteam/txaws/trunk

« back to all changes in this revision

Viewing changes to txaws/ec2/client.py

  • Committer: Duncan McGreggor
  • Date: 2009-08-18 20:29:18 UTC
  • mfrom: (7.1.2 413741-pep8-cleanup)
  • Revision ID: duncan@canonical.com-20090818202918-h6vxh0y42ics0s93
Merged 413741-pep8-cleanup [r=oubiwann,lifeless] [f=413741].

This change brought comments, docstrings, imports, and long lines into a
semblance of consistency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
"""EC2 client support."""
5
5
 
6
 
__all__ = ['EC2Client']
7
 
 
8
6
from base64 import b64encode
9
7
from urllib import quote
10
8
 
14
12
from txaws.util import iso8601time, XML
15
13
 
16
14
 
 
15
__all__ = ['EC2Client']
 
16
 
 
17
 
17
18
class Instance(object):
18
19
    """An Amazon EC2 Instance.
19
20
 
20
 
    :attrib instanceId: The instance ID of this instance.
21
 
    :attrib instanceState: The state of this instance.
 
21
    @attrib instanceId: The instance ID of this instance.
 
22
    @attrib instanceState: The state of this instance.
22
23
    """
23
 
 
24
24
    def __init__(self, instanceId, instanceState):
25
25
        self.instanceId = instanceId
26
26
        self.instanceState = instanceState
34
34
    def __init__(self, creds=None, query_factory=None):
35
35
        """Create an EC2Client.
36
36
 
37
 
        :param creds: Explicit credentials to use. If None, credentials are
 
37
        @param creds: Explicit credentials to use. If None, credentials are
38
38
            inferred as per txaws.credentials.AWSCredentials.
39
39
        """
40
40
        if creds is None:
67
67
    def terminate_instances(self, *instance_ids):
68
68
        """Terminate some instances.
69
69
        
70
 
        :param instance_ids: The ids of the instances to terminate.
71
 
        :return: A deferred which on success gives an iterable of
 
70
        @param instance_ids: The ids of the instances to terminate.
 
71
        @return: A deferred which on success gives an iterable of
72
72
            (id, old-state, new-state) tuples.
73
73
        """
74
74
        instanceset = {}