Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Commit

Permalink
refactor products-contains-component output and added --include-conta…
Browse files Browse the repository at this point in the history
…iner-roots
  • Loading branch information
JimFuller-RedHat committed Jan 17, 2024
1 parent 3ab508b commit b541cf2
Show file tree
Hide file tree
Showing 5 changed files with 723 additions and 375 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Changed
* refactor output format of service products-contain-component (GRIF-209)
* container roots are excluded by default (need to use --include-container-roots)

### Added
* --include-container_roots in service products-contain-component

## [0.4.2] - 2024-01-14
### Added
* GRIFFON_VERIFY_SSL environment variable
Expand Down
11 changes: 10 additions & 1 deletion griffon/commands/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,13 @@ def retrieve_component_summary(ctx, component_name, strict_name_search, operatio
help="Regex search.",
mutually_exclusive_group=["strict_name_search"],
)
@click.option(
"--include-container-roots",
"include_container_roots",
is_flag=True,
default=get_config_option("default", "include_container_roots", False),
help="Include OCI root components in output.",
)
@click.pass_context
@progress_bar(is_updatable=True)
def get_product_contain_component(
Expand Down Expand Up @@ -395,12 +402,13 @@ def get_product_contain_component(
verbose,
operation_status,
regex_name_search,
include_container_roots,
):
# with console_status(ctx) as operation_status:
"""List products of a latest component."""
if verbose:
ctx.obj["VERBOSE"] = verbose

ctx.obj["INCLUDE_CONTAINER_ROOTS"] = include_container_roots
if (
not search_latest
and not search_all
Expand All @@ -419,6 +427,7 @@ def get_product_contain_component(
params.pop("sfm2_flaw_id")
params.pop("flaw_mode")
params.pop("affect_mode")
params.pop("include_container_roots")
if component_name:
q = query_service.invoke(
core_queries.products_containing_component_query, params, status=operation_status
Expand Down
Loading

0 comments on commit b541cf2

Please sign in to comment.