Skip to content

Commit a5ec69b

Browse files
kk7dsElod Illes
authored andcommitted
Add safety check and detection support to FI tool
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) (cherry picked from commit a1c94b4)
1 parent b830aba commit a5ec69b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tools/test_format_inspector.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,13 @@ def main():
102102
else:
103103
print('Confirmed size with qemu-img')
104104

105+
print('Image safety check: %s' % (
106+
fmt.safety_check() and 'passed' or 'FAILED'))
107+
if args.input:
108+
detected_fmt = format_inspector.detect_file_format(args.input)
109+
print('Detected inspector for image as: %s' % (
110+
detected_fmt.__class__.__name__))
111+
105112

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

0 commit comments

Comments
 (0)