~ubuntu-branches/ubuntu/oneiric/python-boto/oneiric

« back to all changes in this revision

Viewing changes to boto/ec2/autoscale/__init__.py

  • Committer: Bazaar Package Importer
  • Author(s): Eric Evans
  • Date: 2009-12-24 13:27:40 UTC
  • mfrom: (1.2.5 upstream) (10.1.2 python-boto.karmic)
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: james.westby@ubuntu.com-20091224132740-u3vgmn9dll21g6hc
Tags: 1.9b-1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
                  'MaxSize'                 : as_group.max_size,
83
83
                  }
84
84
        if op.startswith('Create'):
 
85
            if as_group.availability_zones:
 
86
                zones = self.availability_zones
 
87
            else:
 
88
                zones = [as_group.availability_zone]
85
89
            self.build_list_params(params, as_group.load_balancers,
86
90
                                   'LoadBalancerNames')
87
 
            self.build_list_params(params, [as_group.availability_zone],
 
91
            self.build_list_params(params, zones,
88
92
                                    'AvailabilityZones')
89
93
        return self.get_object(op, params, Request)
90
94
 
98
102
        """
99
103
        Creates a new Launch Configuration.
100
104
 
101
 
        @type launch_config: boto.ec2.autoscale.launchconfig.LaunchConfiguration
102
 
        @param launch_config: LaunchConfiguraiton object.
 
105
        :type launch_config: boto.ec2.autoscale.launchconfig.LaunchConfiguration
 
106
        :param launch_config: LaunchConfiguraiton object.
103
107
 
104
108
        """
105
109
        params = {
146
150
 
147
151
        req = self.get_object('CreateOrUpdateScalingTrigger', params,
148
152
                               Request)
 
153
        return req
149
154
 
150
155
    def get_all_groups(self, names=None):
151
156
        """
171
176
        """
172
177
        Get all activities for the given autoscaling group.
173
178
 
174
 
        @type autoscale_group: str or AutoScalingGroup object
175
 
        @param autoscale_group: The auto scaling group to get activities on.
 
179
        :type autoscale_group: str or AutoScalingGroup object
 
180
        :param autoscale_group: The auto scaling group to get activities on.
176
181
 
177
182
        @max_records: int
178
 
        @param max_records: Maximum amount of activities to return.
 
183
        :param max_records: Maximum amount of activities to return.
179
184
        """
180
185
        name = autoscale_group
181
186
        if isinstance(autoscale_group, AutoScalingGroup):