From c4a99f09d83718a48acf96f73740f5bf1b68ab0d Mon Sep 17 00:00:00 2001 From: Austin Bozowski Date: Tue, 31 May 2022 05:44:42 +0000 Subject: [PATCH] Restructure manifest --- examples/chef/chef.py | 6 ++++-- examples/chef/cimanifest.json | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/chef/chef.py b/examples/chef/chef.py index d73cb8a3611b2b..84895d50b6bcf1 100755 --- a/examples/chef/chef.py +++ b/examples/chef/chef.py @@ -19,6 +19,7 @@ import optparse import os import shutil +import subprocess import sys import tarfile import textwrap @@ -123,13 +124,14 @@ def generate_device_manifest( Returns: Dict containing MD5 of device dir zap files. """ - ci_manifest = {} + ci_manifest = {"devices":{}} + devices_manifest = ci_manifest["devices"] for device_name in _DEVICE_LIST: device_file_path = os.path.join(_DEVICE_FOLDER, device_name + ".zap") with open(device_file_path, "rb") as device_file: device_file_data = device_file.read() device_file_md5 = hashlib.md5(device_file_data).hexdigest() - ci_manifest[device_name] = device_file_md5 + devices_manifest[device_name] = device_file_md5 flush_print(f"Manifest for {device_name} : {device_file_md5}") if write_manifest_file: device_zzz_dir_root = os.path.join(_CHEF_ZZZ_ROOT, device_name) diff --git a/examples/chef/cimanifest.json b/examples/chef/cimanifest.json index ca576bba65b1a7..4392775765dc48 100644 --- a/examples/chef/cimanifest.json +++ b/examples/chef/cimanifest.json @@ -1,4 +1,6 @@ { - "lighting-app": "81a1262e611fab1a71ac4129b91cec0f", + "devices": { + "lighting-app": "81a1262e611fab1a71ac4129b91cec0f" + }, "zap_commit": "TEMP DISABLED" }