Skip to content

Commit

Permalink
Add manifest entry for dangerous grade images (new) (#1541)
Browse files Browse the repository at this point in the history
* Add manifest to check grade status of an image

In our testing lab, we need to provision some devices with Ubuntu Core
images that are set to use the 'dangerous' grade.

This will fail the `image/model-grade` test.

Add a new `dangerous_grade_core_image` manifest to decide whether or not
we should be running this test.

It will be run by default (when there is no manifest entry, its value is
set to 'False'), but by setting it to True, the test will be skipped.

* Modify manifest name

Fix #1479
  • Loading branch information
pieqq authored Oct 15, 2024
1 parent 2226b2c commit 37dcd06
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions providers/base/units/image/jobs.pxu
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ flags: preserve-locale
id: image/model-grade
category_id: image
_summary: Check that the model grade is correctly set
imports: from com.canonical.plainbox import manifest
requires:
lsb.distributor_id == "Ubuntu Core" and int(lsb.release) >= 20
manifest.dangerous_grade_core_image == 'False'
_purpose:
Images with the 'dangerous' grade (the lowest of all available grades)
results in certain security measures being relaxed.
Expand Down
5 changes: 5 additions & 0 deletions providers/base/units/image/manifest.pxu
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
unit: manifest entry
id: dangerous_grade_core_image
_name: Image is using 'dangerous' grade (should be set to 'No' unless you're doing SRU testing)
_prompt: Does this setup have the following configuration?
value-type: bool

0 comments on commit 37dcd06

Please sign in to comment.