def update_ase_db_pw():

    env_obj = UnixHostEnvironment()
    env_obj.ase_host_environment_parameters = ASEHostEnvironmentParameters()
    env_obj.ase_host_environment_parameters.credentials = {
        'type': 'PasswordCredential',
        'password': arguments['--pw']
    }

    try:
        environment.update(
            dx_session_obj.server_session,
            find_obj_by_name(dx_session_obj.server_session, environment,
                             arguments['--env_name'], env_obj).reference,
            env_obj)

    except (HttpError, RequestError) as e:
        print_exception('Could not update ASE DB Password:\n{}'.format(e))
        sys.exit(1)
def update_ase_username(dlpx_obj):
    """
    Update the ASE database user password
    """
    engine_name = dlpx_obj.dlpx_engines.keys()[0]

    env_obj = UnixHostEnvironment()
    env_obj.ase_host_environment_parameters = ASEHostEnvironmentParameters()
    env_obj.ase_host_environment_parameters.db_user = \
        arguments['--update_ase_user']

    try:
        environment.update(dlpx_obj.server_session, find_obj_by_name(
            dlpx_obj.server_session, environment, arguments['--env_name'],
            env_obj).reference, env_obj)

    except (HttpError, RequestError) as e:
        print_exception('\nERROR: Updating the ASE DB password '
                        'failed:\n{}\n'.format(e))
def update_ase_username(dlpx_obj):
    """
    Update the ASE database user password
    """
    engine_name = dlpx_obj.dlpx_engines.keys()[0]

    env_obj = UnixHostEnvironment()
    env_obj.ase_host_environment_parameters = ASEHostEnvironmentParameters()
    env_obj.ase_host_environment_parameters.db_user = \
        arguments['--update_ase_user']

    try:
        environment.update(
            dlpx_obj.server_session,
            find_obj_by_name(dlpx_obj.server_session, environment,
                             arguments['--env_name'], env_obj).reference,
            env_obj)

    except (HttpError, RequestError) as e:
        print_exception('\nERROR: Updating the ASE DB password '
                        'failed:\n{}\n'.format(e))
def update_ase_pw(dlpx_obj):
    """
    Update the ASE database user password
    """
    engine_name = dlpx_obj.dlpx_engines.keys()[0]
    env_obj = UnixHostEnvironment()
    env_obj.ase_host_environment_parameters = ASEHostEnvironmentParameters()
    env_obj.ase_host_environment_parameters.credentials = {
        "type": "PasswordCredential",
        "password": arguments["--update_ase_pw"],
    }

    try:
        environment.update(
            dlpx_obj.server_session,
            find_obj_by_name(dlpx_obj.server_session, environment,
                             arguments["--env_name"], env_obj).reference,
            env_obj,
        )

    except (HttpError, RequestError) as e:
        print_exception("\nERROR: Updating the ASE DB password "
                        "failed:\n{}\n".format(e))
Example #5
0
def update_ase_db_pw():

    env_obj = UnixHostEnvironment()
    env_obj.ase_host_environment_parameters = ASEHostEnvironmentParameters()
    env_obj.ase_host_environment_parameters.credentials = {
        "type": "PasswordCredential",
        "password": arguments["--pw"],
    }

    try:
        environment.update(
            dx_session_obj.server_session,
            find_obj_by_name(
                dx_session_obj.server_session,
                environment,
                arguments["--env_name"],
                env_obj,
            ).reference,
            env_obj,
        )

    except (HttpError, RequestError) as e:
        print_exception("Could not update ASE DB Password:\n{}".format(e))
        sys.exit(1)