From 370cff7c6bcf15a3851d5093c9b9f1558e11e2a2 Mon Sep 17 00:00:00 2001 From: uggla Date: Fri, 10 Jul 2015 11:37:37 +0200 Subject: [PATCH] Encapsulate ci_type and data into methods. --- alexandria/configuration_item.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/alexandria/configuration_item.py b/alexandria/configuration_item.py index f5cde24..b67207b 100644 --- a/alexandria/configuration_item.py +++ b/alexandria/configuration_item.py @@ -10,8 +10,25 @@ class ConfigurationItem(object): self.ip_mgmt = ip_mgmt self.login = login self.password = password + + self.ci_parents = [] # List to store parents ci + self.ci_children = [] # List to store children ci - self.ci_type = None - self.__data = None + @property + def ci_type(self): + return self.__ci_type + + @ci_type.setter + def ci_type(self, ci_type): + self.__ci_type = ci_type + + @property + def data(self): + return self.__data + + @data.setter + def data(self, data): + self.__data = data +