# port: PORT # the port to connect to
#
+# By default this module will try to autodetect number of disks.
+# However this can be overridden by setting variable `disk_count` to
+# desired number of disks. Example for two disks:
+#
+# disk_count: 2
+#
+
# ----------------------------------------------------------------------
# AUTO-DETECTION JOBS
# only one of them will run (they have the same name)
Get data from TCP/IP socket
:return: dict
"""
- self.disk_count = self._get_disk_count()
try:
raw = self._get_raw_data().split("|")[:-1]
except AttributeError:
except (KeyError, TypeError) as e:
self.info("No excluded disks")
self.debug(str(e))
+
+ try:
+ self.disk_count = int(self.configuration['disk_count'])
+ except (KeyError, TypeError) as e:
+ self.info("Autodetecting number of disks")
+ self.disk_count = self._get_disk_count()
+ self.debug(str(e))
+
data = self._get_data()
if data is None:
return False