Exemple #1
0
    def set_filesystem(self, filesystem):
        clause = Eq('filesystem', filesystem)
        self.clear_body()
        title = SectionTitle('Filesystem:  %s' % filesystem)
        attributes = dict(bgcolor='IndianRed', width='100%')
        title.attributes.update(attributes)
        self.body.append(title)
        self.body.append(Header('Filesystem Mounts', level=2))

        rows = self.cursor.select(table='filesystem_mounts',
                                  clause=clause,
                                  order=['ord'])
        fields = ['mnt_name', 'partition', 'ord', 'size']
        mounttable = self._make_table(fields, rows, bgcolor='DarkSeaGreen')
        self.body.append(mounttable)
        self.body.append(Ruler())
        self.body.append(Header('Fstab for %s' % filesystem, level=2))
        fstab = self.mtype.make_fstab(filesystem)
        self.body.append(Pre(fstab))
        self._make_footer_anchors('filesystem', filesystem)
Exemple #2
0
 def set_disk(self, diskname):
     clause = Eq('diskname', diskname)
     self.clear_body()
     title = SectionTitle('Disk:  %s' % diskname)
     attributes = dict(bgcolor='IndianRed', width='100%')
     title.attributes.update(attributes)
     self.body.append(title)
     self.body.append(Header('Partitions', level=2))
     rows = self.cursor.select(table='partitions',
                               clause=clause,
                               order='partition')
     fields = ['partition', 'start', 'size', 'Id']
     ptable = self._make_table(fields, rows, bgcolor='DarkSeaGreen')
     self.body.append(ptable)
     self._make_footer_anchors('disk', diskname)
Exemple #3
0
 def set_mount(self, mount):
     clause = Eq('mnt_name', mount)
     self.clear_body()
     title = SectionTitle('Mount:  %s' % mount)
     attributes = dict(bgcolor='IndianRed', width='100%')
     title.attributes.update(attributes)
     self.body.append(title)
     self.body.append(Header('Mounts', level=2))
     rows = self.cursor.select(table='mounts', clause=clause)
     fields = [
         'mnt_name', 'mnt_point', 'fstype', 'mnt_opts', 'dump', 'pass'
     ]
     mtable = self._make_table(fields, rows, bgcolor='DarkSeaGreen')
     self.body.append(mtable)
     self._make_footer_anchors('mount', mount)