Skip to content

Commit

Permalink
add allowExtraConfig and exportFlags to ovftool options
Browse files Browse the repository at this point in the history
Add allowExtraConfig and exportFlags to ovftool options
  • Loading branch information
kastakhov authored Sep 5, 2024
1 parent 1b9d58c commit 3fc6bd9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions kiwi/storage/subformat/ova.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@ def create_image_format(self) -> None:
ovftool, '--shaAlgorithm', raise_on_error=False
):
ovftool_options.append('--shaAlgorithm=SHA1')
if CommandCapabilities.has_option_in_help(
ovftool, '--allowExtraConfig', raise_on_error=False
):
ovftool_options.append('--allowExtraConfig')
if CommandCapabilities.has_option_in_help(
ovftool, '--exportFlags', raise_on_error=False
):
ovftool_options.append('--exportFlags=extraconfig')

Command.run(
[ovftool] + ovftool_options + [vmx, ova]
)
Expand Down
1 change: 1 addition & 0 deletions test/unit/storage/subformat/ova_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def test_create_image_format(
mock_command.assert_called_once_with(
[
'ovftool', '--shaAlgorithm=SHA1',
'--allowExtraConfig', '--exportFlags=extraconfig',
'target_dir/some-disk-image.x86_64-1.2.3.vmx',
'target_dir/some-disk-image.x86_64-1.2.3.ova'
]
Expand Down

0 comments on commit 3fc6bd9

Please sign in to comment.