Ejemplo n.º 1
0
def confirm_tags_addition() -> bool:
    """
    Choice to add or not tags.

    :return: boolean
    """
    q = q_confirm(message="Add tags", default=True)
    add_tags = answer(q)
    return add_tags
Ejemplo n.º 2
0
def confirm_ipv6_addition() -> bool:
    """
    Choice for IPv6 support or not.

    :return: boolean
    """
    q = q_confirm(message="Enable IPv6", default=False)
    ipv6 = answer(q)
    return ipv6
Ejemplo n.º 3
0
def confirm_backups_addition() -> bool:
    """
    Choice to enable Droplet Backup or not.

    :return: boolean
    """
    q = q_confirm(message="Enable Backups", default=True)
    backup = answer(q)
    return backup
Ejemplo n.º 4
0
def confirm_ssh_addition() -> bool:
    """
    Choice to add or not ssh keys.

    :return: boolean
    """
    msg = "Add ssh keys\n(if not an email will be sent with the root password)"
    q = q_confirm(message=msg, default=True)
    add_ssh_keys = answer(q)
    return add_ssh_keys
Ejemplo n.º 5
0
def confirm_account(manager: Manager) -> bool:
    """
    Given a manager (which is created from the API token) prompt for
    confirmation about using this account.
    :param Manager manager: instance
    :return: bool
    """
    account = api.get_account_data(manager)
    q = config.q_confirm(message=f"Continue as {account.email}", default=True)
    cont = config.answer(q)
    return cont
Ejemplo n.º 6
0
def confirm_droplet_data(droplet_params) -> bool:
    """
    Choice to confirm the droplet selected data.

    :param dict droplet_params: dict of selected options for droplet creation
    :return: boolean
    """
    helpers.review_droplet_data(droplet_params)
    msg = "One step before droplet creation!\nConfirm selections"
    q = q_confirm(message=msg, default=True)
    confirm = answer(q)
    return confirm