Description of problem: Currently role cannot be cloned from CLI and API, and can only be cloned from UI. This RFE is to add that support. Version-Release number of selected component (if applicable): Satellite 6.3 snap 2 How reproducible: Steps to Reproduce: 1. Attempt to clone a role from CLI and API 2. 3. Actual results: No option to clone a Role from CLI hammer or API. Expected results: Support should be added to clone a role from CLI and API. Additional info:
Created redmine issue http://projects.theforeman.org/issues/18317 from this bug
Connecting redmine issue http://projects.theforeman.org/issues/18318 from this bug
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18318 has been resolved.
Verified. Satellite-6.3 Snap 9 Package versions: satellite-6.3.0-16.0.beta.el7sat.noarch tfm-rubygem-hammer_cli-0.10.2-1.el7sat.noarch tfm-rubygem-hammer_cli_foreman-0.10.2-1.el7sat.noarch [root@snap9 ~]# hammer role clone --id 1 --new-name 'Cloned Tasks Managed' User role cloned [root@snap9 ~]# cat role_clone { "name": "Cloned Tasks Manager 2" } [root@snap9 ~]# curl -X POST -k -H 'Content-Type: application/json' https://localhost/api/v2/roles/1/clone -u $LOGIN -d "$(<role_clone)" -i HTTP/1.1 201 Created Date: Wed, 02 Aug 2017 09:22:47 GMT Server: Apache/2.4.6 (CentOS) Foreman_version: 1.15.2 Foreman_api_version: 2 Apipie-Checksum: d27105eaf95e8a9c5bddae9e0d6aca3f Cache-Control: max-age=0, private, must-revalidate X-Request-Id: beef6c09-aaa2-4ebb-9182-3a94eb950837 X-Runtime: 0.117654 Content-Security-Policy: default-src 'self'; child-src 'self'; connect-src 'self' ws: wss:; img-src 'self' data: *.gravatar.com; script-src 'unsafe-eval' 'unsafe-inline' 'self'; style-src 'unsafe-inline' 'self' Strict-Transport-Security: max-age=631152000; includeSubdomains X-Content-Type-Options: nosniff X-Download-Options: noopen X-Frame-Options: sameorigin X-Permitted-Cross-Domain-Policies: none X-XSS-Protection: 1; mode=block X-Powered-By: Phusion Passenger 4.0.18 Set-Cookie: request_method=POST; path=/ Set-Cookie: _session_id=8a32e013079b304b2961f9f6a2dcf155; path=/; secure; HttpOnly Location: https://localhost/roles/27-Cloned%20Tasks%20Manager%202 ETag: W/"ea2b6a48ace431aa687bba7aace3c5ea" Status: 201 Created Transfer-Encoding: chunked Content-Type: application/json; charset=utf-8 {"id":27,"name":"Cloned Tasks Manager 2","builtin":0,"description":null,"origin":null,"cloned_from_id":1}
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2018:0336