[PATCH] (v2) Add support ford iSCSI iface binding.
by Radek Vykydal
In v2:
- added keyboard access to bind checkbutton
- configration of iscsi ifaces moved to _discovery (worker thread)
- bind checkbutton made insensitive during discovery
---
pyanaconda/ui/gui/spokes/advstorage/iscsi.glade | 30 +++++++++++++++++++++++++
pyanaconda/ui/gui/spokes/advstorage/iscsi.py | 27 ++++++++++++++++++----
2 files changed, 53 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/advstorage/iscsi.glade b/pyanaconda/ui/gui/spokes/advstorage/iscsi.glade
index 34b0c41..abe5d1e 100644
--- a/pyanaconda/ui/gui/spokes/advstorage/iscsi.glade
+++ b/pyanaconda/ui/gui/spokes/advstorage/iscsi.glade
@@ -643,6 +643,23 @@
</object>
<packing>
<property name="left_attach">0</property>
+ <property name="top_attach">7</property>
+ <property name="width">3</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="bindCheckbutton">
+ <property name="label" translatable="yes">_Bind targets to network interfaces</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
<property name="top_attach">6</property>
<property name="width">3</property>
<property name="height">1</property>
@@ -720,6 +737,17 @@
</child>
</object>
</child>
+ <child>
+ <object class="GtkTreeViewColumn" id="treeviewcolumn1">
+ <property name="title" translatable="yes">Interface</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext1"/>
+ <attributes>
+ <attribute name="text">3</attribute>
+ </attributes>
+ </child>
+ </object>
+ </child>
</object>
</child>
</object>
@@ -1247,6 +1275,8 @@
<column type="gboolean"/>
<!-- column-name nodeName -->
<column type="gchararray"/>
+ <!-- column-name nodeIface -->
+ <column type="gchararray"/>
</columns>
</object>
<object class="GtkTreeModelFilter" id="nodeStoreFiltered">
diff --git a/pyanaconda/ui/gui/spokes/advstorage/iscsi.py b/pyanaconda/ui/gui/spokes/advstorage/iscsi.py
index 54d79a0..4aae41e 100644
--- a/pyanaconda/ui/gui/spokes/advstorage/iscsi.py
+++ b/pyanaconda/ui/gui/spokes/advstorage/iscsi.py
@@ -26,6 +26,7 @@ from gi.repository import GLib, Gtk
from pyanaconda import constants
from pyanaconda.threads import threadMgr, AnacondaThread
from pyanaconda.ui.gui import GUIObject
+from pyanaconda import nm
import gettext
_ = lambda x: gettext.ldgettext("anaconda", x)
@@ -40,7 +41,7 @@ Credentials = namedtuple("Credentials", ["style",
"targetIP", "initiator", "username",
"password", "rUsername", "rPassword"])
-NodeStoreRow = namedtuple("NodeStoreRow", ["selected", "notLoggedIn", "name"])
+NodeStoreRow = namedtuple("NodeStoreRow", ["selected", "notLoggedIn", "name", "iface"])
def discover_no_credentials(builder):
return Credentials._make([STYLE_NONE,
@@ -134,6 +135,10 @@ class ISCSIDialog(GUIObject):
self._configureGrid = self.builder.get_object("configureGrid")
self._conditionNotebook = self.builder.get_object("conditionNotebook")
+ self._bindCheckbox = self.builder.get_object("bindCheckbutton")
+ self._bindCheckbox.set_active(bool(self.iscsi.ifaces))
+ self._bindCheckbox.set_sensitive(self.iscsi.mode == "none")
+
self._startButton = self.builder.get_object("startButton")
self._okButton = self.builder.get_object("okButton")
self._cancelButton = self.builder.get_object("cancelButton")
@@ -171,13 +176,22 @@ class ISCSIDialog(GUIObject):
# in order to set the Start button sensitivity.
self.on_discover_field_changed()
- def _discover(self, credentials):
+ def _discover(self, credentials, bind):
# This needs to be in its own thread, not marked with gtk_action_* because it's
# called from on_start_clicked, which is in the GTK main loop. Those decorators
# won't do anything special in that case.
if not self.iscsi.initiatorSet:
self.iscsi.initiator = credentials.initiator
+ # interfaces created here affect nodes that iscsi.discover would return
+ if self.iscsi.mode == "none" and not bind:
+ self.iscsi.delete_interfaces()
+ elif (self.iscsi.mode == "bind"
+ or self.iscsi.mode == "none" and bind):
+ activated = set(nm.nm_activated_devices())
+ created = set(self.iscsi.ifaces.values())
+ self.iscsi.create_interfaces(activated - created)
+
try:
self._discoveredNodes = self.iscsi.discover(credentials.targetIP,
username=credentials.username,
@@ -223,6 +237,8 @@ class ISCSIDialog(GUIObject):
for child in self._configureGrid.get_children():
if child == self._initiatorEntry:
self._initiatorEntry.set_sensitive(not self.iscsi.initiatorSet)
+ elif child == self._bindCheckbox:
+ self._bindCheckbox.set_sensitive(sensitivity and self.iscsi.mode == "none")
elif child != self._conditionNotebook:
child.set_sensitive(sensitivity)
@@ -243,11 +259,13 @@ class ISCSIDialog(GUIObject):
discoveredLabel.set_markup(discoveredLabel.get_label() % {"initiatorName": credentials.initiator,
"targetAddress": credentials.targetIP})
+ bind = self._bindCheckbox.get_active()
+
spinner = self.builder.get_object("waitSpinner")
spinner.start()
threadMgr.add(AnacondaThread(name=constants.THREAD_ISCSI_DISCOVER, target=self._discover,
- args=(credentials,)))
+ args=(credentials, bind)))
GLib.timeout_add(250, self._check_discover)
# When the initiator name, ip address, and any auth fields are filled in
@@ -281,7 +299,8 @@ class ISCSIDialog(GUIObject):
def _add_nodes(self, nodes):
for node in nodes:
- self._store.append([False, True, node.name])
+ iface = self.iscsi.ifaces.get(node.iface, node.iface)
+ self._store.append([False, True, node.name, iface])
# We should select the first node by default.
self._store[0][0] = True
--
1.7.11.7
11 years, 1 month
[PATCH 01/11] Add a button to bring up the Add Additional dialogs.
by Chris Lumens
---
pyanaconda/ui/gui/spokes/filter.glade | 31 +++++++++++++++++++++++++++++++
pyanaconda/ui/gui/spokes/filter.py | 5 +++++
2 files changed, 36 insertions(+)
diff --git a/pyanaconda/ui/gui/spokes/filter.glade b/pyanaconda/ui/gui/spokes/filter.glade
index 836a76d..cde4c80 100644
--- a/pyanaconda/ui/gui/spokes/filter.glade
+++ b/pyanaconda/ui/gui/spokes/filter.glade
@@ -90,6 +90,7 @@
<object class="GtkNotebook" id="advancedNotebook">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="vexpand">True</property>
<signal name="switch-page" handler="on_page_switched" swapped="no"/>
<child>
<object class="GtkGrid" id="searchGrid">
@@ -1216,11 +1217,41 @@
</object>
<packing>
<property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="addAdditionalCombo">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ <property name="hexpand">True</property>
+ <property name="active">0</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ <items>
+ <item translatable="yes">Add Additional Targets</item>
+ <item translatable="yes">Add iSCSI Target...</item>
+ <item translatable="yes">Add FCoE SAN...</item>
+ <item translatable="yes">Add ZFCP LUN...</item>
+ </items>
+ <signal name="changed" handler="on_add_additional_changed" swapped="no"/>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="expand">False</property>
diff --git a/pyanaconda/ui/gui/spokes/filter.py b/pyanaconda/ui/gui/spokes/filter.py
index f093704..1c1be28 100644
--- a/pyanaconda/ui/gui/spokes/filter.py
+++ b/pyanaconda/ui/gui/spokes/filter.py
@@ -310,10 +310,12 @@ class FilterSpoke(NormalSpoke):
RaidPage(self.storage, self.builder),
ZPage(self.storage, self.builder)]
+ self._addAdditionalCombo = self.builder.get_object("addAdditionalCombo")
self._notebook = self.builder.get_object("advancedNotebook")
if not arch.isS390():
self._notebook.remove_page(-1)
+ self._addAdditionalCombo.remove(3)
self._store = self.builder.get_object("diskStore")
self._addDisksButton = self.builder.get_object("addDisksButton")
@@ -426,6 +428,9 @@ class FilterSpoke(NormalSpoke):
self._update_summary()
+ def on_add_additional_changed(self, *args):
+ pass
+
##
## SEARCH TAB SIGNAL HANDLERS
##
--
1.8.1.2
11 years, 1 month
[PATCH] Language Support spoke
by Radek Vykydal
Kickstart command lang is extended with --addsupport option for
specifying additional (to ksdata.lang.lang) language support to be
installed (ksdata.lang.addsupport).
In the spoke GUI, ksdata.lang.lang (system lang) is selected and
grayed-out (insensitive).
Selected (using checkbox) languages are displayed in bold, the list is
searchable in the same way as the welcome spoke list. Currently only
available translations for installer (the same as in welcome spoke) are
in the list.
screencast:
http://rvykydal.fedorapeople.org/langsupport.ogg
11 years, 1 month
[master][PATCH] Handle both types of data we can get from libxklavier (#950921)
by Vratislav Podzimek
Since we have to work with multiple versions of libxklavier (Fedora, RHEL, ...)
that may be built with various versions of introspection-generating tools, we
should both types of data we can get.
I still hope the change that caused we get list of integers instead of a string
will be reverted one day.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/keyboard.py | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/keyboard.py b/pyanaconda/keyboard.py
index eae0508..be33314 100755
--- a/pyanaconda/keyboard.py
+++ b/pyanaconda/keyboard.py
@@ -32,6 +32,7 @@ keymaps.
"""
+import types
import os
from pyanaconda import iutil
from pyanaconda.safe_dbus import dbus_call_safe_sync, dbus_get_property_safe_sync
@@ -295,8 +296,16 @@ def activate_keyboard(keyboard):
def item_str(s):
"""Convert a zero-terminated byte array to a proper str"""
- i = s.index(0)
- s = "".join(chr(char) for char in s[:i] if char in xrange(256))
+ # depending of version of libxklavier and the tools generating introspection
+ # data the value of 's' can be either byte string or list of integers
+ if type(s) == types.StringType:
+ i = s.find(b'\x00')
+ s = s[:i]
+ elif type(s) == types.ListType:
+ # XXX: this is the wrong case that should be fixed (rhbz#920595)
+ i = s.index(0)
+ s = "".join(chr(char) for char in s[:i] if char in xrange(256))
+
return s.decode("utf-8") #there are some non-ascii layout descriptions
class _Layout(object):
--
1.7.11.7
11 years, 1 month
[PATCH 1/2] Fix getting dracut setup args from dasd.conf. (#950964)
by David Lehman
---
blivet/devices.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/blivet/devices.py b/blivet/devices.py
index 74015a2..f289410 100644
--- a/blivet/devices.py
+++ b/blivet/devices.py
@@ -3817,8 +3817,11 @@ class DASDDevice(DiskDevice):
if os.path.isfile(conf):
f = open(conf)
# grab the first line that starts with our busID
- line = [line for line in f.readlines()
- if line.startswith(self.busid)][:1]
+ for l in f.readlines():
+ if l.startswith(self.busid):
+ line = l.rstrip()
+ break
+
f.close()
# See if we got a line. If not, grab our getOpts
--
1.8.1.4
11 years, 1 month
[PATCH 2/5] Remove some remnants of old multipath code. (#951259)
by David Lehman
---
pyanaconda/kickstart.py | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 0fd4020..98a7db3 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -76,10 +76,6 @@ stdoutLog = logging.getLogger("anaconda.stdout")
from anaconda_log import logger, logLevelMap, setHandlersLevel,\
DEFAULT_TTY_LEVEL
-# deviceMatches is called early, before any multipaths can possibly be coalesced
-# so it needs to know about them in some additional way: have the topology ready.
-topology = None
-
class AnacondaKSScript(KSScript):
""" Execute a kickstart script
@@ -182,15 +178,6 @@ def deviceMatches(spec):
if dev and dev not in matches:
matches.append(dev)
- # now see if any mpaths and mpath members match
- for members in topology.multipaths_iter():
- mpath_name = udev.udev_device_get_multipath_name(members[0])
- member_names = map(udev.udev_device_get_name, members)
- if mpath_name == spec or (dev in member_names):
- # append the entire mpath
- matches.append(mpath_name)
- matches.extend(member_names)
-
return matches
def lookupAlias(devicetree, alias):
--
1.8.1.4
11 years, 1 month
[PATCH 1/5] Protect the block device containing the stage2 image.
by David Lehman
Also account for the possibility of multiple protected block devices.
It is entirely possible that there are multiple protected block devices.
Any of the live device, the base repo, and the stage2 image can reside on
(potentially different) block devices.
Related: rhbz#853789
---
pyanaconda/__init__.py | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/pyanaconda/__init__.py b/pyanaconda/__init__.py
index ba4e3c5..9a2bb19 100644
--- a/pyanaconda/__init__.py
+++ b/pyanaconda/__init__.py
@@ -142,15 +142,18 @@ class Anaconda(object):
@property
def protected(self):
import stat
-
+ specs = []
if os.path.exists("/run/initramfs/livedev") and \
stat.S_ISBLK(os.stat("/run/initramfs/livedev")[stat.ST_MODE]):
- return [os.readlink("/run/initramfs/livedev")]
- elif self.methodstr and self.methodstr.startswith("hd:"):
- method = self.methodstr[3:]
- return [method.split(":", 3)[0]]
- else:
- return []
+ specs.append(os.readlink("/run/initramfs/livedev"))
+
+ if self.methodstr and self.methodstr.startswith("hd:"):
+ specs.append(self.methodstr[3:].split(":", 3)[0])
+
+ if self.stage2 and self.stage2.startswith("hd:"):
+ specs.append(self.stage2[3:].split(":", 3)[0])
+
+ return specs
@property
def storage(self):
--
1.8.1.4
11 years, 1 month
[PATCH] dracut/parse-kickstart: handle network --mtu
by Will Woods
Clean up the network handling a little bit, and add the mtu where dracut
expects to find it.
---
dracut/parse-kickstart | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/dracut/parse-kickstart b/dracut/parse-kickstart
index d81bdcd..ae34862 100755
--- a/dracut/parse-kickstart
+++ b/dracut/parse-kickstart
@@ -192,6 +192,7 @@ def ksnet_to_dracut(args, lineno, net, bootdev=False):
'''Translate the kickstart network data into dracut network data.'''
line = []
ip=""
+ autoconf=""
if is_mac(net.device): # this is a MAC - find the interface name
mac = net.device
@@ -202,9 +203,9 @@ def ksnet_to_dracut(args, lineno, net, bootdev=False):
# NOTE: dracut currently only does ipv4 *or* ipv6, so only one ip=arg..
if net.bootProto in (BOOTPROTO_DHCP, BOOTPROTO_BOOTP):
- ip="dhcp"
+ autoconf="dhcp"
elif net.bootProto == BOOTPROTO_IBFT:
- ip="ibft"
+ autoconf="ibft"
elif net.bootProto == BOOTPROTO_QUERY:
log.error("'%s': --bootproto=query is deprecated", " ".join(args))
elif net.bootProto == BOOTPROTO_STATIC:
@@ -214,18 +215,22 @@ def ksnet_to_dracut(args, lineno, net, bootdev=False):
log.warn("line %u: network missing %s", lineno, missing)
else:
ip="{0.ip}::{0.gateway}:{0.netmask}:" \
- "{0.hostname}:{0.device}:none".format(net)
+ "{0.hostname}:{0.device}:none:{0.mtu}".format(net)
elif net.ipv6 == "auto":
- ip="auto6"
+ autoconf="auto6"
elif net.ipv6 == "dhcp":
- ip="dhcp6"
+ autoconf="dhcp6"
elif net.ipv6:
ip="[{0.ipv6}]::{0.gateway}:{0.netmask}:" \
- "{0.hostname}:{0.device}:none".format(net)
+ "{0.hostname}:{0.device}:none:{0.mtu}".format(net)
- if net.device and not ip.endswith(":none"):
- line.append("ip=%s:%s" % (net.device, ip))
- else:
+ if autoconf:
+ if net.device or net.mtu:
+ ip="%s:%s:%s" % (net.device, autoconf, net.mtu)
+ else:
+ ip=autoconf
+
+ if ip:
line.append("ip=%s" % ip)
for ns in net.nameserver.split(","):
--
1.8.1.4
11 years, 1 month
[PATCH 1/4] Disable the "Closest mirror" option if there's no fastestmirror plugin (#876135).
by Chris Lumens
The goal here is to not allow selecting the Closest mirror option on trees that
do not include a repo config file supporting it. This seems to be the easiest
way to do it, though I have not been able to test it thoroughly due to trees
being broken in other ways. It does not break the standard Fedora case, though.
Additionally, I've moved Closest mirror to the last option in the combo box so
it can be removed without having to move all the other options around.
---
pyanaconda/packaging/__init__.py | 7 +++++++
pyanaconda/packaging/yumpayload.py | 5 +++++
pyanaconda/ui/gui/spokes/source.glade | 2 +-
pyanaconda/ui/gui/spokes/source.py | 30 +++++++++++++++++++++---------
4 files changed, 34 insertions(+), 10 deletions(-)
diff --git a/pyanaconda/packaging/__init__.py b/pyanaconda/packaging/__init__.py
index f095dea..fb72e82 100644
--- a/pyanaconda/packaging/__init__.py
+++ b/pyanaconda/packaging/__init__.py
@@ -146,6 +146,13 @@ class Payload(object):
""" The identifier of the current base repo. """
return None
+ @property
+ def mirrorEnabled(self):
+ """Is the closest/fastest mirror option enabled? This does not make
+ sense for those payloads that do not support this concept.
+ """
+ return True
+
def getRepo(self, repo_id):
""" Return the package repo object. """
raise NotImplementedError()
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index 3209fe4..2dd81e1 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -410,6 +410,11 @@ reposdir=%s
return base_repo_name
+ @property
+ def mirrorEnabled(self):
+ with _yum_lock:
+ return "fastestmirror" in self._yum.plugins.enabledPlugins
+
def getRepo(self, repo_id):
""" Return the yum repo object. """
with _yum_lock:
diff --git a/pyanaconda/ui/gui/spokes/source.glade b/pyanaconda/ui/gui/spokes/source.glade
index 78ec539..2cc41f2 100644
--- a/pyanaconda/ui/gui/spokes/source.glade
+++ b/pyanaconda/ui/gui/spokes/source.glade
@@ -755,11 +755,11 @@
<property name="can_focus">False</property>
<property name="active">0</property>
<items>
- <item translatable="yes">Closest mirror</item>
<item translatable="yes">http://</item>
<item translatable="yes">https://</item>
<item translatable="yes">ftp://</item>
<item translatable="yes">nfs</item>
+ <item translatable="yes">Closest mirror</item>
</items>
<signal name="changed" handler="on_protocol_changed" swapped="no"/>
</object>
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index accd19a..e9ecc7c 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -53,6 +53,13 @@ BASEREPO_SETUP_MESSAGE = N_("Setting up installation source...")
METADATA_DOWNLOAD_MESSAGE = N_("Downloading package metadata...")
METADATA_ERROR_MESSAGE = N_("Error downloading package metadata...")
+# These need to be in the same order as the items in protocolComboBox in source.glade.
+PROTOCOL_HTTP = 0
+PROTOCOL_HTTPS = 1
+PROTOCOL_FTP = 2
+PROTOCOL_NFS = 3
+PROTOCOL_MIRROR = 4
+
# Repo Store Columns
REPO_ENABLED_COL = 0
REPO_NAME_COL = 1
@@ -554,6 +561,11 @@ class SourceSpoke(NormalSpoke):
added = False
+ # If there's no fallback mirror to use, we should just disable that option
+ # in the UI.
+ if not self.payload.mirrorEnabled:
+ self._protocolComboBox.remove(PROTOCOL_MIRROR)
+
# If we've previously set up to use a CD/DVD method, the media has
# already been mounted by payload.setup. We can't try to mount it
# again. So just use what we already know to create the selector.
@@ -621,7 +633,7 @@ class SourceSpoke(NormalSpoke):
# We default to the mirror list, and then if the method tells us
# something different later, we can change it.
- self._protocolComboBox.set_active(0)
+ self._protocolComboBox.set_active(PROTOCOL_MIRROR)
self._urlEntry.set_sensitive(False)
# Set up the default state of UI elements.
@@ -630,13 +642,13 @@ class SourceSpoke(NormalSpoke):
proto = self.data.method.url or self.data.method.mirrorlist
if proto.startswith("http:"):
- self._protocolComboBox.set_active(1)
+ self._protocolComboBox.set_active(PROTOCOL_HTTP)
l = 7
elif proto.startswith("https:"):
- self._protocolComboBox.set_active(2)
+ self._protocolComboBox.set_active(PROTOCOL_HTTPS)
l = 8
elif proto.startswith("ftp:"):
- self._protocolComboBox.set_active(3)
+ self._protocolComboBox.set_active(PROTOCOL_FTP)
l = 6
self._urlEntry.set_sensitive(True)
@@ -644,7 +656,7 @@ class SourceSpoke(NormalSpoke):
self._mirrorlistCheckbox.set_active(bool(self.data.method.mirrorlist))
elif self.data.method.method == "nfs":
self._networkButton.set_active(True)
- self._protocolComboBox.set_active(4)
+ self._protocolComboBox.set_active(PROTOCOL_NFS)
self._urlEntry.set_text("%s:%s" % (self.data.method.server, self.data.method.dir))
self._urlEntry.set_sensitive(True)
@@ -683,16 +695,16 @@ class SourceSpoke(NormalSpoke):
return not flags.livecdInstall
def _mirror_active(self):
- return self._protocolComboBox.get_active() == 0
+ return self._protocolComboBox.get_active() == PROTOCOL_MIRROR
def _http_active(self):
- return self._protocolComboBox.get_active() in [1, 2]
+ return self._protocolComboBox.get_active() in [PROTOCOL_HTTP, PROTOCOL_HTTPS]
def _ftp_active(self):
- return self._protocolComboBox.get_active() == 3
+ return self._protocolComboBox.get_active() == PROTOCOL_FTP
def _nfs_active(self):
- return self._protocolComboBox.get_active() == 4
+ return self._protocolComboBox.get_active() == PROTOCOL_NFS
def _get_selected_partition(self):
store = self.builder.get_object("partitionStore")
--
1.8.1.2
11 years, 1 month
[PATCH 1/6] Set the default fs type on RHEL (#951088).
by Chris Lumens
---
pyanaconda/__init__.py | 3 +++
pyanaconda/installclass.py | 4 ++++
pyanaconda/installclasses/rhel.py | 1 +
3 files changed, 8 insertions(+)
diff --git a/pyanaconda/__init__.py b/pyanaconda/__init__.py
index ba4e3c5..5105271 100644
--- a/pyanaconda/__init__.py
+++ b/pyanaconda/__init__.py
@@ -158,6 +158,9 @@ class Anaconda(object):
import blivet
self._storage = blivet.Blivet(ksdata=self.ksdata)
+ if self.instClass.defaultFS:
+ self._storage.setDefaultFSType(self.instClass.defaultFS)
+
return self._storage
def dumpState(self):
diff --git a/pyanaconda/installclass.py b/pyanaconda/installclass.py
index 753de20..8b6b762 100644
--- a/pyanaconda/installclass.py
+++ b/pyanaconda/installclass.py
@@ -58,6 +58,10 @@ class BaseInstallClass(object):
bootloaderExtraArgs = []
_l10n_domain = None
+ # The default filesystem type to use. If None, we will use whatever
+ # Blivet uses by default.
+ defaultFS = None
+
# list of of (txt, grplist) tuples for task selection screen
tasks = []
diff --git a/pyanaconda/installclasses/rhel.py b/pyanaconda/installclasses/rhel.py
index d5b000e..1474b4d 100644
--- a/pyanaconda/installclasses/rhel.py
+++ b/pyanaconda/installclasses/rhel.py
@@ -32,6 +32,7 @@ class InstallClass(BaseInstallClass):
_descriptionFields = (productName,)
sortPriority = 10000
hidden = 1
+ defaultFS = "xfs"
bootloaderTimeoutDefault = 5
bootloaderExtraArgs = []
--
1.8.1.2
11 years, 1 month