Beispiel #1
0
    def _adjust_spares_button(self, raidlevel, selected_count):
        maxspares = 0
        if raidlevel is not None:
            maxspares = mdraidlib.get_raid_max_spares(raidlevel, selected_count)

        if maxspares > 0:
	    adj = self.sparesb.get_adjustment()
	    value = int(min(adj.value, maxspares))
	    self.sparesb.set_sensitive(1)
            adj.configure(value=value, lower=0, upper=maxspares, step_increment=1,
                          page_increment=0, page_size=0)
	else:
	    self.sparesb.set_value(0)
	    self.sparesb.set_sensitive(0)
Beispiel #2
0
    def _adjust_spares_button(self, raidlevel, selected_count):
        maxspares = 0
        if raidlevel is not None:
            maxspares = mdraidlib.get_raid_max_spares(raidlevel, selected_count)

        if maxspares > 0:
	    adj = self.sparesb.get_adjustment()
	    value = int(min(adj.value, maxspares))
	    self.sparesb.set_sensitive(1)
            adj.configure(value=value, lower=0, upper=maxspares, step_increment=1,
                          page_increment=0, page_size=0)
	else:
	    self.sparesb.set_value(0)
	    self.sparesb.set_sensitive(0)
    def raidlevelchangeCB(self, widget, sparesb):
	raidlevel = widget.get_model()[widget.get_active()][0]
	numparts = sparesb.get_data("numparts")
	maxspares = mdraidlib.get_raid_max_spares(raidlevel, numparts)

	if maxspares > 0 and not mdraidlib.isRaid(mdraidlib.RAID0, raidlevel):
	    adj = sparesb.get_adjustment() 
	    value = adj.value 
	    if adj.value > maxspares: 
		value = maxspares 

	    sparesb.set_sensitive(1)
	    spareAdj = gtk.Adjustment(value = value, lower = 0,
				      upper = maxspares, step_incr = 1)
	    spareAdj.clamp_page(0, maxspares)
	    sparesb.set_adjustment(spareAdj)
	    sparesb.set_value(value)
	else:
	    sparesb.set_value(0)
	    sparesb.set_sensitive(0)
Beispiel #4
0
    def raidlevelchangeCB(self, widget, sparesb):
        raidlevel = widget.get_model()[widget.get_active()][0]
        numparts = sparesb.get_data("numparts")
        maxspares = mdraidlib.get_raid_max_spares(raidlevel, numparts)

        if maxspares > 0 and not mdraidlib.isRaid(mdraidlib.RAID0, raidlevel):
            adj = sparesb.get_adjustment()
            value = adj.value
            if adj.value > maxspares:
                value = maxspares

            sparesb.set_sensitive(1)
            spareAdj = gtk.Adjustment(value=value,
                                      lower=0,
                                      upper=maxspares,
                                      step_incr=1)
            spareAdj.clamp_page(0, maxspares)
            sparesb.set_adjustment(spareAdj)
            sparesb.set_value(value)
        else:
            sparesb.set_value(0)
            sparesb.set_sensitive(0)
Beispiel #5
0
    def __init__(self, storage, intf, parent, origrequest, isNew=0):
        self.storage = storage
        self.origrequest = origrequest
        self.isNew = isNew
        self.intf = intf
        self.parent = parent

        self.dialog = None

        #
        # start of editRaidRequest
        #
        availraidparts = self.storage.unusedMDMembers(array=self.origrequest)

        # if no raid partitions exist, raise an error message and return
        if len(availraidparts) < 2:
            dlg = gtk.MessageDialog(
                self.parent, 0, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK,
                _("At least two unused software RAID "
                  "partitions are needed to create "
                  "a RAID device.\n\n"
                  "First create at least two partitions "
                  "of type \"software RAID\", and then "
                  "select the \"RAID\" option again."))
            gui.addFrame(dlg)
            dlg.show_all()
            dlg.set_position(gtk.WIN_POS_CENTER)
            dlg.run()
            dlg.destroy()
            return

        if isNew:
            tstr = _("Make RAID Device")
        else:
            if origrequest.minor is not None:
                tstr = _("Edit RAID Device: %s") % (origrequest.path, )
            else:
                tstr = _("Edit RAID Device")

        dialog = gtk.Dialog(tstr, self.parent)
        gui.addFrame(dialog)
        dialog.add_button('gtk-cancel', 2)
        dialog.add_button('gtk-ok', 1)
        dialog.set_position(gtk.WIN_POS_CENTER)

        maintable = gtk.Table()
        maintable.set_row_spacings(5)
        maintable.set_col_spacings(5)
        row = 0

        # we'll maybe add this further down
        self.lukscb = gtk.CheckButton(_("_Encrypt"))
        self.lukscb.set_data("formatstate", 1)

        if origrequest.format.type == "luks":
            try:
                luksdev = self.storage.devicetree.getChildren(origrequest)[0]
            except IndexError:
                luksdev = None
                usedev = origrequest
                format = origrequest.format
            else:
                usedev = luksdev
                format = usedev.format
        else:
            luksdev = None
            usedev = origrequest
            format = origrequest.format

        # Mount Point entry
        lbl = createAlignedLabel(_("_Mount Point:"))
        maintable.attach(lbl, 0, 1, row, row + 1)
        self.mountCombo = createMountPointCombo(usedev)
        lbl.set_mnemonic_widget(self.mountCombo)
        maintable.attach(self.mountCombo, 1, 2, row, row + 1)
        row = row + 1

        # Filesystem Type
        if not origrequest.exists:
            lbl = createAlignedLabel(_("_File System Type:"))
            maintable.attach(lbl, 0, 1, row, row + 1)
            self.fstypeCombo = createFSTypeMenu(
                format,
                fstypechangeCB,
                self.mountCombo,
                ignorefs=["mdmember", "efi", "prepboot", "appleboot"])
            lbl.set_mnemonic_widget(self.fstypeCombo)
            maintable.attach(self.fstypeCombo, 1, 2, row, row + 1)
            row += 1
        else:
            maintable.attach(
                createAlignedLabel(_("Original File System Type:")), 0, 1, row,
                row + 1)
            self.fstypeCombo = gtk.Label(usedev.originalFormat.name)
            maintable.attach(self.fstypeCombo, 1, 2, row, row + 1)
            row += 1

            if getattr(usedev.originalFormat, "label", None):
                maintable.attach(
                    createAlignedLabel(_("Original File System "
                                         "Label:")), 0, 1, row, row + 1)
                maintable.attach(gtk.Label(usedev.originalFormat.label), 1, 2,
                                 row, row + 1)
                row += 1

        # raid minors
        lbl = createAlignedLabel(_("RAID _Device:"))
        maintable.attach(lbl, 0, 1, row, row + 1)

        if not origrequest.exists:
            availminors = self.storage.unusedMDMinors[:16]
            reqminor = origrequest.minor
            if reqminor is not None and reqminor not in availminors:
                availminors.append(reqminor)

            availminors.sort()
            self.minorCombo = self.createRaidMinorMenu(availminors, reqminor)
            lbl.set_mnemonic_widget(self.minorCombo)
        else:
            self.minorCombo = gtk.Label("%s" % (origrequest.name, ))
        maintable.attach(self.minorCombo, 1, 2, row, row + 1)
        row = row + 1

        # raid level
        lbl = createAlignedLabel(_("RAID _Level:"))
        maintable.attach(lbl, 0, 1, row, row + 1)

        if not origrequest.exists:
            # Create here, pack below
            numparts = len(availraidparts)
            if origrequest.spares:
                nspares = origrequest.spares
            else:
                nspares = 0

            if origrequest.level:
                maxspares = mdraidlib.get_raid_max_spares(
                    origrequest.level, numparts)
            else:
                maxspares = 0

            spareAdj = gtk.Adjustment(value=nspares,
                                      lower=0,
                                      upper=maxspares,
                                      step_incr=1)
            self.sparesb = gtk.SpinButton(spareAdj, digits=0)
            self.sparesb.set_data("numparts", numparts)

            if maxspares > 0:
                self.sparesb.set_sensitive(1)
            else:
                self.sparesb.set_value(0)
                self.sparesb.set_sensitive(0)
        else:
            self.sparesb = gtk.Label(str(origrequest.spares))

        if not origrequest.exists:
            self.levelcombo = self.createRaidLevelMenu(mdraidlib.raid_levels,
                                                       origrequest.level)
            lbl.set_mnemonic_widget(self.levelcombo)
        else:
            self.levelcombo = gtk.Label(origrequest.level)

        maintable.attach(self.levelcombo, 1, 2, row, row + 1)
        row = row + 1

        # raid members
        lbl = createAlignedLabel(_("_RAID Members:"))
        maintable.attach(lbl, 0, 1, row, row + 1)

        # XXX need to pass in currently used partitions for this device
        (self.raidlist,
         sw) = self.createAllowedRaidPartitionsList(availraidparts,
                                                    origrequest.devices,
                                                    origrequest.exists)

        lbl.set_mnemonic_widget(self.raidlist)
        self.raidlist.set_size_request(275, 80)
        maintable.attach(sw, 1, 2, row, row + 1)
        row = row + 1

        if origrequest.exists:
            self.raidlist.set_sensitive(False)

        # number of spares - created widget above
        lbl = createAlignedLabel(_("Number of _spares:"))
        maintable.attach(lbl, 0, 1, row, row + 1)
        maintable.attach(self.sparesb, 1, 2, row, row + 1)
        lbl.set_mnemonic_widget(self.sparesb)
        row = row + 1

        # format or not?
        self.formatButton = None
        self.fsoptionsDict = {}
        if not format.exists and not origrequest.exists:
            self.formatButton = gtk.CheckButton(_("_Format partition?"))
            if not format.type:
                self.formatButton.set_active(1)
            else:
                self.formatButton.set_active(0)
    # it only makes sense to show this for preexisting RAID
            if origrequest.exists:
                maintable.attach(self.formatButton, 0, 2, row, row + 1)
                row = row + 1

    # checkbutton for encryption using dm-crypt/LUKS
            if origrequest.format.type == "luks":
                self.lukscb.set_active(1)
            else:
                self.lukscb.set_active(0)
            maintable.attach(self.lukscb, 0, 2, row, row + 1)
            row = row + 1
        else:
            (row, self.fsoptionsDict) = createPreExistFSOptionSection(
                origrequest,
                maintable,
                row,
                self.mountCombo,
                self.storage,
                luksdev=luksdev)

        # put main table into dialog
        dialog.vbox.pack_start(maintable)

        dialog.show_all()
        self.dialog = dialog
        return
Beispiel #6
0
    def testMDRaid(self):
        ##
        ## getRaidLevels
        ##
        # pass
        self.assertEqual(mdraid.getRaidLevels(), mdraid.getRaidLevels())

        ##
        ## get_raid_min_members
        ##
        # pass
        self.assertEqual(mdraid.get_raid_min_members(mdraid.RAID0), 2)
        self.assertEqual(mdraid.get_raid_min_members(mdraid.RAID1), 2)
        self.assertEqual(mdraid.get_raid_min_members(mdraid.RAID5), 3)
        self.assertEqual(mdraid.get_raid_min_members(mdraid.RAID6), 4)
        self.assertEqual(mdraid.get_raid_min_members(mdraid.RAID10), 2)

        # fail
        # unsupported raid
        self.assertRaises(ValueError, mdraid.get_raid_min_members, 4)

        ##
        ## get_raid_max_spares
        ##
        # pass
        self.assertEqual(mdraid.get_raid_max_spares(mdraid.RAID0, 5), 0)
        self.assertEqual(mdraid.get_raid_max_spares(mdraid.RAID1, 5), 3)
        self.assertEqual(mdraid.get_raid_max_spares(mdraid.RAID5, 5), 2)
        self.assertEqual(mdraid.get_raid_max_spares(mdraid.RAID6, 5), 1)
        self.assertEqual(mdraid.get_raid_max_spares(mdraid.RAID10, 5), 3)

        # fail
        # unsupported raid
        self.assertRaises(ValueError, mdraid.get_raid_max_spares, 4, 5)

        ##
        ## mdcreate
        ##
        # pass
        self.assertEqual(
            mdraid.mdcreate("/dev/md0", 1, [self._LOOP_DEV0, self._LOOP_DEV1]),
            None)
        # wait for raid to settle
        time.sleep(2)

        # fail
        self.assertRaises(mdraid.MDRaidError, mdraid.mdcreate, "/dev/md1", 1,
                          ["/not/existing/dev0", "/not/existing/dev1"])

        ##
        ## mddeactivate
        ##
        # pass
        self.assertEqual(mdraid.mddeactivate("/dev/md0"), None)

        # fail
        self.assertRaises(mdraid.MDRaidError, mdraid.mddeactivate,
                          "/not/existing/md")

        ##
        ## mdadd
        ##
        # pass
        # TODO

        # fail
        self.assertRaises(mdraid.MDRaidError, mdraid.mdadd,
                          "/not/existing/device")

        ##
        ## mdactivate
        ##
        # pass
        self.assertEqual(
            mdraid.mdactivate("/dev/md0", [self._LOOP_DEV0, self._LOOP_DEV1],
                              super_minor=0), None)
        # wait for raid to settle
        time.sleep(2)

        # fail
        self.assertRaises(mdraid.MDRaidError,
                          mdraid.mdactivate,
                          "/not/existing/md",
                          super_minor=1)
        # requires super_minor or uuid
        self.assertRaises(ValueError, mdraid.mdactivate, "/dev/md1")

        ##
        ## mddestroy
        ##
        # pass
        # deactivate first
        self.assertEqual(mdraid.mddeactivate("/dev/md0"), None)

        self.assertEqual(mdraid.mddestroy(self._LOOP_DEV0), None)
        self.assertEqual(mdraid.mddestroy(self._LOOP_DEV1), None)

        # fail
        # not a component
        self.assertRaises(mdraid.MDRaidError, mdraid.mddestroy, "/dev/md0")
        self.assertRaises(mdraid.MDRaidError, mdraid.mddestroy,
                          "/not/existing/device")
    def testMDRaid(self):
        _LOOP_DEV0 = self._loopMap[self._LOOP_DEVICES[0]]
        _LOOP_DEV1 = self._loopMap[self._LOOP_DEVICES[1]]

        import storage.devicelibs.mdraid as mdraid

        ##
        ## getRaidLevels
        ##
        # pass
        self.assertEqual(mdraid.getRaidLevels(), mdraid.getRaidLevels())

        ##
        ## get_raid_min_members
        ##
        # pass
        self.assertEqual(mdraid.get_raid_min_members(mdraid.RAID0), 2)
        self.assertEqual(mdraid.get_raid_min_members(mdraid.RAID1), 2)
        self.assertEqual(mdraid.get_raid_min_members(mdraid.RAID5), 3)
        self.assertEqual(mdraid.get_raid_min_members(mdraid.RAID6), 4)
        self.assertEqual(mdraid.get_raid_min_members(mdraid.RAID10), 2)

        # fail
        # unsupported raid
        self.assertRaises(ValueError, mdraid.get_raid_min_members, 8)

        ##
        ## get_raid_max_spares
        ##
        # pass
        self.assertEqual(mdraid.get_raid_max_spares(mdraid.RAID0, 5), 0)
        self.assertEqual(mdraid.get_raid_max_spares(mdraid.RAID1, 5), 3)
        self.assertEqual(mdraid.get_raid_max_spares(mdraid.RAID5, 5), 2)
        self.assertEqual(mdraid.get_raid_max_spares(mdraid.RAID6, 5), 1)
        self.assertEqual(mdraid.get_raid_max_spares(mdraid.RAID10, 5), 3)

        # fail
        # unsupported raid
        self.assertRaises(ValueError, mdraid.get_raid_max_spares, 8, 5)

        ##
        ## mdcreate
        ##
        # pass
        self.assertEqual(mdraid.mdcreate("/dev/md0", 1, [_LOOP_DEV0, _LOOP_DEV1]), None)
        # wait for raid to settle
        time.sleep(2)

        # fail
        self.assertRaises(mdraid.MDRaidError, mdraid.mdcreate, "/dev/md1", 1, ["/not/existing/dev0", "/not/existing/dev1"])

        ##
        ## mddeactivate
        ##
        # pass
        self.assertEqual(mdraid.mddeactivate("/dev/md0"), None)

        # fail
        self.assertRaises(mdraid.MDRaidError, mdraid.mddeactivate, "/not/existing/md")

        ##
        ## mdadd
        ##
        # pass
        # TODO

        # fail
        self.assertRaises(mdraid.MDRaidError, mdraid.mdadd, "/not/existing/device")

        ##
        ## mdactivate
        ##
        # pass
        self.assertEqual(mdraid.mdactivate("/dev/md0", [_LOOP_DEV0, _LOOP_DEV1], super_minor=0), None)
        # wait for raid to settle
        time.sleep(2)

        # fail
        self.assertRaises(mdraid.MDRaidError, mdraid.mdactivate, "/not/existing/md", super_minor=1)
        # requires super_minor or uuid
        self.assertRaises(ValueError, mdraid.mdactivate, "/dev/md1")

        ##
        ## mddestroy
        ##
        # pass
        # deactivate first
        self.assertEqual(mdraid.mddeactivate("/dev/md0"), None)

        self.assertEqual(mdraid.mddestroy(_LOOP_DEV0), None)
        self.assertEqual(mdraid.mddestroy(_LOOP_DEV1), None)

        # fail
        # not a component
        self.assertRaises(mdraid.MDRaidError, mdraid.mddestroy, "/dev/md0")
        self.assertRaises(mdraid.MDRaidError, mdraid.mddestroy, "/not/existing/device")
    def __init__(self, storage, intf, parent, origrequest, isNew = 0):
	self.storage = storage
	self.origrequest = origrequest
	self.isNew = isNew
	self.intf = intf
	self.parent = parent

	self.dialog = None

	#
	# start of editRaidRequest
	#
        availraidparts = self.storage.unusedMDMembers(array=self.origrequest)

	# if no raid partitions exist, raise an error message and return
	if len(availraidparts) < 2:
	    dlg = gtk.MessageDialog(self.parent, 0, gtk.MESSAGE_ERROR,
				    gtk.BUTTONS_OK,
				    _("At least two unused software RAID "
				      "partitions are needed to create "
				      "a RAID device.\n\n"
				      "First create at least two partitions "
				      "of type \"software RAID\", and then "
				      "select the \"RAID\" option again."))
	    gui.addFrame(dlg)
	    dlg.show_all()
	    dlg.set_position(gtk.WIN_POS_CENTER)
	    dlg.run()
	    dlg.destroy()
	    return

	if isNew:
	    tstr = _("Make RAID Device")
	else:
	    if origrequest.minor is not None:
		tstr = _("Edit RAID Device: %s") % (origrequest.path,)
	    else:
		tstr = _("Edit RAID Device")
		
	dialog = gtk.Dialog(tstr, self.parent)
	gui.addFrame(dialog)
	dialog.add_button('gtk-cancel', 2)
	dialog.add_button('gtk-ok', 1)
	dialog.set_position(gtk.WIN_POS_CENTER)

	maintable = gtk.Table()
	maintable.set_row_spacings(5)
	maintable.set_col_spacings(5)
	row = 0

        # we'll maybe add this further down
        self.lukscb = gtk.CheckButton(_("_Encrypt"))
        self.lukscb.set_data("formatstate", 1)

        if origrequest.format.type == "luks":
            try:
                luksdev = self.storage.devicetree.getChildren(origrequest)[0]
            except IndexError:
                luksdev = None
                usedev = origrequest
                format = origrequest.format
            else:
                usedev = luksdev
                format = usedev.format
        else:
            luksdev = None
            usedev = origrequest
            format = origrequest.format

	# Mount Point entry
	lbl = createAlignedLabel(_("_Mount Point:"))
	maintable.attach(lbl, 0, 1, row, row + 1)
	self.mountCombo = createMountPointCombo(usedev)
	lbl.set_mnemonic_widget(self.mountCombo)
	maintable.attach(self.mountCombo, 1, 2, row, row + 1)
	row = row + 1

	# Filesystem Type
        if not origrequest.exists:
            lbl = createAlignedLabel(_("_File System Type:"))
            maintable.attach(lbl, 0, 1, row, row + 1)
            self.fstypeCombo = createFSTypeMenu(format,
                                                fstypechangeCB,
                                                self.mountCombo,
                                                ignorefs = ["mdmember", "efi", "prepboot", "appleboot"])
	    lbl.set_mnemonic_widget(self.fstypeCombo)
            maintable.attach(self.fstypeCombo, 1, 2, row, row + 1)
            row += 1
        else:
            maintable.attach(createAlignedLabel(_("Original File System Type:")),
                             0, 1, row, row + 1)
            self.fstypeCombo = gtk.Label(usedev.originalFormat.name)
            maintable.attach(self.fstypeCombo, 1, 2, row, row + 1)
            row += 1

            if getattr(usedev.originalFormat, "label", None):
                maintable.attach(createAlignedLabel(_("Original File System "
                                                      "Label:")),
                                 0, 1, row, row + 1)
                maintable.attach(gtk.Label(usedev.originalFormat.label),
                                 1, 2, row, row + 1)
                row += 1

	# raid minors
	lbl = createAlignedLabel(_("RAID _Device:"))	
	maintable.attach(lbl, 0, 1, row, row + 1)

        if not origrequest.exists:
            availminors = self.storage.unusedMDMinors[:16]
            reqminor = origrequest.minor
            if reqminor is not None and reqminor not in availminors:
                availminors.append(reqminor)

            availminors.sort()
            self.minorCombo = self.createRaidMinorMenu(availminors, reqminor)
	    lbl.set_mnemonic_widget(self.minorCombo)
        else:
            self.minorCombo = gtk.Label("%s" %(origrequest.name,))
	maintable.attach(self.minorCombo, 1, 2, row, row + 1)
	row = row + 1

	# raid level
	lbl = createAlignedLabel(_("RAID _Level:"))
	maintable.attach(lbl, 0, 1, row, row + 1)

        if not origrequest.exists:
            # Create here, pack below
            numparts =  len(availraidparts)
            if origrequest.spares:
                nspares = origrequest.spares
            else:
                nspares = 0

            if origrequest.level:
                maxspares = mdraidlib.get_raid_max_spares(origrequest.level,
                                                          numparts)
            else:
                maxspares = 0

            spareAdj = gtk.Adjustment(value = nspares, lower = 0,
                                      upper = maxspares, step_incr = 1)
            self.sparesb = gtk.SpinButton(spareAdj, digits = 0)
            self.sparesb.set_data("numparts", numparts)

            if maxspares > 0:
                self.sparesb.set_sensitive(1)
            else:
                self.sparesb.set_value(0)
                self.sparesb.set_sensitive(0)
        else:
            self.sparesb = gtk.Label(str(origrequest.spares))


        if not origrequest.exists:
            self.levelcombo = self.createRaidLevelMenu(mdraidlib.raid_levels,
                                                       origrequest.level)
	    lbl.set_mnemonic_widget(self.levelcombo)
        else:
            self.levelcombo = gtk.Label(origrequest.level)

	maintable.attach(self.levelcombo, 1, 2, row, row + 1)
	row = row + 1

	# raid members
	lbl=createAlignedLabel(_("_RAID Members:"))
	maintable.attach(lbl, 0, 1, row, row + 1)

	# XXX need to pass in currently used partitions for this device
	(self.raidlist, sw) = self.createAllowedRaidPartitionsList(availraidparts,
                                                                   origrequest.devices,
                                                                   origrequest.exists)

	lbl.set_mnemonic_widget(self.raidlist)
	self.raidlist.set_size_request(275, 80)
	maintable.attach(sw, 1, 2, row, row + 1)
	row = row + 1

        if origrequest.exists:
            self.raidlist.set_sensitive(False)

	# number of spares - created widget above
	lbl = createAlignedLabel(_("Number of _spares:"))
	maintable.attach(lbl, 0, 1, row, row + 1)
	maintable.attach(self.sparesb, 1, 2, row, row + 1)
	lbl.set_mnemonic_widget(self.sparesb)
	row = row + 1

	# format or not?
	self.formatButton = None
	self.fsoptionsDict = {}
	if not format.exists and not origrequest.exists:
	    self.formatButton = gtk.CheckButton(_("_Format partition?"))
	    if not format.type:
		self.formatButton.set_active(1)
	    else:
		self.formatButton.set_active(0)
            # it only makes sense to show this for preexisting RAID
            if origrequest.exists:
                maintable.attach(self.formatButton, 0, 2, row, row + 1)
                row = row + 1

            # checkbutton for encryption using dm-crypt/LUKS
            if origrequest.format.type == "luks":
                self.lukscb.set_active(1)
            else:
                self.lukscb.set_active(0)
            maintable.attach(self.lukscb, 0, 2, row, row + 1)
            row = row + 1
	else:
	    (row, self.fsoptionsDict) = createPreExistFSOptionSection(origrequest, maintable, row, self.mountCombo, self.storage, luksdev=luksdev)

	# put main table into dialog
	dialog.vbox.pack_start(maintable)

	dialog.show_all()
	self.dialog = dialog
	return