VM: def __str__

This commit is contained in:
Nico Schottelius 2020-03-05 23:55:33 +01:00
parent 0e6a6afd88
commit aa8336b7e4

View file

@ -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(