Project

General

Profile

Actions

Bug #32407

closed

import/export metadata.json needs to be trimmed

Added by Partha Aji over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Inter Server Sync
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

The metadata.json file generated when exporting bunch of repositories that are part of the same product, the product details like name and gpg keys are repeated multiple times. We need to trim this information better
It looks like below at present.

{
    "organization": "export-3439",
    "repository_mapping": {
        <.....other mappings .....>
        "misc-33384": {
            "name": "misc",
            "label": "misc",
            "description": null,
            "arch": "x86_64",
            "content_type": "yum",
            "unprotected": true,
            "checksum_type": "sha256",
            "os_versions": [
                "rhel-7" 
            ],
            "major": null,
            "minor": null,
            "product": {
                "name": "prod",
                "label": "prod",
                "description": null,
                "gpg_key": {

                }
            },
            "gpg_key": {
                "name": "great",
                "content_type": "gpg_key",
                "content": "great gatsby" 
            },
            "redhat": false
        }
    },
    "content_view": {
        "name": "Export-Library",
        "label": "Export-Library",
        "description": null
    },
    "content_view_version": {
        "major": 9,
        "minor": 0
    },
    "incremental": false,
    "toc": "export-5e1ca0f7-1af7-49b2-97d5-f9417760d11a-20210421_0159-toc.json" 
}

It needs to look like

{
    "organization": "export-3439",
    "products": {
       "prod" : {
                "name": "prod",
                "label": "prod",
                "description": null,
                "gpg_key": {

                }
     },
     "gpg_keys": {
        "great" : : {
                "name": "great",
                "content_type": "gpg_key",
                "content": "great gatsby" 
            },
     }
    "repositories": {
        <.....other mappings .....>
        "misc-33384": {
            "name": "misc",
            "label": "misc",
            "description": null,
            "arch": "x86_64",
            "content_type": "yum",
            "unprotected": true,
            "checksum_type": "sha256",
            "os_versions": [
                "rhel-7" 
            ],
            "major": null,
            "minor": null,
            "product": { "label": "prod" }          
            "gpg_key": { "name": "great" }
            },
            "redhat": false
        }
    },
    "content_view": {
        "name": "Export-Library",
        "label": "Export-Library",
        "description": null
    },
    "content_view_version": {
        "major": 9,
        "minor": 0
    },
    "incremental": false,
    "toc": "export-5e1ca0f7-1af7-49b2-97d5-f9417760d11a-20210421_0159-toc.json" 
}
Actions #1

Updated by The Foreman Bot over 3 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Partha Aji
  • Pull request https://github.com/Katello/katello/pull/9315 added
Actions #2

Updated by James Jeffers over 3 years ago

  • Triaged changed from No to Yes
Actions #3

Updated by The Foreman Bot over 3 years ago

  • Fixed in Releases Katello 4.2.0 added
Actions #4

Updated by Partha Aji over 3 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF