Add --include argument to old prepare command
So the old prepare command retains feature parity with the new one, add an --include argument for the new include filtering. Change-Id: I472202243fc9b95034e481761845755eb87dff34 Depends-On: I751670f3788898d78f261000c0f51049948e8544
This commit is contained in:
parent
31688cb8c3
commit
5c76e54a12
6
releasenotes/notes/prepare-include-86d96ff1d7bdc44d.yaml
Normal file
6
releasenotes/notes/prepare-include-86d96ff1d7bdc44d.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The command `openstack overcloud container image prepare` command now has
|
||||
an `--include` argument which will filter entries if they do not match any
|
||||
of the include expressions.
|
@ -127,6 +127,7 @@ class TestContainerImagePrepare(TestPluginV1):
|
||||
|
||||
mock_cip.assert_called_with(
|
||||
excludes=[],
|
||||
includes=[],
|
||||
mapping_args={
|
||||
'name_suffix': '',
|
||||
'tag': 'latest',
|
||||
@ -234,6 +235,7 @@ class TestContainerImagePrepare(TestPluginV1):
|
||||
object_request=mock.ANY)
|
||||
mock_cip.assert_called_once_with(
|
||||
excludes=[],
|
||||
includes=[],
|
||||
mapping_args={
|
||||
'namespace': '192.0.2.0:8787/t',
|
||||
'name_suffix': 'foo',
|
||||
|
@ -273,6 +273,17 @@ class PrepareImageFiles(command.Command):
|
||||
"exclude from the final output. Can be specified multiple "
|
||||
"times."),
|
||||
)
|
||||
parser.add_argument(
|
||||
"--include",
|
||||
dest="includes",
|
||||
metavar='<regex>',
|
||||
default=[],
|
||||
action="append",
|
||||
help=_("Pattern to match against resulting imagename entries to "
|
||||
"include in final output. Can be specified multiple "
|
||||
"times, entries not matching any --include will be "
|
||||
"excluded. --exclude is ignored if --include is used."),
|
||||
)
|
||||
parser.add_argument(
|
||||
"--images-file",
|
||||
dest="output_images_file",
|
||||
@ -401,6 +412,7 @@ class PrepareImageFiles(command.Command):
|
||||
|
||||
prepare_data = kolla_builder.container_images_prepare(
|
||||
excludes=parsed_args.excludes,
|
||||
includes=parsed_args.includes,
|
||||
service_filter=service_filter,
|
||||
pull_source=parsed_args.pull_source,
|
||||
push_destination=parsed_args.push_destination,
|
||||
|
Loading…
Reference in New Issue
Block a user