Project

Profile

Help

Issue #7632

Updated by fao89 over 3 years ago

At the first sync stage we only provide: name, namespace and version: 
 https://github.com/pulp/pulp_ansible/blob/master/pulp_ansible/app/tasks/collections.py#L292-L295 

 We get the other attributes from MANIFEST.json 
 https://github.com/pulp/pulp_ansible/blob/master/pulp_ansible/app/tasks/collections.py#L486-L510 

 ~~~ text 
 > /home/vagrant/devel/pulp_ansible/pulp_ansible/app/tasks/collections.py(493)_post_save()                                                                                                      
 -> file_obj = tar.extractfile("MANIFEST.json")                                                                                                                                                 
 (Pdb) n                                                                                                                                                                                        
 > /home/vagrant/devel/pulp_ansible/pulp_ansible/app/tasks/collections.py(494)_post_save()                                                                                                      
 -> manifest_data = json.load(file_obj)                                                                                                                                                         
 (Pdb) n                                                                                                                                                                                        
 > /home/vagrant/devel/pulp_ansible/pulp_ansible/app/tasks/collections.py(495)_post_save()                                                                                                      
 -> info = manifest_data["collection_info"]                                                                                                                                                     
 (Pdb) n                                         
 > /home/vagrant/devel/pulp_ansible/pulp_ansible/app/tasks/collections.py(498)_post_save() 
 -> tags = info.pop("tags") 
 (Pdb) info                                      
 {'namespace': 'ibm', 'name': 'spectrum_virtualize', 'version': '1.0.12-awc13', 'authors': ['Peng Wang <wangpww@cn.ibm.com>'], 'readme': 'README.md', 'tags': ['storage'], 'description': None$ 
  'license': [], 'license_file': 'LICENSE', 'dependencies': {}, 'repository': 'https://github.com/ansible-collections/ibm.spectrum_virtualize', 'documentation': None, 'homepage': None, 'issu$ 
 s': None}                                       
 (Pdb) info.keys()                               
 dict_keys(['namespace', 'name', 'version', 'authors', 'readme', 'tags', 'description', 'license', 'license_file', 'dependencies', 'repository', 'documentation', 'homepage', 'issues']) 
 ~~~ 

 Even when the endpoint provides it: 
 https://ci.cloud.redhat.com/api/automation-hub/content/synctest/v3/collections/ibm/spectrum_virtualize/versions/1.0.12-awc10/ 

 ~~~ text 
 { 
 "version": "1.0.12-awc10", 
 "certification": "needs_review", 
 "href": "/api/automation-hub/content/synctest/v3/collections/ibm/spectrum_virtualize/versions/1.0.12-awc10/", 
 "created_at": "2020-03-30T15:08:24.399223Z", 
 "updated_at": "2020-03-30T15:08:24.399254Z", 
 "artifact": { 
 "filename": "ibm-spectrum_virtualize-1.0.12-awc10.tar.gz", 
 "sha256": "50121055382a3c0dd6e54e1dbd02c8be3a760b48796adc213f411a9a26a05479", 
 "size": 36676 
 }, 
 "collection": { 
 "id": "04051ea0-1d99-4752-a477-09b91acb419f", 
 "name": "spectrum_virtualize", 
 "href": "/api/automation-hub/content/synctest/v3/collections/ibm/spectrum_virtualize/" 
 }, 
 "download_url": "https://ci.cloud.redhat.com/api/automation-hub/v3/artifacts/collections/synctest/ibm-spectrum_virtualize-1.0.12-awc10.tar.gz", 
 "name": "spectrum_virtualize", 
 "namespace": { 
 "name": "ibm" 
 }, 
 "metadata": { 
 "authors": [ 
 "Peng Wang <wangpww@cn.ibm.com>" 
 ], 
 "contents": [ 
 { 
 "name": "ibm_svc_mdisk", 
 "description": "This module manages MDisks on IBM Spectrum Virtualize Family storage systems.", 
 "content_type": "module" 
 }, 
 { 
 "name": "ibm_svc_vol_map", 
 "description": "This module manages volume mapping on IBM Spectrum Virtualize Family storage systems.", 
 "content_type": "module" 
 }, 
 { 
 "name": "ibm_svc_vdisk", 
 "description": "This module manages volumes on IBM Spectrum Virtualize Family storage systems.", 
 "content_type": "module" 
 }, 
 { 
 "name": "ibm_svc_host", 
 "description": "This module manages hosts on IBM Spectrum Virtualize Family storage systems.", 
 "content_type": "module" 
 }, 
 { 
 "name": "ibm_svc_mdiskgrp", 
 "description": "This module manages pools on IBM Spectrum Virtualize Family storage systems.", 
 "content_type": "module" 
 }, 
 { 
 "name": "ibm_svc_info", 
 "description": "This module gathers various information from the IBM Spectrum Virtualize storage systems.", 
 "content_type": "module" 
 }, 
 { 
 "name": "ibm_svc_utils", 
 "description": null, 
 "content_type": "module_utils" 
 } 
 ], 
 "dependencies": {}, 
 "description": "", 
 "documentation": "", 
 "homepage": "", 
 "issues": "", 
 "license": [], 
 "repository": "https://github.com/ansible-collections/ibm.spectrum_virtualize", 
 "tags": [ 
 "storage" 
 ] 
 } 
 } 
 ~~~ 

Back