Skip to content
Browse files

Add dynamically captured version data to metadata

Currently the user had to manually change version.json to reflect the
environment in which the user is running browbeat. This commit adds functionality
for browbeat to consume OSP version data captured from stockpile and ship it ES
along with result data, as metadata.

Change-Id: Ic8036914046aa19680abf491683bb9cd141875ff
  • Loading branch information
smalleni committed Mar 2, 2020
1 parent d6bba83 commit 88cf6fc4f01b1f60242972f2d40e2d2bcb5463ba
Showing with 16 additions and 4 deletions.
  1. +16 −0 browbeat/
  2. +0 −4 metadata/version.json
@@ -80,6 +80,19 @@ def get_environment_metadata(self, sys_data):
env_dict['environment_setup'][nodes] = number
return env_dict

def get_version_metadata(self, sys_data):
version = {}
for item, dictionary in six.iteritems(sys_data):
if 'undercloud' in sys_data[item]['group_names']:
if 'stockpile_rhosp_version' in dictionary:
version['rhosp_version'] = dictionary['stockpile_rhosp_version']
if 'stockpile_rhosp_major' in dictionary:
version['rhosp_major'] = dictionary['stockpile_rhosp_major']
if 'stockpile_rhosp_puddle' in dictionary:
version['rhosp_puddle'] = dictionary['stockpile_rhosp_puddle']
return version

def get_software_metadata(self, sys_data):
soft_all_dict = []
bad_output_list = [{},[],""]
@@ -182,6 +195,9 @@ def main():
hardware_data = metadata.get_hardware_metadata(sysdata)
hardware_data, os.path.join(args.path, 'hardware-metadata.json'))
version_data = metadata.get_version_metadata(sysdata)
version_data, os.path.join(args.path, 'version.json'))
software_data = metadata.get_software_metadata(sysdata)
# Just a simple check to ensure that stockpile was able to collect osp data
check = False

This file was deleted.

0 comments on commit 88cf6fc

Please sign in to comment.
You can’t perform that action at this time.