From 540129bb8f3a6a3ae50e18b2c45d18be18657678 Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Tue, 18 May 2021 18:51:33 -0400 Subject: [PATCH] fix(cgi-bin): remove outdated logic --- cgi-bin/set_power | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/cgi-bin/set_power b/cgi-bin/set_power index 3931e144..27745471 100755 --- a/cgi-bin/set_power +++ b/cgi-bin/set_power @@ -238,31 +238,5 @@ elsif ($host_uuid) $anvil->nice_exit({ exit_code => 1 }); } } -else -{ - $anvil->data->{anvil_status}{anvil_name} = "!!invalid!no_target!!"; -} - - # Are we managing the power of a node or an Anvil! system? If the later, we're controlling both. - -# $anvil->data->{anvil_status}{anvil_name} = $anvil->data->{anvils}{anvil_uuid}{$anvil_uuid}{anvil_name}; -# $anvil->data->{anvil_status}{anvil_description} = $anvil->data->{anvils}{anvil_uuid}{$anvil_uuid}{anvil_description}; -# $anvil->data->{anvil_status}{timestamp} = time; -# -# my $node1_uuid = $anvil->data->{anvils}{anvil_uuid}{$anvil_uuid}{anvil_node1_host_uuid}; -# my $node2_uuid = $anvil->data->{anvils}{anvil_uuid}{$anvil_uuid}{anvil_node2_host_uuid}; -# my $node2_status = $anvil->data->{hosts}{host_uuid}{$node2_uuid}{host_status} eq "online" ? 1 : 0; -# -# $anvil->data->{anvil_status}{nodes}{node1}{host_name} = $anvil->data->{hosts}{host_uuid}{$node1_uuid}{host_name}; -# $anvil->data->{anvil_status}{nodes}{node1}{host_uuid} = $node1_uuid; -# $anvil->data->{anvil_status}{nodes}{node1}{host_status} = $anvil->data->{hosts}{host_uuid}{$node1_uuid}{host_status} eq "online" ? 1 : 0; -# $anvil->data->{anvil_status}{nodes}{node2}{host_name} = $anvil->data->{hosts}{host_uuid}{$node2_uuid}{host_name}; -# $anvil->data->{anvil_status}{nodes}{node2}{host_uuid} = $node2_uuid; -# $anvil->data->{anvil_status}{nodes}{node2}{host_status} = $anvil->data->{hosts}{host_uuid}{$node2_uuid}{host_status} eq "online" ? 1 : 0; -# -# $hash->{timestamp} = time; -# $hash->{nodes} = []; -# push @{$hash->{nodes}}, { on => $anvil->data->{anvil_status}{nodes}{node1}{host_status} }; -# push @{$hash->{nodes}}, { on => $anvil->data->{anvil_status}{nodes}{node2}{host_status} }; print JSON->new->utf8->encode($hash)."\n";