mediakind-video / ams-migration-tool

3 stars 4 forks source link

When all exports and imports are used together, imports are not done correctly due to the import order. #8

Closed yuki-mizutani-azp closed 9 months ago

yuki-mizutani-azp commented 11 months ago

When executed in this way

tool.exe --azure-subscription {azure-subscription} --azure-resource-group {azure-resource-group} --azure-account-name {azure-account-name} --mediakind-subscription {mediakind-subscription} --export --import --validate --assets --asset-filters --streaming-locators --content-key-policies --streaming-endpoints

Now it imports in the following order 1: Assets 2: AssetFilters 3: ContentKeyPolicies 4: Streaming Locators 5: Streaming Endpoints

However, Import of Assets fails without specific ContentKeyPolicies

I think the following is the correct processing order to import 1: ContentKeyPolicies 2: Assets 3: AssetFilters 4: Streaming Locators 5: Streaming Endpoints

ljacob-mk commented 9 months ago

I've updated the code to import ContentKeyPolicies before assets.