Description :
Updating a booted instance with personality file is not returning Bad Request. Personality file is not allowed to be updated once the instance is booted.
Expected result:
-----------------------
Should raise bad request exception. (Error code 400)
Refernce link:
------------------
http://docs.openstack.org/api/openstack-compute/2/content/ServerUpdate.html
LOG
---------
REQ: curl -i http://15.184.83.251:8774/v2/5e8e6e11adf74ee5b9141d4c6c5fad94/servers/7cb9a448-e3f9-4867-b6ad-aa6bd4f6fed4 PUT -H "X-Auth-Project-Id: nova_auto_project" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: 424987eba9714778aabc72c3bbf6c747"
novaclient.client: DEBUG: REQ BODY: {"server": {"personality": [{"path": "/etc/banner.txt", "contents": "b25zLiINCg0KLVJpY2hhcmQgQmFjaA=="}]}}
novaclient.client: DEBUG: RESP:{'date': 'Fri, 03 Aug 2012 06:47:55 GMT', 'status': '200', 'x-compute-request-id': 'req-ab7dd9ee-fd76-4058-98d5-5a11017e97b1', 'content-type': 'application/json', 'content-length': '1167'} {"server": {"status": "ACTIVE", "updated": "2012-08-03T06:47:11Z", "hostId": "c84667f0a75102fe2bd55ca8e02baaeb37c4806fba2d57ec9621e98a", "user_id": "c6b7b674f9514f7a94bf5251344042fa", "name": "update_server_active_0", "links": [{"href": "http://15.184.83.251:8774/v2/5e8e6e11adf74ee5b9141d4c6c5fad94/servers/7cb9a448-e3f9-4867-b6ad-aa6bd4f6fed4", "rel": "self"}, {"href": "http://15.184.83.251:8774/5e8e6e11adf74ee5b9141d4c6c5fad94/servers/7cb9a448-e3f9-4867-b6ad-aa6bd4f6fed4", "rel": "bookmark"}], "created": "2012-08-03T06:46:44Z", "tenant_id": "5e8e6e11adf74ee5b9141d4c6c5fad94", "image": {"id": "5509c976-a040-467b-88a8-6a6566202bb0", "links": [{"href": "http://15.184.83.251:8774/5e8e6e11adf74ee5b9141d4c6c5fad94/images/5509c976-a040-467b-88a8-6a6566202bb0", "rel": "bookmark"}]}, "OS-DCF:diskConfig": "MANUAL", "addresses": {"private": [{"version": 4, "addr": "10.0.0.23"}]}, "accessIPv4": "", "accessIPv6": "", "progress": 0, "flavor": {"id": "1", "links": [{"href": "http://15.184.83.251:8774/5e8e6e11adf74ee5b9141d4c6c5fad94/flavors/1", "rel": "bookmark"}]}, "config_drive": "", "id": "7cb9a448-e3f9-4867-b6ad-aa6bd4f6fed4", "metadata": {"meta": "HPCS-0"}}}
I think this is actually intentional
e.g. if you GET a server, change the name and do a PUT, the request should succeed
So, the server update handler doesn't check whether you've specified attributes which cannot be changed