From 718e3094d503533ef4d2108522a6fa88b34384f8 Mon Sep 17 00:00:00 2001 From: Yogeshwar Srikrishnan Date: Fri, 10 Jun 2011 13:19:01 -0500 Subject: Doc updates. --- docs/guide/src/docbkx/identitydevguide.xml | 157 +++++++++++++++++++++++++++-- docs/guide/src/docbkx/samples/group.json | 1 + docs/guide/src/docbkx/samples/group.xml | 4 + docs/guide/src/docbkx/samples/groups.json | 1 + docs/guide/src/docbkx/samples/groups.xml | 5 + keystone/server.py | 4 +- 6 files changed, 163 insertions(+), 9 deletions(-) mode change 100644 => 100755 docs/guide/src/docbkx/identitydevguide.xml create mode 100644 docs/guide/src/docbkx/samples/group.json create mode 100644 docs/guide/src/docbkx/samples/group.xml create mode 100644 docs/guide/src/docbkx/samples/groups.json create mode 100644 docs/guide/src/docbkx/samples/groups.xml diff --git a/docs/guide/src/docbkx/identitydevguide.xml b/docs/guide/src/docbkx/identitydevguide.xml old mode 100644 new mode 100755 index 5af5c532..8cd562c6 --- a/docs/guide/src/docbkx/identitydevguide.xml +++ b/docs/guide/src/docbkx/identitydevguide.xml @@ -858,6 +858,49 @@ Host: identity.api.openstack.org/v1.1/
Core Admin API Proposal The following table of calls is proposed as core Keystone Admin APIs +
+ Users + + &LONG_URI_REFHEAD; + + + &POST; + /users + Get a list of users. + + + &GET; + /users/userId + Get a user. + + + &PUT; + /users/userId + Update a user. + + + &DELETE; + /users/userId + Delete a user. + + + &PUT; + /users/userId/password + Update a user password. + + + &PUT; + /users/userId/enabled + Enable/Disable user. + + + &PUT; + /users/userId/tenant + Update user tenant. + + + +
Tokens @@ -887,15 +930,65 @@ Host: identity.api.openstack.org/v1.1/ /tenants Get a list of tenants. - - &GET; - /tenants/tenantId - Get a tenant. - + + &GET; + /tenants/tenantId + Get a tenant. + + + &POST; + /tenants + Create a tenant. + + + &PUT; + /tenants/tenantId + Update a tenant. + + + &DELETE; + /tenants/tenantId + Delete a tenant. + + + &GET; + /tenants/tenantId/groups + Get a list of tenant groups. + + + &POST; + /tenants/tenantId/groups + Create a tenant group. + + + &GET; + /tenants/tenantId/groups/groupId + Get a tenant group with the specified id. + + + &PUT; + /tenants/tenantId/groups/groupId + Update a tenant group. + + + &GET; + /tenants/tenantId/groups/groupId/users + get tenant group users. + + + &PUT; + /tenants/tenantId/groups/groupId/users/userId + Add a user to a tenant group. + + + &DELETE; + /tenants/tenantId/groups/groupId/users/userId + Delete user tenant group. + -
- +
+
Endpoints (BaseURLs) @@ -1008,6 +1101,56 @@ Host: identity.api.openstack.org/v1.1/
+ +
+ Global Groups + + &LONG_URI_REFHEAD; + + + &POST; + /groups + Create a global group. + + + &GET; + /groups + Get a list of global groups. + + + &GET; + /groups/groupId + Get a global group. + + + &PUT; + /groups/groupId + Update a global group. + + + &DELETE; + /groups/groupId + Delete a global group. + + + &GET; + /groups/groupId/users + Get a list of users of a global group. + + + &PUT; + /groups/groupId/users/userId + Add user to a global group. + + + &DELETE; + /groups/groupId/users/userId + Delete user from a global group. + + + +
+ All other APIs listed in this section will be extensions used for this reference implementation of Keystone to support user and tenant management diff --git a/docs/guide/src/docbkx/samples/group.json b/docs/guide/src/docbkx/samples/group.json new file mode 100644 index 00000000..07dc0a10 --- /dev/null +++ b/docs/guide/src/docbkx/samples/group.json @@ -0,0 +1 @@ +{"group": {"id": "test_global_group", "description": "A description ..."}} \ No newline at end of file diff --git a/docs/guide/src/docbkx/samples/group.xml b/docs/guide/src/docbkx/samples/group.xml new file mode 100644 index 00000000..0f285307 --- /dev/null +++ b/docs/guide/src/docbkx/samples/group.xml @@ -0,0 +1,4 @@ + + + A Description of the group + diff --git a/docs/guide/src/docbkx/samples/groups.json b/docs/guide/src/docbkx/samples/groups.json new file mode 100644 index 00000000..06dd58a0 --- /dev/null +++ b/docs/guide/src/docbkx/samples/groups.json @@ -0,0 +1 @@ +{"groups": {"values": [{"id": "test_global_group_add", "description": "A description ..."}], "links": []}} \ No newline at end of file diff --git a/docs/guide/src/docbkx/samples/groups.xml b/docs/guide/src/docbkx/samples/groups.xml new file mode 100644 index 00000000..a429fdb3 --- /dev/null +++ b/docs/guide/src/docbkx/samples/groups.xml @@ -0,0 +1,5 @@ + + + A Description of the group + + diff --git a/keystone/server.py b/keystone/server.py index 8dff1159..139a47d8 100755 --- a/keystone/server.py +++ b/keystone/server.py @@ -533,7 +533,7 @@ class KeystoneAPI(wsgi.Router): db_api.configure_db(options) # Token Operations - auth_controller = AuthController(options) + auth_controller = AuthController(options) mapper.connect("/v2.0/tokens", controller=auth_controller, action="authenticate", conditions=dict(method=["POST"])) @@ -676,7 +676,7 @@ class KeystoneAdminAPI(wsgi.Router): controller=user_controller, action="set_user_password", conditions=dict(method=["PUT"])) - mapper.connect("/v1.0/tenants/{tenant_id}/users/{user_id}/add", + mapper.connect("/v2.0/tenants/{tenant_id}/users/{user_id}/add", controller=user_controller, action="add_user_tenant", conditions=dict(method=["PUT"])) -- cgit From d477f8b8ae14f8f9728bb6b108805940a6dade4d Mon Sep 17 00:00:00 2001 From: Yogeshwar Srikrishnan Date: Fri, 10 Jun 2011 13:38:48 -0500 Subject: Doc updates. --- docs/guide/src/docbkx/identitydevguide.xml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/guide/src/docbkx/identitydevguide.xml b/docs/guide/src/docbkx/identitydevguide.xml index 8cd562c6..ff85e1b1 100755 --- a/docs/guide/src/docbkx/identitydevguide.xml +++ b/docs/guide/src/docbkx/identitydevguide.xml @@ -864,7 +864,12 @@ Host: identity.api.openstack.org/v1.1/ &LONG_URI_REFHEAD; - &POST; + &PUT; + /users + Create a User. + + + &GET; /users Get a list of users. @@ -936,7 +941,7 @@ Host: identity.api.openstack.org/v1.1/ Get a tenant. - &POST; + &PUT; /tenants Create a tenant. @@ -985,6 +990,12 @@ Host: identity.api.openstack.org/v1.1/ /tenants/tenantId/groups/groupId/users/userId Delete user tenant group. + + &GET; + /tenants/tenantId/users + get tenant users. + + -- cgit From d6984f31b8b14a14d321605d7ec6c5b15612d844 Mon Sep 17 00:00:00 2001 From: Yogeshwar Srikrishnan Date: Fri, 10 Jun 2011 16:31:07 -0500 Subject: Doc updates.Minor keyston-manage changes. --- bin/keystone-manage | 20 ++- bin/sampledata.sh | 5 + docs/guide/src/docbkx/identitydevguide.xml | 211 ++++++++++++++++------------- 3 files changed, 142 insertions(+), 94 deletions(-) diff --git a/bin/keystone-manage b/bin/keystone-manage index 496d5337..582b7bf5 100755 --- a/bin/keystone-manage +++ b/bin/keystone-manage @@ -76,7 +76,7 @@ def Main(): parser.error('No object type specified for first argument') object_type = args[0] - if object_type in ['user', 'tenant', 'role', 'baseURLs' , 'token']: + if object_type in ['user', 'tenant', 'role', 'baseURLs' , 'token', 'tenant_baseURL']: pass else: parser.error('%s is not a supported object type' % object_type) @@ -309,6 +309,24 @@ def Main(): except Exception, e: print 'Error getting all BaseURLs:', str(e) return + elif object_type == "tenant_baseURL": + if command == "add": + if len(args) < 4: + parser.error("Missing arguments: baseURLs add 'tenant'\ + 'baseURL'") + + tenant_id = args[2] + baseURLs_id = args[3] + try: + object = db_models.TenantBaseURLAssociation() + object.tenant_id = tenant_id + object.baseURLs_id = baseURLs_id + object = db_api.baseurls_ref_add(object) + print "BaseURl Ref created successfully. ID=%s" % object.id + return + except Exception as exc: + print "ERROR: Failed to create BaseURL Ref: %s" % exc + return elif object_type == "token": if command == "add": if len(args) < 6: diff --git a/bin/sampledata.sh b/bin/sampledata.sh index 0238d36b..72117827 100755 --- a/bin/sampledata.sh +++ b/bin/sampledata.sh @@ -57,3 +57,8 @@ ./keystone-manage $* token add 999888777666 admin 1234 2015-02-05T00:00 ./keystone-manage $* token add 000999 admin 1234 2010-02-05T00:00 ./keystone-manage $* token add 999888777 disabled 1234 2015-02-05T00:00 + +#Tenant Role +./keystone-manage $*tenant_baseURL add 1234 1 +./keystone-manage $*tenant_baseURL add 1234 2 +./keystone-manage $*tenant_baseURL add 1234 3 \ No newline at end of file diff --git a/docs/guide/src/docbkx/identitydevguide.xml b/docs/guide/src/docbkx/identitydevguide.xml index ff85e1b1..e0e9ef11 100755 --- a/docs/guide/src/docbkx/identitydevguide.xml +++ b/docs/guide/src/docbkx/identitydevguide.xml @@ -133,15 +133,6 @@ and operators. Tenant administrators may assign roles to users. -
- Group - - A group of users. Groups may be used to organize and assign - privileges to a group of related users. For example, an operator - may create a "delinquent" group, which will assign limited - privileges to users who have past due bills. - -
General API Information @@ -955,41 +946,6 @@ Host: identity.api.openstack.org/v1.1/ /tenants/tenantId Delete a tenant. - - &GET; - /tenants/tenantId/groups - Get a list of tenant groups. - - - &POST; - /tenants/tenantId/groups - Create a tenant group. - - - &GET; - /tenants/tenantId/groups/groupId - Get a tenant group with the specified id. - - - &PUT; - /tenants/tenantId/groups/groupId - Update a tenant group. - - - &GET; - /tenants/tenantId/groups/groupId/users - get tenant group users. - - - &PUT; - /tenants/tenantId/groups/groupId/users/userId - Add a user to a tenant group. - - - &DELETE; - /tenants/tenantId/groups/groupId/users/userId - Delete user tenant group. - &GET; /tenants/tenantId/users @@ -1112,55 +1068,6 @@ Host: identity.api.openstack.org/v1.1/ - -
- Global Groups - - &LONG_URI_REFHEAD; - - - &POST; - /groups - Create a global group. - - - &GET; - /groups - Get a list of global groups. - - - &GET; - /groups/groupId - Get a global group. - - - &PUT; - /groups/groupId - Update a global group. - - - &DELETE; - /groups/groupId - Delete a global group. - - - &GET; - /groups/groupId/users - Get a list of users of a global group. - - - &PUT; - /groups/groupId/users/userId - Add user to a global group. - - - &DELETE; - /groups/groupId/users/userId - Delete user from a global group. - - - -
All other APIs listed in this section will be extensions used for this reference implementation of Keystone to support user and tenant management @@ -1830,4 +1737,122 @@ Host: identity.api.openstack.org/v1.1/
+ + + Appendix +
+ Rackspace Extenison Proposal +
+ Concepts + + The concepts that are specific to rackspace extensions are: + +
+ Group + + A group of users. Groups may be used to organize and assign + privileges to a group of related users. For example, an operator + may create a "delinquent" group, which will assign limited + privileges to users who have past due bills. + +
+
+ + The following table of calls is proposed as rackspace specific extensions for Keystone APIs + +
+ Global Groups + + &LONG_URI_REFHEAD; + + + &PUT; + /groups + Create a global group. + + + &GET; + /groups + Get a list of global groups. + + + &GET; + /groups/groupId + Get a global group. + + + &PUT; + /groups/groupId + Update a global group. + + + &DELETE; + /groups/groupId + Delete a global group. + + + &GET; + /groups/groupId/users + Get a list of users of a global group. + + + &PUT; + /groups/groupId/users/userId + Add user to a global group. + + + &DELETE; + /groups/groupId/users/userId + Delete user from a global group. + + + +
+
+ Tenant Groups + + &LONG_URI_REFHEAD; + + + &GET; + /tenants/tenantId/groups + Get a list of tenant groups. + + + &POST; + /tenants/tenantId/groups + Create a tenant group. + + + &GET; + /tenants/tenantId/groups/groupId + Get a tenant group with the specified id. + + + &PUT; + /tenants/tenantId/groups/groupId + Update a tenant group. + + + &GET; + /tenants/tenantId/groups/groupId/users + get tenant group users. + + + &PUT; + /tenants/tenantId/groups/groupId/users/userId + Add a user to a tenant group. + + + &DELETE; + /tenants/tenantId/groups/groupId/users/userId + Delete user tenant group. + + + +
+ +
+
+ -- cgit