I'm trying out the API and came across the following behaviour:
I didn’t see doc about this, so I’m wondering is this a bug or a feature?
If I introduce non existing field to the json request body when using the identity add user API(POST v2.0/users http://docs.openstack.org/api/openstack-identity-service/2.0/content/POST_addUser_v2.0_users_User_Operations_OS-KSADM.html), it get added without error.
I tested on a DevStack installation of OpenStack
curl -X POST -H "X-Auth-Token: Xx1=" -d '{"user":{"name":"name_6","pass-none-exist":"test-none-exist","non-existing":"non-existing", "anything-bool":false}}' -H 'Content-type: application/json' http://130.102.155.7:35357/v2.0/users
Get the response: {"user": {"name": "name_6", "pass_none_exist": "test-none-exist", "enabled": true, "non_existing": "non-existing", "anything_bool": false, "id": "2fb0955de04b481ab39dd393837cd8b4"}}
Checking using command line tool keystone user-get name_6
+-----------------+----------------------------------+ | Property | Value | +-----------------+----------------------------------+ | anything_bool | False | | enabled | True | | id | 2fb0955de04b481ab39dd393837cd8b4 | | name | name_6 | | non_existing | non-existing | | pass_none_exist | test-none-exist | +-----------------+----------------------------------+
now I can’t really tell what is allowed and what is not…
I'm trying out the API and came across the following behaviour:
I didn’t see doc about this, so I’m wondering is this a bug or a feature?
If I introduce non existing field to the json request body when using the identity add user API(POST v2.0/users http:// docs.openstack. org/api/ openstack- identity- service/ 2.0/content/ POST_addUser_ v2.0_users_ User_Operations _OS-KSADM. html), it get added without error.
I tested on a DevStack installation of OpenStack
curl -X POST -H "X-Auth-Token: Xx1=" -d '{"user" :{"name" :"name_ 6","pass- none-exist" :"test- none-exist" ,"non-existing" :"non-existing" , "anything- bool":false} }' -H 'Content-type: application/json' http:// 130.102. 155.7:35357/ v2.0/users
Get the response: 1ab39dd393837cd 8b4"}}
{"user": {"name": "name_6", "pass_none_exist": "test-none-exist", "enabled": true, "non_existing": "non-existing", "anything_bool": false, "id": "2fb0955de04b48
Checking using command line tool
keystone user-get name_6
+------ ------- ----+-- ------- ------- ------- ------- ----+ ------- ----+-- ------- ------- ------- ------- ----+ ab39dd393837cd8 b4 | ------- ----+-- ------- ------- ------- ------- ----+
| Property | Value |
+------
| anything_bool | False |
| enabled | True |
| id | 2fb0955de04b481
| name | name_6 |
| non_existing | non-existing |
| pass_none_exist | test-none-exist |
+------
now I can’t really tell what is allowed and what is not…