Skip to content

Commit

Permalink
use CommaSeparatorCallback for SysFsInterfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbeedy authored and NucciTheBoss committed Dec 3, 2024
1 parent 69da858 commit 36b9966
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion slurmutils/models/option.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class AcctGatherConfigOptionSet(_OptionSet):
ProfileInfluxDBUser: Callback = Callback()
ProfileInfluxDBTimeout: Callback = Callback()
InfinibandOFEDPort: Callback = Callback()
SysfsInterfaces: Callback = Callback()
SysfsInterfaces: Callback = CommaSeparatorCallback


@dataclass(frozen=True)
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/editors/test_acctgatherconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_loads(self) -> None:
self.assertEqual(config.profile_influx_db_user, "testuser")
self.assertEqual(config.profile_influx_db_timeout, "10")
self.assertEqual(config.infiniband_ofed_port, "0")
self.assertEqual(config.sysfs_interfaces, "enp0s1")
self.assertEqual(config.sysfs_interfaces, ["enp0s1"])

config = acctgatherconfig.loads(EXAMPLE_ACCT_GATHER_CONFIG)
# The new config and old config should not be equal since the
Expand Down Expand Up @@ -81,7 +81,7 @@ def test_edit(self) -> None:
config.profile_influx_db_user = "testuser1"
config.profile_influx_db_timeout = "20"
config.infiniband_ofed_port = "1"
config.sysfs_interfaces = "enp0s2"
config.sysfs_interfaces = ["enp0s2"]

config = acctgatherconfig.load("/etc/slurm/acct_gather.conf")
self.assertEqual(config.energy_ipmi_frequency, "2")
Expand All @@ -103,4 +103,4 @@ def test_edit(self) -> None:
self.assertEqual(config.profile_influx_db_user, "testuser1")
self.assertEqual(config.profile_influx_db_timeout, "20")
self.assertEqual(config.infiniband_ofed_port, "1")
self.assertEqual(config.sysfs_interfaces, "enp0s2")
self.assertEqual(config.sysfs_interfaces, ["enp0s2"])

0 comments on commit 36b9966

Please sign in to comment.