def run(self): super(LDAPUpdater_NonUpgrade, self).run() api.Backend.ldap2.connect() options = self.options modified = False if options.schema_files: modified = schemaupdate.update_schema( options.schema_files, ldapi=True) or modified ld = LDAPUpdate( sub_dict={}, ldapi=True) if not self.files: self.files = ld.get_all_files(UPDATES_DIR) modified = ld.update(self.files) or modified if modified: logger.info('Update complete') else: logger.info('Update complete, no data were modified') api.Backend.ldap2.disconnect()
def run(self): super(LDAPUpdater_NonUpgrade, self).run() api.Backend.ldap2.connect() options = self.options modified = False if options.schema_files: modified = schemaupdate.update_schema( options.schema_files, ldapi=True) or modified ld = LDAPUpdate( sub_dict={}, ldapi=True) if not self.files: self.files = ld.get_all_files(UPDATES_DIR) modified = ld.update(self.files) or modified if modified: self.log.info('Update complete') else: self.log.info('Update complete, no data were modified') api.Backend.ldap2.disconnect()
def run(self): super(LDAPUpdater_NonUpgrade, self).run() options = self.options modified = False if options.update_schema: modified = schemaupdate.update_schema( options.schema_files, dm_password=self.dirman_password, live_run=not options.test) or modified ld = LDAPUpdate( dm_password=self.dirman_password, sub_dict={}, live_run=not options.test, ldapi=options.ldapi, plugins=options.plugins or self.run_plugins) if not self.files: self.files = ld.get_all_files(UPDATES_DIR) modified = ld.update(self.files, ordered=True) or modified if modified and options.test: self.log.info('Update complete, changes to be made, test mode') return 2
def run(self): super(LDAPUpdater_NonUpgrade, self).run() options = self.options modified = False if options.schema_files: modified = schemaupdate.update_schema(options.schema_files, ldapi=True) or modified ld = LDAPUpdate(sub_dict={}, ldapi=True) if not self.files: self.files = ld.get_all_files(UPDATES_DIR) modified = ld.update(self.files) or modified if modified: self.log.info("Update complete") else: self.log.info("Update complete, no data were modified")
def __update_schema(self): self.modified = schemaupdate.update_schema( self.schema_files, dm_password='', ldapi=True) or self.modified
def __update_schema(self): self.modified = schemaupdate.update_schema(self.schema_files, ldapi=True) or self.modified