From 2d9f8ca4515d1557b67c255c65138b9231c57831 Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Thu, 9 Jul 2026 08:53:32 +0200 Subject: Update docstring in handle_repos Change-Id: Ic088f5a85f3c033b0c5024d0b2e1bc889c52648d Signed-off-by: Michal Nasiadka --- kolla/template/methods.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/kolla/template/methods.py b/kolla/template/methods.py index 3d6767206..8bb7a7fc3 100644 --- a/kolla/template/methods.py +++ b/kolla/template/methods.py @@ -101,12 +101,20 @@ def debian_package_install(packages, clean_package_cache=True): @pass_context def handle_repos(context, reponames, mode): - """NOTE(hrw): we need to handle CentOS, Debian and Ubuntu with one macro. + """Generate Dockerfile RUN commands to enable or disable package repos. - Repo names have to be simple names mapped to proper ones. So 'ceph' == - 'centos-ceph-pacific' for CentOS, UCA for Ubuntu (enabled by default) and - something else for Debian. - Distro/arch are not required to have all entries - we ignore missing ones. + Takes a list of logical repo names (e.g. 'ceph', 'grafana') and a mode + ('enable' or 'disable'), looks them up in repos.yaml (merging any + user-supplied repos_yaml override), and returns a shell command string + suitable for use in a Dockerfile RUN instruction. + + Repo names are distro/arch-agnostic aliases that map to the real repo + name and URL for the target platform. So 'ceph' becomes + 'centos-ceph-squid' on CentOS, uses UCA on Ubuntu, and so on. + Distro/arch sections are not required to have all entries - missing ones + are silently ignored. + + NOTE(hrw): we need to handle CentOS, Debian and Ubuntu with one macro. """ if not isinstance(reponames, list): -- cgit v1.2.3