Rename 'reboot' to 'restart'
Change-Id: I5d821303f9e5efb80efeeb3b0d7b3c7c330fa13b Depends-On: I412fdb2123feb57b9fd5bcdb47ab389271d0d7e0 Closes-Bug: #1682679
This commit is contained in:
parent
daa20b5483
commit
c8983de015
@ -112,8 +112,8 @@ def container_stop(request, id, timeout):
|
|||||||
return zunclient(request).containers.stop(id, timeout)
|
return zunclient(request).containers.stop(id, timeout)
|
||||||
|
|
||||||
|
|
||||||
def container_reboot(request, id, timeout):
|
def container_restart(request, id, timeout):
|
||||||
return zunclient(request).containers.reboot(id, timeout)
|
return zunclient(request).containers.restart(id, timeout)
|
||||||
|
|
||||||
|
|
||||||
def container_pause(request, id):
|
def container_pause(request, id):
|
||||||
|
@ -66,9 +66,9 @@ class ContainerActions(generic.View):
|
|||||||
elif action == 'stop':
|
elif action == 'stop':
|
||||||
timeout = request.DATA.get("timeout") or 10
|
timeout = request.DATA.get("timeout") or 10
|
||||||
return client.container_stop(request, id, timeout)
|
return client.container_stop(request, id, timeout)
|
||||||
elif action == 'reboot':
|
elif action == 'restart':
|
||||||
timeout = request.DATA.get("timeout") or 10
|
timeout = request.DATA.get("timeout") or 10
|
||||||
return client.container_reboot(request, id, timeout)
|
return client.container_restart(request, id, timeout)
|
||||||
elif action == 'pause':
|
elif action == 'pause':
|
||||||
return client.container_pause(request, id)
|
return client.container_pause(request, id)
|
||||||
elif action == 'unpause':
|
elif action == 'unpause':
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
'horizon.dashboard.container.containers.delete-force.service',
|
'horizon.dashboard.container.containers.delete-force.service',
|
||||||
'horizon.dashboard.container.containers.start.service',
|
'horizon.dashboard.container.containers.start.service',
|
||||||
'horizon.dashboard.container.containers.stop.service',
|
'horizon.dashboard.container.containers.stop.service',
|
||||||
'horizon.dashboard.container.containers.reboot.service',
|
'horizon.dashboard.container.containers.restart.service',
|
||||||
'horizon.dashboard.container.containers.pause.service',
|
'horizon.dashboard.container.containers.pause.service',
|
||||||
'horizon.dashboard.container.containers.unpause.service',
|
'horizon.dashboard.container.containers.unpause.service',
|
||||||
'horizon.dashboard.container.containers.execute.service',
|
'horizon.dashboard.container.containers.execute.service',
|
||||||
@ -54,7 +54,7 @@
|
|||||||
deleteContainerForceService,
|
deleteContainerForceService,
|
||||||
startContainerService,
|
startContainerService,
|
||||||
stopContainerService,
|
stopContainerService,
|
||||||
rebootContainerService,
|
restartContainerService,
|
||||||
pauseContainerService,
|
pauseContainerService,
|
||||||
unpauseContainerService,
|
unpauseContainerService,
|
||||||
executeContainerService,
|
executeContainerService,
|
||||||
@ -107,10 +107,10 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.append({
|
.append({
|
||||||
id: 'rebootContainerAction',
|
id: 'restartContainerAction',
|
||||||
service: rebootContainerService,
|
service: restartContainerService,
|
||||||
template: {
|
template: {
|
||||||
text: gettext('Reboot Container')
|
text: gettext('Restart Container')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.append({
|
.append({
|
||||||
|
@ -17,15 +17,15 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @ngDoc factory
|
* @ngDoc factory
|
||||||
* @name horizon.dashboard.container.containers.reboot.service
|
* @name horizon.dashboard.container.containers.restart.service
|
||||||
* @Description
|
* @Description
|
||||||
* reboot container.
|
* restart container.
|
||||||
*/
|
*/
|
||||||
angular
|
angular
|
||||||
.module('horizon.dashboard.container.containers')
|
.module('horizon.dashboard.container.containers')
|
||||||
.factory('horizon.dashboard.container.containers.reboot.service', rebootService);
|
.factory('horizon.dashboard.container.containers.restart.service', restartService);
|
||||||
|
|
||||||
rebootService.$inject = [
|
restartService.$inject = [
|
||||||
'horizon.app.core.openstack-service-api.zun',
|
'horizon.app.core.openstack-service-api.zun',
|
||||||
'horizon.dashboard.container.containers.basePath',
|
'horizon.dashboard.container.containers.basePath',
|
||||||
'horizon.dashboard.container.containers.resourceType',
|
'horizon.dashboard.container.containers.resourceType',
|
||||||
@ -36,7 +36,7 @@
|
|||||||
'horizon.framework.widgets.toast.service'
|
'horizon.framework.widgets.toast.service'
|
||||||
];
|
];
|
||||||
|
|
||||||
function rebootService(
|
function restartService(
|
||||||
zun, basePath, resourceType, actionResult, gettext, $qExtensions, modal, toast
|
zun, basePath, resourceType, actionResult, gettext, $qExtensions, modal, toast
|
||||||
) {
|
) {
|
||||||
// schema
|
// schema
|
||||||
@ -44,7 +44,7 @@
|
|||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
timeout: {
|
timeout: {
|
||||||
title: gettext("Reboot Container"),
|
title: gettext("Restart Container"),
|
||||||
type: "number",
|
type: "number",
|
||||||
minimum: 1
|
minimum: 1
|
||||||
}
|
}
|
||||||
@ -75,7 +75,7 @@
|
|||||||
var model;
|
var model;
|
||||||
|
|
||||||
var message = {
|
var message = {
|
||||||
success: gettext('Container %s was successfully rebooted.')
|
success: gettext('Container %s was successfully restarted.')
|
||||||
};
|
};
|
||||||
|
|
||||||
var service = {
|
var service = {
|
||||||
@ -105,8 +105,8 @@
|
|||||||
};
|
};
|
||||||
// modal config
|
// modal config
|
||||||
var config = {
|
var config = {
|
||||||
"title": gettext('Reboot Container'),
|
"title": gettext('Restart Container'),
|
||||||
"submitText": gettext('Reboot'),
|
"submitText": gettext('Restart'),
|
||||||
"schema": schema,
|
"schema": schema,
|
||||||
"form": form,
|
"form": form,
|
||||||
"model": model
|
"model": model
|
||||||
@ -118,7 +118,7 @@
|
|||||||
var name = context.model.name;
|
var name = context.model.name;
|
||||||
delete context.model.id;
|
delete context.model.id;
|
||||||
delete context.model.name;
|
delete context.model.name;
|
||||||
return zun.rebootContainer(id, context.model).then(function() {
|
return zun.restartContainer(id, context.model).then(function() {
|
||||||
toast.add('success', interpolate(message.success, [name]));
|
toast.add('success', interpolate(message.success, [name]));
|
||||||
var result = actionResult.getActionResult().updated(resourceType, id);
|
var result = actionResult.getActionResult().updated(resourceType, id);
|
||||||
return result.result;
|
return result.result;
|
@ -36,7 +36,7 @@
|
|||||||
startContainer: startContainer,
|
startContainer: startContainer,
|
||||||
stopContainer: stopContainer,
|
stopContainer: stopContainer,
|
||||||
logsContainer: logsContainer,
|
logsContainer: logsContainer,
|
||||||
rebootContainer: rebootContainer,
|
restartContainer: restartContainer,
|
||||||
pauseContainer: pauseContainer,
|
pauseContainer: pauseContainer,
|
||||||
unpauseContainer: unpauseContainer,
|
unpauseContainer: unpauseContainer,
|
||||||
executeContainer: executeContainer,
|
executeContainer: executeContainer,
|
||||||
@ -101,9 +101,9 @@
|
|||||||
return apiService.get(containersPath + id + '/logs').error(error(msg));
|
return apiService.get(containersPath + id + '/logs').error(error(msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
function rebootContainer(id, params) {
|
function restartContainer(id, params) {
|
||||||
var msg = gettext('Unable to reboot Container.');
|
var msg = gettext('Unable to restart Container.');
|
||||||
return apiService.post(containersPath + id + '/reboot', params).error(error(msg));
|
return apiService.post(containersPath + id + '/restart', params).error(error(msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
function pauseContainer(id) {
|
function pauseContainer(id) {
|
||||||
|
Loading…
Reference in New Issue
Block a user