mirror of
https://github.com/mclueppers/xo-server.git
synced 2025-07-28 16:34:40 +02:00
Minor updates.
This commit is contained in:
parent
87b880d869
commit
6dff423206
@ -648,7 +648,7 @@ Api.fn.xapi = {
|
|||||||
}).thenResolve(true);
|
}).thenResolve(true);
|
||||||
},
|
},
|
||||||
|
|
||||||
'clean_reboot': function (session, req) {
|
'reboot': function (session, req) {
|
||||||
var p_id = req.params.id;
|
var p_id = req.params.id;
|
||||||
if (!p_id)
|
if (!p_id)
|
||||||
{
|
{
|
||||||
@ -671,11 +671,12 @@ Api.fn.xapi = {
|
|||||||
}).then(function (pool) {
|
}).then(function (pool) {
|
||||||
var xapi = xo.connections[pool.get('uuid')];
|
var xapi = xo.connections[pool.get('uuid')];
|
||||||
|
|
||||||
|
// @todo If XS tools are unavailable, do a hard reboot.
|
||||||
return xapi.call('VM.clean_reboot', vm.get('ref'));
|
return xapi.call('VM.clean_reboot', vm.get('ref'));
|
||||||
}).thenResolve(true);
|
}).thenResolve(true);
|
||||||
},
|
},
|
||||||
|
|
||||||
'clean_shutdown': function (session, req) {
|
'shutdown': function (session, req) {
|
||||||
var p_id = req.params.id;
|
var p_id = req.params.id;
|
||||||
if (!p_id)
|
if (!p_id)
|
||||||
{
|
{
|
||||||
@ -698,6 +699,7 @@ Api.fn.xapi = {
|
|||||||
}).then(function (pool) {
|
}).then(function (pool) {
|
||||||
var xapi = xo.connections[pool.get('uuid')];
|
var xapi = xo.connections[pool.get('uuid')];
|
||||||
|
|
||||||
|
// @todo If XS tools are unavailable, do a hard shutdown.
|
||||||
return xapi.call('VM.clean_shutdown', vm.get('ref'));
|
return xapi.call('VM.clean_shutdown', vm.get('ref'));
|
||||||
}).thenResolve(true);
|
}).thenResolve(true);
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user