rename (2)

Attempts to rename the provided component to the provided new component name. If a component by the new component name already exists, then this method will prompt the user to see if they want to merge the components.

If the user responds in the affirmative, then components will be merged. If the user responds in the negative, the given system will be skipped, and processing will continue to the next selected system.

User prompting behavior may be overridden by supplying the force option with the provided force-mode. See Force Modes below for more information about overriding prompts.

usage: cmri system component rename --name <name> --new-name <new-name> [--force 'accept'[, 'reject']]

required arguments:

-n, --name

The name of the component to rename.

-N, --new-name

The new name for the component.

optional arguments:

-f, --force

Confirm rename of the component. Note that force applies to all selected systems.

accept

Merges without prompting.

reject

Skips the system without prompting.

Force Modes

In order to allow for users to override prompts in non-interactive shells, certain commands in CodeMRI support the concept of “force modes”. Typically these are applied where the CLI would ask the user to cofirm an action multiple times. “Force modes” allow the user to either say “yes to all”, “no to all”, or “prompt me (default)”. See the table below:

accept

Answer “yes” to all prompts without confirmation.

reject

Answer “no” to all prompts without confirmation.

prompt

Display an interactive yes/no prompt for confirmation, halting command progress until action is either accepted or rejected.