def process_ami_record(ami_key, ami_data, whitelist=[], user=None, password=None, url=DEFAULT_URL, component=DEFAULT_COMPONENT, bugzilla_product=DEFAULT_PRODUCT, verbose=False): '''process one ami record creating bug with comment per hwp''' connection = connect(url, user, password) summary = " ".join(ami_key) region, platform, product, version, arch, itype, ami = ami_key bug = create_bug(connection, summary, version, arch, component, bugzilla_product) create_bug_log_attachment(connection, bug, ami, ami_data) ami_result = RESULT_PASSED data = aggregate.nested(ami_data, 'cloudhwname') for hwp in data: sub_result, sub_log = get_hwp_result(data[hwp], whitelist, verbose) if sub_result not in [RESULT_PASSED, RESULT_SKIP ] and ami_result == RESULT_PASSED: ami_result = sub_result bug.addcomment('# %s: %s\n%s' % (hwp, sub_result, '\n'.join(sub_log))) bug.setstatus(ami_result == RESULT_PASSED and 'VERIFIED' or 'ON_QA') return bug.bug_id, ami, ami_result
def process_ami_record_debug(ami_key, ami_data, whitelist=[], user=None, password=None, url=DEFAULT_URL, component=DEFAULT_COMPONENT, bugzilla_product=DEFAULT_PRODUCT, verbose=False): '''process one ami record creating bug with comment per hwp''' summary = " ".join(ami_key) ami = ami_key[-1] logger.debug('*** Summary for bug: %s', summary) logger.debug('*** Ami data: %s', ami_data) bug = 'not created' ami_result = RESULT_PASSED data = aggregate.nested(ami_data, 'cloudhwname') for hwp in data: sub_result, sub_log = get_hwp_result(data[hwp], whitelist, verbose) if sub_result not in [RESULT_PASSED, RESULT_SKIP ] and ami_result == RESULT_PASSED: ami_result = sub_result logger.debug('.....adding comment: # %s: %s\n%s' % (hwp, sub_result, '\n'.join(sub_log))) logger.debug(".....setting status: %s", ami_result == RESULT_PASSED and 'VERIFIED' or 'ON_QA') return bug, ami, ami_result
def process_ami_record(ami, version, arch, region, itype, user, password, ami_data, url=DEFAULT_URL, component=DEFAULT_COMPONENT, product=DEFAULT_PRODUCT, verbose=False): '''process one ami record creating bug with comment per hwp''' connection = connect(url, user, password) summary = '%s %s %s %s %s' % (ami, version, arch, itype, region) bug = create_bug(connection, summary, version, arch, component, product) create_bug_log_attachment(connection, bug, ami, ami_data) ami_result = RESULT_PASSED for hwp in ami_data: sub_result, sub_log = get_hwp_result(ami_data[hwp], verbose) if sub_result not in [RESULT_PASSED, RESULT_SKIP ] and ami_result == RESULT_PASSED: ami_result = sub_result bug.addcomment('# %s: %s\n%s' % (hwp, sub_result, '\n'.join(sub_log))) bug.setstatus(ami_result == RESULT_PASSED and 'VERIFIED' or 'ON_QA') return bug.bug_id, ami, ami_result
def process_ami_record_debug( ami_key, ami_data, whitelist=[], user=None, password=None, url=DEFAULT_URL, component=DEFAULT_COMPONENT, bugzilla_product=DEFAULT_PRODUCT, verbose=False, ): """process one ami record creating bug with comment per hwp""" summary = " ".join(ami_key) ami = ami_key[-1] logger.debug("*** Summary for bug: %s", summary) logger.debug("*** Ami data: %s", ami_data) bug = "not created" ami_result = RESULT_PASSED data = aggregate.nested(ami_data, "cloudhwname") for hwp in data: sub_result, sub_log = get_hwp_result(data[hwp], whitelist, verbose) if sub_result not in [RESULT_PASSED, RESULT_SKIP] and ami_result == RESULT_PASSED: ami_result = sub_result logger.debug(".....adding comment: # %s: %s\n%s" % (hwp, sub_result, "\n".join(sub_log))) logger.debug(".....setting status: %s", ami_result == RESULT_PASSED and "VERIFIED" or "ON_QA") return bug, ami, ami_result
def process_ami_record( ami_key, ami_data, whitelist=[], user=None, password=None, url=DEFAULT_URL, component=DEFAULT_COMPONENT, bugzilla_product=DEFAULT_PRODUCT, verbose=False, ): """process one ami record creating bug with comment per hwp""" connection = connect(url, user, password) summary = " ".join(ami_key) region, platform, product, version, arch, itype, ami = ami_key bug = create_bug(connection, summary, version, arch, component, bugzilla_product) create_bug_log_attachment(connection, bug, ami, ami_data) ami_result = RESULT_PASSED data = aggregate.nested(ami_data, "cloudhwname") for hwp in data: sub_result, sub_log = get_hwp_result(data[hwp], whitelist, verbose) if sub_result not in [RESULT_PASSED, RESULT_SKIP] and ami_result == RESULT_PASSED: ami_result = sub_result bug.addcomment("# %s: %s\n%s" % (hwp, sub_result, "\n".join(sub_log))) bug.setstatus(ami_result == RESULT_PASSED and "VERIFIED" or "ON_QA") return bug.bug_id, ami, ami_result
def process_ami_record(ami, version, arch, region, itype, user, password, ami_data, url=DEFAULT_URL, component=DEFAULT_COMPONENT, product=DEFAULT_PRODUCT, verbose=False): '''process one ami record creating bug with comment per hwp''' connection = connect(url, user, password) summary = '%s %s %s %s %s' % (ami, version, arch, itype, region) bug = create_bug(connection, summary, version, arch, component, product) create_bug_log_attachment(connection, bug, ami, ami_data) ami_result = RESULT_PASSED for hwp in ami_data: sub_result, sub_log = get_hwp_result(ami_data[hwp], verbose) if sub_result not in [RESULT_PASSED, RESULT_SKIP] and ami_result == RESULT_PASSED: ami_result = sub_result bug.addcomment('# %s: %s\n%s' % (hwp, sub_result, '\n'.join(sub_log))) bug.setstatus(ami_result == RESULT_PASSED and 'VERIFIED' or 'ON_QA') return bug.bug_id, ami, ami_result
def process_ami_record_debug(ami, version, arch, region, itype, user, password, ami_data, url=DEFAULT_URL, component=DEFAULT_COMPONENT, product=DEFAULT_PRODUCT, verbose=False): '''process one ami record creating bug with comment per hwp''' summary = '%s %s %s %s %s' % (ami, version, arch, itype, region) logger.debug('*** Summary for bug: %s %s %s %s %s', ami, version, arch, itype, region) logger.debug('*** Ami data: %s', ami_data) bug = 'not created' logger.debug('version: %s, arch: %s, component: %s, product: %s', version, arch, component, product) ami_result = RESULT_PASSED for hwp in ami_data: sub_result, sub_log = get_hwp_result(ami_data[hwp], verbose) if sub_result not in [RESULT_PASSED, RESULT_SKIP] and ami_result == RESULT_PASSED: ami_result = sub_result logger.debug('.....adding comment: # %s: %s\n%s' % (hwp, sub_result, '\n'.join(sub_log))) logger.debug(".....setting status: %s", ami_result == RESULT_PASSED and 'VERIFIED' or 'ON_QA') return bug, ami, ami_result