More fix for vcpu
This commit is contained in:
		
					parent
					
						
							
								78738e8175
							
						
					
				
			
			
				commit
				
					
						316496b969
					
				
			
		
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -130,7 +130,7 @@ class VirtualMachineSerializer(serializers.Serializer):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def get_price(self, obj):
 | 
					    def get_price(self, obj):
 | 
				
			||||||
        template = obj.template
 | 
					        template = obj.template
 | 
				
			||||||
        price = float(template.vcpu) * 5.0
 | 
					        price = float(template.cpu * 10) * 5.0
 | 
				
			||||||
        price += (int(template.memory) / 1024 * 2.0)
 | 
					        price += (int(template.memory) / 1024 * 2.0)
 | 
				
			||||||
        for disk in template.disks:
 | 
					        for disk in template.disks:
 | 
				
			||||||
            price += int(disk.size) / 1024 * 0.6
 | 
					            price += int(disk.size) / 1024 * 0.6
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue