def get_saved_backends_list(self): backends_dic = self._read_backend_configuration_file() # Retrocompatibility: default backend has changed name for dic in backends_dic: if dic["module"] == "localfile": dic["module"] = "backend_localfile" dic["pid"] = str(uuid.uuid4()) dic["need_conversion"] = \ dic["xmlobject"].getAttribute("filename") # Now that the backend list is build, we will construct them for dic in backends_dic: self.restore_backend_from_xml(dic) # If no backend available, we create a new using localfile. Xmlobject # will be filled in by the backend if len(backends_dic) == 0: dic = BackendFactory().get_new_backend_dict("backend_localfile") dic["backend"].this_is_the_first_run(firstrun_tasks.populate()) backends_dic.append(dic) return backends_dic
def get_saved_backends_list(self): backends_dic = self._read_backend_configuration_file() # Retrocompatibility: default backend has changed name for dic in backends_dic: if dic["module"] == "localfile": dic["module"] = "backend_localfile" dic["pid"] = str(uuid.uuid4()) dic["need_conversion"] = \ dic["xmlobject"].getAttribute("filename") # Now that the backend list is build, we will construct them for dic in backends_dic: self.restore_backend_from_xml(dic) # If no backend available, we create a new using localfile. Xmlobject # will be filled in by the backend if len(backends_dic) == 0: dic = BackendFactory().get_new_backend_dict( "backend_localfile") dic["backend"].this_is_the_first_run(firstrun_tasks.populate()) backends_dic.append(dic) return backends_dic