interactive

Interactive module.

class homer.interactive.ApprovalStatus(value)[source]

Bases: Enum

Represent the different approval statuses.

APPROVE_ALL = 'all'

Approve the configuration diff for the current device and all next devices with the same diff.

APPROVE_SINGLE = 'yes'

Approve the configuration diff for the current device only.

REJECT_ALL = 'none'

Reject the configuration diff for the current device and all next devices with the same diff.

REJECT_SINGLE = 'no'

Reject the configuration diff for the current device only.

homer.interactive.ask_approval() homer.interactive.ApprovalStatus[source]

Ask the user for the approval level for the given device configuration diff.

Return type:

homer.interactive.ApprovalStatus

Returns:

the approval status, one of the values of the homer.interactive.ApprovalStatus enum.

Raises:

homer.exceptions.HomerError -- if not in a TTY or too many invalid answers were provided.