VM: def __str__

This commit is contained in:
Nico Schottelius 2020-03-05 23:55:33 +01:00
parent 0e6a6afd88
commit aa8336b7e4
1 changed files with 5 additions and 0 deletions

View File

@ -75,6 +75,11 @@ class VMProduct(Product):
else:
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
def description(self):
return "Virtual machine '{}': {} core(s), {}GB memory".format(