summaryrefslogtreecommitdiff
path: root/boto/vpc
diff options
context:
space:
mode:
authorMichael Barrientos <mike@syapse.com>2013-10-18 10:46:18 -0700
committerMichael Barrientos <mike@syapse.com>2013-10-18 10:56:57 -0700
commitdf7d85d0ce215c15b8b8a67e709e86544feb2f8d (patch)
tree9d8b7e4ebfa5317b63be965e9fd1817e390e9072 /boto/vpc
parent152822e726636e8edeeebc4834b8a9a3468b6f48 (diff)
downloadboto-df7d85d0ce215c15b8b8a67e709e86544feb2f8d.tar.gz
Add DHCP options filtering
Diffstat (limited to 'boto/vpc')
-rw-r--r--boto/vpc/__init__.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/boto/vpc/__init__.py b/boto/vpc/__init__.py
index 1a482f62..f1df3d6a 100644
--- a/boto/vpc/__init__.py
+++ b/boto/vpc/__init__.py
@@ -849,7 +849,7 @@ class VPCConnection(EC2Connection):
# DHCP Options
- def get_all_dhcp_options(self, dhcp_options_ids=None, dry_run=False):
+ def get_all_dhcp_options(self, dhcp_options_ids=None, filters=None, dry_run=False):
"""
Retrieve information about your DhcpOptions.
@@ -859,12 +859,18 @@ class VPCConnection(EC2Connection):
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.
+ :type filters: list of tuples
+ :param filters: A list of tuples containing filters. Each tuple
+ consists of a filter key and a filter value.
+
:rtype: list
:return: A list of :class:`boto.vpc.dhcpoptions.DhcpOptions`
"""
params = {}
if dhcp_options_ids:
self.build_list_params(params, dhcp_options_ids, 'DhcpOptionsId')
+ if filters:
+ self.build_filter_params(params, dict(filters))
if dry_run:
params['DryRun'] = 'true'
return self.get_list('DescribeDhcpOptions', params,