Fix #99: Rename image_commands to commands

This commit is contained in:
Anders Ingemann 2015-05-02 12:36:14 +02:00
parent a9b1624427
commit fa8da6171d
5 changed files with 8 additions and 8 deletions

View file

@ -26,7 +26,7 @@ Example
Create an empty `index.html` in `/var/www` and delete all locales except english. Create an empty `index.html` in `/var/www` and delete all locales except english.
.. code:: yaml .. code:: yaml
image_commands: commands:
commands: commands:
- [touch, '{root}/var/www/index.html'] - [touch, '{root}/var/www/index.html']
- ['rm -rf /usr/share/locale/[^en]*'] - ['rm -rf /usr/share/locale/[^en]*']

View file

@ -3,7 +3,7 @@ $schema: http://json-schema.org/draft-04/schema#
properties: properties:
plugins: plugins:
properties: properties:
image_commands: commands:
properties: properties:
commands: commands:
items: items:
@ -17,7 +17,7 @@ properties:
- commands - commands
type: object type: object
required: required:
- image_commands - commands
type: object type: object
required: required:
- plugins - plugins

View file

@ -9,7 +9,7 @@ class ImageExecuteCommand(Task):
@classmethod @classmethod
def run(cls, info): def run(cls, info):
from bootstrapvz.common.tools import log_check_call 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) command = map(lambda part: part.format(root=info.root, **info.manifest_vars), raw_command)
shell = len(command) == 1 shell = len(command) == 1
log_check_call(command, shell=shell) log_check_call(command, shell=shell)

View file

@ -214,7 +214,7 @@ boot, root and swap.
optional setting overrides the command bootstrap-vz would normally optional setting overrides the command bootstrap-vz would normally
use to format the partition. The command is specified as a string use to format the partition. The command is specified as a string
array where each option/argument is an item in that array (much 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: ``optional`` The following variables are available:
- ``{fs}``: The filesystem of the partition. - ``{fs}``: The filesystem of the partition.
- ``{device_path}``: The device path of the partition. - ``{device_path}``: The device path of the partition.