From f259b4e5ca7f7f385feb94f82f449e4572355220 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Wed, 21 Jul 2021 08:09:51 +0000 Subject: [PATCH] =?UTF-8?q?stages/modprobe:=20configuration=5Ffiles=20?= =?UTF-8?q?=E2=86=92=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename the `configuration_files` key to `config` key. --- stages/org.osbuild.modprobe | 10 +++----- test/data/stages/modprobe/b.json | 2 +- test/data/stages/modprobe/b.mpp.json | 38 +++++++++++++++------------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/stages/org.osbuild.modprobe b/stages/org.osbuild.modprobe index c97266d7..50a78876 100755 --- a/stages/org.osbuild.modprobe +++ b/stages/org.osbuild.modprobe @@ -2,10 +2,8 @@ """ Configure modprobe -The option 'configuration_files' allows to create `.conf` configuration files -for modprobe in `/usr/lib/modprobe.d`. At least one configuration file must -be defined. Value os the options is a dictionary with keys being the names -of `.conf` files which will be created. Value of each key is a list +The 'config' option allows the creation of one ore more `.conf` configuration +files for modprobe in `/usr/lib/modprobe.d`. The value of each key is a list of "command" objects with at least the 'command' property and additional properties specific for each command type. The list must contain at least one "command" object. @@ -26,7 +24,7 @@ import osbuild.api SCHEMA = r""" "additionalProperties": false, "properties": { - "configuration_files": { + "config": { "additionalProperties": false, "type": "object", "description": "modprobe configuration files.", @@ -85,7 +83,7 @@ def create_configuration_files(tree, configuration_files_options): def main(tree, options): - configuration_files_options = options.get("configuration_files", {}) + configuration_files_options = options.get("config", {}) create_configuration_files(tree, configuration_files_options) diff --git a/test/data/stages/modprobe/b.json b/test/data/stages/modprobe/b.json index c818f581..95bd090a 100644 --- a/test/data/stages/modprobe/b.json +++ b/test/data/stages/modprobe/b.json @@ -457,7 +457,7 @@ { "name": "org.osbuild.modprobe", "options": { - "configuration_files": { + "config": { "disallow-modules.conf": [ { "command": "blacklist", diff --git a/test/data/stages/modprobe/b.mpp.json b/test/data/stages/modprobe/b.mpp.json index 720af301..4600a282 100644 --- a/test/data/stages/modprobe/b.mpp.json +++ b/test/data/stages/modprobe/b.mpp.json @@ -23,30 +23,32 @@ "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/" } ], - "packages": ["kmod"] + "packages": [ + "kmod" + ] } } }, { "name": "org.osbuild.modprobe", "options": { - "configuration_files": { - "disallow-modules.conf": [ - { - "command": "blacklist", - "modulename": "nouveau" - }, - { - "command": "blacklist", - "modulename": "floppy" - } - ], - "disallow-additional-modules.conf": [ - { - "command": "blacklist", - "modulename": "my-module" - } - ] + "config": { + "disallow-modules.conf": [ + { + "command": "blacklist", + "modulename": "nouveau" + }, + { + "command": "blacklist", + "modulename": "floppy" + } + ], + "disallow-additional-modules.conf": [ + { + "command": "blacklist", + "modulename": "my-module" + } + ] } } }