Project

General

Profile

Actions

Bug #39176

closed

Can't clone locked Partition table in API

Added by Lukáš Hellebrandt 4 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Category:
Templates
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

When I attempt to clone a partition table using API, I get an error suggesting to first unlock the template. That doesn’t make sense, cloning is specifically for creating an unlocked copy that I can edit.

This operation isn’t available in Hammer and it behaves correctly in WebUI.

Steps to reproduce:

  1. Have a Satellite with some locked partition table
  1. Using hammer partition-table list get an ID of some partition table
  1. curl -H 'Content-Type: application/json' -uadmin:changeme -k -X POST https://$(hostname)/api/v2/ptables/163/clone -d '{"ptable": {"name": "test34"}}'
    {
    "error": {"id":163,"errors":{"base":["This template is locked. Please clone it to a new template to customize."]},"full_messages":["This template is locked. Please clone it to a new template to customize."]}
    }
    

Actual outcome:

Unable to clone template

Expected outcome:

Able to clone template and cloned template is unlocked


Related issues 2 (0 open2 closed)

Related to Foreman - Bug #39173: Cloning a locked report template via Hammer creates a locked cloneClosedLukáš HellebrandtActions
Related to Webhooks - Bug #39175: Cloning a locked webhook template via Hammer creates a locked cloneClosedLukáš HellebrandtActions
Actions #1

Updated by Lukáš Hellebrandt 4 months ago

  • Assignee set to Lukáš Hellebrandt
Actions #2

Updated by Oleh Fedorenko 4 months ago

  • Project changed from Templates to Foreman
  • Category set to Templates
Actions #3

Updated by Oleh Fedorenko 4 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/10918 added
Actions #4

Updated by Oleh Fedorenko 4 months ago

  • Related to Bug #39173: Cloning a locked report template via Hammer creates a locked clone added
Actions #5

Updated by Oleh Fedorenko 4 months ago

  • Related to Bug #39175: Cloning a locked webhook template via Hammer creates a locked clone added
Actions #6

Updated by The Foreman Bot 3 months ago

  • Fixed in Releases 3.19.0 added
Actions #7

Updated by Lukáš Hellebrandt 3 months ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF