summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--model.py (renamed from data.py)25
1 files changed, 23 insertions, 2 deletions
diff --git a/data.py b/model.py
index 4b48e19..5894e05 100644
--- a/data.py
+++ b/model.py
@@ -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 = []
nihil fit ex nihilo