Merge "Allow package install to be skipped for image build"

This commit is contained in:
Zuul 2022-01-27 14:05:18 +00:00 committed by Gerrit Code Review
commit 10ee13e279

View File

@ -81,6 +81,13 @@ class BuildOvercloudImage(command.Command):
default=True,
help=_("Skip build if cached image exists."),
)
parser.add_argument(
"--no-package-install",
dest="package_install",
action="store_false",
default=True,
help=_("Skip installing required packages."),
)
parser.add_argument(
"--output-directory",
dest="output_directory",
@ -106,7 +113,8 @@ class BuildOvercloudImage(command.Command):
def take_action(self, parsed_args):
self.log.debug("take_action(%s)" % parsed_args)
self._ensure_packages_installed()
if parsed_args.package_install:
self._ensure_packages_installed()
if not parsed_args.config_files:
parsed_args.config_files = [os.path.join(self.IMAGE_YAML_PATH, f)