Commit 444c3a93 by adamtorok

new fields added to Snapshot

parent ced1af14
import json
class Snapshot:
def __init__(self, id, size) -> None:
def __init__(self,
id,
volume_id,
size,
status,
created_at
) -> None:
super().__init__()
self.id = id
self.volume_id = volume_id
self.size = size
self.status = status
self.created_at = created_at
def __str__(self) -> str:
return self.toJSON()
def toJSON(self):
return json.dumps(self.__dict__)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment