Merge branch 'master' into task/3530/upgrade_to_django_1.11
This commit is contained in:
commit
75420a8bde
5 changed files with 33 additions and 17 deletions
|
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-08-24 09:56+0000\n"
|
||||
"POT-Creation-Date: 2018-09-08 08:45+0000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
|
@ -807,6 +807,11 @@ msgstr ""
|
|||
msgid "Error terminating VM"
|
||||
msgstr "Fehler beenden VM"
|
||||
|
||||
msgid ""
|
||||
"VM terminate action timed out. Please contact support@datacenterlight.ch for "
|
||||
"further information."
|
||||
msgstr ""
|
||||
|
||||
#, python-format
|
||||
msgid "Virtual Machine %(vm_name)s Cancelled"
|
||||
msgstr "Virtuelle Maschine %(vm_name)s Kündigung"
|
||||
|
|
|
|||
|
|
@ -1402,7 +1402,7 @@ class VirtualMachineView(LoginRequiredMixin, View):
|
|||
terminated = manager.delete_vm(vm.id)
|
||||
|
||||
if not terminated:
|
||||
logger.debug(
|
||||
logger.error(
|
||||
"manager.delete_vm returned False. Hence, error making "
|
||||
"xml-rpc call to delete vm failed."
|
||||
)
|
||||
|
|
@ -1412,6 +1412,9 @@ class VirtualMachineView(LoginRequiredMixin, View):
|
|||
try:
|
||||
manager.get_vm(vm.id)
|
||||
except WrongIdError:
|
||||
logger.error(
|
||||
"VM {} not found. So, its terminated.".format(vm.id)
|
||||
)
|
||||
response['status'] = True
|
||||
response['text'] = ugettext('Terminated')
|
||||
vm_detail_obj = VMDetail.objects.filter(
|
||||
|
|
@ -1429,6 +1432,10 @@ class VirtualMachineView(LoginRequiredMixin, View):
|
|||
break
|
||||
else:
|
||||
sleep(2)
|
||||
if not response['status']:
|
||||
response['text'] = _("VM terminate action timed out. Please "
|
||||
"contact support@datacenterlight.ch for "
|
||||
"further information.")
|
||||
context = {
|
||||
'vm_name': vm_name,
|
||||
'base_url': "{0}://{1}".format(
|
||||
|
|
@ -1449,11 +1456,13 @@ class VirtualMachineView(LoginRequiredMixin, View):
|
|||
email = BaseEmail(**email_data)
|
||||
email.send()
|
||||
admin_email_body.update(response)
|
||||
admin_msg_sub = "VM and Subscription for VM {} and user: {}".format(
|
||||
vm.id,
|
||||
owner.email
|
||||
)
|
||||
email_to_admin_data = {
|
||||
'subject': "Deleted VM and Subscription for VM {vm_id} and "
|
||||
"user: {user}".format(
|
||||
vm_id=vm.id, user=owner.email
|
||||
),
|
||||
'subject': ("Deleted " if response['status']
|
||||
else "ERROR deleting ") + admin_msg_sub,
|
||||
'from_email': settings.DCL_SUPPORT_FROM_ADDRESS,
|
||||
'to': ['info@ungleich.ch'],
|
||||
'body': "\n".join(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue