diff options
author | Raúl Benencia <rbenencia@linti.unlp.edu.ar> | 2012-08-02 13:18:26 -0300 |
---|---|---|
committer | Raúl Benencia <rbenencia@linti.unlp.edu.ar> | 2012-08-02 13:18:26 -0300 |
commit | 588a241bebfc477ef117c3f87e5c405edbe5bec5 (patch) | |
tree | b8472c8c1f06a644bb5db9dc15da27b407b8a18b | |
parent | ab15c97378d41e6084eac42843e44733d1444bd7 (diff) |
Updated model classes
-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 = [] |