diff --git a/lib/objects.py b/lib/objects.py index 8106287e856921b3f4853705cb99e5b1508bef3e..cc3307dce9542d259f08a48369ef3712aa3bd8fa 100644 --- a/lib/objects.py +++ b/lib/objects.py @@ -153,6 +153,14 @@ class ConfigObject(object): " _ContainerFromDicts" % c_type) return ret + def Copy(self): + """Makes a deep copy of the current object and its children. + + """ + dict_form = self.ToDict() + clone_obj = self.__class__.FromDict(dict_form) + return clone_obj + def __repr__(self): """Implement __repr__ for ConfigObjects.""" return repr(self.ToDict())