COT.commands.inject_config
module¶
Implements "inject-config" command.
-
class
COTInjectConfig
(ui)[source]¶ Bases:
COT.commands.command.ReadWriteCommand
Wrap configuration file(s) into a disk image embedded into the VM.
Inherited attributes:
ui
,package
,output
Attributes:
config_file
,secondary_config_file
,extra_files
-
__init__
(ui)[source]¶ Instantiate this command with the given UI.
Parameters: ui (UI) -- User interface instance.
-
ready_to_run
()[source]¶ Check whether the module is ready to
run()
.Returns: tuple -- (True, ready_message)
or(False, reason_why_not)
-
run
()[source]¶ Do the actual work of this command.
Raises: InvalidInputError
-- ifready_to_run()
reportsFalse
ValueUnsupportedError
-- if theBOOTSTRAP_DISK_TYPE
of the associated VM'splatform
is not 'cdrom' or 'harddisk'LookupError
-- if unable to find a disk drive device to inject the configuration into.
-
working_dir_disk_space_required
()[source]¶ How much space this module will require in
working_dir
.Returns: int -- Predicted temporary storage requirements
-
config_file
¶ Primary configuration file.
Raises: InvalidInputError
-- if the file does not existInvalidInputError
-- if the platform described bypackage
doesn't support configuration files.
-
extra_files
¶ Additional files to be embedded as-is.
Raises: InvalidInputError
-- if any file in the list does not exist
-
secondary_config_file
¶ Secondary configuration file.
Raises: InvalidInputError
-- if the file does not existInvalidInputError
-- if the platform described bypackage
doesn't support secondary configuration files.
-