diff options
author | Jann Kleen <jann@pocketvillage.com> | 2011-03-27 16:44:06 +0200 |
---|---|---|
committer | Jann Kleen <jann@pocketvillage.com> | 2011-03-27 16:44:06 +0200 |
commit | 19c57e3b2e36d0201a6c352fe75c134133d0e0af (patch) | |
tree | f0cfe1656a0412a43d4c0ceb8be1a48a71138dec | |
parent | 1577d00c1718735f58c762b7728f59cebd240c94 (diff) | |
download | boto-19c57e3b2e36d0201a6c352fe75c134133d0e0af.tar.gz |
added max_records parameters and a bit of documentation
-rw-r--r-- | boto/ec2/autoscale/__init__.py | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/boto/ec2/autoscale/__init__.py b/boto/ec2/autoscale/__init__.py index 75d1298c..96c6aa40 100644 --- a/boto/ec2/autoscale/__init__.py +++ b/boto/ec2/autoscale/__init__.py @@ -198,19 +198,47 @@ class AutoScaleConnection(AWSQueryConnection): # Request) # return req - def get_all_groups(self, names=None): + def get_all_groups(self, **kwargs): """ + Get all autoscaling groups. + + :type names: list + :param names: List of group names which should be searched for. + + :type max_records: int + :param max_records: Maximum amount of groups to return. + + :rtype: list + :returns: List of :class:`boto.ec2.autoscale.group.AutoScalingGroup` instances. """ params = {} + max_records = kwargs.get('max_records', None) + names = kwargs.get('names', None) + if max_records is not None: + params['MaxRecords'] = max_records if names: self.build_list_params(params, names, 'AutoScalingGroupNames') return self.get_list('DescribeAutoScalingGroups', params, [('member', AutoScalingGroup)]) - def get_all_launch_configurations(self, names=None): + def get_all_launch_configurations(self, **kwargs): """ + Get launch configurations. + + :type names: list + :param names: List of configuration names which should be searched for. + + :type max_records: int + :param max_records: Maximum amount of configurations to return. + + :rtype: list + :returns: List of :class:`boto.ec2.autoscale.launchconfig.LaunchConfiguration` instances. """ params = {} + max_records = kwargs.get('max_records', None) + names = kwargs.get('names', None) + if max_records is not None: + params['MaxRecords'] = max_records if names: self.build_list_params(params, names, 'LaunchConfigurationNames') return self.get_list('DescribeLaunchConfigurations', params, |