diff --git a/bootstrapvz/plugins/image_commands/README.rst b/bootstrapvz/plugins/commands/README.rst similarity index 87% rename from bootstrapvz/plugins/image_commands/README.rst rename to bootstrapvz/plugins/commands/README.rst index fd4e579..882f64b 100644 --- a/bootstrapvz/plugins/image_commands/README.rst +++ b/bootstrapvz/plugins/commands/README.rst @@ -26,7 +26,7 @@ Example Create an empty `index.html` in `/var/www` and delete all locales except english. .. code:: yaml - image_commands: - commands: - - [touch, '{root}/var/www/index.html'] - - ['rm -rf /usr/share/locale/[^en]*'] + commands: + commands: + - [touch, '{root}/var/www/index.html'] + - ['rm -rf /usr/share/locale/[^en]*'] diff --git a/bootstrapvz/plugins/image_commands/__init__.py b/bootstrapvz/plugins/commands/__init__.py similarity index 100% rename from bootstrapvz/plugins/image_commands/__init__.py rename to bootstrapvz/plugins/commands/__init__.py diff --git a/bootstrapvz/plugins/image_commands/manifest-schema.yml b/bootstrapvz/plugins/commands/manifest-schema.yml similarity index 91% rename from bootstrapvz/plugins/image_commands/manifest-schema.yml rename to bootstrapvz/plugins/commands/manifest-schema.yml index da1ad8d..5292ea2 100644 --- a/bootstrapvz/plugins/image_commands/manifest-schema.yml +++ b/bootstrapvz/plugins/commands/manifest-schema.yml @@ -3,7 +3,7 @@ $schema: http://json-schema.org/draft-04/schema# properties: plugins: properties: - image_commands: + commands: properties: commands: items: @@ -17,7 +17,7 @@ properties: - commands type: object required: - - image_commands + - commands type: object required: - plugins diff --git a/bootstrapvz/plugins/image_commands/tasks.py b/bootstrapvz/plugins/commands/tasks.py similarity index 85% rename from bootstrapvz/plugins/image_commands/tasks.py rename to bootstrapvz/plugins/commands/tasks.py index 5ab2b27..2dd6eda 100644 --- a/bootstrapvz/plugins/image_commands/tasks.py +++ b/bootstrapvz/plugins/commands/tasks.py @@ -9,7 +9,7 @@ class ImageExecuteCommand(Task): @classmethod def run(cls, info): from bootstrapvz.common.tools import log_check_call - for raw_command in info.manifest.plugins['image_commands']['commands']: + for raw_command in info.manifest.plugins['commands']['commands']: command = map(lambda part: part.format(root=info.root, **info.manifest_vars), raw_command) shell = len(command) == 1 log_check_call(command, shell=shell) diff --git a/manifests/README.rst b/manifests/README.rst index bff6c7b..da2c08a 100644 --- a/manifests/README.rst +++ b/manifests/README.rst @@ -214,7 +214,7 @@ boot, root and swap. optional setting overrides the command bootstrap-vz would normally use to format the partition. The command is specified as a string array where each option/argument is an item in that array (much - like the `image\_commands <../bootstrapvz/plugins/image_commands>`__ plugin). + like the `commands <../bootstrapvz/plugins/commands>`__ plugin). ``optional`` The following variables are available: - ``{fs}``: The filesystem of the partition. - ``{device_path}``: The device path of the partition.