Skip to content

dx_environment

arunskurian edited this page Jan 28, 2021 · 1 revision

SYNOPSIS

dx_environment.py ( [--list] | [--create] | [--enable] | [--disable] | [--delete] | [--refresh] | [--update_host])
                [--type <name>]
                [--toolkit <toolkit>]
                [--env_name <name>]
                [--passwd <passwd>]
                [--connector_name <name>]
                [--ip <ipaddress>]
                [--old_host_address <name> ]
                [--new_host_address <name>]
                [--single_thread <bool>]
                [--host_user <hostuser>]
                [--logdir <directory>]
                [--config <filename>]
                [--engine <identifier>]
                [--poll <n>]
                [-h | --help]
                [-v | --version]   

DESCRIPTION

This script can be used to list, create, delete, enable, disable, refresh and update environments.

ARGUMENTS

ACTIONS

Selection of an action is required to run this script

  • --list
    List all environments in an engine

  • --create
    Creates a Unix or Windows environment. (Does not support clustered environments)

  • --delete
    Deletes an environment in an engine

  • --enable
    Enables an environment

  • --disable
    Disables an environment

  • --refresh
    Refreshes an environment

  • --update_host
    Updates the host address of an environment

OTHER ARGUMENTS

  • --typeRequired for create action
    Type of the host environment. Unix/Windows

  • --env_nameRequired for create,delete,enable,disable,refresh,update actions
    Name of the environment to perform the operation on.

  • --toolkitRequired for Unix environments when action is create
    The toolkit directory path

  • --connector_name <connector_name>Required for Windows Target environments when action is create
    Connector on the Windows Host

  • --ipRequired for create action
    IP address of the environment to add

  • --host_userRequired for create environments
    Delphix OS user on the environment

  • --passwdRequired for create environments
    Password of the Delphix OS user on the environment

COMMON ARGUMENTS

  • -engineOptional
    Specify name of the Delphix Engine from dxtools.conf file. To run on all engines, provide 'all' as engine name.

  • --config Optional
    Location of the configuration file.
    A config file search order is as follows:
    config parameter
    dxtools.conf inside /conf/ folder

  • --logdir Optional
    Location of the log file.
    A log file search order is as follows:
    Logdir parameter which includes the filename
    File with the same name as the script under /conf/ folder

  • --single_thread Optional
    Defines whether the operations on an engine is run synchronously or asynchronously.
    Default is False

  • --poll Optional
    Defines the # of seconds to sleep before polling for the status of a job.

EXAMPLES

List all environments on engine "mymask"

python3 dx_environment.py --list --engine mymask

Create a unix environment named "orasrc" on engine "mymask"

python3 dx_environment.py --create --engine mymask --type Linux --env_name orasec --host_user delphix --passwd xxxx --ip 10.0.1.30 --toolkit /home/delphix

Enable an environment named "orasrc" on default engine

python3 dx_environment.py --enable --env_name orasrc

Disable an environment named "orasrc" on default engine

python3 dx_environment.py --disable --env_name orasrc

Refresh an environment named "orasrc" on default engine

python3 dx_environment.py --refresh --env_name orasrc

Delete an environment named "orasrc" on default engine

python3 dx_environment.py --delete --env_name orasrc

Update host ip for an environment named "orasrc" on engine "mymask"

python3 dx_environment.py --update_host --engine mymask --old_host_address 10.0.1.20 --new_host_address 10.0.1.30
Clone this wiki locally