Project

General

Profile

Actions

Bug #39176

closed

Can't clone locked Partition table in API

Added by Lukáš Hellebrandt 5 months ago. Updated 4 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

Also available in: Atom PDF