Use updated get_vm_price method
This commit is contained in:
		
					parent
					
						
							
								558e187e11
							
						
					
				
			
			
				commit
				
					
						63a12ffe06
					
				
			
		
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
					@ -106,6 +106,7 @@ class IndexView(CreateView):
 | 
				
			||||||
        storage = request.POST.get('storage')
 | 
					        storage = request.POST.get('storage')
 | 
				
			||||||
        storage_field = forms.IntegerField(validators=[self.validate_storage])
 | 
					        storage_field = forms.IntegerField(validators=[self.validate_storage])
 | 
				
			||||||
        template_id = int(request.POST.get('config'))
 | 
					        template_id = int(request.POST.get('config'))
 | 
				
			||||||
 | 
					        vm_pricing_name = request.POST.get('pricing_name')
 | 
				
			||||||
        template = VMTemplate.objects.filter(
 | 
					        template = VMTemplate.objects.filter(
 | 
				
			||||||
            opennebula_vm_template_id=template_id
 | 
					            opennebula_vm_template_id=template_id
 | 
				
			||||||
        ).first()
 | 
					        ).first()
 | 
				
			||||||
| 
						 | 
					@ -140,7 +141,10 @@ class IndexView(CreateView):
 | 
				
			||||||
            return HttpResponseRedirect(referer_url + "#order_form")
 | 
					            return HttpResponseRedirect(referer_url + "#order_form")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        amount_to_be_charged = get_vm_price(
 | 
					        amount_to_be_charged = get_vm_price(
 | 
				
			||||||
            cpu=cores, memory=memory, disk_size=storage
 | 
					            cpu=cores,
 | 
				
			||||||
 | 
					            memory=memory,
 | 
				
			||||||
 | 
					            disk_size=storage,
 | 
				
			||||||
 | 
					            pricing_name=vm_pricing_name
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
        specs = {
 | 
					        specs = {
 | 
				
			||||||
            'cpu': cores,
 | 
					            'cpu': cores,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue