Project

Profile

Help

Story #5178

Updated by ttereshc over 5 years ago

Users can submit a Migration Plan in JSON format. 
 The structure of the JSON as well as values in it need to be validated: 
  - check that structure is correct and only expected fields are present 
  - check that pulp2 plugins which need to be migrated and corresponding pulp 3 plugins are installed 
  - optionally check resources a Migration Plan refers to ( if a plugin exists in Pulp2, if resources exist in Pulp 2). 

 Consider using https://github.com/Julian/jsonschema which is among recommended project for JSON schema validation https://json-schema.org/implementations.html#validators 

 Example of a Migration Plan 
 <pre> 
  { 
     "plugins": [ 
        {  
          "type": "iso",    # it should be a pulp2 type 
          "protection": true, # migrate any content protection available for all repos 
          "repositories" :    [ 
            { 
              "name": "foo", 
              "pulp2_repository_id":    "my_repo_id to use to find an importer to migrate"     # optional? 
              "repository_versions": [ 
                  { 
                    "pulp2_repository_id": "idA", 
                    "distributor_ids":    ["id1", "'id2"]    # optional? 
                    "protection": ["distibutor_id1"] # content protection migration is only needed for the specfied distributor(s) 
                   },                 
                   { 
                     "pulp2_repository_id": "idB", "pulp2_repository": 'idB', 
                     "distributor_ids":    ["id3''] ['id3''] 
                   }, 
                ] 
             } 
         ] 
      }, 
      { 
        "type": "docker", 
      } 
   ] 
 } 
 </pre> 

 For use cases and examples of a Migration Plan, see https://etherpad.net/p/pulp-2to3-migration 

Back