Bug 1066022
Summary: | Add to 'update role' section that it is possible to update permissions field | ||
---|---|---|---|
Product: | [Retired] Pulp | Reporter: | Ina Panova <ipanova> |
Component: | documentation | Assignee: | Chris Duryee <cduryee> |
Status: | CLOSED UPSTREAM | QA Contact: | Irina Gulina <igulina> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | unspecified | CC: | bcourt, cduryee, igulina, skarmark |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | 2.6.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-02-28 22:02:53 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Ina Panova
2014-02-17 14:13:23 UTC
This is fixed in 2.4.4-0.1.beta. I couldn't update permissions. Please let me know what to do about that. >> rpm -qa | grep pulp-server pulp-server-2.4.4-0.1.beta.el7.noarch >> curl -i -H "Accept: application/json" -X POST -k -u admin:admin -d '{"display_name": "Role Test", "description": "Demo Role", "role id": "gena-users"}' 'https://hostname/pulp/api/v2/roles/' HTTP/1.1 201 Created Date: Sun, 07 Dec 2014 16:46:22 GMT Server: Apache/2.4.6 (Red Hat) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5 Location: gena-users Content-Length: 200 Content-Type: application/json {"display_name": "Role Test", "description": "Demo Role", "_ns": "roles", "_href": "/pulp/api/v2/roles/gena-users/", "_id": {"$oid": "5484845e21ede105b5f56e39"}, "id": "gena-users", "permissions": {}} >> curl -i -H "Accept: application/json" -X PUT -k -u admin:admin -d '{"delta":{"display_name": "New Role Test", "description": "New Demo Role", "permissions": {"/v2/roles/": ["CREATE"]}}}' 'https://hostname/pulp/api/v2/roles/gena-users/' HTTP/1.1 400 Bad Request Date: Sun, 07 Dec 2014 16:47:49 GMT Server: Apache/2.4.6 (Red Hat) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5 Content-Encoding: utf-8 Content-Length: 380 Connection: close Content-Type: application/json {"http_request_method": "PUT", "exception": null, "error_message": "Update Keyword [permissions] is not supported", "_href": "/pulp/api/v2/roles/gena-users/", "http_status": 400, "error": {"code": "PLP0000", "data": {}, "description": "Update Keyword [permissions] is not supported", "sub_errors": []}, "args": ["Update Keyword [permissions] is not supported"], "traceback": null} >> curl -i -H "Accept: application/json" -X PUT -k -u admin:admin -d '{"delta":{"display_name": "New Role Test", "description": "New Demo Role"}}' 'https://hostname/pulp/api/v2/roles/gena-users/' HTTP/1.1 200 OK Date: Sun, 07 Dec 2014 16:48:55 GMT Server: Apache/2.4.6 (Red Hat) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5 Content-Length: 208 Content-Type: application/json {"display_name": "New Role Test", "description": "New Demo Role", "_ns": "roles", "_href": "/pulp/api/v2/roles/gena-users/", "_id": {"$oid": "5484845e21ede105b5f56e39"}, "id": "gena-users", "permissions": {}} >> curl -i -H "Accept: application/json" -X PUT -k -u admin:admin -d '{"delta":{"display_name": "New Role Test", "description": "New Demo Role", "permissions": {}}}' 'https://hostname/pulp/api/v2/roles/gena-users/' HTTP/1.1 400 Bad Request Date: Sun, 07 Dec 2014 16:50:33 GMT Server: Apache/2.4.6 (Red Hat) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5 Content-Encoding: utf-8 Content-Length: 380 Connection: close Content-Type: application/json {"http_request_method": "PUT", "exception": null, "error_message": "Update Keyword [permissions] is not supported", "_href": "/pulp/api/v2/roles/gena-users/", "http_status": 400, "error": {"code": "PLP0000", "data": {}, "description": "Update Keyword [permissions] is not supported", "sub_errors": []}, "args": ["Update Keyword [permissions] is not supported"], "traceback": null} This documentation bug was opened together with https://bugzilla.redhat.com/show_bug.cgi?id=1066040 (api bug), and since api bug was fixed the way it is not possible to update permission field in the role update call - doc bug is not appropriate anymore. Barnaby, what are the next steps regarding this situation? Ina, Barnaby, that is right. Here is the PR https://github.com/pulp/pulp/pull/820 which summarizes how permissions of a role need to be updated and the way described in this bug is not supported. This change will need to be reverted. Everything regarding updating permissions in "Update a role" section [1] should be removed since that way of updating permissions is not supported anymore. See comments above. [1] http://pulp-dev-guide.readthedocs.org/en/latest/integration/rest-api/role/cud.html#update-a-role merged to 2.6-testing and up fixed in 2.6.0-0.4.beta Moved to https://pulp.plan.io/issues/399 |