hosting order: Add price to vm context
This commit is contained in:
parent
b848841337
commit
44b5d9bb3a
1 changed files with 5 additions and 0 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue