https://pulp.plan.io/https://pulp.plan.io/favicon.ico2015-07-09T16:54:53ZPulpPulp - Issue #1125: API call to create a user includes extra `id` fieldhttps://pulp.plan.io/issues/1125?journal_id=54032015-07-09T16:54:53Zigulina@redhat.comigulina@redhat.com
<ul></ul><p>It seems there is the same issue not only for user creation. I don't follow id and _id logic at all. Since for one things, they match, for others they differ in names and values:</p>
<p>1) id and _id values are duplicated for:</p>
<pre><code>- binding repo
- consumer history
- unit profiles
- repo content retrieval
- repo group publish
- event crud
- user cud - as the original issue description, but user retrieval also
- permissions retrieval
</code></pre>
<p>Check all response bodies on this pages:</p>
<p><a href="https://github.com/pulp/pulp/blob/master/docs/dev-guide/integration/rest-api/consumer/bind.rst" class="external">https://github.com/pulp/pulp/blob/master/docs/dev-guide/integration/rest-api/consumer/bind.rst</a><br>
<a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/consumer/history.html" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/consumer/history.html</a><br>
<a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/consumer/profile.html" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/consumer/profile.html</a><br>
<a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/content.html" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/content.html</a><br>
<a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/groups/publish.html" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/groups/publish.html</a><br>
<a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/event/crud.html" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/event/crud.html</a><br>
<a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/user/cud.html" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/user/cud.html</a><br>
<a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/user/retrieval.html" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/user/retrieval.html</a><br>
<a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/permission/retrieval.html" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/permission/retrieval.html</a></p>
<p>2) However, id and _id values are different for:<br>
- consumer cud and retrieval<br>
- consumer group cud<br>
- repo cud and retrieval<br>
- repo group cud, retrieval and distributors<br>
- role cud and retrieval</p>
<p><a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/consumer/cud.html" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/consumer/cud.html</a><br>
<a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/consumer/retrieval.html" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/consumer/retrieval.html</a><br>
<a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/consumer/group/cud.html" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/consumer/group/cud.html</a><br>
<a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/cud.html" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/cud.html</a><br>
<a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/retrieval.html" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/retrieval.html</a><br>
<a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/groups/cud.html" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/groups/cud.html</a><br>
<a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/groups/retrieval.html" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/groups/retrieval.html</a><br>
<a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/groups/distributors.html" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/groups/distributors.html</a><br>
<a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/role/cud.html" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/role/cud.html</a><br>
<a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/role/retrieval.html" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/role/retrieval.html</a></p>
<p>3) the same parameter name, but different value format<br>
Here: <a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/sync.html" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/sync.html</a><br>
and for example here <a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/publish.html#scheduling-a-publish" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/publish.html#scheduling-a-publish</a><br>
_id value is a string "_id": "52e6d29edd01fb70bd0d9c37"</p>
<p>but here <a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/retrieval.html" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/retrieval.html</a><br>
it is a dictionary "_id": {"$oid": "addf9261-345e-4ce3-ad1e-436ba005287f"}</p>
<p>4) sometimes it's only "_id", and sometimes it's "id"<br>
In the above example we have a parameter _id which has a value a string or a dictionary, but here <a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/events/repo-action-events.html#repository-sync-finished" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/events/repo-action-events.html#repository-sync-finished</a><br>
we have parameter id and there is no any _id</p>
<p>5)<br>
This <a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/sync.html#retrieving-sync-history" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/sync.html#retrieving-sync-history</a></p>
<p>doesn't include any id or _id</p>
<p>But all other schedules examples have _id, see the same page</p>
<p>6) Please notice how the variables with the same name are different in values for the first response body and for all other response bodies on this page:<br>
<a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/groups/distributors.html#list-repository-group-distributors" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/groups/distributors.html#list-repository-group-distributors</a></p>
<p>In the 1st sample it's:<br>
"id": "2a146bdf-384b-4951-987e-8d42c7c4317f",<br>
and in all other samples it's:<br>
"id": "test_id",</p>
<p>7) Here <a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/nodes.html#publishing" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/nodes.html#publishing</a><br>
we have <span>"id": "nodes_http_distributor"</span><br>
and on the same page in the next sample we have<br>
<span>"distributor_id": "nodes_http_distributor"</span><br>
and for example here <a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/retrieval.html#retrieve-distributors-associated-with-a-repository" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/retrieval.html#retrieve-distributors-associated-with-a-repository</a><br>
we have <span>"distributor_type_id": "harness_distributor"</span>,</p>
<p>8) Here <a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/nodes.html#bind" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/nodes.html#bind</a><br>
we have <span>"repo_id": "elmer"</span>,<br>
but here <a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/cud.html#create-a-repository" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/repo/cud.html#create-a-repository</a><br>
we have <span>"id": "harness_repo_1",</span></p>
<p>9) Why we have task_id and type_id, but for example for repo cud it's simpy id, but here <a href="http://pulp.readthedocs.org/en/latest/dev-guide/integration/nodes.html#run" class="external">http://pulp.readthedocs.org/en/latest/dev-guide/integration/nodes.html#run</a><br>
it's<br>
"repo_id": "abc"</p>
<p>Please when/if fixing it, don't forget to update response bodies in docs.</p> Pulp - Issue #1125: API call to create a user includes extra `id` fieldhttps://pulp.plan.io/issues/1125?journal_id=54352015-07-10T14:49:26Zmhrivnakmhrivnak@redhat.com
<ul><li><strong>Triaged</strong> changed from <i>No</i> to <i>Yes</i></li></ul> Pulp - Issue #1125: API call to create a user includes extra `id` fieldhttps://pulp.plan.io/issues/1125?journal_id=366342019-04-12T19:16:31Zbmbouterbmbouter@redhat.com
<ul><li><strong>Status</strong> changed from <i>NEW</i> to <i>CLOSED - WONTFIX</i></li></ul> Pulp - Issue #1125: API call to create a user includes extra `id` fieldhttps://pulp.plan.io/issues/1125?journal_id=366912019-04-12T19:20:34Zbmbouterbmbouter@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 #1125: API call to create a user includes extra `id` fieldhttps://pulp.plan.io/issues/1125?journal_id=396892019-04-15T20:45:55Zbmbouterbmbouter@redhat.com
<ul><li><strong>Tags</strong> <i>Pulp 2</i> added</li></ul>