removed error details from error msg
This commit is contained in:
parent
61bf158238
commit
78423c83e3
3 changed files with 4 additions and 8 deletions
|
@ -1,6 +1,7 @@
|
||||||
function VMTerminateStatus($container, url) {
|
function VMTerminateStatus($container, url) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: url,
|
url: url,
|
||||||
|
type: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
VMTerminateSuccess($container, data);
|
VMTerminateSuccess($container, data);
|
||||||
|
|
|
@ -969,11 +969,11 @@ class VirtualMachineView(LoginRequiredMixin, View):
|
||||||
kwargs={'pk': opennebula_vm_id})
|
kwargs={'pk': opennebula_vm_id})
|
||||||
)
|
)
|
||||||
|
|
||||||
terminated, err = manager.delete_vm(vm.id)
|
terminated = manager.delete_vm(vm.id)
|
||||||
|
|
||||||
if not terminated:
|
if not terminated:
|
||||||
response['text'] = ugettext(
|
response['text'] = ugettext(
|
||||||
'Error terminating VM') + opennebula_vm_id + '\n' + err
|
'Error terminating VM') + opennebula_vm_id
|
||||||
else:
|
else:
|
||||||
for t in range(15):
|
for t in range(15):
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -324,7 +324,6 @@ class OpenNebulaManager():
|
||||||
def delete_vm(self, vm_id):
|
def delete_vm(self, vm_id):
|
||||||
TERMINATE_ACTION = 'terminate'
|
TERMINATE_ACTION = 'terminate'
|
||||||
vm_terminated = False
|
vm_terminated = False
|
||||||
err = ''
|
|
||||||
try:
|
try:
|
||||||
self.oneadmin_client.call(
|
self.oneadmin_client.call(
|
||||||
oca.VirtualMachine.METHODS['action'],
|
oca.VirtualMachine.METHODS['action'],
|
||||||
|
@ -334,19 +333,15 @@ class OpenNebulaManager():
|
||||||
vm_terminated = True
|
vm_terminated = True
|
||||||
except socket.timeout as socket_err:
|
except socket.timeout as socket_err:
|
||||||
logger.info("Socket timeout error: {0}".format(socket_err))
|
logger.info("Socket timeout error: {0}".format(socket_err))
|
||||||
err = ("Socket timeout error: {0}".format(socket_err))
|
|
||||||
except OpenNebulaException as opennebula_err:
|
except OpenNebulaException as opennebula_err:
|
||||||
logger.info(
|
logger.info(
|
||||||
"OpenNebulaException error: {0}".format(opennebula_err))
|
"OpenNebulaException error: {0}".format(opennebula_err))
|
||||||
err = ("OpenNebulaException error: {0}".format(opennebula_err))
|
|
||||||
except OSError as os_err:
|
except OSError as os_err:
|
||||||
logger.info("OSError : {0}".format(os_err))
|
logger.info("OSError : {0}".format(os_err))
|
||||||
err = ("OSError : {0}".format(os_err))
|
|
||||||
except ValueError as value_err:
|
except ValueError as value_err:
|
||||||
logger.info("ValueError : {0}".format(value_err))
|
logger.info("ValueError : {0}".format(value_err))
|
||||||
err = ("ValueError : {0}".format(value_err))
|
|
||||||
|
|
||||||
return (vm_terminated, err)
|
return vm_terminated
|
||||||
|
|
||||||
def _get_template_pool(self):
|
def _get_template_pool(self):
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue