Implement local search feature
This commit adds local image information search feature to imagen script. It can be used with imagen local --dir <search_path> and script searches image information in given directory.
In addition to this, repository is refactored so that imagen.py becomes the main function and AWS releated search functions are placed under aws.py and local search functions are placed in local.py.
Furhermore logging used instead of print for printing.
Here is the sample generated test_images_info.json file;
{
"UUID": "",
"RELEASE": "",
"X_STREAM": "",
"UPSTREAM_DISTRO_ID": "",
"UPSTREAM_DISTRO_VERSION": "",
"COMPOSES_BASEURL": "",
"IMAGES_BASEURL": "",
"qemu": [],
"aws": [],
"ridesx4": [
{
"aboot_image_path": "dummy-dir/latest/RideSX4/auto-osbuild-ridesx4-autosd9-developer-ostree-aarch64-9982414.a848fd6d.aboot/aboot.img.xz",
"arch": "aarch64",
"build_target": "ridesx4",
"image_type": "ostree",
"image_name": "developer",
"root_image_path": "dummy-dir/latest/RideSX4/auto-osbuild-ridesx4-autosd9-developer-ostree-aarch64-9982414.a848fd6d.aboot/rootfs.simg.xz",
"build_format": "aboot.simg",
"s3_upload_prefix": "dummy-dir/latest/RideSX4/auto-osbuild-ridesx4-autosd9-developer-ostree-aarch64-9982414.a848fd6d.aboot",
"tf_pool": "ride4-atc",
"debug": "false"
},
{
"aboot_image_path": "dummy-dir/latest/RideSX4/auto-osbuild-ridesx4-autosd9-developer-ostree-aarch64-10027135.a848fd6d.aboot/aboot.img.xz",
"arch": "aarch64",
"build_target": "ridesx4",
"image_type": "ostree",
"image_name": "developer",
"root_image_path": "dummy-dir/latest/RideSX4/auto-osbuild-ridesx4-autosd9-developer-ostree-aarch64-10027135.a848fd6d.aboot/rootfs.simg.xz",
"build_format": "aboot.simg",
"s3_upload_prefix": "dummy-dir/latest/RideSX4/auto-osbuild-ridesx4-autosd9-developer-ostree-aarch64-10027135.a848fd6d.aboot",
"tf_pool": "ride4-atc",
"debug": "false"
}
],
"am69sk": [],
"j784s4evm": [],
"rcar_s4": [
{
"image": "auto-osbuild-rcar_s4-autosd9-qa-ostree-aarch64-10044976.9a86b502.raw.xz",
"arch": "aarch64",
"build_target": "rcar_s4",
"image_type": "ostree",
"image_name": "qa",
"path": "dummy-dir/latest/Renesans/auto-osbuild-rcar_s4-autosd9-qa-ostree-aarch64-10044976.9a86b502.raw.xz",
"build_format": "raw",
"s3_upload_prefix": "dummy-dir/latest/Renesans",
"tf_pool": "rcar-s4-atc",
"debug": "false"
},
{
"image": "auto-osbuild-rcar_s4-autosd9-qa-regular-aarch64-10044976.9a86b502.raw.xz",
"arch": "aarch64",
"build_target": "rcar_s4",
"image_type": "regular",
"image_name": "qa",
"path": "dummy-dir/latest/Renesans/auto-osbuild-rcar_s4-autosd9-qa-regular-aarch64-10044976.9a86b502.raw.xz",
"build_format": "raw",
"s3_upload_prefix": "dummy-dir/latest/Renesans",
"tf_pool": "rcar-s4-atc",
"debug": "false"
}
],
"s32g_vnp_rdb3": [],
"rpi4": [],
"qdrive3": []
}
Edited by Ozan Unsal