# Remove all associations from the repo RepoContentUnit.get_collection().remove({'repo_id' : repo_id}, safe=True) except Exception, e: msg = _('Error updating one or more database collections while removing repo [%(r)s]') msg = msg % {'r': repo_id} logger.exception(msg) error_tuples.append(e) # remove the repo from any groups it was a member of group_manager = manager_factory.repo_group_manager() group_manager.remove_repo_from_groups(repo_id) if len(error_tuples) > 0: pe = PulpExecutionException() pe.child_exceptions = error_tuples raise pe @staticmethod def update_repo(repo_id, delta): """ Updates metadata about the given repository. Only the following fields may be updated through this call: * display_name * description Other fields found in delta will be ignored. :param repo_id: identifies the repo :type repo_id: str
safe=True) except Exception, e: msg = _( 'Error updating one or more database collections while removing repo [%(r)s]' ) msg = msg % {'r': repo_id} logger.exception(msg) error_tuples.append(e) # remove the repo from any groups it was a member of group_manager = manager_factory.repo_group_manager() group_manager.remove_repo_from_groups(repo_id) if len(error_tuples) > 0: pe = PulpExecutionException() pe.child_exceptions = error_tuples raise pe @staticmethod def update_repo(repo_id, delta): """ Updates metadata about the given repository. Only the following fields may be updated through this call: * display_name * description Other fields found in delta will be ignored. :param repo_id: identifies the repo :type repo_id: str