Skip to content
Snippets Groups Projects
Commit 8878a075 authored by Antoine Millet's avatar Antoine Millet
Browse files

Implemented sto*_ratio tag

parent fccf9fa5
No related branches found
No related tags found
No related merge requests found
......@@ -117,6 +117,8 @@ class Handler(HostHandler):
Tag('sto%s_vol' % name,
lambda sto: ' '.join(sto.volumes) if sto.volumes else None,
5, 5, storage),
Tag('sto%s_ratio' % name,
lambda sto: '%0.2f' % (1 - float(sto.available) / sto.capacity), 5, 5, storage),
))
# register domains
......@@ -163,6 +165,7 @@ class Handler(HostHandler):
'sto%s_used' % storage,
'sto%s_type' % storage,
'sto%s_vol' % storage,
'sto%s_ratio' % storage,
))
# unregister sub objects (for the same reason)
for sub_id in self.tag_db.keys():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment