From 44b5d9bb3a8f5871de8b9ce610f979e2799d0792 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Mon, 2 Oct 2017 23:17:37 +0200 Subject: [PATCH] hosting order: Add price to vm context --- hosting/views.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hosting/views.py b/hosting/views.py index 46a0775f..e929f60b 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -686,6 +686,11 @@ class OrdersHostingDetailView(LoginRequiredMixin, context['vm'] = vm_detail.__dict__ context['vm']['name'] = '{}-{}'.format( context['vm']['configuration'], context['vm']['vm_id']) + context['vm']['price'] = get_vm_price( + cpu=context['vm']['cores'], + disk_size=context['vm']['disk_size'], + memory=context['vm']['memory'] + ) except VMDetail.DoesNotExist: try: manager = OpenNebulaManager(