Commit cd55b09d by Adam Torok

Network & NetworkManager interface added

parent 08f0fe9d
import json
class Network:
def __init__(self,
id,
name,
status,
subnet_ids,
created_at
) -> None:
super().__init__()
self.id = id
self.name = name
self.status = status
self.subnet_ids = subnet_ids
self.created_at = created_at
def __str__(self) -> str:
return self.toJSON()
def toJSON(self):
return json.dumps(self.__dict__)
from interface.network.Network import Network
class NetworkManager:
def __init__(self) -> None:
super().__init__()
def create(self) -> Network:
raise NotImplementedError
def get(self, id) -> Network:
raise NotImplementedError
def delete(self, id) -> bool:
raise NotImplementedError
def list(self) -> []:
raise NotImplementedError
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