Versions Compared

Key

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

Story ID

sto_85

Name

Import DPU template(s) from zip file

User role

Who can do this (User role)

Data Publisher


Description

I want to import DPU template exported from one system to another system so that I can:

  1. prepare DPU template in a test system and then to update production environment with proper one
  2. restore a DPU from export/backup done earlier, after data loss or system re-install

Preconditions

  • zip file representing a result of DPU template(s) export or zip file representing a result of pipeline export exists on local file system
Acceptance criteria

How to do it:

  • selects and clicks 'Unified Views' from 'Tools' combo box on main page of internal catalog
    • 'Home' page of ODN/UV is displayed
  • clicks 'DPU Templates' in main menu
    • list of all DPU templates organized in Develop tree is displayed
    • 'Create DPU template' button is available
  • clicks 'Create DPU template' button
    • 'DPU template creation' dialog is displayed
      • 'zip' tab is available
    •   clicks to 'zip' tab
      • 'Choose file' button is available
      • clicks 'Choose file' button
        • upload dialog for selection of file to be uploaded from local file system is displayed
      • selects exported zip file containing DPU template(s) and respective DPU JARs from local file system, the zip file representing a result of:
          • pipeline export (not necessarily contains DPU JARs)
          • DPU template(s) export
        • upload dialog is closed
        • name of the zip file is displayed in dedicated field
        • system checks the content of the file after selection and is able to recognize whether the exported file is a result of pipeline export or DPU template export
          • list of DPU templates contained in the zip file is displayed containing columns
            • 'DPU template name'
            • 'Respective DPU JAR name'
            • 'Import possible' - takes values 'YES' and 'NO'
        • if the zip file is a result of pipeline export and contains no DPU templates
          • 'Import possible' column contains 'NO' for all DPU templates
          • error message is displayed "There is nothing to import."
          • 'Import' button is disabled
        • if the zip file is a result of pipeline export and contains DPU templates or if the zip file is a result of DPU template(s) export
          • 'Import possible' column contains
            • 'NO' for 2nd level DPU templates with version older than the version of DPU JARs on current system
            • 'YES' for 2nd level DPU templates with version equal or newer than the version of DPU JARs on current system
            • 'YES' for 2nd DPU templates that do not exist in current system yet
            • 'NO' for existing (the same name) 3rd level DPU templates with parent 2nd level DPU template version older than the version of DPU JARs on current system
            • 'YES' for non existing 3rd level DPU templates with parent 2nd level DPU template version older than the version of DPU JARs on current system
            • 'YES' for all 3rd level DPU templates with parent 2nd level DPU template version equal or newer than the version of DPU JARs on current system
            • 'YES' for 3rd level DPU templates that has no parent 2nd level DPU template in current system yet
          • if at least one row contains 'NO' in 'Import possible' column, warning message is displayed "Warning, not all DPU templates will be imported due to outdated versions."
          • if at least one row contains 'YES' in 'Import possible' column, 'Import' button is available
          • if all rows contain 'NO' in 'Import possible' column, 'Import' button is disabled
          • clicks 'Import' button
            • import of 3rd level DPU templates is started after all 2nd level DPU templates are resolved 
            • 2nd level DPU templates with newer version are installed replacing the older versions
            • 2nd level DPU templates that do not exist yet are installed as 2nd level DPU templates
            • no 2nd level DPU template with version older than the version of DPU template in current system is installed
            • all existing (not imported) 3rd level DPU templates remain as child DPU templates of replaced parent 2nd level DPU templates
            • all non existing 3rd level DPU templates are installed and created as child DPU templates for corresponding parent 2nd level DPU templates
            • existing 3rd level DPU templates are replaced only if the imported 3rd level DPU template has corresponding parent of newer version
            • 'DPU template creation' dialog is closed with message 'Import of DPU template(s) was successful.'

Requirements

TODO

Notes

 

Matching
Ad matchovani 2nd level DPU templates, ano, v tomto pripade by to melo matchovat podle groupID+artifactID, aktualne resime dle JAR. Ad custom name, desc, to necht si na kazde instaci upravi, pri importu netreba modifikovat.
Ad default konf, nejlepsi by bylo se uzivatele zeptat zda konfiguraci 1) prepsat nebo 2) neimportovat. Ono obe varianty muzou davat smysl a v obou pripadech bude DPU template fungovat - aneb muze existovat DPU template 2nd urovne verze 2.1, ktere ale jako defaultni konf ma ulozenu v db konfiguraci dle 2.0. Pri nacteni teto 2.0 konfigurace se aplikuje migracni fce, ktera konfiguraci zmigruje na 2.1.

  

Ad matchovani 3rd level DPU templates - tam to jde zalozit na prislusnosti k 2nd level DPU template a jmenu. Kdyz importujes 3rd level DPU a 3rd level DPU s danym jmenom uz pro dane 2nd level DPU existuje, tak by bylo nejlepsi se zeptat uzivatele, zda konfiguraci si preje 1) prepsat 2) neimportovat. Oboje moznosti muzou davat smysl. Tedy postup stejny jako u 2nd level DPUs. 

Overwriting confs

Regarding overriding configurations of the imported vs. target DPU templates, we should consider: 

 If somebody is importing DPU templates and the imported set of DPU templates contains 3rd level DPU template with the same name as in the target system and in both cases pointing to the same 2nd level DPU template, we can:

  1. Overwrite the target 3rd level DPU template config with the imported one in any case
  2. Overwrite  the target 3rd level DPU template config only if the imported 3rd level DPU template points to the same or newer imported 2nd level DPU template (this option is selected in the user story)
  3. Ask user whether such 3rd level DPU template configuration should be overridden or not.

 

Similarly, if somebody is importing DPU templates and the imported set of DPU templates contains 2nd level DPU template with the same name as in the target system, but with newer version, we may: 

  • Overwrite the default configuration in the target system ((this option is selected in the user story)
  • Ask user whether the target default configuration should be overridden (take into account the fact that even DPU template X version 2.1 can work with default configuration according to DPU template X version 2.0 - anytime when such DPU template X v 2.1 with default configuration according to 2.0 version is placed on the pipeline, DPU instance is prepared and default instance configuration of such DPU instance is migrated to version 2.1 on the fly when the dialog is open)

    Notes

    85