Commit 8878a075 authored by Antoine Millet's avatar Antoine Millet
Browse files

Implemented sto*_ratio tag

parent fccf9fa5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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():