summaryrefslogtreecommitdiff
path: root/ceilometer/nova_client.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-01-09 00:39:30 +0000
committerGerrit Code Review <review@openstack.org>2016-01-09 00:39:30 +0000
commite09a946ccfaf80a9bc4bbbbf327169c09974117c (patch)
treeda32130666666d05641874069e6ec86fef809197 /ceilometer/nova_client.py
parent14b897910bedde46edae1aa87118a42f162e080b (diff)
parent541a87587e1d5bd8c382b85debaa6f37bea6c13d (diff)
downloadceilometer-2015.1.3.tar.gz
Merge "Instance Caching" into stable/kilo2015.1.3
Diffstat (limited to 'ceilometer/nova_client.py')
-rw-r--r--ceilometer/nova_client.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/ceilometer/nova_client.py b/ceilometer/nova_client.py
index 47f8ee59..3d6a4174 100644
--- a/ceilometer/nova_client.py
+++ b/ceilometer/nova_client.py
@@ -137,9 +137,15 @@ class Client(object):
setattr(instance, attr, ameta)
@logged
- def instance_get_all_by_host(self, hostname):
- """Returns list of instances on particular host."""
+ def instance_get_all_by_host(self, hostname, since=None):
+ """Returns list of instances on particular host.
+
+ If since is supplied, it will return the instances changed since that
+ datetime. since should be in ISO Format '%Y-%m-%dT%H:%M:%SZ'
+ """
search_opts = {'host': hostname, 'all_tenants': True}
+ if since:
+ search_opts['changes-since'] = since
return self._with_flavor_and_image(self.nova_client.servers.list(
detailed=True,
search_opts=search_opts))