COT.commands.add_file module

Module for adding files to VM definitions.

COTAddFile(ui) Add a file (such as a README) to the package.
class COTAddFile(ui)[source]

Bases: COT.commands.command.ReadWriteCommand

Add a file (such as a README) to the package.

Inherited attributes: ui, package, output

Attributes: file, file_id

__init__(ui)[source]

Instantiate this command with the given UI.

Parameters:ui (UI) -- User interface instance.
create_subparser()[source]

Create 'add-file' CLI subparser.

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 -- if ready_to_run() reports False
file

File to be added to the package.

Raises:InvalidInputError -- if the file does not exist.
file_id = None

File identifier string.