File tree Expand file tree Collapse file tree
repos/system_upgrade/common/actors/dummyinhibitor Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ from leapp .actors import Actor
2+ from leapp import reporting
3+ from leapp .reporting import Report
4+ from leapp .tags import ChecksPhaseTag , IPUWorkflowTag
5+
6+ import os
7+
8+
9+ class DummyInhibitor (Actor ):
10+ """
11+ Raise an inhibitor report to halt the upgrade process when the test marker is present.
12+ """
13+
14+ name = 'dummy_inhibitor'
15+ consumes = ()
16+ produces = (Report ,)
17+ tags = (IPUWorkflowTag , ChecksPhaseTag )
18+
19+ def process (self ):
20+ if os .path .exists ("/etc/noleapp" ):
21+ reporting .create_report ([
22+ reporting .Title ('Upgrade blocked by /etc/noleapp' ),
23+ reporting .Summary (
24+ '/etc/noleapp file is present, upgrade blocked by dummy_inhibitor actor.'
25+ ),
26+ reporting .Severity (reporting .Severity .HIGH ),
27+ reporting .Tags ([reporting .Tags .SANITY ]),
28+ reporting .Flags ([reporting .Flags .INHIBITOR ]),
29+ ])
You can’t perform that action at this time.
0 commit comments