diff options
Diffstat (limited to 'ceilometer/nova_client.py')
-rw-r--r-- | ceilometer/nova_client.py | 10 |
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)) |