https://pulp.plan.io/https://pulp.plan.io/favicon.ico2015-06-22T11:40:02ZPulpPulp - Issue #1057: CLI returns unclear error for nonexistant role-id in permission grant/revokehttps://pulp.plan.io/issues/1057?journal_id=50792015-06-22T11:40:02Zipanova@redhat.comipanova@redhat.com
<ul></ul><p>Invalid properties is raised because you don't have the role 'test' created, otherwise permission should be granted/revoked without any issue.<br>
Since you entered incorrect data in the request, the 400 with invalid properties is raised.</p>
<pre><code>$ pulp-admin -u admin -p admin auth role list
+----------------------------------------------------------------------+
Roles
+----------------------------------------------------------------------+
Id: super-users
Users: admin
Id: r1
Users:
[ipanova@ina pulp]$ pulp-admin -u admin -p admin -vv auth permission grant --role-id test --resource / -o READ
2015-06-22 13:32:50,139 - DEBUG - sending POST request to /pulp/api/v2/permissions/actions/grant_to_role/
2015-06-22 13:32:50,312 - INFO - POST request to /pulp/api/v2/permissions/actions/grant_to_role/ with parameters {"operations": ["READ"], "resource": "/", "role_id": "test"}
2015-06-22 13:32:50,312 - INFO - Response status : 400
2015-06-22 13:32:50,312 - INFO - Response body :
{
"exception": null,
"traceback": null,
"property_names": [
"role_id"
],
"_href": "/pulp/api/v2/permissions/actions/grant_to_role/",
"error_message": "Invalid properties: ['role_id']",
"http_request_method": "POST",
"http_status": 400,
"error": {
"code": "PLP0015",
"data": {
"property_names": [
"role_id"
],
"properties": "['role_id']"
},
"description": "Invalid properties: ['role_id']",
"sub_errors": []
}
}
2015-06-22 13:32:50,312 - ERROR - Exception occurred:
href: /pulp/api/v2/permissions/actions/grant_to_role/
method: POST
status: 400
error: Invalid properties: ['role_id']
traceback: None
data: {u'property_names': [u'role_id'], u'error': {u'code': u'PLP0015', u'data': {u'property_names': [u'role_id'], u'properties': u"['role_id']"}, u'description': u"Invalid properties: ['role_id']", u'sub_errors': []}}
Invalid properties: ['role_id']
</code></pre>
<p>I suggest to close this as notabug.</p> Pulp - Issue #1057: CLI returns unclear error for nonexistant role-id in permission grant/revokehttps://pulp.plan.io/issues/1057?journal_id=50912015-06-22T14:24:55Zbmbouterbmbouter@redhat.com
<ul><li><strong>Severity</strong> changed from <i>2. Medium</i> to <i>1. Low</i></li><li><strong>Triaged</strong> changed from <i>No</i> to <i>Yes</i></li></ul><p>Apply the fix in the CLI to give the user a clearer error message. If it's possible to provide a solution that generalizes to other types u'PLP0015' (invalid value exception) in the CLI that would be good too, but not a requirement.</p> Pulp - Issue #1057: CLI returns unclear error for nonexistant role-id in permission grant/revokehttps://pulp.plan.io/issues/1057?journal_id=50932015-06-22T14:29:06Zbmbouterbmbouter@redhat.com
<ul><li><strong>Category</strong> set to <i>15</i></li></ul> Pulp - Issue #1057: CLI returns unclear error for nonexistant role-id in permission grant/revokehttps://pulp.plan.io/issues/1057?journal_id=54392015-07-10T14:50:50Zmhrivnakmhrivnak@redhat.com
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-9 priority-6 priority-default closed" href="/issues/1126">Issue #1126</a>: consumer group bind needs to have error handling when the repo doesn't exist</i> added</li></ul> Pulp - Issue #1057: CLI returns unclear error for nonexistant role-id in permission grant/revokehttps://pulp.plan.io/issues/1057?journal_id=63482015-09-25T20:07:14Zamacdona@redhat.comaustin@redhat.com
<ul><li><strong>Subject</strong> changed from <i>Invalid property role-id in permission grant/revoke</i> to <i>CLI returns unclear error for nonexistant role-id in permission grant/revoke</i></li></ul> Pulp - Issue #1057: CLI returns unclear error for nonexistant role-id in permission grant/revokehttps://pulp.plan.io/issues/1057?journal_id=63502015-09-25T20:08:44Zamacdona@redhat.comaustin@redhat.com
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-11 priority-6 priority-default closed" href="/issues/433">Issue #433</a>: Permission Grant : Role-id Issue</i> added</li></ul> Pulp - Issue #1057: CLI returns unclear error for nonexistant role-id in permission grant/revokehttps://pulp.plan.io/issues/1057?journal_id=366162019-04-12T19:16:20Zbmbouterbmbouter@redhat.com
<ul><li><strong>Status</strong> changed from <i>NEW</i> to <i>CLOSED - WONTFIX</i></li></ul> Pulp - Issue #1057: CLI returns unclear error for nonexistant role-id in permission grant/revokehttps://pulp.plan.io/issues/1057?journal_id=367092019-04-12T19:22:06Zbmbouterbmbouter@redhat.com
<ul></ul><p>Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the <a href="https://www.redhat.com/mailman/listinfo/pulp-dev" class="external">developer mailing list</a>.</p> Pulp - Issue #1057: CLI returns unclear error for nonexistant role-id in permission grant/revokehttps://pulp.plan.io/issues/1057?journal_id=397562019-04-15T20:47:18Zbmbouterbmbouter@redhat.com
<ul><li><strong>Tags</strong> <i>Pulp 2</i> added</li></ul>