Project

Profile

Help

Story #5407

Updated by ttereshc about 4 years ago

Add a pulp2 api endpoint that will return MP template in a json format based on the provided data. 

 This template is subject to further modifications unless whole plugin is intended to be migrated. 

 ~~~ 

 GET pulp/api/v2/migration-plan/?plugin=docker 
 pulp/api/v2/migration-plan/?plugin=docker&repositories=True 

 Will return: 

  { 
     "plugins": [ 
        {  
          "type": "docker", 
          "protection": false, 
          "repositories" :    [ ] 
      } 
   ] 
 } 

 GET pulp/api/v2/migration-plan/?plugin=docker&repositories=True pulp/api/v2/migration-plan/?plugin=docker 

 Will return: 

  { 
     "plugins": [ 
        {  
          "type": "docker", 
          "repositories": [list of all repositories in Pulp2 for this plugin, one pulp2 repo is migrated into 1 pulp3 repo and repo version] "docker" 
      } 
   ] 
 } 

 GET pulp/api/v2/migration-plan/?plugin=docker,iso 

 Will return: 

  { 
     "plugins": [ 
        {  
          "type": "docker" 
      }, 
        { 
          "type": "iso" 
      } 
   ] 
 } 

 GET pulp/api/v2/migration-plan/?plugin=docker,iso&repositories=True 
 pulp/api/v2/migration-plan/?plugin=docker,iso&repositories=True&protection=True 

 Will return: 

  { 
     "plugins": [ 
        {  
          "type": "docker", 
          "protection": true, 
          "repositories" :    [list of all repositories in Pulp2 for this plugin, one pulp2 repo is migrated into 1 pulp3 repo and repo version] [] 
      }, 
        {  
          "type": "iso", 
          "protection": true, 
          "repositories" :    [list of all repositories in Pulp2 for this plugin, one pulp2 repo is migrated into 1 pulp3 repo and repo version] [] 
      } 
   ] 
 } 
 ~~~ 

 For further detailed specifications user will need to modify the json manually and also add repos, distributors, etc he wants to migrate in the case when they don't he does not want to migrate all repos. We need to provide docs that will explain how to do that. 

Back