Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-38097

Templates are missing the correct org/loc after import in WebUI

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • Templates Plugin
    • None
    • sat-endeavour
    • False
    • None

      Description of problem:

      When importing a template (e.g. job template), the template is imported without org and loc specified within the template. Settings -> Template Sync -> Associate seems to be ignored because correct association is not done even if value is "Always".

      Version-Release number of selected component (if applicable):

      Reproduced on stream snap 122.0 and 6.17 => not a regression

      How reproducible:

      • Deterministic

      Steps to Reproduce:

      1. Have an exported template (created previously on the same Sat so you have matching org and loc names) and have no template of that name in Satellite already (so, delete the original template):
        <%#
        name: testtemp617
        snippet: false
        model: JobTemplate
        job_category: Miscellaneous
        provider_type: script
        kind: job_template
        organizations:
        - Default Organization
        locations:
        - CjuxzQrgnXv
        - Default Location
        %>echo a > /tmp/test
      1. In Hosts -> Templates -> Job Templates, click Import and select the template file, Submit
      2. In Hosts -> Templates -> Job Templates, click the created job template and go to Organizations and Locations tabs respectively

      Actual results:

      The job template has always org and loc specified that was selected as WebUI's context (in the top-left org and loc selector). If you select different org and loc, it will have those. If you select Any organization and Any location, it will have none.

      Expected results:

      Depends on value af "associate" setting. For "always", I would expect the job template to have org and loc as per the template file imported. See the linked related issue to see a similar situation in Hammer.

              Unassigned Unassigned
              lhellebr@redhat.com Lukas Hellebrandt
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: