[PATCH] Really hide and show passphrase warnings (#1162828)
by David Shea
This prevents the failure image and message from being displayed if the
checks pass before show_all is called on the dialog.
---
pyanaconda/ui/gui/spokes/lib/passphrase.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/lib/passphrase.py b/pyanaconda/ui/gui/spokes/lib/passphrase.py
index 064d0a5..89c2c64 100644
--- a/pyanaconda/ui/gui/spokes/lib/passphrase.py
+++ b/pyanaconda/ui/gui/spokes/lib/passphrase.py
@@ -28,6 +28,7 @@ from pyanaconda.ui.gui import GUIObject
from pyanaconda.ui.gui.helpers import GUIInputCheckHandler
from pyanaconda.constants import PW_ASCII_CHARS
from pyanaconda.i18n import _, N_
+from pyanaconda.ui.gui.utils import really_hide, really_show
__all__ = ["PassphraseDialog"]
@@ -137,11 +138,11 @@ class PassphraseDialog(GUIObject, GUIInputCheckHandler):
result_icon, result_message = failed_check.check_status
self._passphrase_warning_image.set_from_icon_name(result_icon, Gtk.IconSize.BUTTON)
self._passphrase_warning_label.set_text(result_message)
- self._passphrase_warning_image.set_visible(True)
- self._passphrase_warning_label.set_visible(True)
+ really_show(self._passphrase_warning_image)
+ really_show(self._passphrase_warning_label)
else:
- self._passphrase_warning_image.set_visible(False)
- self._passphrase_warning_label.set_visible(False)
+ really_hide(self._passphrase_warning_image)
+ really_hide(self._passphrase_warning_label)
# The save button should only be sensitive if the match check passes
if self._passphrase_match_check.check_status == InputCheck.CHECK_OK and \
--
2.1.0
9 years, 5 months
[blivet:rhel7-master 0/6] #1090009 related patches (v3)
by Anne Mulhern
This set is slightly lighter weight than (v2).
The big difference in the final patch is that it attempts to re-get the
udev info if the essential info is not available instead of if the array
is inactive. This actually makes a little more sense and leaves out
the necessity of having a separate method for reading the array state.
Still think that it would be sensible to have a generic facility for reading
from files in sysfs/md directory and getting info about the array that way.
But since we don't need anything about that in this version of the patch
set I'm leaving that problem alone for now.
The method tagged w/ bz are for both, those without are just for master.
mulhern (6):
Change _matchNames so that it is less restrictive
Substitute simple value for single element array.
Change allow_degraded_mdraid flag to allow_imperfect_devices
(#1090009)
Add mdrun method to just start, not assemble, an array. (#1090009)
Add a method that looks at DEVNAME (#1090009)
If allowing degraded array, attempt to start it (#1090009)
blivet/devicelibs/mdraid.py | 14 ++++++++
blivet/devicetree.py | 46 +++++++++++++++++-------
blivet/flags.py | 4 +--
blivet/udev.py | 3 ++
tests/devicelibs_test/mdraid_interrogate_test.py | 20 +++--------
5 files changed, 57 insertions(+), 30 deletions(-)
--
1.9.3
9 years, 5 months
[PATCH] rpmostreepayload: Rework remote add handling
by Colin Walters
**NOTE** This will break rpmostreepayload unless you have
a version of ostree later than 2014.12 with
https://git.gnome.org/browse/ostree/commit/?id=f6a6e68412c9f1be2b5de1ded7...
OSTree's handling of remotes is a bit funky, because it supports
non-root operation, where the remotes are stored in the repo config,
and historically that was the only supported method.
But more recently, support for /etc/ostree/remotes.d was added; it's a
lot friendlier to system administrators for the special case of the
system repository /ostree/repo.
However for Anaconda, there's a bootstrapping problem as that
directory doesn't yet exist when we're doing an install. And we
(fortunately) don't even try to write there because OSTree doesn't
understand that /mnt/sysimage/ostree/repo is a system repository.
The goal is for the remote to end up in /etc/ostree/remotes.d, so to
do that unfortunately involves the complex dance in this patch.
---
pyanaconda/packaging/rpmostreepayload.py | 54 +++++++++++++++++++++++++-------
1 file changed, 42 insertions(+), 12 deletions(-)
9 years, 5 months
[rhel6-branch] Write new options to zipl.conf (#1171053)
by Samantha N. Bueno
This is a backport of 0a7d09ae, which sets two variables in zipl.conf
since zipl will now provide functionality appropriate for this.
Thanks to Dan Horák <dan(a)danny.cz> for the original patch.
Resolves: rhbz#1171053
---
booty/s390.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/booty/s390.py b/booty/s390.py
index 97597b3..6773dc6 100644
--- a/booty/s390.py
+++ b/booty/s390.py
@@ -145,6 +145,7 @@ class s390BootloaderInfo(bootloaderInfo):
f = open(instRoot + cf, "w+")
f.write('[defaultboot]\n')
+ f.write('defaultauto\nprompt=1\n')
if self.timeout:
f.write('timeout=%d\n' % self.timeout)
defaultList = filter(lambda x: not (x[0].endswith('debug') or x[0].endswith('kdump')), kernelList)
--
1.8.3.1
9 years, 5 months
[PATCH 1/4] Move the pykickstart version test into a different subdirectory.
by Chris Lumens
It's not really a kickstart test - it's a test of whether pykickstart and
pyanaconda are synced up. Thus, it belongs in pyanaconda_tests.
---
tests/kickstart_tests/version_test.py | 79 -------------------------------
tests/pyanaconda_tests/ks_version_test.py | 79 +++++++++++++++++++++++++++++++
2 files changed, 79 insertions(+), 79 deletions(-)
delete mode 100644 tests/kickstart_tests/version_test.py
create mode 100644 tests/pyanaconda_tests/ks_version_test.py
diff --git a/tests/kickstart_tests/version_test.py b/tests/kickstart_tests/version_test.py
deleted file mode 100644
index 84fa384..0000000
--- a/tests/kickstart_tests/version_test.py
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2013 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published
-# by the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Author: Chris Lumens <clumens(a)redhat.com>
-from mock import Mock
-import unittest
-import os
-
-class BaseTestCase(unittest.TestCase):
- def setUp(self):
- import sys
-
- sys.modules["anaconda_log"] = Mock()
- sys.modules["block"] = Mock()
-
- from pyanaconda import kickstart
- import pykickstart.version
-
- self.handler = pykickstart.version.makeVersion(kickstart.superclass.version)
- self._commandMap = kickstart.commandMap
- self._dataMap = kickstart.dataMap
-
-# Verify that each kickstart command in anaconda uses the correct version of
-# that command as provided by pykickstart. That is, if there's an FC3 and an
-# F10 version of a command, make sure anaconda >= F10 uses the F10 version.
-class CommandVersionTestCase(BaseTestCase):
- def commands_test(self):
- """Test that anaconda uses the right versions of kickstart commands"""
- for (commandName, commandObj) in self._commandMap.iteritems():
- pykickstartClass = self.handler.commands[commandName].__class__
- self.assertIsInstance(commandObj(), pykickstartClass)
-
-# Do the same thing as CommandVersionTestCase, but for data objects.
-class DataVersionTestCase(BaseTestCase):
- def data_test(self):
- """Test that anaconda uses the right versions of kickstart data"""
- for (dataName, dataObj) in self._dataMap.iteritems():
- # pykickstart does not expose data objects as a mapping the way
- # it does command objects.
- pykickstartClass = eval("self.handler.%s" % dataName)
- self.assertIsInstance(dataObj(), pykickstartClass)
-
-# Copy the commands tests but with the command map from dracut/parse-kickstart
-class DracutCommandVersionTestCase(CommandVersionTestCase):
- def setUp(self):
- CommandVersionTestCase.setUp(self)
-
- # top_srcdir should have been set by nosetests.sh. If it wasn't, the KeyError
- # will fail the test.
- parse_kickstart_path = os.path.join(os.environ['top_srcdir'], 'dracut', 'parse-kickstart')
-
- import tempfile
- with tempfile.NamedTemporaryFile() as parse_temp:
- # Compile the file manually to a tempfile so that the import doesn't automatically
- # crud up the source directory with parse-kickstartc
- import py_compile
- parse_temp = tempfile.NamedTemporaryFile()
- py_compile.compile(parse_kickstart_path, parse_temp.name)
-
- # Use imp to pretend that hyphens are ok for module names
- import imp
- parse_module = imp.load_module('parse_kickstart', parse_temp.file,
- parse_temp.name, ('', 'r', imp.PY_COMPILED))
-
- self._commandMap = parse_module.dracutCmds
diff --git a/tests/pyanaconda_tests/ks_version_test.py b/tests/pyanaconda_tests/ks_version_test.py
new file mode 100644
index 0000000..84fa384
--- /dev/null
+++ b/tests/pyanaconda_tests/ks_version_test.py
@@ -0,0 +1,79 @@
+#!/usr/bin/python
+#
+# Copyright (C) 2013 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published
+# by the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Chris Lumens <clumens(a)redhat.com>
+from mock import Mock
+import unittest
+import os
+
+class BaseTestCase(unittest.TestCase):
+ def setUp(self):
+ import sys
+
+ sys.modules["anaconda_log"] = Mock()
+ sys.modules["block"] = Mock()
+
+ from pyanaconda import kickstart
+ import pykickstart.version
+
+ self.handler = pykickstart.version.makeVersion(kickstart.superclass.version)
+ self._commandMap = kickstart.commandMap
+ self._dataMap = kickstart.dataMap
+
+# Verify that each kickstart command in anaconda uses the correct version of
+# that command as provided by pykickstart. That is, if there's an FC3 and an
+# F10 version of a command, make sure anaconda >= F10 uses the F10 version.
+class CommandVersionTestCase(BaseTestCase):
+ def commands_test(self):
+ """Test that anaconda uses the right versions of kickstart commands"""
+ for (commandName, commandObj) in self._commandMap.iteritems():
+ pykickstartClass = self.handler.commands[commandName].__class__
+ self.assertIsInstance(commandObj(), pykickstartClass)
+
+# Do the same thing as CommandVersionTestCase, but for data objects.
+class DataVersionTestCase(BaseTestCase):
+ def data_test(self):
+ """Test that anaconda uses the right versions of kickstart data"""
+ for (dataName, dataObj) in self._dataMap.iteritems():
+ # pykickstart does not expose data objects as a mapping the way
+ # it does command objects.
+ pykickstartClass = eval("self.handler.%s" % dataName)
+ self.assertIsInstance(dataObj(), pykickstartClass)
+
+# Copy the commands tests but with the command map from dracut/parse-kickstart
+class DracutCommandVersionTestCase(CommandVersionTestCase):
+ def setUp(self):
+ CommandVersionTestCase.setUp(self)
+
+ # top_srcdir should have been set by nosetests.sh. If it wasn't, the KeyError
+ # will fail the test.
+ parse_kickstart_path = os.path.join(os.environ['top_srcdir'], 'dracut', 'parse-kickstart')
+
+ import tempfile
+ with tempfile.NamedTemporaryFile() as parse_temp:
+ # Compile the file manually to a tempfile so that the import doesn't automatically
+ # crud up the source directory with parse-kickstartc
+ import py_compile
+ parse_temp = tempfile.NamedTemporaryFile()
+ py_compile.compile(parse_kickstart_path, parse_temp.name)
+
+ # Use imp to pretend that hyphens are ok for module names
+ import imp
+ parse_module = imp.load_module('parse_kickstart', parse_temp.file,
+ parse_temp.name, ('', 'r', imp.PY_COMPILED))
+
+ self._commandMap = parse_module.dracutCmds
--
1.9.3
9 years, 5 months
[PATCH] Unsetup the payload on the way out of anaconda (#1164577)
by David Shea
For yum and dnf payloads this does nothing of note. For live, this
unmounts the live image so you can run anaconda again.
---
anaconda | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/anaconda b/anaconda
index 27b82ed..80b39f6 100755
--- a/anaconda
+++ b/anaconda
@@ -81,6 +81,10 @@ def exitHandler(rebootData, storage):
uninhibit_screensaver(anaconda.dbus_session_connection, anaconda.dbus_inhibit_id)
anaconda.dbus_inhibit_id = None
+ # Unsetup the payload, which most usefully unmounts live images
+ if anaconda.payload:
+ anaconda.payload.unsetup()
+
# Clean up the PID file
if pidfile_created:
os.unlink(pidfile_path)
--
2.1.0
9 years, 5 months
[master] Fix various issues in the Datetime spoke
by Vratislav Podzimek
This fixes issues with hours decrementing when any time-setting button is
clicked, setting time to 00:XX or XX:00 not working and generally a stupid idea
to use a timer ID to determine something that looks totally unrelated.
Vratislav Podzimek (3):
Use a flag to determine if the datetime spoke is shown
Fix the last member of the struct_time struct
Beware of 0 being the same bool value as None when setting time
pyanaconda/isys/__init__.py | 23 ++++++++++-------------
pyanaconda/ui/gui/spokes/datetime_spoke.py | 14 ++++++++++----
2 files changed, 20 insertions(+), 17 deletions(-)
--
2.1.0
9 years, 5 months
[pykickstart] Add support for setting user account ssh key
by Brian C. Lane
This adds the sshkey --username=<user> "ssh key" command.
This is used to set the ssh key for users on the installed system.
---
pykickstart/commands/__init__.py | 4 +-
pykickstart/commands/sshkey.py | 99 ++++++++++++++++++++++++++++++++++++++++
pykickstart/handlers/f22.py | 2 +
tests/commands/sshkey.py | 41 +++++++++++++++++
4 files changed, 144 insertions(+), 2 deletions(-)
create mode 100644 pykickstart/commands/sshkey.py
create mode 100644 tests/commands/sshkey.py
diff --git a/pykickstart/commands/__init__.py b/pykickstart/commands/__init__.py
index b27546a..dfd492d 100644
--- a/pykickstart/commands/__init__.py
+++ b/pykickstart/commands/__init__.py
@@ -23,5 +23,5 @@ from pykickstart.commands import \
group, harddrive, ignoredisk, interactive, iscsi, iscsiname, key, keyboard, lang, \
langsupport, lilocheck, liveimg, logging, logvol, mediacheck, method, monitor, \
mouse, multipath, network, nfs, ostreesetup, partition, raid, realm, reboot, repo, \
- rescue, rootpw, selinux, services, skipx, sshpw, timezone, updates, upgrade, url, \
- user, unsupported_hardware, vnc, volgroup, xconfig, zerombr, zfcp
+ rescue, rootpw, selinux, services, skipx, sshpw, sshkey, timezone, updates, upgrade, \
+ url, user, unsupported_hardware, vnc, volgroup, xconfig, zerombr, zfcp
diff --git a/pykickstart/commands/sshkey.py b/pykickstart/commands/sshkey.py
new file mode 100644
index 0000000..b470c28
--- /dev/null
+++ b/pykickstart/commands/sshkey.py
@@ -0,0 +1,99 @@
+#
+# Brian C. Lane <bcl(a)redhat.com>
+#
+# Copyright 2014 Red Hat, Inc.
+#
+# This copyrighted material is made available to anyone wishing to use, modify,
+# copy, or redistribute it subject to the terms and conditions of the GNU
+# General Public License v.2. This program is distributed in the hope that it
+# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
+# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 51
+# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
+# trademarks that are incorporated in the source code or documentation are not
+# subject to the GNU General Public License and may only be used or replicated
+# with the express permission of Red Hat, Inc.
+#
+from pykickstart.base import BaseData, KickstartCommand
+from pykickstart.errors import KickstartValueError, formatErrorMsg
+from pykickstart.options import KSOptionParser
+import warnings
+
+import gettext
+_ = lambda x: gettext.ldgettext("pykickstart", x)
+
+class F22_SshKeyData(BaseData):
+ removedKeywords = BaseData.removedKeywords
+ removedAttrs = BaseData.removedAttrs
+
+ def __init__(self, *args, **kwargs):
+ BaseData.__init__(self, *args, **kwargs)
+ self.username = kwargs.get("username", None)
+ self.key = kwargs.get("key", "")
+
+ def __eq__(self, y):
+ if not y:
+ return False
+
+ return self.username == y.username
+
+ def __ne__(self, y):
+ return not self == y
+
+ def __str__(self):
+ retval = BaseData.__str__(self)
+
+ retval += "sshkey"
+ retval += self._getArgsAsStr() + '\n'
+
+ return retval
+
+ def _getArgsAsStr(self):
+ retval = ""
+
+ retval += " --username=%s" % self.username
+ retval += ' "%s"' % self.key
+ return retval
+
+class F22_SshKey(KickstartCommand):
+ removedKeywords = KickstartCommand.removedKeywords
+ removedAttrs = KickstartCommand.removedAttrs
+
+ def __init__(self, writePriority=0, *args, **kwargs):
+ KickstartCommand.__init__(self, writePriority, *args, **kwargs)
+ self.op = self._getParser()
+
+ self.sshUserList = kwargs.get("sshUserList", [])
+
+ def __str__(self):
+ retval = ""
+ for user in self.sshUserList:
+ retval += user.__str__()
+
+ return retval
+
+ def _getParser(self):
+ op = KSOptionParser()
+ op.add_option("--username", dest="username", required=True)
+ return op
+
+ def parse(self, args):
+ ud = self.handler.SshKeyData()
+ (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
+ self._setToObj(self.op, opts, ud)
+ ud.lineno = self.lineno
+
+ if len(extra) != 1:
+ raise KickstartValueError(formatErrorMsg(self.lineno, msg=_("A single argument is expected for the %s command") % "sshkey"))
+ ud.key = extra[0]
+
+ if ud in self.dataList():
+ warnings.warn(_("An ssh user with the name %s has already been defined.") % ud.name)
+
+ return ud
+
+ def dataList(self):
+ return self.sshUserList
diff --git a/pykickstart/handlers/f22.py b/pykickstart/handlers/f22.py
index ceb4131..603dbc9 100644
--- a/pykickstart/handlers/f22.py
+++ b/pykickstart/handlers/f22.py
@@ -77,6 +77,7 @@ class F22Handler(BaseHandler):
"shutdown": commands.reboot.F18_Reboot,
"skipx": commands.skipx.FC3_SkipX,
"sshpw": commands.sshpw.F13_SshPw,
+ "sshkey": commands.sshkey.F22_SshKey,
"text": commands.displaymode.FC3_DisplayMode,
"timezone": commands.timezone.F18_Timezone,
"updates": commands.updates.F7_Updates,
@@ -105,6 +106,7 @@ class F22Handler(BaseHandler):
"RaidData": commands.raid.F18_RaidData,
"RepoData": commands.repo.F21_RepoData,
"SshPwData": commands.sshpw.F13_SshPwData,
+ "SshKeyData": commands.sshkey.F22_SshKeyData,
"UserData": commands.user.F19_UserData,
"VolGroupData": commands.volgroup.F21_VolGroupData,
"ZFCPData": commands.zfcp.F14_ZFCPData,
diff --git a/tests/commands/sshkey.py b/tests/commands/sshkey.py
new file mode 100644
index 0000000..f419b18
--- /dev/null
+++ b/tests/commands/sshkey.py
@@ -0,0 +1,41 @@
+#
+# Brian C. Lane <bcl(a)redhat.com>
+#
+# Copyright 2014 Red Hat, Inc.
+#
+# This copyrighted material is made available to anyone wishing to use, modify,
+# copy, or redistribute it subject to the terms and conditions of the GNU
+# General Public License v.2. This program is distributed in the hope that it
+# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
+# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 51
+# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
+# trademarks that are incorporated in the source code or documentation are not
+# subject to the GNU General Public License and may only be used or replicated
+# with the express permission of Red Hat, Inc.
+#
+import unittest
+from tests.baseclass import *
+
+from pykickstart.errors import *
+from pykickstart.commands.rootpw import *
+
+class F22_TestCase(CommandTest):
+ command = "sshkey"
+ key = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJGDmFSzIWSvnFYhExf+FbzSiZxsoohJdrKlmPKQhdts8nSg5PH7jyG5X+w6RgWhSetlD3WouKoo3zFOR5nCYq4= bcl(a)notae.us"
+
+ def runTest(self):
+ # pass
+ self.assert_parse('sshkey --username=root "%s"' % self.key, 'sshkey --username=root "%s"\n' % self.key)
+
+ # fail
+ self.assert_parse_error("sshkey", KickstartValueError)
+ self.assert_parse_error("sshkey --foo", KickstartParseError)
+ self.assert_parse_error("sshkey --username", KickstartParseError)
+ self.assert_parse_error("sshkey --username=root", KickstartValueError)
+
+if __name__ == "__main__":
+ unittest.main()
--
1.9.3
9 years, 5 months
[master/rhel7-branch 2/2] Fix the way we create the list of DASDs needing dasdfmt. (#1073982)
by Samantha N. Bueno
selected_disks is nice and all, but if you don't explicitly state in
your ks file which disks you're using (in other words, use them all),
selected_disks is always going to be an empty list. Then if any of
them need dasdfmt, they won't get it, since we pass selected_disks
to the function determining which DASDs need dasdfmt.
So, just pass storage.devicetree to determine which DASDs need
dasdfmt--this is what's done in the GUI also. Yet another TUI
discrepancy done away with.
Related: rhbz#1073982
---
pyanaconda/ui/tui/spokes/storage.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/tui/spokes/storage.py b/pyanaconda/ui/tui/spokes/storage.py
index 718e1f6..528d371 100644
--- a/pyanaconda/ui/tui/spokes/storage.py
+++ b/pyanaconda/ui/tui/spokes/storage.py
@@ -84,7 +84,7 @@ class StorageSpoke(NormalTUISpoke):
if self.data.zerombr.zerombr and arch.isS390():
# if zerombr is specified in a ks file and there are unformatted
# dasds, automatically format them
- to_format = make_unformatted_dasd_list(self.selected_disks)
+ to_format = make_unformatted_dasd_list(d.name for d in getDisks(self.storage.devicetree))
if to_format:
self.run_dasdfmt(to_format)
--
1.8.3.1
9 years, 5 months
[blivet:master 0/3] Splitting MDRaidArrayDevice in sub-hierarchy
by Anne Mulhern
The first patch is much like it was last time I posted it, just a bit
rebased. I've added a few checks in the MDRaidArrayDevice constructor
that should catch misuses of the super-class constructor when it's a
subclass constructor that's actually wanted.
The second two patches try to dispatch to the appropriate constructor in
the places where that seems required.
mulhern (3):
Factor out MDRaidArrayDevice w/ type in ("mdcontainer",
"mdbiosraidarray")
Change MDRaidArrayDevice to MDBiosRaidArrayDevice.
Distinguish among desired MD*Device constructors in newMDArray().
blivet/__init__.py | 16 +-
blivet/devicelibs/mdraid.py | 2 +-
blivet/devices/__init__.py | 2 +-
blivet/devices/container.py | 18 +--
blivet/devices/md.py | 189 +++++++++++++++--------
blivet/devicetree.py | 5 +-
tests/devicelibs_test/mdraid_interrogate_test.py | 4 +-
tests/devicelibs_test/mdraid_test.py | 1 -
tests/devices_test.py | 14 +-
9 files changed, 158 insertions(+), 93 deletions(-)
--
1.9.3
9 years, 5 months