From aa8f6734f44dbeb9c4770b05e700f0da04f252bc Mon Sep 17 00:00:00 2001 From: karmab Date: Fri, 19 Jan 2024 15:55:38 +0100 Subject: [PATCH] switch to ImageDigestSources --- ailib/__init__.py | 8 ++++---- samples/disconnected.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ailib/__init__.py b/ailib/__init__.py index 5a3d01f..6ae1559 100644 --- a/ailib/__init__.py +++ b/ailib/__init__.py @@ -285,7 +285,7 @@ def set_default_values(self, overrides, existing=False, quiet=False): "source": "quay.io/openshift-release-dev/ocp-release"}, {'mirrors': [f"{url}/openshift/release", f"{url}/openshift/release-images"], "source": "quay.io/openshift-release-dev/ocp-v4.0-art-dev"}] - installconfig = {'imageContentSources': disconnected_registries} + installconfig = {'ImageDigestSources': disconnected_registries} info(f"Trying to gather registry ca cert from {url}") cacmd = f"openssl s_client -showcerts -connect {url} /dev/null|" cacmd += "openssl x509 -outform PEM" @@ -409,10 +409,10 @@ def set_disconnected_ignition_config_override(self, infra_env_id=None, overrides _preload_content=False) ignition_version = json.loads(ori.read().decode("utf-8"))['ignition']['version'] if 'installconfig' in overrides and isinstance(overrides['installconfig'], dict)\ - and 'imageContentSources' in overrides['installconfig']: - info("Using imageContentSources from installconfig") + and 'ImageDigestSources' in overrides['installconfig']: + info("Using ImageDigestSources from installconfig") registries = 'unqualified-search-registries = ["registry.access.redhat.com", "docker.io"]\n' - for registry in overrides['installconfig']['imageContentSources']: + for registry in overrides['installconfig']['ImageDigestSources']: source = registry.get('source') for target in registry.get('mirrors', []): new_registry = """[[registry]] diff --git a/samples/disconnected.yml b/samples/disconnected.yml index 5c326bb..d3e3cf7 100644 --- a/samples/disconnected.yml +++ b/samples/disconnected.yml @@ -39,7 +39,7 @@ installconfig: Ig5BBu37RdjCR7JGSF/2QisMmyKoTnyD9P+lFKTgGfsbbxrp7XdeLYY7xaFRzkuZ gAedh+jkW6mjkMIu5RUU -----END CERTIFICATE----- - imageContentSources: + imageDigestSources: - mirrors: - testk-disconnecter.ipv6only:5000/ocp4 source: quay.io/openshift-release-dev/ocp-v4.0-art-dev