Actions
Bug #39176
closedCan't clone locked Partition table in API
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:
- Have a Satellite with some locked partition table
- Using hammer partition-table list get an ID of some partition table
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
Actions