VM: def __str__
This commit is contained in:
		
					parent
					
						
							
								0e6a6afd88
							
						
					
				
			
			
				commit
				
					
						aa8336b7e4
					
				
			
		
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
					@ -75,6 +75,11 @@ class VMProduct(Product):
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            raise Exception('Invalid recurring period for VM Product pricing.')
 | 
					            raise Exception('Invalid recurring period for VM Product pricing.')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def __str__(self):
 | 
				
			||||||
 | 
					        return "VM {} ({}): {} cores {} gb ram".format(self.uuid,
 | 
				
			||||||
 | 
					                                                       self.name,
 | 
				
			||||||
 | 
					                                                       self.cores,
 | 
				
			||||||
 | 
					                                                       self.ram_in_gb)
 | 
				
			||||||
    @property
 | 
					    @property
 | 
				
			||||||
    def description(self):
 | 
					    def description(self):
 | 
				
			||||||
        return "Virtual machine '{}': {} core(s), {}GB memory".format(
 | 
					        return "Virtual machine '{}': {} core(s), {}GB memory".format(
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue