diff options
-rw-r--r-- | model.py (renamed from data.py) | 25 |
1 files changed, 23 insertions, 2 deletions
@@ -5,12 +5,33 @@ class Network(): def __init__(self, name): self.name = name - self.domain = None + self.domain = [] self.ip_blocks = [] self.data = {} +class Domain(): + """A simple domain definition""" + + def __init__(self, name, domain): + self.name = name + self.domain = domain + self.admins = [] + + def add_admin(self, admin): + """Add an administrator for this network""" + + self.admins.append(admin) + +class Person(): + """A simple person definition""" + + def __init__(self, name, surname, email): + self.name = name + self.surname = surname + self.email = email + class Data(): - """Abstract class for storing network information""" + """Abstract class for storing anf getting information""" def __init__(self, config): self.networks = [] |