#! /usr/bin/env python # -*- coding: utf-8 # @author <*****@*****.**> import logging from sys import argv, exit from pronto import Pronto, ProntoHttp404 logger = logging.getLogger('pronto_logger') logger.setLevel(logging.CRITICAL) p = Pronto(strict=True) try: pr = p.problem_report(argv[1]) except ProntoHttp404: print('NOT FOUND') exit(1) else: print(pr.xml())
#p.new_build('test003') #print(p.build_exists('WN9.1_0000_286_00')) #print(p.build_exists('WN9.1_0000_286_00X')) #exit(0) #test_pr = '105576ESPE01' test_pr = '110012ESPE01' #test_pr = 'PR034651' #test_pr = '113352ESPE01' #test_view = 'VIEW013794' test_view = 'VIEW116124' #test_view = 'VIEW026812' print(p.pr_link(test_pr)) print(p.group_fc('LTE_SV_FeVe_WRO')) pr = p.problem_report(test_pr) print(pr.get_history()) print(pr.pr_link()) print(pr.links) print(pr.get_corrections()) print(pr.get_correction_policy()) print(pr.get_top()) print(pr.get_attached()) #pr.new_correction(build='test build') with open('pr.xml', 'w') as f: f.write(pr.xml()) #pr.transfer('RABLTE_PS_CCS_PRESCREENING') #pr.update_build('LN0.0_ENB_0000_000_99', 'LN0.0_ENB_0000_000_00') #pr.new_correction(build='abc') #print(pr.xml())