diff options
| author | Zuul <zuul@review.opendev.org> | 2026-07-11 11:46:31 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2026-07-11 11:46:31 +0000 |
| commit | a18c9dd7662d5cdaf7b0986d7e1a32b04360cd7b (patch) | |
| tree | ea5b827c22ef10f309a69060204630c8b62da589 | |
| parent | c0c6ec5a00711de6a5f69e692c1049eefa1a1f06 (diff) | |
| parent | 2d9f8ca4515d1557b67c255c65138b9231c57831 (diff) | |
| download | kolla-a18c9dd7662d5cdaf7b0986d7e1a32b04360cd7b.tar.gz kolla-a18c9dd7662d5cdaf7b0986d7e1a32b04360cd7b.zip | |
Merge "Update docstring in handle_repos"
| -rw-r--r-- | kolla/template/methods.py | 18 |
1 files 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): |
