[pve-devel] [PATCH ha-manager v5 12/23] test: add test cases for rules config
Thomas Lamprecht
t.lamprecht at proxmox.com
Thu Jul 31 07:30:00 CEST 2025
Am 30.07.25 um 20:03 schrieb Daniel Kral:
> + print "--- Log ---\n";
> + my $cfg = PVE::HA::Rules->parse_config($cfg_fn, $raw);
> + PVE::HA::Rules->set_rule_defaults($_) for values %{ $cfg->{ids} };
> + my $messages = PVE::HA::Rules->canonicalize($cfg);
> + print $_ for @$messages;
> + print "--- Config ---\n";
> + {
> + local $Data::Dumper::Sortkeys = 1;
> + print Dumper($cfg);
> + }
Can we use to_json($cfg, { canonical => 1, pretty => 1, utf8 => 1 }) instead?
While Data::Dumper can be OK, json is normally a bit easier to grasp and also
slightly more dense.
More information about the pve-devel
mailing list