Example #1
0
 def make_volume_node(self, vlm, volume_def_map):
     volume_node = TreeNode('volume' + str(vlm.vlm_nr), '', Color.DARKGREEN)
     volume_node.set_description('minor number: ' + str(vlm.vlm_minor_nr))
     volume_node.add_description(', size: ' + str(
         SizeCalc.approximate_size_string(volume_def_map[vlm.vlm_minor_nr]))
                                 )
     return volume_node
Example #2
0
    def make_volume_node(cls, vlm):
        """

        :param responses.Volume vlm:
        :return:
        """
        volume_node = TreeNode('volume' + str(vlm.number), '', Color.DARKGREEN)
        volume_node.set_description('minor number: ' + str(vlm.drbd_data.drbd_volume_definition.minor)
                                    if vlm.drbd_data else '')
        volume_node.add_description(
            ', size: ' + str(SizeCalc.approximate_size_string(vlm.allocated_size))
        )
        return volume_node