Changeset 65226 in vbox for trunk/src/VBox/ValidationKit/testmanager/core
- Timestamp:
- Jan 10, 2017 3:36:36 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 112734
- Location:
- trunk/src/VBox/ValidationKit/testmanager/core
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testmanager/core/build.py
r65053 r65226 152 152 self.dCache = None; 153 153 154 def fetchForListing(self, iStart, cMaxRows, tsNow ):154 def fetchForListing(self, iStart, cMaxRows, tsNow, aiSortColumns = None): 155 155 """ 156 156 Fetches testboxes for listing. … … 515 515 # 516 516 517 def fetchForListing(self, iStart, cMaxRows, tsNow ):517 def fetchForListing(self, iStart, cMaxRows, tsNow, aiSortColumns = None): 518 518 """ 519 519 Fetches builds for listing. … … 522 522 Raises exception on error. 523 523 """ 524 _ = aiSortColumns; 525 524 526 if tsNow is None: 525 527 self._oDb.execute('SELECT *\n' -
trunk/src/VBox/ValidationKit/testmanager/core/buildblacklist.py
r65040 r65226 128 128 self.dCache = None; 129 129 130 def fetchForListing(self, iStart, cMaxRows, tsNow ):130 def fetchForListing(self, iStart, cMaxRows, tsNow, aiSortColumns = None): 131 131 """ 132 132 Fetches Build Blacklist records. … … 135 135 Raises exception on error. 136 136 """ 137 _ = aiSortColumns; 137 138 138 139 if tsNow is None: -
trunk/src/VBox/ValidationKit/testmanager/core/buildsource.py
r65040 r65226 163 163 # 164 164 165 def fetchForListing(self, iStart, cMaxRows, tsNow ):165 def fetchForListing(self, iStart, cMaxRows, tsNow, aiSortColumns = None): 166 166 """ 167 167 Fetches build sources. … … 170 170 Raises exception on error. 171 171 """ 172 _ = aiSortColumns; 173 172 174 if tsNow is None: 173 175 self._oDb.execute('SELECT *\n' -
trunk/src/VBox/ValidationKit/testmanager/core/failurecategory.py
r62484 r65226 111 111 self.dCache = None; 112 112 113 def fetchForListing(self, iStart, cMaxRows, tsNow ):113 def fetchForListing(self, iStart, cMaxRows, tsNow, aiSortColumns = None): 114 114 """ 115 115 Fetches Failure Category records. … … 118 118 Raises exception on error. 119 119 """ 120 _ = aiSortColumns; 120 121 121 122 if tsNow is None: -
trunk/src/VBox/ValidationKit/testmanager/core/failurereason.py
r65040 r65226 149 149 self.oUserAccountLogic = None; 150 150 151 def fetchForListing(self, iStart, cMaxRows, tsNow ):151 def fetchForListing(self, iStart, cMaxRows, tsNow, aiSortColumns = None): 152 152 """ 153 153 Fetches Failure Category records. … … 156 156 Raises exception on error. 157 157 """ 158 _ = aiSortColumns; 158 159 self._ensureCachesPresent(); 159 160 … … 188 189 return aoRows 189 190 190 def fetchForListingInCategory(self, iStart, cMaxRows, tsNow, idFailureCategory ):191 def fetchForListingInCategory(self, iStart, cMaxRows, tsNow, idFailureCategory, aiSortColumns = None): 191 192 """ 192 193 Fetches Failure Category records. … … 195 196 Raises exception on error. 196 197 """ 198 _ = aiSortColumns; 197 199 self._ensureCachesPresent(); 198 200 -
trunk/src/VBox/ValidationKit/testmanager/core/globalresource.py
r65040 r65226 124 124 self.dCache = None; 125 125 126 def fetchForListing(self, iStart, cMaxRows, tsNow ):126 def fetchForListing(self, iStart, cMaxRows, tsNow, aiSortColumns = None): 127 127 """ 128 128 Returns an array (list) of FailureReasonData items, empty list if none. 129 129 Raises exception on error. 130 130 """ 131 _ = aiSortColumns; 131 132 132 133 if tsNow is None: -
trunk/src/VBox/ValidationKit/testmanager/core/schedgroup.py
r65040 r65226 434 434 # 435 435 436 def fetchForListing(self, iStart, cMaxRows, tsNow ):436 def fetchForListing(self, iStart, cMaxRows, tsNow, aiSortColumns = None): 437 437 """ 438 438 Fetches build sources. … … 441 441 Raises exception on error. 442 442 """ 443 _ = aiSortColumns; 443 444 444 445 if tsNow is None: -
trunk/src/VBox/ValidationKit/testmanager/core/systemchangelog.py
r65211 r65226 128 128 129 129 130 def fetchForListingEx(self, iStart, cMaxRows, tsNow, cDaysBack ):130 def fetchForListingEx(self, iStart, cMaxRows, tsNow, cDaysBack, aiSortColumns = None): 131 131 """ 132 132 Fetches SystemLog entries. … … 135 135 Raises exception on error. 136 136 """ 137 _ = aiSortColumns; 137 138 138 139 # -
trunk/src/VBox/ValidationKit/testmanager/core/systemlog.py
r62484 r65226 103 103 ModelLogicBase.__init__(self, oDb); 104 104 105 def fetchForListing(self, iStart, cMaxRows, tsNow ):105 def fetchForListing(self, iStart, cMaxRows, tsNow, aiSortColumns = None): 106 106 """ 107 107 Fetches SystemLog entries. … … 110 110 Raises exception on error. 111 111 """ 112 _ = aiSortColumns; 112 113 if tsNow is None: 113 114 self._oDb.execute('SELECT *\n' -
trunk/src/VBox/ValidationKit/testmanager/core/testbox.py
r65094 r65226 671 671 """ 672 672 673 kiSortColumn_sName = 0; 674 kiSortColumn_sOs = 1; 675 kiSortColumn_sOsVersion = 2; 676 kiSortColumn_sCpuVendor = 3; 677 kiSortColumn_sCpuArch = 4; 678 kiSortColumn_lCpuRevision = 5; 679 kiSortColumn_cCpus = 6; 680 kiSortColumn_cMbMemory = 7; 681 kiSortColumn_cMbScratch = 8; 682 kiSortColumn_fNestedPaging = 9; 683 kiSortColumn_iTestBoxScriptRev = 10; 684 kiSortColumn_iPythonHexVersion = 11; 685 kcMaxSortColumns = 12; 686 kdSortColumnMap = { 687 kiSortColumn_sName: 'TestBoxesWithStrings.sName', 688 kiSortColumn_sOs: 'TestBoxesWithStrings.sOs', 689 kiSortColumn_sOsVersion: 'TestBoxesWithStrings.sOsVersion', 690 kiSortColumn_sCpuVendor: 'TestBoxesWithStrings.sCpuVendor', 691 kiSortColumn_sCpuArch: 'TestBoxesWithStrings.sCpuArch', 692 kiSortColumn_lCpuRevision: 'TestBoxesWithStrings.lCpuRevision', 693 kiSortColumn_cCpus: 'TestBoxesWithStrings.cCpus', 694 kiSortColumn_cMbMemory: 'TestBoxesWithStrings.cMbMemory', 695 kiSortColumn_cMbScratch: 'TestBoxesWithStrings.cMbScratch', 696 kiSortColumn_fNestedPaging: 'TestBoxesWithStrings.fNestedPaging', 697 kiSortColumn_iTestBoxScriptRev: 'TestBoxesWithStrings.iTestBoxScriptRev', 698 kiSortColumn_iPythonHexVersion: 'TestBoxesWithStrings.iPythonHexVersion', 699 }; 673 700 674 701 def __init__(self, oDb): … … 694 721 return oData; 695 722 696 def fetchForListing(self, iStart, cMaxRows, tsNow ):723 def fetchForListing(self, iStart, cMaxRows, tsNow, aiSortColumns = None): 697 724 """ 698 725 Fetches testboxes for listing. … … 713 740 714 741 from testmanager.core.testboxstatus import TestBoxStatusData; 742 743 if aiSortColumns is None or len(aiSortColumns) == 0: 744 aiSortColumns = [self.kiSortColumn_sName,]; 715 745 716 746 if tsNow is None: … … 721 751 ' ON TestBoxStatuses.idTestBox = TestBoxesWithStrings.idTestBox\n' 722 752 'WHERE TestBoxesWithStrings.tsExpire = \'infinity\'::TIMESTAMP\n' 723 'ORDER BY TestBoxesWithStrings.sName\n'753 'ORDER BY ' + (', '.join([self.kdSortColumnMap[i] for i in aiSortColumns])) + '\n' 724 754 'LIMIT %s OFFSET %s\n' 725 755 , (cMaxRows, iStart,)); … … 732 762 'WHERE tsExpire > %s\n' 733 763 ' AND tsEffective <= %s\n' 734 'ORDER BY TestBoxesWithStrings.sName\n'764 'ORDER BY ' + (', '.join([self.kdSortColumnMap[i] for i in aiSortColumns])) + '\n' 735 765 'LIMIT %s OFFSET %s\n' 736 766 , ( tsNow, tsNow, cMaxRows, iStart,)); -
trunk/src/VBox/ValidationKit/testmanager/core/testcase.py
r62484 r65226 965 965 return aoRet 966 966 967 def fetchForListing(self, iStart, cMaxRows, tsNow ):967 def fetchForListing(self, iStart, cMaxRows, tsNow, aiSortColumns = None): 968 968 """ 969 969 Fetches test cases. … … 972 972 Raises exception on error. 973 973 """ 974 _ = aiSortColumns; 974 975 if tsNow is None: 975 976 self._oDb.execute('SELECT *\n' -
trunk/src/VBox/ValidationKit/testmanager/core/testgroup.py
r65040 r65226 380 380 # 381 381 382 def fetchForListing(self, iStart, cMaxRows, tsNow ):382 def fetchForListing(self, iStart, cMaxRows, tsNow, aiSortColumns = None): 383 383 """ 384 384 Fetches test groups. … … 387 387 Raises exception on error. 388 388 """ 389 _ = aiSortColumns; 389 390 if tsNow is None: 390 391 self._oDb.execute('SELECT *\n' -
trunk/src/VBox/ValidationKit/testmanager/core/useraccount.py
r62484 r65226 123 123 self.dCache = None; 124 124 125 def fetchForListing(self, iStart, cMaxRows, tsNow ):125 def fetchForListing(self, iStart, cMaxRows, tsNow, aiSortColumns = None): 126 126 """ 127 127 Fetches user accounts. … … 130 130 Raises exception on error. 131 131 """ 132 _ = aiSortColumns; 132 133 if tsNow is None: 133 134 self._oDb.execute('SELECT *\n' -
trunk/src/VBox/ValidationKit/testmanager/core/vcsrevisions.py
r62484 r65226 113 113 # 114 114 115 def fetchForListing(self, iStart, cMaxRows, tsNow ):115 def fetchForListing(self, iStart, cMaxRows, tsNow, aiSortColumns = None): 116 116 """ 117 117 Fetches VCS revisions for listing. … … 120 120 Raises exception on error. 121 121 """ 122 _ = tsNow; 122 _ = tsNow; _ = aiSortColumns; 123 123 self._oDb.execute('SELECT *\n' 124 124 'FROM VcsRevisions\n'
Note:
See TracChangeset
for help on using the changeset viewer.