Changeset 79087 in vbox for trunk/src/VBox/ValidationKit/testmanager/core/schedgroup.py
- Timestamp:
- Jun 11, 2019 11:58:28 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 131247
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testmanager/core/schedgroup.py
r76553 r79087 259 259 def __init__(self): 260 260 SchedGroupData.__init__(self); 261 self.aoMembers = [] ;# type: SchedGroupMemberDataEx261 self.aoMembers = [] # type: SchedGroupMemberDataEx 262 262 263 263 # Two build sources for convenience sake. 264 self.oBuildSrc = None ;# type: TestBoxData265 self.oBuildSrcValidationKit = None ;# type: TestBoxData264 self.oBuildSrc = None # type: TestBoxData 265 self.oBuildSrcValidationKit = None # type: TestBoxData 266 266 # List of test boxes that uses this group for convenience. 267 self.aoTestBoxes = None ;# type: list[TestBoxData]267 self.aoTestBoxes = None # type: list[TestBoxData] 268 268 269 269 def _initExtraMembersFromDb(self, oDb, tsNow = None, sPeriodBack = None): … … 421 421 422 422 423 class SchedGroupLogic(ModelLogicBase): # pylint: disable= R0903423 class SchedGroupLogic(ModelLogicBase): # pylint: disable=too-few-public-methods 424 424 """ 425 425 SchedGroup logic. … … 578 578 raise TMRowInUse('Scheduling group #%d is associated with one or more test boxes: %s' 579 579 % (idSchedGroup, ', '.join(asTestBoxes),)); 580 else: 581 # Reassign testboxes to scheduling group #1 (the default group). 582 oTbLogic = TestBoxLogic(self._oDb); 583 for oTestBox in oData.aoTestBoxes: 584 oTbCopy = TestBoxData().initFromOther(oTestBox); 585 oTbCopy.idSchedGroup = 1; 586 oTbLogic.editEntry(oTbCopy, uidAuthor, fCommit = False); 587 588 oData = SchedGroupDataEx().initFromDbWithId(self._oDb, idSchedGroup); 589 if oData.aoTestBoxes: 590 raise TMRowInUse('More testboxes was added to the scheduling group as we were trying to delete it.'); 580 # Reassign testboxes to scheduling group #1 (the default group). 581 oTbLogic = TestBoxLogic(self._oDb); 582 for oTestBox in oData.aoTestBoxes: 583 oTbCopy = TestBoxData().initFromOther(oTestBox); 584 oTbCopy.idSchedGroup = 1; 585 oTbLogic.editEntry(oTbCopy, uidAuthor, fCommit = False); 586 587 oData = SchedGroupDataEx().initFromDbWithId(self._oDb, idSchedGroup); 588 if oData.aoTestBoxes: 589 raise TMRowInUse('More testboxes was added to the scheduling group as we were trying to delete it.'); 591 590 592 591 # … … 982 981 # 983 982 984 # pylint: disable= C0111983 # pylint: disable=missing-docstring 985 984 class SchedGroupMemberDataTestCase(ModelDataBaseTestCase): 986 985 def setUp(self):
Note:
See TracChangeset
for help on using the changeset viewer.