Both version and schema added in fledge-info support bundle
@@ -69,7 +69,7 @@ class SupportBuilder:
tar_file_name = self._out_file_path+"/"+"support-{}.tar.gz".format(file_spec)
pyz = tarfile.open(tar_file_name, "w:gz")
try:
- await self.add_fledge_version(pyz)
+ await self.add_fledge_version_and_schema(pyz)
self.add_syslog_fledge(pyz, file_spec)
self.add_syslog_storage(pyz, file_spec)
cf_mgr = ConfigurationManager(self._storage)
@@ -130,10 +130,11 @@ class SupportBuilder:
json.dump(data, outfile, indent=4)
pyz.add(temp_file, arcname=basename(temp_file))
- async def add_fledge_version(self, pyz):
- temp_file = self._interim_file_path + "/" + "fledge-version"
- data = await self._storage.query_tbl("version")
- self.write_to_tar(pyz, temp_file, int(data['rows'][0]['id']))
+ async def add_fledge_version_and_schema(self, pyz):
+ temp_file = self._interim_file_path + "/" + "fledge-info"
+ with open('{}/VERSION'.format(_FLEDGE_ROOT)) as f:
+ lines = [line.rstrip() for line in f]
+ self.write_to_tar(pyz, temp_file, lines)
def add_syslog_fledge(self, pyz, file_spec):
# The fledge entries from the syslog file
