Scope
- The XML Editor can export an XML configuration as used for YADE 1.11 to a compatible .ini format as used for YADE 1.10 and earlier.
- The following samples examples have been created by use of the JADE - XML Configuration - XML Editor
- Each sample file references the XSD
scheme JADE
Examples
All examples are used for JADE Configuration XSD schema http://www.sos-berlin.com/schema/jade/JADE_configuration_v1.0.xsd
Simple File Transfer Operations
- Each sample is available in compatible .xml and .ini formats for your reference.
- The samples are based on configuration examples as explained in the YADE - Tutorials.
Prerequisites
The XML Editor feature for exporting compatible configuration files makes use of a Java based Plugin.
- Use of this feature requires a Java Run-Time Environment starting from version 1.8 to be available.
Configuring the XML Editor
Activating the YADE Xml2Ini Converter Plugin
The XML Editor comes with a sub-folder plugins
in the installation directory.
- By default all Plugins that are deployed with this folder are available with the XML Editor. Therefore the Xml2Ini Converter is active by default.
- Should the sub-folder
plugins
not be available, e.g. should this folder have been renamed, then you cannot use the conversion feature. - If the Xml2Ini Converter is available then you can use the respective operation from the main menu and from the tab context menu.
- The XML Editor shows a file dialog and suggests an .ini export file with the same basename as the current .xml configuration file.
Configuring the XML Editor for automated Conversion
The XML Editor comes with the feature to auto-save configuration files in the .ini format when saving to the .xml format, i.e. doing the conversion automatically.
- To activate this feature adjust the check-box "Autosave ini file" to be checked. We recommend to use this feature if you want to create compatible .xml and .ini configuration files for YADE releases 1.10 and 1.11.
- This allows to manage configurations for YADE 1.11 in XML format and to have a parallel .ini file being created for use with YADE 1.10. Keeping both .xml and .ini configuration files in sync will allow a smooth migration to YADE 1.11 - as long as you would not manually modify the .ini file.
- In autosave mode the .ini file will be overwritten whenever the .xml file is saved.
- In addition you can enable desktop notifications to be created if a .ini file is being saved.
Image Added
Assigning the YADE XSD Schema
When creating a new XML configuration file then the following dialog appears for schema assignment:
Image Added
For YADE configuration files please assign the XSD Schema that matches your YADE release:
- either assign the XSD schema from the SOS Web Site: http://www.sos-berlin.com/schema/yade/YADE_configuration_v1.0.xsd
- or download the XSD schema to some local location and assign it by using the Open File dialog.
The schema will be accessed by the XML Editor when validating, saving and converting files. The following operations for schema assignment for existing files are available from the tab context menu:
- Reload schema: reload and apply the current XSD schema.
- Reassign schema: open the assignment dialog and assign an XSD schema.
Examples
- All examples are used for the YADE Configuration XSD schema http://www.sos-berlin.com/schema/yade/YADE_configuration_v1.0.xsd
- All examples are compatible for use with YADE 1.10 (.ini) and YADE 1.11 (.xml)
Getting Started
Code Block |
---|
language | xml |
---|
title | XML Configuration File: getting_started.xml |
---|
collapse | true |
---|
|
<?xml version="1.0" encoding="utf-8"?>
<Configurations xsi:noNamespaceSchemaLocation="http://www.sos-berlin.com/schema/yade/YADE_configuration_v1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Fragments>
<ProtocolFragments>
<FTPFragment name="ftp_server_2_local">
<BasicConnection>
<Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
<Port>21</Port>
</BasicConnection>
<BasicAuthentication>
<Account><![CDATA[demo]]></Account>
<Password><![CDATA[demo]]></Password>
</BasicAuthentication>
<PassiveMode>true</PassiveMode>
</FTPFragment>
<SFTPFragment name="sftp_server_2_local_pass">
<BasicConnection>
<Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
<Port>22</Port>
</BasicConnection>
<SSHAuthentication>
<Account><![CDATA[demo]]></Account>
<AuthenticationMethodPassword>
<Password><![CDATA[demo]]></Password>
</AuthenticationMethodPassword>
</SSHAuthentication>
</SFTPFragment>
</ProtocolFragments>
</Fragments>
<Profiles>
<Profile profile_id="ftp_server_2_local">
<Operation>
<Copy>
<CopySource>
<CopySourceFragmentRef>
<FTPFragmentRef ref="ftp_server_2_local" />
</CopySourceFragmentRef>
<SourceFileOptions>
<Selection>
<FileSpecSelection>
<FileSpec><![CDATA[.*]]></FileSpec>
<Directory><![CDATA[/]]></Directory>
</FileSpecSelection>
</Selection>
</SourceFileOptions>
</CopySource>
<CopyTarget>
<CopyTargetFragmentRef>
<LocalTarget />
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
<TargetFileOptions>
<DisableOverwriteFiles>false</DisableOverwriteFiles>
</TargetFileOptions>
</CopyTarget>
<TransferOptions>
<Transactional>true</Transactional>
</TransferOptions>
</Copy>
</Operation>
</Profile>
<Profile profile_id="sftp_server_2_local_pass">
<Operation>
<Copy>
<CopySource>
<CopySourceFragmentRef>
<SFTPFragmentRef ref="sftp_server_2_local_pass" />
</CopySourceFragmentRef>
<SourceFileOptions>
<Selection>
<FileSpecSelection>
<FileSpec><![CDATA[.*]]></FileSpec>
<Directory><![CDATA[/]]></Directory>
</FileSpecSelection>
</Selection>
</SourceFileOptions>
</CopySource>
<CopyTarget>
<CopyTargetFragmentRef>
<LocalTarget />
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
<TargetFileOptions>
<DisableOverwriteFiles>true</DisableOverwriteFiles>
</TargetFileOptions>
</CopyTarget>
<TransferOptions>
<Transactional>true</Transactional>
</TransferOptions>
</Copy>
</Operation>
</Profile>
</Profiles>
</Configurations> |
- Flat File Configuration: getting_started.ini
Code Block |
---|
language | xml |
---|
title | Flat File Configuration: getting_started.ini |
---|
collapse | true |
---|
|
[protocol_fragment_ftp@ftp_server_2_local]
protocol = ftp
host = test.sos-berlin.com
port = 21
user = demo
password = demo
passive_mode = true
[protocol_fragment_sftp@sftp_server_2_local_pass]
protocol = sftp
host = test.sos-berlin.com
port = 22
user = demo
ssh_auth_method = password
password = demo
[profile@ftp_server_2_local]
operation = copy
source_include = protocol_fragment_ftp@ftp_server_2_local
file_spec = .*
source_dir = /
target_protocol = local
target_host = localhost
target_dir = ${USERPROFILE}\jade_demo\a
overwrite_files = true
transactional = true
[profile@sftp_server_2_local_pass]
operation = copy
source_include = protocol_fragment_sftp@sftp_server_2_local_pass
file_spec = .*
source_dir = /
target_protocol = local
target_host = localhost
target_dir = ${USERPROFILE}\jade_demo\a
overwrite_files = false
transactional = true |
Simple File Selection
Code Block |
---|
language | xml |
---|
title | XML Configuration: simple_file_selection.xml |
---|
collapse | true |
---|
|
<?xml version="1.0" encoding="utf-8"?>
<Configurations xsi:noNamespaceSchemaLocation="http://www.sos-berlin.com/schema/yade/YADE_configuration_v1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Fragments>
<ProtocolFragments>
<SFTPFragment name="sftp_test">
<BasicConnection>
<Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
<Port><![CDATA[22]]></Port>
</BasicConnection>
<SSHAuthentication>
<Account><![CDATA[demo]]></Account>
<AuthenticationMethodPassword>
<Password><![CDATA[demo]]></Password>
</AuthenticationMethodPassword>
</SSHAuthentication>
</SFTPFragment>
</ProtocolFragments>
</Fragments>
<Profiles>
<Profile profile_id="sftp_server_2_local_select_recursive">
<Operation>
<Copy>
<CopySource>
<CopySourceFragmentRef>
<SFTPFragmentRef ref="sftp_test" />
</CopySourceFragmentRef>
<SourceFileOptions>
<Selection>
<FileSpecSelection>
<FileSpec><![CDATA[^test_.\.txt$]]></FileSpec>
<Directory><![CDATA[/rec]]></Directory>
<Recursive><![CDATA[true]]></Recursive>
</FileSpecSelection>
</Selection>
</SourceFileOptions>
</CopySource>
<CopyTarget>
<CopyTargetFragmentRef>
<LocalTarget />
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
</CopyTarget>
</Copy>
</Operation>
</Profile>
</Profiles>
</Configurations> |
- Flat File Configuration: simple_file_selection.ini
Code Block |
---|
language | xml |
---|
title | Flat File Configuration: simple_file_selection.ini |
---|
collapse | true |
---|
|
[protocol_fragment_sftp@sftp_server_2_local_select_recursive]
protocol = sftp
host = test.sos-berlin.com
port = 22
user = demo
ssh_auth_method = password
password = demo
[protocol_fragment_sftp@sftp_server_2_local_zero_byte]
protocol = sftp
host = test.sos-berlin.com
port = 22
user = demo
ssh_auth_method = password
password = demo
[profile@sftp_server_2_local_select_recursive]
operation = copy
source_include = protocol_fragment_sftp@sftp_server_2_local_select_recursive
file_spec = ^test_.\.txt$
source_dir = /rec
recursive |
Code Block |
---|
|
<?xml version="1.0" encoding="utf-8"?>
<Configurations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.sos-berlin.com/schema/jade/JADE_configuration_v1.0.work.xsd">
<Fragments>
<ProtocolFragments>
<FTPFragment name="ftp_test">
<BasicAuthentication>
<Account><![CDATA[demo]]></Account>
= true
target_protocol <Password><![CDATA[demo]]></Password>
= local
target_host </BasicAuthentication>
<BasicConnection>
<Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
= localhost
target_dir <Port><![CDATA[21]]></Port>
</BasicConnection>
</FTPFragment>
<SFTPFragment name="sftp_test">
= ${USERPROFILE}\jade_demo\a
overwrite_files <BasicConnection>
= <Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
false
[profile@sftp_server_2_local_zero_byte]
operation <Port><![CDATA[22]]></Port>
</BasicConnection>
<SSHAuthentication>
= copy
source_include <Account><![CDATA[demo]]></Account>
<AuthenticationMethodPassword>
= protocol_fragment_sftp@sftp_server_2_local_zero_byte
file_spec <Password><![CDATA[demo]]></Password>
</AuthenticationMethodPassword>
</SSHAuthentication>
</SFTPFragment>
= ^test_[0-9]\.txt$
source_dir <SFTPFragment name="sftp_test_key">
<BasicConnection>
<Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
= /
zero_byte_transfer <Port><![CDATA[22]]></Port>
= </BasicConnection>
relaxed
target_protocol <SSHAuthentication>
<Account><![CDATA[demo]]></Account>
= local
target_host <AuthenticationMethodPublickey>
<AuthenticationFile><![CDATA[${USERPROFILE}\jade_demo\demo_id_rsa]]></AuthenticationFile>
= localhost
target_dir </AuthenticationMethodPublickey>
</SSHAuthentication>
</SFTPFragment>
</ProtocolFragments>
= </Fragments>
<Profiles>
<Profile profile_id="ftp_server_2_local">
<Operation>
<Copy>
<CopySource>
<CopySourceFragmentRef>
${USERPROFILE}\jade_demo\a |
More Advanced File Selection
Code Block |
---|
language | xml |
---|
title | XML Configuration: more_advanced_file_selection.xml |
---|
collapse | true |
---|
|
<?xml version="1.0" encoding="utf-8"?>
<Configurations xsi:noNamespaceSchemaLocation="http://www.sos-berlin.com/schema/yade/YADE_configuration_v1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Fragments>
<ProtocolFragments>
<FTPFragmentRef ref="ftp_test" /<SFTPFragment name="sftp_server_2_local_poll_minfiles">
</CopySourceFragmentRef><BasicConnection>
<SourceFileOptions><Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
<Selection><Port>22</Port>
</BasicConnection>
<FileSpecSelection><SSHAuthentication>
<FileSpec><<Account><![CDATA[.*demo]]></FileSpec>Account>
<AuthenticationMethodPassword>
<Directory><<Password><![CDATA[/demo]]></Directory>Password>
</AuthenticationMethodPassword>
</FileSpecSelection>SSHAuthentication>
</SFTPFragment>
</ProtocolFragments>
</Selection>Fragments>
<Profiles>
<Profile profile_id="sftp_server_2_local_poll_minfiles">
</SourceFileOptions><Operation>
</CopySource><Copy>
<CopyTarget><CopySource>
<CopyTargetFragmentRef><CopySourceFragmentRef>
<LocalTarget<SFTPFragmentRef ref="sftp_server_2_local_poll_minfiles" />
</CopyTargetFragmentRef>CopySourceFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory><SourceFileOptions>
</CopyTarget>
</Copy>
<Selection>
</Operation>
</Profile>
<Profile profile_id="sftp_server_2_local_pass"> <FileSpecSelection>
<Operation>
<Copy>
<FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec>
<CopySource>
<CopySourceFragmentRef><Directory><![CDATA[/]]></Directory>
<SFTPFragmentRef ref="sftp_test" </>FileSpecSelection>
</CopySourceFragmentRef>Selection>
<SourceFileOptions>
<Polling>
<Selection>
<PollInterval>20</PollInterval>
<FileSpecSelection>
<PollTimeout>1</PollTimeout>
<FileSpec><![CDATA[.*]]></FileSpec> <MinFiles>5</MinFiles>
<Directory><![CDATA[/]]></Directory><PollingServer>false</PollingServer>
<<PollForever>false</FileSpecSelection>PollForever>
</Selection>Polling>
</SourceFileOptions>
</CopySource>
<CopyTarget>
<CopyTargetFragmentRef>
<LocalTarget />
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
</CopyTarget>
</Copy>
</Operation>
</Profile>
<Profile profile_id="sftp_server_2_local_select_recursive">
<Operation>
<Copy>
<CopySource></Copy>
</Operation>
</Profile>
</Profiles>
</Configurations> |
Code Block |
---|
language | xml |
---|
title | Flat File Configuration: more_advanced_file_selection.ini |
---|
collapse | true |
---|
|
[protocol_fragment_sftp@sftp_server_2_local_poll_minfiles]
protocol <CopySourceFragmentRef>
<SFTPFragmentRef ref="sftp_test" />
= </CopySourceFragmentRef>sftp
host <SourceFileOptions>
<Selection>
= test.sos-berlin.com
port <FileSpecSelection>
<FileSpec><![CDATA[^test_.\.txt$]]></FileSpec>
= 22
user <Directory><![CDATA[/rec]]></Directory>
<Recursive><![CDATA[true]]></Recursive>
= demo
ssh_auth_method </FileSpecSelection>
= </Selection>password
password </SourceFileOptions>
</CopySource>
= demo
[profile@sftp_server_2_local_poll_minfiles]
operation <CopyTarget>
<CopyTargetFragmentRef>
= copy
source_include <LocalTarget />
</CopyTargetFragmentRef>
= protocol_fragment_sftp@sftp_server_2_local_poll_minfiles
file_spec <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
</CopyTarget>
</Copy>
</Operation>
= ^test_[0-9]\.txt$
source_dir </Profile>
<Profile profile_id="sftp_server_2_local_zero_byte">
<Operation>
= <Copy>/
poll_interval <CopySource>
<CopySourceFragmentRef>
= 20
poll_timeout <SFTPFragmentRef ref="sftp_test" />
= </CopySourceFragmentRef>
1
poll_minfiles <SourceFileOptions>
= 5
polling_server <Selection>
<FileSpecSelection>
= false
polling_server_poll_forever = false
target_protocol <FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec>
<Directory><![CDATA[/]]></Directory>
= local
target_host </FileSpecSelection>
= localhost
target_dir </Selection>
<Directives>
= ${USERPROFILE}\jade_demo\a |
File Transfer
Code Block |
---|
language | xml |
---|
title | XML Configuration: file_transfer.xml |
---|
collapse | true |
---|
|
<?xml version="1.0" encoding="utf-8"?>
<Configurations>
<Fragments>
<TransferZeroByteFiles><![CDATA[relaxed]]></TransferZeroByteFiles><ProtocolFragments>
<SFTPFragment name="sftp_server_2_local_cumulate">
</Directives> <BasicConnection>
</SourceFileOptions><Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
<<Port>22</CopySource>Port>
<CopyTarget></BasicConnection>
<CopyTargetFragmentRef><SSHAuthentication>
<LocalTarget /><Account><![CDATA[demo]]></Account>
</CopyTargetFragmentRef><AuthenticationMethodPassword>
<Directory><<Password><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>Password>
</CopyTarget>AuthenticationMethodPassword>
</Copy>SSHAuthentication>
</Operation>SFTPFragment>
</Profile>ProtocolFragments>
</Fragments>
<Profiles>
<Profile profile_id="sftp_server_2replace_local_poll_minfilesdatestamp">
<Operation>
<Copy>
<CopySource>
<CopySourceFragmentRef>
<SFTPFragmentRef ref="sftp_test" /><LocalSource>
</CopySourceFragmentRef>
<SourceFileOptions><Rename>
<Selection>
<FileSpecSelection><ReplaceWhat><![CDATA[^(test)(_)[0-9]\.txt]]></ReplaceWhat>
<FileSpec><<ReplaceWith><![CDATA[^testfile_;[0-9]\.txt$date:yyyy-MM-dd]_]]></FileSpec>ReplaceWith>
<Directory><![CDATA[/]]></Directory>
</Rename>
</LocalSource>
</FileSpecSelection>CopySourceFragmentRef>
</Selection><SourceFileOptions>
<Polling><Selection>
<PollInterval><![CDATA[20]]></PollInterval>
<FileSpecSelection>
<PollTimeout><<FileSpec><![CDATA[1^test_[0-9]\.txt$]]></PollTimeout>FileSpec>
<MinFiles>< <Directory><![CDATA[3${USERPROFILE}\jade_demo\a]]></MinFiles>Directory>
<KeepConnection><![CDATA[true]]></KeepConnection></FileSpecSelection>
</Polling>Selection>
</SourceFileOptions>
</CopySource>
<CopyTarget>
<CopyTargetFragmentRef>
<LocalTarget />
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\ab]]></Directory>
</CopyTarget>
</Copy>
</Operation>
</Profile>
<Profile profile_id="replacesftp_server_2_local_datestampcumulate">
<Operation>
<Copy>
<CopySource>
<CopySourceFragmentRef>
<LocalSource<SFTPFragmentRef ref="sftp_server_2_local_cumulate" />
</CopySourceFragmentRef>
<SourceFileOptions>
<Selection>
<FileSpecSelection>
<FileSpec><![CDATA[^test_[0-9].\.txt$]]></FileSpec>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a/]]></Directory>
</FileSpecSelection>
</Selection>
</SourceFileOptions>
</CopySource>
<CopyTarget>
<CopyTargetFragmentRef>
<LocalTarget />
</CopySource>CopyTargetFragmentRef>
<CopyTarget> <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
<CopyTargetFragmentRef><TargetFileOptions>
<LocalTarget><CumulateFiles>
<Rename>
<CumulativeFileSeparator><![CDATA[--- File: %{SourceFileName} ---]]></CumulativeFileSeparator>
<ReplaceWhat><<CumulativeFilename><![CDATA[^(test)(_)[0-9]\text-files.txt]]></ReplaceWhat>CumulativeFilename>
</CumulateFiles>
<ReplaceWith><![CDATA[file_;[date:yyyy-MM-dd]_]]></ReplaceWith> </TargetFileOptions>
</CopyTarget>
</Rename>Copy>
</Operation>
</Profile>
</Profiles>
</Configurations> |
- Flat File Configuration: file_transfer.ini
Code Block |
---|
language | xml |
---|
title | Flat File Configuration: file_transfer.ini |
---|
collapse | true |
---|
|
[protocol_fragment_sftp@sftp_server_2_local_cumulate]
protocol </LocalTarget>
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory>
= sftp
host </CopyTarget>
</Copy>
</Operation>
</Profile>
<Profile profile_id="sftp_server_2_local_cumulate">
<Operation>
= test.sos-berlin.com
port <Copy>
<CopySource>
<CopySourceFragmentRef>
= 22
user <SFTPFragmentRef ref="sftp_test" />
</CopySourceFragmentRef>
= demo
ssh_auth_method <SourceFileOptions>
<Selection>
= password
password <FileSpecSelection>
<FileSpec><![CDATA[^test_.\.txt$]]></FileSpec>
= demo
[profile@replace_local_datestamp]
operation <Directory><![CDATA[/]]></Directory>
= copy
source_protocol </FileSpecSelection>
</Selection>
= local
source_host </SourceFileOptions>
</CopySource>
= localhost
replacing <CopyTarget>
<CopyTargetFragmentRef>
= <LocalTarget />
^(test)(_)[0-9]\.txt
replacement </CopyTargetFragmentRef>
= <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
file_;[date:yyyy-MM-dd]_
file_spec <TargetFileOptions>
<CumulateFiles>
= ^test_[0-9]\.txt$
source_dir <CumulativeFileSeparator><![CDATA[--- File: %{SourceFileName} ---]]></CumulativeFileSeparator>
= ${USERPROFILE}\jade_demo\a
target_protocol <CumulativeFilename><![CDATA[text-files.txt]]></CumulativeFilename>
<CumulativeFileDelete><![CDATA[true]]></CumulativeFileDelete>
= local
target_host </CumulateFiles>
</TargetFileOptions>
= localhost
target_dir </CopyTarget>
</Copy>
</Operation>
</Profile>
<Profile profile_id="local= ${USERPROFILE}\jade_demo\b
[profile@sftp_server_2_local_create_md5">
cumulate]
operation <Operation>
<Copy>
<CopySource>
<CopySourceFragmentRef>
= copy
source_include <LocalSource />
</CopySourceFragmentRef>
= protocol_fragment_sftp@sftp_server_2_local_cumulate
file_spec <SourceFileOptions>
<Selection>
= ^test_.\.txt$
source_dir <FileSpecSelection>
<FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec>
= /
target_protocol <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
= local
target_host </FileSpecSelection>
= </Selection>
localhost
target_dir </SourceFileOptions>
</CopySource>
= ${USERPROFILE}\jade_demo\a
cumulate_files <CopyTarget>
<CopyTargetFragmentRef>
= true
cumulative_file_separator <LocalTarget />
= --- File: %{SourceFileName} ---
cumulative_file_name </CopyTargetFragmentRef>
= text-files.txt |
Checking Files for Completenss
Code Block |
---|
language | xml |
---|
title | XML Configuration: checking_files_for_completeness.xml |
---|
collapse | true |
---|
|
<?xml version="1.0" encoding="utf-8"?>
<Configurations xsi:noNamespaceSchemaLocation="http://www.sos-berlin.com/schema/yade/YADE_configuration_v1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Fragments>
<ProtocolFragments>
<SFTPFragment name="sftp_server_2_local_atomic <Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory>
<TargetFileOptions>
<CreateIntegrityHashFile><![CDATA[true]]></CreateIntegrityHashFile>
</TargetFileOptions>
</CopyTarget>
</Copy>
</Operation>
</Profile>
<Profile profile_id="local_2_local_check_md5">
<Operation>
<BasicConnection>
<Copy>
<CopySource><Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
<Port>22</Port>
<CopySourceFragmentRef>
</BasicConnection>
<LocalSource /><SSHAuthentication>
</CopySourceFragmentRef><Account><![CDATA[demo]]></Account>
<SourceFileOptions><AuthenticationMethodPassword>
<Password><![CDATA[demo]]></Password>
<Selection>
</AuthenticationMethodPassword>
<FileSpecSelection></SSHAuthentication>
</SFTPFragment>
</ProtocolFragments>
</Fragments>
<Profiles>
<FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec><Profile profile_id="local_2_local_create_md5">
<Operation>
<Copy>
<Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory>
<CopySource>
</FileSpecSelection><CopySourceFragmentRef>
<LocalSource </Selection>>
</SourceFileOptions>CopySourceFragmentRef>
</CopySource>
<SourceFileOptions>
<CopyTarget><Selection>
<CopyTargetFragmentRef>
<FileSpecSelection>
<LocalTarget />
<FileSpec><![CDATA[^test_[0-9]\.txt$]]></FileSpec>
</CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\b\checked]]></Directory>
a]]></Directory>
<TargetFileOptions>
</FileSpecSelection>
<CheckIntegrityHash />
</TargetFileOptions>Selection>
</CopyTarget>
</Copy>SourceFileOptions>
</Operation>
</Profile>CopySource>
<Profile profile_id="sftp_server_2_local_atomic">
<Operation><CopyTarget>
<Copy>
<CopyTargetFragmentRef>
<CopySource>
<CopySourceFragmentRef><LocalTarget />
<SFTPFragmentRef ref="sftp_test" /></CopyTargetFragmentRef>
</CopySourceFragmentRef><Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory>
<SourceFileOptions><TargetFileOptions>
<Selection><CheckIntegrityHash>
<FileSpecSelection><CreateIntegrityHashFile>true</CreateIntegrityHashFile>
<FileSpec><![CDATA[^test_large_1\.txt$]]></FileSpec></CheckIntegrityHash>
<Directory><![CDATA[/large/]]></Directory>
</TargetFileOptions>
</FileSpecSelection>CopyTarget>
</Copy>
</Selection>Operation>
</SourceFileOptions>Profile>
<Profile profile_id="local_2_local_check_md5">
</CopySource><Operation>
<CopyTarget><Copy>
<CopyTargetFragmentRef><CopySource>
<CopySourceFragmentRef>
<LocalTarget />
<LocalSource </CopyTargetFragmentRef>>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory></CopySourceFragmentRef>
<TargetFileOptions><SourceFileOptions>
<Atomicity><Selection>
<AtomicPrefix><![CDATA[~]]></AtomicPrefix>
<FileSpecSelection>
<AtomicSuffix><<FileSpec><![CDATA[~[^test_[0-9]\.txt$]]></AtomicSuffix>FileSpec>
</Atomicity>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
</TargetFileOptions>
</CopyTarget>FileSpecSelection>
</Copy>
</Operation>
</Profile>Selection>
<Profile profile_id="local_2_local_check_steady_state">
<Operation></SourceFileOptions>
<Copy> </CopySource>
<CopySource><CopyTarget>
<CopySourceFragmentRef><CopyTargetFragmentRef>
<LocalSource<LocalTarget />
</CopySourceFragmentRef>CopyTargetFragmentRef>
<SourceFileOptions><Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory>
<TargetFileOptions>
<Selection>
<CheckIntegrityHash />
<FileSpecSelection>
</TargetFileOptions>
<FileSpec><![CDATA[^test_large_1\.txt$]]></FileSpec>
</CopyTarget>
</Copy>
</Operation>
</Profile>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory><Profile profile_id="sftp_server_2_local_atomic">
<Operation>
</FileSpecSelection><Copy>
<CopySource>
</Selection>
<CopySourceFragmentRef>
<CheckSteadyState>
<SFTPFragmentRef ref="sftp_server_2_local_atomic" />
<CheckSteadyStateInterval><![CDATA[2]]></CheckSteadyStateInterval>
</CopySourceFragmentRef>
<CheckSteadyStateCount><![CDATA[10]]></CheckSteadyStateCount> <SourceFileOptions>
</CheckSteadyState><Selection>
</SourceFileOptions> <FileSpecSelection>
</CopySource>
<CopyTarget>
<FileSpec><![CDATA[^test_large_1\.txt$]]></FileSpec>
<CopyTargetFragmentRef>
<Directory><![CDATA[/large/]]></Directory>
<LocalTarget </>FileSpecSelection>
</CopyTargetFragmentRef>Selection>
<Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory></SourceFileOptions>
</CopySource>
<TargetFileOptions />
<CopyTarget>
</CopyTarget>
</Copy><CopyTargetFragmentRef>
</Operation>
</Profile>
<Profile profile_id="sftp_server_2_local_key"<LocalTarget />
<Operation>
</CopyTargetFragmentRef>
<Copy>
<CopySource><Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
<CopySourceFragmentRef><TargetFileOptions>
<Atomicity>
<SFTPFragmentRef ref="sftp_test_key" />
</CopySourceFragmentRef>
<AtomicPrefix><![CDATA[~]]></AtomicPrefix>
<SourceFileOptions><AtomicSuffix><![CDATA[~]]></AtomicSuffix>
<Selection></Atomicity>
</TargetFileOptions>
<FileSpecSelection>
</CopyTarget>
</Copy>
<FileSpec><![CDATA[^test\.txt$]]></FileSpec> </Operation>
</Profile>
<Profile profile_id="local_2_local_check_steady_state">
<Operation>
<Directory><![CDATA[/]]></Directory>
<Copy>
<CopySource>
</FileSpecSelection>
<CopySourceFragmentRef>
</Selection>
<LocalSource </SourceFileOptions>>
</CopySource>CopySourceFragmentRef>
<CopyTarget>
<SourceFileOptions>
<CopyTargetFragmentRef>
<Selection>
<LocalTarget />
<FileSpecSelection>
</CopyTargetFragmentRef>
<Directory><<FileSpec><![CDATA[${USERPROFILE}\jade_demo\a^test_large_1\.txt$]]></Directory>FileSpec>
</CopyTarget>
</Copy>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
</Operation>
</Profile>
</Profiles>
</Configurations> |
Getting Started
Code Block |
---|
|
<?xml version="1.0" encoding="utf-8"?>
<Configurations>
<Fragments>
<ProtocolFragments>
</FileSpecSelection>
</Selection>
<CheckSteadyState>
<FTPFragment name="ftp_test">
<BasicAuthentication><CheckSteadyStateInterval>2</CheckSteadyStateInterval>
<Account><![CDATA[demo]]></Account>
<CheckSteadyStateCount>10</CheckSteadyStateCount>
<Password><![CDATA[demo]]></Password>
</CheckSteadyState>
</BasicAuthentication>SourceFileOptions>
<BasicConnection> </CopySource>
<Hostname><![CDATA[test.sos-berlin.com]]></Hostname><CopyTarget>
<Port><![CDATA[21]]></Port> <CopyTargetFragmentRef>
</BasicConnection>
<LocalTarget </FTPFragment>>
</ProtocolFragments>
</Fragments>
<Profiles>
<Profile profile_id="ftp_server_2_local">
</CopyTargetFragmentRef>
<Operation>
<Copy><Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory>
<CopySource></CopyTarget>
<CopySourceFragmentRef></Copy>
</Operation>
</Profile>
<FTPFragmentRef ref="ftp_test" />
</CopySourceFragmentRef>
</Profiles>
</Configurations> |
Code Block |
---|
language | xml |
---|
title | Flat File Configuration: checking_files_for_completeness.ini |
---|
collapse | true |
---|
|
[protocol_fragment_sftp@sftp_server_2_local_atomic]
protocol <SourceFileOptions>
= <Selection>sftp
host <FileSpecSelection>
<FileSpec><![CDATA[.*]]></FileSpec>
= test.sos-berlin.com
port <Directory><![CDATA[/]]></Directory>
= </FileSpecSelection>22
user </Selection>
</SourceFileOptions>
</CopySource>
<CopyTarget>
<CopyTargetFragmentRef>
= demo
ssh_auth_method <LocalTarget />
= </CopyTargetFragmentRef>password
password <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
</CopyTarget>
= </Copy>
demo
[profile@local_2_local_create_md5]
operation </Operation>
</Profile>
</Profiles>
</Configurations> |
Code Block |
---|
|
<?xml version="1.0" encoding="utf-8"?>
<Configurations>
<Fragments>
<ProtocolFragments>
= copy
source_protocol <SFTPFragment name="sftp_test">
= <BasicConnection>local
source_host <Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
<Port><![CDATA[22]]></Port>
= localhost
file_spec </BasicConnection>
<SSHAuthentication>
= <Account><![CDATA[demo]]></Account>
^test_[0-9]\.txt$
source_dir <AuthenticationMethodPassword>
<Password><![CDATA[demo]]></Password>
= ${USERPROFILE}\jade_demo\a
target_protocol </AuthenticationMethodPassword>
</SSHAuthentication>
</SFTPFragment>
= local
target_host </ProtocolFragments>
</Fragments>
<Profiles>
<Profile profile_id="sftp_server_2_local_pass">
<Operation>
<Copy>
= localhost
target_dir <CopySource>
<CopySourceFragmentRef>
= ${USERPROFILE}\jade_demo\b
check_security_hash <SFTPFragmentRef ref="sftp_test" />
true
create_security_hash_file </CopySourceFragmentRef>
= true
[profile@local_2_local_check_md5]
operation <SourceFileOptions>
= <Selection>copy
source_protocol <FileSpecSelection>
= local
source_host <FileSpec><![CDATA[.*]]></FileSpec>
= localhost
file_spec <Directory><![CDATA[/]]></Directory>
</FileSpecSelection>
= ^test_[0-9]\.txt$
source_dir </Selection>
</SourceFileOptions>
= ${USERPROFILE}\jade_demo\a
target_protocol </CopySource>
= <CopyTarget>local
target_host <CopyTargetFragmentRef>
<LocalTarget />
= localhost
target_dir </CopyTargetFragmentRef>
= <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
b
check_security_hash </CopyTarget>
= true
[profile@sftp_server_2_local_atomic]
operation </Copy>
</Operation>
</Profile>
</Profiles>
</Configurations> |
Simple File Selection
Code Block |
---|
|
<?xml version="1.0" encoding="utf-8"?>
<Configurations>
<Fragments>
<ProtocolFragments>
= copy
source_include <SFTPFragment name="sftp_test">
= protocol_fragment_sftp@sftp_server_2_local_atomic
file_spec <BasicConnection>
<Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
= ^test_large_1\.txt$
source_dir <Port><![CDATA[22]]></Port>
</BasicConnection>
= <SSHAuthentication>
/large/
target_protocol <Account><![CDATA[demo]]></Account>
= <AuthenticationMethodPassword>local
target_host <Password><![CDATA[demo]]></Password>
</AuthenticationMethodPassword>
= localhost
target_dir </SSHAuthentication>
</SFTPFragment>
</ProtocolFragments>
</Fragments>
<Profiles>
<Profile profile_id="sftp_server_2_local_select_recursive">
= ${USERPROFILE}\jade_demo\a
atomic_prefix <Operation>
<Copy>
<CopySource>
= ~
atomic_suffix <CopySourceFragmentRef>
<SFTPFragmentRef ref="sftp_test" />
= ~
[profile@local_2_local_check_steady_state]
operation </CopySourceFragmentRef>
<SourceFileOptions>
= copy
source_protocol <Selection>
= <FileSpecSelection>
local
source_host <FileSpec><![CDATA[^test_.\.txt$]]></FileSpec>
<Directory><![CDATA[/rec]]></Directory>
= localhost
file_spec <Recursive><![CDATA[true]]></Recursive>
= ^test_large_1\.txt$
source_dir </FileSpecSelection>
</Selection>
= ${USERPROFILE}\jade_demo\a
check_steady_state_of_files = </SourceFileOptions>
true
check_steady_state_interval = </CopySource>
2
steady_state_count <CopyTarget>
= 10
target_protocol <CopyTargetFragmentRef>
<LocalTarget= />local
target_host </CopyTargetFragmentRef>
<Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
= localhost
target_dir </CopyTarget>
</Copy>
</Operation>
</Profile>
</Profiles>
</Configurations> |
...
= ${USERPROFILE}\jade_demo\b |