Ejemplo n.º 1
0
    def opsyscomponents(self):
        self.begin('Components')
        opsysobjs = self.ses.query(OpSys).all()

        for comp in data.COMPS:
            for obj in opsysobjs:
                if randutils.tosslow():
                    continue
                compobj = OpSysComponent(name=comp)
                compobj.opsys = obj
                for release in randutils.pickmost(obj.releases):
                    release_assoc = OpSysReleaseComponent()
                    release_assoc.release = release
                    compobj.opsysreleases.append(release_assoc)
                self.add(compobj)
        self.commit()
Ejemplo n.º 2
0
    def opsyscomponents(self):
        self.begin('Components')
        opsysobjs = self.ses.query(OpSys).all()

        for comp in data.COMPS.keys():
            for obj in opsysobjs:
                if randutils.tosslow():
                    continue
                compobj = OpSysComponent(name=comp)
                compobj.opsys = obj
                for release in randutils.pickmost(obj.releases):
                    release_assoc = OpSysReleaseComponent()
                    release_assoc.release = release
                    compobj.opsysreleases.append(release_assoc)
                self.add(compobj)
        self.commit()
Ejemplo n.º 3
0
    def opsyscomponents(self) -> None:
        self.begin('Components')
        opsysobjs = self.ses.query(OpSys).all()

        for comp in data.COMPS:
            for obj in opsysobjs:
                if randutils.tosslow():
                    continue
                compobj = OpSysComponent(name=comp)
                compobj.opsys = obj
                for release in randutils.pickmost(obj.releases):
                    release_assoc = OpSysReleaseComponent()
                    release_assoc.release = release
                    # OpSysComponent.releases is a backref from OpSysReleaseComponent.
                    compobj.releases.append(release_assoc)  # pylint: disable=no-member
                self.add(compobj)
        self.commit()