Changeset 61593 in vbox for trunk/src/VBox
- Timestamp:
- Jun 8, 2016 8:14:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testmanager/core/testbox.py
r61592 r61593 771 771 if len(dDataErrors) > 0: 772 772 raise TMInvalidData('TestBoxLogic.addEntry: %s' % (dDataErrors,)); 773 if len(oData.aoInSchedGroups): 774 sSchedGrps = ', '.join('(%s)' % oCur.idSchedGroup for oCur in oData.aoInSchedGroups); 775 self._oDb.execute('SELECT SchedGroupIDs.idSchedGroup\n' 776 'FROM (VALUES ' + sSchedGrps + ' ) AS SchedGroupIDs(idSchedGroup)\n' 777 ' LEFT OUTER JOIN SchedGroups\n' 778 ' ON SchedGroupIDs.idSchedGroup = SchedGroups.idSchedGroup\n' 779 ' AND SchedGroups.tsExpire = \'infinity\'::TIMESTAMP\n' 780 'WHERE SchedGroups.idSchedGroup IS NULL\n'); 781 aaoRows = self._oDb.fetchAll(); 782 if len(aaoRows) > 0: 783 raise TMInvalidData('TestBoxLogic.addEntry missing scheduling groups: %s' 784 % (', '.join(str(aoRow[0]) for aoRow in aaoRows),)); 773 if isinstance(oData, TestBoxDataEx): 774 if len(oData.aoInSchedGroups): 775 sSchedGrps = ', '.join('(%s)' % oCur.idSchedGroup for oCur in oData.aoInSchedGroups); 776 self._oDb.execute('SELECT SchedGroupIDs.idSchedGroup\n' 777 'FROM (VALUES ' + sSchedGrps + ' ) AS SchedGroupIDs(idSchedGroup)\n' 778 ' LEFT OUTER JOIN SchedGroups\n' 779 ' ON SchedGroupIDs.idSchedGroup = SchedGroups.idSchedGroup\n' 780 ' AND SchedGroups.tsExpire = \'infinity\'::TIMESTAMP\n' 781 'WHERE SchedGroups.idSchedGroup IS NULL\n'); 782 aaoRows = self._oDb.fetchAll(); 783 if len(aaoRows) > 0: 784 raise TMInvalidData('TestBoxLogic.addEntry missing scheduling groups: %s' 785 % (', '.join(str(aoRow[0]) for aoRow in aaoRows),)); 785 786 return None; 786 787 … … 827 828 Data edit update, web UI is the primary user. 828 829 829 oData is either TestBoxDataEx or TestBoxData. 830 oData is either TestBoxDataEx or TestBoxData. The latter is for enabling 830 831 Returns the new generation ID and effective date. 831 832 """
Note:
See TracChangeset
for help on using the changeset viewer.