Beispiel #1
0
 def execute(self, ns, tps=None):
     """
     Implementation of 'thinlv list' command.
     """
     for tlv in lvm.get_tlvs(ns, tps):
         size = size2str(tlv.NumberOfBlocks * tlv.BlockSize,
                 self.app.config.human_friendly)
         tp = lvm.get_lv_vg(ns, tlv)
         yield (tlv.ElementName, tp.ElementName, size)
Beispiel #2
0
    def execute(self, ns, tlvs=None):
        """
        Implementation of 'thinlv show' command.
        """
        if not tlvs:
            tlvs = lvm.get_tlvs(ns)

        for tlv in tlvs:
            tlv = str2device(ns, tlv)
            cmd = fcmd.NewTableCommand(title=tlv.DeviceID)
            yield cmd
            for line in show.tlv_show(ns, tlv, self.app.config.human_friendly):
                yield line