usage()
#        sys.exit()
    elif opt in ('-c', '--config'):
        xmlFilePath = arg
    elif opt in ('-p', '--project'):
        projectName = arg
    elif opt in ('-t', '--to'):
        emailto = arg
    else:
        usage()

checkerPropertiesHash = {}
ConfigFile = XmlConfigFileRead(xmlFilePath)

WSCoverity = ConnectionService(ConfigFile.getHost(), ConfigFile.getPort(),
                               ConfigFile.getUserName(),
                               ConfigFile.getPassword(), ConfigFile.getSSL())
filterSpec = WSCoverity.projectScopeDefectFilterSpecDataObj(
    None, None, None, None, None, None, None, None, None, None, None, None,
    None, None, None, None, None, None, None, None)

workbook = xlsxwriter.Workbook('Defect_Resolved_Report.xlsx')
header_format = workbook.add_format({
    'bold': True,
    'font_color': 'white',
    'bg_color': '#0096d6',
    'font_name': 'HP Simplified',
    'align': 'center',
    'valign': 'center'
})
header_format_bottom = workbook.add_format({
Beispiel #2
0
        sys.exit(0)
    elif opt in ('-c', '--config'):
        xmlFilePath = arg
    elif opt in ('-p', '--project'):
        projectName = arg
    elif opt in ('-t', '--to'):
        emailto = arg
    elif opt in ('-d', '--days'):
        daysBefore = arg
    else:
        usage()

ConfigFile = XmlConfigFileRead(xmlFilePath)

WSCoverity = ConnectionService(ConfigFile.getHost(), ConfigFile.getPort(),
                               ConfigFile.getUserName(),
                               ConfigFile.getPassword(), ConfigFile.getSSL())
fromDate = datetime.now(timezone.utc) - timedelta(days=int(daysBefore))
userdefectHash = {}
tfaldefectHash = {}
defectsSend = []
ownerChangesIndex = 5
defects = []
pageStartIndex = 0
numDefects = 0

while True:
    sizePage = WSCoverity.pageSpecDataObj(1000, True, None, pageStartIndex)
    filterSpec = WSCoverity.projectScopeDefectFilterSpecDataObj(
        None, None, None, None, None, None, None, None, None, None, None, None,
        None, None, None, fromDate, None, None, None, None)
Beispiel #3
0
    elif opt in ('-c', '--config'):
        xmlFilePath = arg
    elif opt in ('-p', '--project'):
        projectName = arg
    elif opt in ('-d', '--days'):
        daysBefore = arg
    elif opt in ('-t', '--to'):
        toUsers = arg
    else:
        usage()
        sys.exit(0)

ConfigFile = XmlConfigFileRead(xmlFilePath)

WSCoverity = ConnectionService(ConfigFile.getHost(), ConfigFile.getPort(),
                               ConfigFile.getUserName(),
                               ConfigFile.getPassword(), ConfigFile.getSSL())
fromDate = datetime.now(timezone.utc) - timedelta(days=int(daysBefore))
lastDetectedDate = datetime.now(timezone.utc) - timedelta(days=1)

new_defects = []
mergedDefects = []
pageStartIndex = 0
numDefects = 0
while True:
    sizePage = WSCoverity.pageSpecDataObj(1000, True, None, pageStartIndex)
    filterSpec = WSCoverity.projectScopeDefectFilterSpecDataObj(
        None, None, None, None, None, None, None, None, None, None, None, None,
        None, None, None, lastDetectedDate, None, None, None, None)
    defectsPage = WSCoverity.getMergedDefectsForProjectScope(
        projectName, filterSpec, sizePage)
        usage()
#        sys.exit()
    elif opt in ('-c', '--config'):
        xmlFilePath= arg
    elif opt in ('-p', '--project'):
        projectName= arg
    elif opt in ('-t', '--to'):
        emailto= arg
    else:
        usage()


checkerPropertiesHash={}
ConfigFile= XmlConfigFileRead(xmlFilePath)

WSCoverity=ConnectionService(ConfigFile.getHost(),ConfigFile.getPort(),ConfigFile.getUserName(),ConfigFile.getPassword(), ConfigFile.getSSL())
filterSpec=WSCoverity.projectScopeDefectFilterSpecDataObj(None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None)

workbook=xlsxwriter.Workbook('Defect_Resolved_Report.xlsx')
header_format=workbook.add_format({'bold':True,'font_color': 'white', 'bg_color':'#0096d6','font_name':'HP Simplified', 'align':'center','valign':'center'})
header_format_bottom=workbook.add_format({'bold':True,'font_color': 'white', 'bg_color':'#0096d6','font_name':'HP Simplified','bottom':True, 'border_color':'#FFFFFF','align':'center','valign':'center'})
data_format=workbook.add_format({'font_name':'HP Simplified'})
projects =projectName.split(",")
for prName in projects:
    defects=[]
    pageStartIndex=0
    numDefects=0
    row=3
    col=0
    domain=prName.split("-")
    while True:
Beispiel #5
0
    elif opt in ('-p', '--project'):
        projectName= arg
    elif opt in ('-d', '--days'):
        daysBefore= arg
    elif opt in ('-t', '--to'):
        toUsers= arg
    else:
        usage()
        sys.exit(0)




ConfigFile= XmlConfigFileRead(xmlFilePath)

WSCoverity=ConnectionService(ConfigFile.getHost(),ConfigFile.getPort(),ConfigFile.getUserName(),ConfigFile.getPassword(), ConfigFile.getSSL())
fromDate= datetime.now(timezone.utc) - timedelta(days=int(daysBefore))
lastDetectedDate= datetime.now(timezone.utc) - timedelta(days=1)

new_defects=[]
mergedDefects=[]
pageStartIndex=0
numDefects=0
while True:
    sizePage=WSCoverity.pageSpecDataObj(1000,True,None,pageStartIndex)
    filterSpec=WSCoverity.projectScopeDefectFilterSpecDataObj(None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,lastDetectedDate,None,None,None,None)
    defectsPage=WSCoverity.getMergedDefectsForProjectScope(projectName,filterSpec,sizePage)
    pageStartIndex+=1000
    numDefects=defectsPage['totalNumberOfRecords']
    if numDefects > 0 :
        mergedDefects.extend(defectsPage['mergedDefects'])
Beispiel #6
0
        usage()
        sys.exit(0)
    elif opt in ('-c', '--config'):
        xmlFilePath= arg
    elif opt in ('-p', '--project'):
        projectName= arg
    elif opt in ('-t', '--to'):
        emailto= arg
    elif opt in ('-d', '--days'):
        daysBefore= arg
    else:
        usage()

ConfigFile= XmlConfigFileRead(xmlFilePath)

WSCoverity=ConnectionService(ConfigFile.getHost(),ConfigFile.getPort(),ConfigFile.getUserName(),ConfigFile.getPassword(), ConfigFile.getSSL())
fromDate=datetime.now(timezone.utc) - timedelta(days=int(daysBefore)) 
userdefectHash={}
tfaldefectHash={}
defectsSend=[]
ownerChangesIndex=5
defects=[]
pageStartIndex=0
numDefects=0

while True:
    sizePage=WSCoverity.pageSpecDataObj(1000,True,None,pageStartIndex)
    filterSpec=WSCoverity.projectScopeDefectFilterSpecDataObj(None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,fromDate,None,None,None,None)
    defectsPage=WSCoverity.getMergedDefectsForProjectScope(projectName,filterSpec,sizePage)
    pageStartIndex+=1000
    numDefects=defectsPage['totalNumberOfRecords']