fix(cgi-bin): enable sending power on/off server VM jobs

main
Tsu-ba-me 4 years ago committed by Digimer
parent c07e72bab9
commit e8f18d7aa1
  1. 44
      cgi-bin/set_power
  2. 8
      share/words.xml

@ -141,28 +141,28 @@ WHERE
$anvil->Log->variables({ source => $THIS_FILE, line => __LINE__, level => 2, list => { anvil_uuid => $anvil_uuid, host_uuid => $host_uuid, server_uuid => $server_uuid } }); $anvil->Log->variables({ source => $THIS_FILE, line => __LINE__, level => 2, list => { anvil_uuid => $anvil_uuid, host_uuid => $host_uuid, server_uuid => $server_uuid } });
# if ($on) if ($on)
# { {
# $anvil->Database->insert_or_update_jobs({ $anvil->Database->insert_or_update_jobs({
# job_command => $anvil->data->{path}{exe}{'anvil-boot-server'}." --server-uuid ".$server_uuid, job_command => $anvil->data->{path}{exe}{'anvil-boot-server'}." --server-uuid ".$server_uuid,
# job_host_uuid => $host_uuid, job_host_uuid => $host_uuid,
# job_description => "", job_description => "job_0341",
# job_name => "cgi-bin::set_power::server::on", job_name => "cgi-bin::set_power::server::on",
# job_progress => 0, job_progress => 0,
# job_title => "" job_title => "job_0340"
# }); });
# } }
# else else
# { {
# $anvil->Database->insert_or_update_jobs({ $anvil->Database->insert_or_update_jobs({
# job_command => $anvil->data->{path}{exe}{'anvil-shutdown-server'}." --server-uuid ".$server_uuid, job_command => $anvil->data->{path}{exe}{'anvil-shutdown-server'}." --server-uuid ".$server_uuid,
# job_host_uuid => $host_uuid, job_host_uuid => $host_uuid,
# job_description => "", job_description => "job_0343",
# job_name => "cgi-bin::set_power::server::off", job_name => "cgi-bin::set_power::server::off",
# job_progress => 0, job_progress => 0,
# job_title => "" job_title => "job_0342"
# }); });
# } }
} }
} }

@ -1097,6 +1097,14 @@ It should be provisioned in the next minute or two.</key>
<key name="job_0338">Host Leave Cluster</key> <key name="job_0338">Host Leave Cluster</key>
<!-- cgi-bin/set_membership,leave,job_description --> <!-- cgi-bin/set_membership,leave,job_description -->
<key name="job_0339">Make target host leave its anvil cluster.</key> <key name="job_0339">Make target host leave its anvil cluster.</key>
<!-- cgi-bin/set_power,server,on,job_title -->
<key name="job_0340">Power On Server VM</key>
<!-- cgi-bin/set_power,server,on,job_description -->
<key name="job_0341">Power on the target server VM by executing a start script on the first host within the cluster.</key>
<!-- cgi-bin/set_power,server,off,job_title -->
<key name="job_0342">Power Off Server VM</key>
<!-- cgi-bin/set_power,server,off,job_description -->
<key name="job_0343">Power off the target server VM by executing a stop script on the first a host within the cluster.</key>
<!-- Log entries --> <!-- Log entries -->
<key name="log_0001">Starting: [#!variable!program!#].</key> <key name="log_0001">Starting: [#!variable!program!#].</key>

Loading…
Cancel
Save