Connector template migration script is designed and written in python 3.11.
The connector script helps to migrate connectors from Aspire 4.0 to Aspire 5.0.
The script is designed to be robust and easily extensible using templates with transformation matrices.
It can currently migrate the following connector types: Filesystem, SMB, SharePoint online.
The workflows are now ignored and not migrated.
There are implemented these features:
aspire-migration-component
Run Aspire 4.0 and Aspire 5.0
URL_ASPIRE = "http://localhost:50505/aspire/_api" # --- https with certificates # CA_CERTS = ('client-2048.crt', 'client-2048.key') # http = urllib3.PoolManager(cert_reqs='REQUIRED', ca_certs=CA_CERTS)
4. Run script
python __init__.py -p smb_connector-content-source.zip
5. After few second connector is migrated to Aspire 5.0, objects "seed", "connection", "connector", "credential" created with description "migration-{date}".
You can also check the created report about migration "migration-{date}.log" which will be in the directory "reports" to see what exactly happened.
We can get information about script by command
python __init__.py -h
Output
usage: __init__.py [-h] [-d DESC] [-v VER] [-p PATH] [-t TAGS] [-i IDS] Migration ASPIRE script. Migrate connector from ASPIRE version 4.0 to ASPIRE version 5.0 options: -h, --help show this help message and exit -d DESC, --desc DESC Custom description of all migrated ASPIRE objects (seed, connector, connection, credential) -v VER, --ver VER Version of transformation matrix. -p PATH, --path PATH Path to connector file zip. -t TAGS, --tags TAGS Tags for seed. -i IDS, --ids IDS Ids with should be used in seed or connection Check log after migration. All is well that ends well.
Templates are in directory "migration_template"
The structure of the project looks similarily as an situation below.
-- migration
-- migration_template
-- 4.1
-- default
-- aspire-filesystem-source
-- aspire-sharepointonline-source
-- aspire-smb-source
-- type_transform_matrix.json
Connectors can have different properties related to their version 4.0, 4.1, 5.0, 5.1 etc. When we want to work with different version than "default", we need to create new directory there "4.1" everything from directory "default" needs to be copied to this new directory. Changes needs to be done in "*_transform_matrix.json" for current connector.
After we are done with changes, script must to be run with other parameter "-v [name of new directory]"
python __init.py__ -v 4.1 -p smb_connector-content-source.zip
Can be the situation that we have some objects already created in Aspire 5 and we want to use them for this new migrated connector. So we create json file with the structure related to example below.
File "ids.json" content:
{ "Seed":{ "workflows":[ "2745cfbe-0a2f-4d19-ac02-51e7c6d68898" ], "connector":"a3ffa705-cc09-44f2-9233-ea6a5242491c", "connection":"2f31049e-da32-45cf-af49-dbc203d00c75", "deleteIncrementalPolicy":"e6165aa0-fb7d-490a-98da-f90032f0b886", "throttlePolicy":"c080798a-fd43-484b-bafb-2891b555ab3e", "routingPolicies":[ "c6ed5858-4e74-443d-a303-a33ff4099115" ] }, "Connection":{ "credential":"aa56ec21-1459-469e-b347-c95199c2d95b", "deleteIncrementalPolicy":"e6165aa0-fb7d-490a-98da-f90032f0b886", "throttlePolicy":"c080798a-fd43-484b-bafb-2891b555ab3e", "routingPolicies":[ "c6ed5858-4e74-443d-a303-a33ff4099115" ] }, "Credential":{ "deleteIncrementalPolicy":"e6165aa0-fb7d-490a-98da-f90032f0b886", "throttlePolicy":"c080798a-fd43-484b-bafb-2891b555ab3e", "routingPolicies":[ "c6ed5858-4e74-443d-a303-a33ff4099115" ] }, }
This content of the file is only to show, what all of ids can be setup and in the real situation "connection" in "Seed" must be deleted if we want to also setup connection and same for the situation credential in connection. Because these objects will be replaced and not created in script.
After we are done with file, script must to be run with other parameter "-i [filepath]"
python __init.py__ -i ids.json -p smb_connector-content-source.zip
Plase see the article below about tags.
Routing Policies - Aspire 5.0 - Confluence (accenture.com)
Script must to be run with other parameter "-t [tag1, tag2, ..]"
python __init.py__ -t EU,US -p smb_connector-content-source.zip