Loading cloudcontrol/node/hypervisor/lib.py +4 −2 Original line number Diff line number Diff line Loading @@ -326,13 +326,15 @@ class StorageIndex(object): Tag('sto%s_size' % s.name, partial(lambda x: x.capacity, s), 5, 5), Tag('sto%s_free' % s.name, partial(lambda x: x.available, s), 5, 5), Tag('sto%s_used' % s.name, partial(lambda x: x.capacity - x.available, s), 5, 5), partial(lambda x: x.capacity - x.available if x.available is not None and x.capacity is not None else None, s), 5, 5), Tag('sto%s_type' % s.name, partial(lambda x: x.type, s), 5, 5), Tag('sto%s_vol' % s.name, partial(lambda x: ' '.join(x.volumes) if x.volumes and not x.is_shared else None, s), 5, 5), Tag('sto%s_ratio' % s.name, partial(lambda x: '%0.2f' % (1 - float(x.available) / x.capacity), s), 5, 5), partial(lambda x: '%0.2f' % (1 - float(x.available) / x.capacity) if x.available is not None and x.capacity is not None else None, s), 5, 5), )) self.update_path_index() Loading Loading
cloudcontrol/node/hypervisor/lib.py +4 −2 Original line number Diff line number Diff line Loading @@ -326,13 +326,15 @@ class StorageIndex(object): Tag('sto%s_size' % s.name, partial(lambda x: x.capacity, s), 5, 5), Tag('sto%s_free' % s.name, partial(lambda x: x.available, s), 5, 5), Tag('sto%s_used' % s.name, partial(lambda x: x.capacity - x.available, s), 5, 5), partial(lambda x: x.capacity - x.available if x.available is not None and x.capacity is not None else None, s), 5, 5), Tag('sto%s_type' % s.name, partial(lambda x: x.type, s), 5, 5), Tag('sto%s_vol' % s.name, partial(lambda x: ' '.join(x.volumes) if x.volumes and not x.is_shared else None, s), 5, 5), Tag('sto%s_ratio' % s.name, partial(lambda x: '%0.2f' % (1 - float(x.available) / x.capacity), s), 5, 5), partial(lambda x: '%0.2f' % (1 - float(x.available) / x.capacity) if x.available is not None and x.capacity is not None else None, s), 5, 5), )) self.update_path_index() Loading