Skip to content

Commit

Permalink
Print informative message after "lago ovirt start"
Browse files Browse the repository at this point in the history
The message will include the url to the web ui,
username and password.

Signed-off-by: gbenhaim <galbh2@gmail.com>
  • Loading branch information
gbenhaim committed Apr 27, 2017
1 parent 4520202 commit 9cf732e
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions ovirtlago/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import logging
import os
import sys
import textwrap
import warnings

import lago
Expand All @@ -29,6 +30,7 @@
from lago.plugins.cli import CLIPlugin, cli_plugin, cli_plugin_add_argument
from lago.utils import in_prefix, with_logging
from ovirtlago.prefix import OvirtPrefix, OvirtWorkdir
import ovirtlago.constants as constants

LOGGER = logging.getLogger('ovirt-cli')
in_ovirt_prefix = in_prefix(
Expand Down Expand Up @@ -256,6 +258,23 @@ def do_ovirt_start(prefix, with_vms, vms_timeout, **kwargs):
with LogTask('Starting Engine VMs'):
prefix.virt_env.engine_vm().start_all_vms(timeout=vms_timeout)

LOGGER.info(
textwrap.dedent(
"""
The environment is ready to be used.
You can access the web UI with the following link and credentials:
https://{ip}
Username: {username}
Password: {password}
""".format(
ip=prefix.virt_env.engine_vm().ip(),
username=constants.ENGINE_USER.split('@')[0],
password=prefix.virt_env.engine_vm()
.metadata['ovirt-engine-password']
)
)
)


@cli_plugin(
help=(
Expand Down

0 comments on commit 9cf732e

Please sign in to comment.