+ def GetHypervisorList(self):
+ """Return the list of enabled hypervisors.
+
+ """
+ data = self._ReadFile(constants.SS_HYPERVISOR_LIST)
+ nl = data.splitlines(False)
+ return nl
+
+ def GetMaintainNodeHealth(self):
+ """Return the value of the maintain_node_health option.
+
+ """
+ data = self._ReadFile(constants.SS_MAINTAIN_NODE_HEALTH)
+ # we rely on the bool serialization here
+ return data == "True"
+
+ def GetUidPool(self):
+ """Return the user-id pool definition string.
+
+ The separator character is a newline.
+
+ The return value can be parsed using uidpool.ParseUidPool()::
+
+ ss = ssconf.SimpleStore()
+ uid_pool = uidpool.ParseUidPool(ss.GetUidPool(), separator="\\n")
+
+ """
+ data = self._ReadFile(constants.SS_UID_POOL)
+ return data
+
+ def GetPrimaryIPFamily(self):
+ """Return the cluster-wide primary address family.
+
+ """
+ try:
+ return int(self._ReadFile(constants.SS_PRIMARY_IP_FAMILY,
+ default=netutils.IP4Address.family))
+ except (ValueError, TypeError), err:
+ raise errors.ConfigurationError("Error while trying to parse primary ip"
+ " family: %s" % err)
+