Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
outlinh1. true
outlinh1. true
1printablefalse
2stylh1. none
3indent20px

h1. Variables in JADE parameters

Variables as Parameter argument from Command line

YADE settings and command line arguments

  • YADE accepts parameters from a settings file and from the command line.

YADE example for a settings file

Code Block
languagetext
Code Block

[ftp_server_2_server]
 ssh_auth_method=password 
 source_user=kb
 source_password=*****
 source_ssh_auth_method=password
 source_host=wilma.sos
 source_protocol=sftp
 source_port=22
 
 target_user=test
 target_password=*****
 target_host=8of9.sos
 target_protocol=ftp
 target_port=21
 
 file_spec=^.*\.txt$
 operation=copy 

...

YADE example for mixed usage of settings and command line

...

arguments

...

  • YADE can use the transfer profile from the above jade_settings.ini and

...

  • parameters from the CLI command line interface.
  • Command line parameters have precedence. If a parameter value is provided from the CLI, then parameters from jade_settings.ini will be overwritten.
Code Block
languagebash
Code Block

export archive_dir=/archive/daily/reports
export source_dir=/home/user/application/output

./jade.sh -settings="jade_settings.ini" -profile="ftp_server_2_server" -local_dir="$\{source_dir\}" -remote_dir="${archive_dir}"

Variables

...

in jade_settings.ini

...

 profile

  • YADE profiles can use variables that are substituted within settings

YADE example for a settings file with variables

Code Block
 [globals]
 sftp.port = 22
 ftp.port  = 21

 [ftp_server_2_server]
 file_spec              =^.*\.txt$
 operation              =copy 

 ssh_auth_method        = password 
 source_user            = kb
 source_password        = *****
 source_ssh_auth_method = password
 source_host            = wilma.sos
 source_protocol        = sftp
 source_port            = ${sftp.port}
 
 target_user            = test
 target_password        = *****
 target_host            = 8of9.sos
 target_protocol        = ftp
 target_port            = ${ftp.port}

YADE example of variables in jade_settings.ini file

  • The jade_settings.ini file can use variables in a profile.
  • Such variables can be defined in the global profile and subsequent profiles. The globals profile is included automatically by all profiles.
Code Block
languagebash
./jade.sh -settings="jade_settings.ini" -profile="ftp_server_2_server" 

See also

 

For info about the parameters see the parameter documentation on jadeParameterReference.

globals
homer.hosth1. homer.sos
homer.user test
homer.ssh_auth_methodh1. password
homer.password 12345
homer.protocolh1. sftp
homer.port 22
homer.command=/home/test/jade/bin/jade.sh