Skip to content

Commit

Permalink
Add safety check and detection support to FI tool
Browse files Browse the repository at this point in the history
This adds a safety check and detection mechanism to the
tools/test_format_inspector.py utility for verifying those features
outside of glance.

Change-Id: I447e7e51315472f8fa6013d4c4852f54c1e0c43d
(cherry picked from commit b27040b87e43ff4acfb6870ef0d13d54e5ca5caa)
(cherry picked from commit b394ef00c3426771092d099cf1d96077bfa4b919)
(cherry picked from commit aa12d39b453068d9ee8367591eb60d4a15cddece)
  • Loading branch information
kk7ds authored and markgoddard committed Jul 2, 2024
1 parent 867566a commit 11d3b65
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tools/test_format_inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ def main():
else:
print('Confirmed size with qemu-img')

print('Image safety check: %s' % (
fmt.safety_check() and 'passed' or 'FAILED'))
if args.input:
detected_fmt = format_inspector.detect_file_format(args.input)
print('Detected inspector for image as: %s' % (
detected_fmt.__class__.__name__))


if __name__ == '__main__':
sys.exit(main())

0 comments on commit 11d3b65

Please sign in to comment.