Comment 4 for bug 1194885

Revision history for this message
Anne Gentle (annegentle) wrote :

Here's the HTML of the table comparison.

<table>
  <tbody>
    <tr>
      <th>Feature</th>
      <th>Description</th>
      <th>Keystone Client (using 2.0)</th>
      <th>Curl - using V2.0 API</th>
      <th>V3 API</th>
      <th colspan="1">Observations</th>
    </tr>
    <tr>
      <td>List Users</td>
      <td>List all users that the supplied token has visibility to</td>
      <td>keystone --token ADMIN --endpoint <a href="http://localhost:35357/v2.0/">http://localhost:35357/v2.0/</a> user-list</td>
      <td>
        <p>curl <a href="http://166.78.146.147:35357/v2.0/users">http://locahost:35357/v2.0/users</a> -H "X-Auth-Token: ADMIN"</p>
        <ac:structured-macro ac:name="code">
          <ac:plain-text-body><![CDATA[{
 "users": [
 {
 "email": "<email address hidden>",
 "enabled": true,
 "id": "45214d3ed59b46458c5d2ae9431fbbb7",
 "name": "joe",
 "tenantId": "26772165df7f4e418706a7ab875b6312"
 }
 ]
}]]></ac:plain-text-body>
        </ac:structured-macro>
      </td>
      <td>
        <p>curl <a href="http://166.78.146.147:35357/v3/users">http://localhost:35357/v3/users</a> -H "X-Auth-Token: ADMIN"</p>
        <ac:structured-macro ac:name="code">
          <ac:plain-text-body><![CDATA[{
 "links": {
 "next": null,
 "previous": null,
 "self": "http://localhost:5000/v3/users"
 },
 "users": [
 {
 "domain_id": "default",
 "email": "<email address hidden>",
 "enabled": true,
 "id": "45214d3ed59b46458c5d2ae9431fbbb7",
 "links": {
 "self": "http://localhost:5000/v3/users/45214d3ed59b46458c5d2ae9431fbbb7"
 },
 "name": "joe",
 "tenantId": "26772165df7f4e418706a7ab875b6312"
 }
 ]
}]]></ac:plain-text-body>
        </ac:structured-macro>
      </td>
      <td colspan="1"> </td>
    </tr>
    <tr>
      <td colspan="1">Create User</td>
      <td colspan="1">Create a new user</td>
      <td colspan="1">keystone --token ADMIN --endpoint <a href="http://localhost:35357/v2.0/">http://localhost:35357/v2.0/</a> user-create --name joe --tenant_id 26772165df7f4e418706a7ab875b6312 --pass password1 --email <a href="mailto:<email address hidden>"><email address hidden></a> --enabled true</td>
      <td colspan="1">
        <p>curl <a href="http://166.78.146.147:35357/v2.0/tenants">http://localhost:35357/v2.0</a>/users -d '{"user":{"username":"joe","email":"<a href="mailto:<email address hidden>"><email address hidden></a>","enabled":true, "name":"Joe", "OS-KSADM":"secrete"}}' -H "Content-type: application/json" -H "X-Auth-Token: ADMIN"</p>
        <p> </p>
        <p> </p>
      </td>
      <td colspan="1"> </td>
      <td colspan="1">
        <p>Name required attribute in Keystone v2, but username is not...</p>
        <p>Case sensitive username.</p>
        <p>Another API call needed in v2 to associate user with tenant.</p>
        <p> </p>
      </td>
    </tr>
    <tr>
      <td>Create Tenant</td>
      <td>Create a new tenant (or project for v3 lingo)</td>
      <td>keystone --token ADMIN --endpoint <a href="http://localhost:35357/v2.0/">http://localhost:35357/v2.0/</a> tenant-create --name tenant01 --description "tenant for tenant sake" --enable true</td>
      <td>
        <p>curl <a href="http://166.78.146.147:35357/v2.0/tenants">http://localhost:35357/v2.0/tenants</a> -H "X-Auth-Token: ADMIN" -X POST -d '{"tenant":{"name":"tenant02","description":"tenant tenant", "enabled":true}}' -H "Content-type: application/json"</p>
        <p> </p>
        <ac:structured-macro ac:name="code">
          <ac:plain-text-body><![CDATA[{
 "tenant":
 {
   "description": "tenant tenant",
   "enabled": true,
   "id": "e92d66cd3aed46ad8d47d2055f63b796",
   "name": "tenant02"
 }
}]]></ac:plain-text-body>
        </ac:structured-macro>
      </td>
      <td>
        <p>curl <a href="http://166.78.146.147:35357/v3/projects">http://localhost:35357/v3/projects</a> -H "X-Auth-Token: ADMIN" -H "Content-type: application/json" -d '{"project": {"domain_id":"123","enabled":true,"name":"Project-X"}}'</p>
        <p> </p>
        <ac:structured-macro ac:name="code">
          <ac:plain-text-body><![CDATA[{
 "project":
 {
   "description": "",
   "links":
    {
     "self":"http://localhost:5000/v3/projects/9dcdb57f6e5345afb50cafed9b13b52b"
    },
   "enabled": true,
   "id": "9dcdb57f6e5345afb50cafed9b13b52b",
   "domain_id": "123",
   "name": "Project-X"
 }
}]]></ac:plain-text-body>
        </ac:structured-macro>
        <p> </p>
        <p> </p>
      </td>
      <td colspan="1">
        <p>Tenants in v2 can be seen as projects in v3.</p>
        <p>Projects in v3 can be seen as tenants in v2.</p>
        <p>Projects in v3 can be created, referencing a domain that doesn't yet exist. (In the example to the left, domain "123" wasn't created and still isn't shown on a get v3/domains call</p>
      </td>
    </tr>
    <tr>
      <td>List Domains</td>
      <td>List all the domains the supplied token has visibility to</td>
      <td>N/A</td>
      <td>N/A</td>
      <td>
        <p>curl <a href="http://166.78.146.147:35357/v3/domains">http://localhost:35357/v3/domains</a> -H "X-Auth-Token: ADMIN" | python -mjson.tool</p>
        <p> </p>
        <ac:structured-macro ac:name="code">
          <ac:plain-text-body><![CDATA[{
 "domains": [
 {
 "description": "Owns users and tenants (i.e. projects) available on Identity API v2.",
 "enabled": true,
 "id": "default",
 "links": {
 "self": "http://localhost:5000/v3/domains/default"
 },
 "name": "Default"
 }
 ],
 "links": {
 "next": null,
 "previous": null,
 "self": "http://localhost:5000/v3/domains"
 }
}]]></ac:plain-text-body>
        </ac:structured-macro>
      </td>
      <td colspan="1"> </td>
    </tr>
    <tr>
      <td>Add Domain</td>
      <td>Create a new domain</td>
      <td>N/A</td>
      <td>N/A</td>
      <td>
        <p>curl <a href="http://166.78.146.147:35357/v3/domains">http://localhost:35357/v3/domains</a> -H "X-Auth-Token: ADMIN" -H "Content-type: application/json" -d '{"domain":{"enabled":true, "name":"CustomerX"}}' | python -mjson.tool</p>
        <p> </p>
        <ac:structured-macro ac:name="code">
          <ac:plain-text-body><![CDATA[{
 "domain": {
 "enabled": true,
 "id": "fbff0b59b2ae4be5836195b978f2d101",
 "links": {
 "self": "http://localhost:5000/v3/domains/fbff0b59b2ae4be5836195b978f2d101"
 },
 "name": "CustomerX"
 }
}]]></ac:plain-text-body>
        </ac:structured-macro>
      </td>
      <td colspan="1"> </td>
    </tr>
    <tr>
      <td colspan="1">Add Role</td>
      <td colspan="1">Add a new role</td>
      <td colspan="1">keystone --token ADMIN --endpoint <a href="http://localhost:35357/v2.0">http://localhost:35357/v2.0</a> role-create --name user</td>
      <td colspan="1">
        <p>curl <a href="http://166.78.146.147:35357/v2.0/OS-KSADM/roles">http://166.78.146.147:35357/v2.0/OS-KSADM/roles</a> -H "X-Auth-Token: ADMIN" -d '{"role":{"name":"SysAdmni", "description":"Role for doing sys adminy things"}}' -H "Content-type: application/json"</p>
        <ac:structured-macro ac:name="code">
          <ac:plain-text-body><![CDATA[{
 "role":
 {
   "description": "Role for doing sys adminy things",
   "name": "SysAdmni",
   "id": "c6d7d36aaa7344efbf9e24af2223de72"
 }
}]]></ac:plain-text-body>
        </ac:structured-macro>
      </td>
      <td colspan="1">
        <p>curl <a href="http://166.78.146.147:35357/v3/roles">http://localhost:35357/v3/roles</a> -H "X-AUTH-TOKEN: ADMIN" -H "Content-type: application/json" -d '{"role":{"name":"SysAdmin","description":"Sys Admin created via v3"}}' | python -mjson.tool<br/>
          <br/>
        </p>
        <ac:structured-macro ac:name="code">
          <ac:plain-text-body><![CDATA[{
 "role": {
 "description": "Sys Admin created via v3",
 "id": "dd8312d819f44f0398092601c2643000",
 "links": {
 "self": "http://localhost:5000/v3/roles/dd8312d819f44f0398092601c2643000"
 },
 "name": "SysAdmin"
 }
}]]></ac:plain-text-body>
        </ac:structured-macro>
      </td>
      <td colspan="1">
        <p>description not listed in v3 doc, but i was able to add it anyway.</p>
        <p> </p>
        <p>V3 doc: <a href="https://github.com/openstack/identity-api/blob/master/openstack-identity-api/src/markdown/identity-api-v3.md">https://github.com/openstack/identity-api/blob/master/openstack-identity-api/src/markdown/identity-api-v3.md</a>
        </p>
      </td>
    </tr>
  </tbody>
</table>