Add parent_id information in the Project options

In kilo, Keystone provide the possibility to create a project hierarchy.
Now, in the project operations, you can provide a parent_id to represent the
parent project.

This patch add the parent_id information in the identity API ref.
Updated code samples to use actual values rather than
placeholders like --endpoint-id-- (DF)

Change-Id: Idc22d9f0ff55f161bd0dc5a81974e91018e37b7b
This commit is contained in:
Raildo Mascena 2015-06-12 15:41:55 -03:00 committed by Diane Fleming
parent b7fecce212
commit c51138f746
13 changed files with 63 additions and 52 deletions

View File

@ -1,8 +1,9 @@
{
"project": {
"description": "...",
"domain_id": "...",
"enabled": "...",
"name": "..."
"description": "My new project",
"domain_id": "1789d1",
"parent_id": "123c56",
"enabled": true,
"name": "myNewProject"
}
}

View File

@ -1,11 +1,12 @@
{
"project": {
"domain_id": "--domain-id--",
"domain_id": "1789d1",
"parent_id": "123c56",
"enabled": true,
"id": "--project-id--",
"id": "456789",
"links": {
"self": "http://identity:35357/v3/projects/--project-id--"
"self": "http://identity:35357/v3/projects/456789"
},
"name": "a project name"
"name": "myNewProject"
}
}

View File

@ -1,11 +1,12 @@
{
"project": {
"domain_id": "--domain-id--",
"domain_id": "1789d1",
"parent_id": "123c56",
"enabled": true,
"id": "--project-id--",
"id": "456789",
"links": {
"self": "http://identity:35357/v3/projects/--project-id--"
"self": "http://identity:35357/v3/projects/456789"
},
"name": "a project name"
"name": "myNewProject"
}
}

View File

@ -1,22 +1,22 @@
{
"roles": [
{
"id": "--role-id--",
"id": "123456",
"links": {
"self": "http://identity:35357/v3/roles/--role-id--"
"self": "http://identity:35357/v3/roles/123456"
},
"name": "admin"
},
{
"id": "--role-id--",
"id": "123456",
"links": {
"self": "http://identity:35357/v3/roles/--role-id--"
"self": "http://identity:35357/v3/roles/123456"
},
"name": "manager"
}
],
"links": {
"self": "http://identity:35357/v3/projects/--project-id--/groups/--group-id--/roles",
"self": "http://identity:35357/v3/projects/456789/groups/101112/roles",
"previous": null,
"next": null
}

View File

@ -1,22 +1,22 @@
{
"roles": [
{
"id": "--role-id--",
"id": "123456",
"links": {
"self": "http://identity:35357/v3/roles/--role-id--"
"self": "http://identity:35357/v3/roles/123456"
},
"name": "admin"
},
{
"id": "--role-id--",
"id": "123456",
"links": {
"self": "http://identity:35357/v3/roles/--role-id--"
"self": "http://identity:35357/v3/roles/123456"
},
"name": "manager"
}
],
"links": {
"self": "http://identity:35357/v3/projects/--project-id--/users/--user-id--/roles",
"self": "http://identity:35357/v3/projects/456789/users/313233/roles",
"previous": null,
"next": null
}

View File

@ -1,7 +1,8 @@
{
"project": {
"description": "my updated project",
"domain_id": "...",
"description": "My updated project",
"domain_id": "1789d1",
"parent_id": "123c56",
"enabled": true,
"name": "myUpdatedProject"
}

View File

@ -1,11 +1,12 @@
{
"project": {
"description": "my updated project",
"domain_id": "--domain-id--",
"description": "My updated project",
"domain_id": "1789d1",
"parent_id": "123c56",
"enabled": true,
"id": "--project-id--",
"id": "263fd9",
"links": {
"self": "http://identity:35357/v3/projects/--project-id--"
"self": "http://identity:35357/v3/projects/263fd9"
},
"name": "myUpdatedProject"
}

View File

@ -2,6 +2,7 @@
"projects": [
{
"domain_id": "1789d1",
"parent_id": "123c56",
"enabled": true,
"id": "263fd9",
"links": {
@ -11,6 +12,7 @@
},
{
"domain_id": "1789d1",
"parent_id": "123c56",
"enabled": true,
"id": "50ef01",
"links": {

View File

@ -1,6 +1,7 @@
{
"project": {
"domain_id": "1789d1",
"parent_id": "123c56",
"enabled": true,
"id": "263fd9",
"name": "project-x",

View File

@ -2,29 +2,29 @@
"projects": [
{
"description": "description of this project",
"domain_id": "--domain-id--",
"domain_id": "161718",
"enabled": true,
"id": "--project-id--",
"parent_id": "--parent-project-id--",
"id": "456789",
"parent_id": "212223",
"links": {
"self": "http://identity:35357/v3/projects/--project-id--"
"self": "http://identity:35357/v3/projects/456789"
},
"name": "a project name"
},
{
"description": "description of this project",
"domain_id": "--domain-id--",
"domain_id": "161718",
"enabled": true,
"id": "--project-id--",
"parent_id": "--parent-project-id--",
"id": "456789",
"parent_id": "212223",
"links": {
"self": "http://identity:35357/v3/projects/--project-id--"
"self": "http://identity:35357/v3/projects/456789"
},
"name": "another domain"
}
],
"links": {
"self": "http://identity:35357/v3/users/--user-id--/projects",
"self": "http://identity:35357/v3/users/313233/projects",
"previous": null,
"next": null
}

View File

@ -107,6 +107,14 @@
xmlns:wadl="http://wadl.dev.java.net/2009/02" xml:lang="EN"><para>Filters
on domain_id.</para></wadl:doc>
</param>'>
<!ENTITY parent_idQueryParam '
<param name="parent_id" style="query"
xmlns="http://wadl.dev.java.net/2009/02" type="xsd:string"
required="false">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02" xml:lang="EN"><para>Filters
on parent_id.</para></wadl:doc>
</param>'>
<!--<!ENTITY addPolicyParams '-->
<!ENTITY blobRequestParam '
<param name="blob" style="plain" type="xsd:string"

View File

@ -1296,9 +1296,10 @@
<!--No request body is provided-->
<request>
<representation mediaType="application/json">
&domain_idQueryParam; &nameQueryParam;
&enabledQueryParam; &pageQueryParam;
&per_pageQueryParam; </representation>
&domain_idQueryParam; &parent_idQueryParam;
&nameQueryParam; &enabledQueryParam;
&pageQueryParam; &per_pageQueryParam;
</representation>
</request>
<response status="200">
<representation mediaType="application/json">

6
{
View File

@ -1,6 +0,0 @@
{
"remove_interface": {
"address": "aa:aa:aa:aa:aa:aa"
}
}