def getColnamesForDiffCategory(self, category, Installed=False, colnames=COMPARE_2_SOFTWARE):
     source=Source(dbhandle=self.db)
     sourcenames=source.getSourcesForCategory(category)
     colnames_ret=list()
     colnames_ret.append(colnames[0])
     for sourcename in sourcenames:
         for colname in colnames[1:]:
             colnames_ret.append(colname+"_"+self.escapeSQL(sourcename))
     if Installed:
         colnames_ret.append(SoftwareCMDB.DIFFS_COLNAME)
     return colnames_ret
 def getDiffsFromCategory(self, category, colnames=None, limitup=0, limitdown=0, where=None, orderby=None, Diffs=True, NotInstalled=True, Installed=False):
     """
     Returns a resultset of differences of the given categories.
     Parameter are the sourcesnames to compare
     """
     sources=list()
     source=Source(dbhandle=self.db)
     snames=source.getSourcesForCategory(category)
     if len(snames) == 0:
         return None
     else:
         snames=self.escapeSQL(snames)
         return self.getDiffsFromSources(snames, colnames, limitup, limitdown, where, orderby, Diffs, NotInstalled, Installed)
Example #3
0
 def getColnamesForDiffCategory(self,
                                category,
                                Installed=False,
                                colnames=COMPARE_2_SOFTWARE):
     source = Source(dbhandle=self.db)
     sourcenames = source.getSourcesForCategory(category)
     colnames_ret = list()
     colnames_ret.append(colnames[0])
     for sourcename in sourcenames:
         for colname in colnames[1:]:
             colnames_ret.append(colname + "_" + self.escapeSQL(sourcename))
     if Installed:
         colnames_ret.append(SoftwareCMDB.DIFFS_COLNAME)
     return colnames_ret
Example #4
0
 def getDiffsFromCategory(self,
                          category,
                          colnames=None,
                          limitup=0,
                          limitdown=0,
                          where=None,
                          orderby=None,
                          Diffs=True,
                          NotInstalled=True,
                          Installed=False):
     """
     Returns a resultset of differences of the given categories.
     Parameter are the sourcesnames to compare
     """
     sources = list()
     source = Source(dbhandle=self.db)
     snames = source.getSourcesForCategory(category)
     if len(snames) == 0:
         return None
     else:
         snames = self.escapeSQL(snames)
         return self.getDiffsFromSources(snames, colnames, limitup,
                                         limitdown, where, orderby, Diffs,
                                         NotInstalled, Installed)