)]}'
{"tempest/api_schema/response/compute/v2_1/services.py":[{"author":{"_account_id":7350,"name":"Jordan Pittier","email":"jordan.pittier@gmail.com","username":"JordanP"},"change_message_id":"fcbc2c36072f91093a1d4b2c4ea1b1e626fce19f","unresolved":false,"context_lines":[{"line_number":69,"context_line":"disable_service \u003d copy.deepcopy(enable_service)"},{"line_number":70,"context_line":"# NOTE(gmann): \u0027disabled_reason\u0027 is only present if same is mentioned in"},{"line_number":71,"context_line":"# request so it is not required attribute in response."},{"line_number":72,"context_line":"disable_service[\u0027response_body\u0027][\u0027properties\u0027][\u0027service\u0027]["},{"line_number":73,"context_line":"    \u0027properties\u0027].update({\u0027disabled_reason\u0027: {\u0027type\u0027: \u0027string\u0027}})"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1a9d01_eee4c2ac","line":72,"updated":"2015-09-30 10:49:36.000000000","message":"Our client talks to \"os-services/disable\" endpoint, this endpoint doesn\u0027t understand the \"disabled_reason\" parameter.\n\nOnly the \"os-services/disable-log-reason\" endpoint accepts a \"disabled_reason\" parameter.\n\nSee http://developer.openstack.org/api-ref-compute-v2.1.html#disableScheduling","commit_id":"a2f8ea1725078285a3ada88fcf0923b2e3c98e84"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"cd285507c7481fc272d6022b526755be50cd2b5a","unresolved":false,"context_lines":[{"line_number":69,"context_line":"disable_service \u003d copy.deepcopy(enable_service)"},{"line_number":70,"context_line":"# NOTE(gmann): \u0027disabled_reason\u0027 is only present if same is mentioned in"},{"line_number":71,"context_line":"# request so it is not required attribute in response."},{"line_number":72,"context_line":"disable_service[\u0027response_body\u0027][\u0027properties\u0027][\u0027service\u0027]["},{"line_number":73,"context_line":"    \u0027properties\u0027].update({\u0027disabled_reason\u0027: {\u0027type\u0027: \u0027string\u0027}})"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_01209b9a","line":72,"in_reply_to":"9a1a9d01_1372097d","updated":"2015-10-06 02:03:27.000000000","message":"ahh you are right Jordon. \n\nI got it now only disable-log-reason request can have disable_reason. I got confused with implementation of those APIs.\n\nThanks :)","commit_id":"a2f8ea1725078285a3ada88fcf0923b2e3c98e84"},{"author":{"_account_id":7350,"name":"Jordan Pittier","email":"jordan.pittier@gmail.com","username":"JordanP"},"change_message_id":"1afbcd6d29d4891ba639b9f693c480b9825c9003","unresolved":false,"context_lines":[{"line_number":69,"context_line":"disable_service \u003d copy.deepcopy(enable_service)"},{"line_number":70,"context_line":"# NOTE(gmann): \u0027disabled_reason\u0027 is only present if same is mentioned in"},{"line_number":71,"context_line":"# request so it is not required attribute in response."},{"line_number":72,"context_line":"disable_service[\u0027response_body\u0027][\u0027properties\u0027][\u0027service\u0027]["},{"line_number":73,"context_line":"    \u0027properties\u0027].update({\u0027disabled_reason\u0027: {\u0027type\u0027: \u0027string\u0027}})"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1a9d01_1372097d","line":72,"in_reply_to":"9a1a9d01_45ca0851","updated":"2015-10-02 16:11:38.000000000","message":"Let me try this one last time.\n\n1) Our Tempest client compute/json/services_client.py, on line 55 is \n\n  self.put(\u0027os-services/disable\u0027, post_body)\".\n\nNote: this is os-services/disable, this is NOT disable-log-reason\n\n2) At nova-api side os-services/disable maps to openstack/compute/services.py#L38 \n\n  \"disable\": self._disable,\n\nNote: this will call self._disable, this will NOT call self._disable_log_reason\n\n3) self._disable will call self._enable_disable with \u0027disabled_reason\u0027: None\n\nSo the value of body[\u0027disabled_reason\u0027] is completely ignored and never returned.\n\nThis is because our Tempest client calls \"os-services/disable\". If it had called \"os-services/disable-log-reason\" you would be right.\n\n\nNow, try this \n\n curl -g -i -X PUT http://XX:8774/v2/XX/os-services/disable -H \"User-Agent: python-novaclient\" -H \"Content-Type: application/json\" -H \"Accept: application/json\" -H \"X-Auth-Token: XX\" -d \u0027{\"binary\": \"nova-compute\", \"host\": \"node-4\", \"disabled_reason\": \"foobar\"}\u0027\n\nNotice we call os-services/disable. And look at what is returned by this curl command.","commit_id":"a2f8ea1725078285a3ada88fcf0923b2e3c98e84"},{"author":{"_account_id":7350,"name":"Jordan Pittier","email":"jordan.pittier@gmail.com","username":"JordanP"},"change_message_id":"4153fd13123c3e94a5f229e298224135a1da05ff","unresolved":false,"context_lines":[{"line_number":69,"context_line":"disable_service \u003d copy.deepcopy(enable_service)"},{"line_number":70,"context_line":"# NOTE(gmann): \u0027disabled_reason\u0027 is only present if same is mentioned in"},{"line_number":71,"context_line":"# request so it is not required attribute in response."},{"line_number":72,"context_line":"disable_service[\u0027response_body\u0027][\u0027properties\u0027][\u0027service\u0027]["},{"line_number":73,"context_line":"    \u0027properties\u0027].update({\u0027disabled_reason\u0027: {\u0027type\u0027: \u0027string\u0027}})"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1a9d01_a7ad8d9c","line":72,"in_reply_to":"9a1a9d01_6c1f5a08","updated":"2015-09-30 11:58:58.000000000","message":"there are 2 different/distinct URL: http://nova/v2.1/os-services/disable and http://nova/v2.1/os-services/disable-log-reason. The first URL doesn\u0027t take any \u0027reason\u0027 parameter. The second requires a \u0027reason\u0027 parameter.\n\nIt\u0027s in the code here : https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/services.py#L39 and L38.","commit_id":"a2f8ea1725078285a3ada88fcf0923b2e3c98e84"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"2315054f42f6d7ec21655779c6bda5e07e397b70","unresolved":false,"context_lines":[{"line_number":69,"context_line":"disable_service \u003d copy.deepcopy(enable_service)"},{"line_number":70,"context_line":"# NOTE(gmann): \u0027disabled_reason\u0027 is only present if same is mentioned in"},{"line_number":71,"context_line":"# request so it is not required attribute in response."},{"line_number":72,"context_line":"disable_service[\u0027response_body\u0027][\u0027properties\u0027][\u0027service\u0027]["},{"line_number":73,"context_line":"    \u0027properties\u0027].update({\u0027disabled_reason\u0027: {\u0027type\u0027: \u0027string\u0027}})"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1a9d01_45ca0851","line":72,"in_reply_to":"9a1a9d01_a7ad8d9c","updated":"2015-10-02 10:55:58.000000000","message":"Actually it takes. If you see implementation method for disable request action- https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/services.py#L90\n\ndisable-log-reason accept in request body - https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/services.py#L99","commit_id":"a2f8ea1725078285a3ada88fcf0923b2e3c98e84"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"29570a2e209f113db06e04a2e5c4297baeb4a6c8","unresolved":false,"context_lines":[{"line_number":69,"context_line":"disable_service \u003d copy.deepcopy(enable_service)"},{"line_number":70,"context_line":"# NOTE(gmann): \u0027disabled_reason\u0027 is only present if same is mentioned in"},{"line_number":71,"context_line":"# request so it is not required attribute in response."},{"line_number":72,"context_line":"disable_service[\u0027response_body\u0027][\u0027properties\u0027][\u0027service\u0027]["},{"line_number":73,"context_line":"    \u0027properties\u0027].update({\u0027disabled_reason\u0027: {\u0027type\u0027: \u0027string\u0027}})"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1a9d01_6c1f5a08","line":72,"in_reply_to":"9a1a9d01_eee4c2ac","updated":"2015-09-30 11:25:05.000000000","message":"In response that returns \u0027disabled_reason\u0027 if same was passed in during request.\n\nActually doc is not correct and it did not mentioned about reason :(.\n\nIn disable request,  reason is optional in request and if it is passed then response does contain that-\nhttps://github.com/openstack/nova/blob/master/nova/api/openstack/compute/services.py#L90\nhttps://github.com/openstack/nova/blob/master/nova/api/openstack/compute/services.py#L118","commit_id":"a2f8ea1725078285a3ada88fcf0923b2e3c98e84"}]}
