)]}'
{"api-ref/source/parameters.yaml":[{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"592fccaee86e9fa22833fe31f6c05ef06cb7141d","unresolved":false,"context_lines":[{"line_number":3325,"context_line":"# This is the host in a POST (create instance) request body."},{"line_number":3326,"context_line":"server_host_create:"},{"line_number":3327,"context_line":"  description: |"},{"line_number":3328,"context_line":"    Targeted host."},{"line_number":3329,"context_line":"  in: body"},{"line_number":3330,"context_line":"  required: false"},{"line_number":3331,"context_line":"  type: string"}],"source_content_type":"text/x-yaml","patch_set":6,"id":"3fce034c_ad23d2bc","line":3328,"range":{"start_line":3328,"start_character":4,"end_line":3328,"end_character":18},"updated":"2019-04-18 12:24:07.000000000","message":"I would add more words for users::\n\n    The name of the host to which the server is deployed. The API return 400 if no hosts are found with the given name. \n\nIt might be better if you also include the difference from forced_host in the availability zone, something like::\n\n   .. note:: You can also specify the target host in the ``availability_zone``, but this is safer since specifying the target host in the ``availability_zone`` forces the deployment bypassing the scheduler.","commit_id":"31b795544fd0ce59ac59df6668b6b50c15a8fdb7"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"28d2d4733bd7f16b751419b4b846d1c6aa9e650f","unresolved":false,"context_lines":[{"line_number":3325,"context_line":"# This is the host in a POST (create instance) request body."},{"line_number":3326,"context_line":"server_host_create:"},{"line_number":3327,"context_line":"  description: |"},{"line_number":3328,"context_line":"    Targeted host."},{"line_number":3329,"context_line":"  in: body"},{"line_number":3330,"context_line":"  required: false"},{"line_number":3331,"context_line":"  type: string"}],"source_content_type":"text/x-yaml","patch_set":6,"id":"3fce034c_4e9ca50e","line":3328,"range":{"start_line":3328,"start_character":4,"end_line":3328,"end_character":18},"in_reply_to":"3fce034c_ad23d2bc","updated":"2019-04-18 15:38:37.000000000","message":"Done.\nAdd more details and add a note description.","commit_id":"31b795544fd0ce59ac59df6668b6b50c15a8fdb7"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"592fccaee86e9fa22833fe31f6c05ef06cb7141d","unresolved":false,"context_lines":[{"line_number":3577,"context_line":"# This is the hypervisor_hostname in a POST (create instance) request body."},{"line_number":3578,"context_line":"server_hypervisor_hostname_create:"},{"line_number":3579,"context_line":"  description: |"},{"line_number":3580,"context_line":"    Targeted hypervisor host name."},{"line_number":3581,"context_line":"  in: body"},{"line_number":3582,"context_line":"  required: false"},{"line_number":3583,"context_line":"  type: string"}],"source_content_type":"text/x-yaml","patch_set":6,"id":"3fce034c_481a5c6f","line":3580,"range":{"start_line":3580,"start_character":4,"end_line":3580,"end_character":34},"updated":"2019-04-18 12:24:07.000000000","message":"ditto","commit_id":"31b795544fd0ce59ac59df6668b6b50c15a8fdb7"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"28d2d4733bd7f16b751419b4b846d1c6aa9e650f","unresolved":false,"context_lines":[{"line_number":3577,"context_line":"# This is the hypervisor_hostname in a POST (create instance) request body."},{"line_number":3578,"context_line":"server_hypervisor_hostname_create:"},{"line_number":3579,"context_line":"  description: |"},{"line_number":3580,"context_line":"    Targeted hypervisor host name."},{"line_number":3581,"context_line":"  in: body"},{"line_number":3582,"context_line":"  required: false"},{"line_number":3583,"context_line":"  type: string"}],"source_content_type":"text/x-yaml","patch_set":6,"id":"3fce034c_6e9081ee","line":3580,"range":{"start_line":3580,"start_character":4,"end_line":3580,"end_character":34},"in_reply_to":"3fce034c_481a5c6f","updated":"2019-04-18 15:38:37.000000000","message":"Done","commit_id":"31b795544fd0ce59ac59df6668b6b50c15a8fdb7"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"9d452c00bc80bf87e8e4b72250046a3df840f87b","unresolved":false,"context_lines":[{"line_number":5915,"context_line":"    By default, it appears in the response for administrative users only."},{"line_number":5916,"context_line":"  min_version: 2.3"},{"line_number":5917,"context_line":"# This is the host in a POST (create instance) request body."},{"line_number":5918,"context_line":"server_host_create:"},{"line_number":5919,"context_line":"  description: |"},{"line_number":5920,"context_line":"    The name of the host to which the server is created. The API will return"},{"line_number":5921,"context_line":"    400 if no compute nodes are found with the given host."}],"source_content_type":"text/x-yaml","patch_set":7,"id":"3fce034c_c47f0913","line":5918,"range":{"start_line":5918,"start_character":0,"end_line":5918,"end_character":18},"updated":"2019-04-19 02:36:30.000000000","message":"This parameter should be before \u0027server_hostname\u0027.","commit_id":"3aea8b1abf244caa7956ceeb846d9a4010ab462c"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"4ac404fbdf44efe1fa503751c900d7ee91ba0bc9","unresolved":false,"context_lines":[{"line_number":5915,"context_line":"    By default, it appears in the response for administrative users only."},{"line_number":5916,"context_line":"  min_version: 2.3"},{"line_number":5917,"context_line":"# This is the host in a POST (create instance) request body."},{"line_number":5918,"context_line":"server_host_create:"},{"line_number":5919,"context_line":"  description: |"},{"line_number":5920,"context_line":"    The name of the host to which the server is created. The API will return"},{"line_number":5921,"context_line":"    400 if no compute nodes are found with the given host."}],"source_content_type":"text/x-yaml","patch_set":7,"id":"3fce034c_89def50e","line":5918,"range":{"start_line":5918,"start_character":0,"end_line":5918,"end_character":18},"in_reply_to":"3fce034c_c47f0913","updated":"2019-04-19 09:55:05.000000000","message":"Done","commit_id":"3aea8b1abf244caa7956ceeb846d9a4010ab462c"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"9d452c00bc80bf87e8e4b72250046a3df840f87b","unresolved":false,"context_lines":[{"line_number":5919,"context_line":"  description: |"},{"line_number":5920,"context_line":"    The name of the host to which the server is created. The API will return"},{"line_number":5921,"context_line":"    400 if no compute nodes are found with the given host."},{"line_number":5922,"context_line":""},{"line_number":5923,"context_line":"    .. note::"},{"line_number":5924,"context_line":"     Prior to microversion 2.73, you can also specify the forced host in the"},{"line_number":5925,"context_line":"     ``availability_zone``. But specifying a forced host will bypass validation"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"3fce034c_84eee1ea","line":5922,"updated":"2019-04-19 02:36:30.000000000","message":"This parameter can be specified by administrators only by default. So it should be described.","commit_id":"3aea8b1abf244caa7956ceeb846d9a4010ab462c"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"4ac404fbdf44efe1fa503751c900d7ee91ba0bc9","unresolved":false,"context_lines":[{"line_number":5919,"context_line":"  description: |"},{"line_number":5920,"context_line":"    The name of the host to which the server is created. The API will return"},{"line_number":5921,"context_line":"    400 if no compute nodes are found with the given host."},{"line_number":5922,"context_line":""},{"line_number":5923,"context_line":"    .. note::"},{"line_number":5924,"context_line":"     Prior to microversion 2.73, you can also specify the forced host in the"},{"line_number":5925,"context_line":"     ``availability_zone``. But specifying a forced host will bypass validation"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"3fce034c_69e949b5","line":5922,"in_reply_to":"3fce034c_84eee1ea","updated":"2019-04-19 09:55:05.000000000","message":"Done","commit_id":"3aea8b1abf244caa7956ceeb846d9a4010ab462c"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"18a0f0c854226945c4606c8cf48fc786acddd20d","unresolved":false,"context_lines":[{"line_number":5922,"context_line":""},{"line_number":5923,"context_line":"    .. note::"},{"line_number":5924,"context_line":"     Prior to microversion 2.73, you can also specify the forced host in the"},{"line_number":5925,"context_line":"     ``availability_zone``. But specifying a forced host will bypass validation"},{"line_number":5926,"context_line":"     by the scheduler."},{"line_number":5927,"context_line":"  in: body"},{"line_number":5928,"context_line":"  required: false"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"3fce034c_3d24d4ae","line":5925,"range":{"start_line":5925,"start_character":27,"end_line":5925,"end_character":31},"updated":"2019-04-19 09:01:51.000000000","message":"Don\u0027t see why we need ``but`` here","commit_id":"3aea8b1abf244caa7956ceeb846d9a4010ab462c"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"4ac404fbdf44efe1fa503751c900d7ee91ba0bc9","unresolved":false,"context_lines":[{"line_number":5922,"context_line":""},{"line_number":5923,"context_line":"    .. note::"},{"line_number":5924,"context_line":"     Prior to microversion 2.73, you can also specify the forced host in the"},{"line_number":5925,"context_line":"     ``availability_zone``. But specifying a forced host will bypass validation"},{"line_number":5926,"context_line":"     by the scheduler."},{"line_number":5927,"context_line":"  in: body"},{"line_number":5928,"context_line":"  required: false"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"3fce034c_3db854e3","line":5925,"range":{"start_line":5925,"start_character":27,"end_line":5925,"end_character":31},"in_reply_to":"3fce034c_3d24d4ae","updated":"2019-04-19 09:55:05.000000000","message":"Done","commit_id":"3aea8b1abf244caa7956ceeb846d9a4010ab462c"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"9d452c00bc80bf87e8e4b72250046a3df840f87b","unresolved":false,"context_lines":[{"line_number":5933,"context_line":"  description: |"},{"line_number":5934,"context_line":"    The hostname of the hypervisor to which the server is created. The API"},{"line_number":5935,"context_line":"    will return 400 if no compute nodes are found with the given hypervisor"},{"line_number":5936,"context_line":"    hostname."},{"line_number":5937,"context_line":""},{"line_number":5938,"context_line":"    .. note::"},{"line_number":5939,"context_line":"     Prior to microversion 2.73, you can also specify the forced node in the"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"3fce034c_a4ebddd9","line":5936,"updated":"2019-04-19 02:36:30.000000000","message":"ditto","commit_id":"3aea8b1abf244caa7956ceeb846d9a4010ab462c"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"4ac404fbdf44efe1fa503751c900d7ee91ba0bc9","unresolved":false,"context_lines":[{"line_number":5933,"context_line":"  description: |"},{"line_number":5934,"context_line":"    The hostname of the hypervisor to which the server is created. The API"},{"line_number":5935,"context_line":"    will return 400 if no compute nodes are found with the given hypervisor"},{"line_number":5936,"context_line":"    hostname."},{"line_number":5937,"context_line":""},{"line_number":5938,"context_line":"    .. note::"},{"line_number":5939,"context_line":"     Prior to microversion 2.73, you can also specify the forced node in the"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"3fce034c_a9e3b1d8","line":5936,"in_reply_to":"3fce034c_a4ebddd9","updated":"2019-04-19 09:55:05.000000000","message":"Done","commit_id":"3aea8b1abf244caa7956ceeb846d9a4010ab462c"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"18a0f0c854226945c4606c8cf48fc786acddd20d","unresolved":false,"context_lines":[{"line_number":5937,"context_line":""},{"line_number":5938,"context_line":"    .. note::"},{"line_number":5939,"context_line":"     Prior to microversion 2.73, you can also specify the forced node in the"},{"line_number":5940,"context_line":"     ``availability_zone``. But specifying a forced node will bypass validation"},{"line_number":5941,"context_line":"     by the scheduler."},{"line_number":5942,"context_line":"  in: body"},{"line_number":5943,"context_line":"  required: false"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"3fce034c_dd3cb0c9","line":5940,"range":{"start_line":5940,"start_character":27,"end_line":5940,"end_character":31},"updated":"2019-04-19 09:01:51.000000000","message":"ditto","commit_id":"3aea8b1abf244caa7956ceeb846d9a4010ab462c"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"4ac404fbdf44efe1fa503751c900d7ee91ba0bc9","unresolved":false,"context_lines":[{"line_number":5937,"context_line":""},{"line_number":5938,"context_line":"    .. note::"},{"line_number":5939,"context_line":"     Prior to microversion 2.73, you can also specify the forced node in the"},{"line_number":5940,"context_line":"     ``availability_zone``. But specifying a forced node will bypass validation"},{"line_number":5941,"context_line":"     by the scheduler."},{"line_number":5942,"context_line":"  in: body"},{"line_number":5943,"context_line":"  required: false"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"3fce034c_ddd03022","line":5940,"range":{"start_line":5940,"start_character":27,"end_line":5940,"end_character":31},"in_reply_to":"3fce034c_dd3cb0c9","updated":"2019-04-19 09:55:05.000000000","message":"Done","commit_id":"3aea8b1abf244caa7956ceeb846d9a4010ab462c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1d785b8c283cfbf420e9af38c5f214b52bc1595b","unresolved":false,"context_lines":[{"line_number":5938,"context_line":"# This is the host in a POST (create instance) request body."},{"line_number":5939,"context_line":"server_host_create:"},{"line_number":5940,"context_line":"  description: |"},{"line_number":5941,"context_line":"    The name of the host to which the server is created. The API will return"},{"line_number":5942,"context_line":"    400 if no compute nodes are found with the given host. By default, it"},{"line_number":5943,"context_line":"    can be specified by administrators only."},{"line_number":5944,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":15,"id":"dfbec78f_e4b23849","line":5941,"range":{"start_line":5941,"start_character":25,"end_line":5941,"end_character":47},"updated":"2019-05-13 18:52:38.000000000","message":"on which the server is to be\n\n?","commit_id":"a8e895c35efbd5c5496060d99c062a474ce00a86"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"45215ccd665f35d6e31a394b18328817b6a19c1c","unresolved":false,"context_lines":[{"line_number":5938,"context_line":"# This is the host in a POST (create instance) request body."},{"line_number":5939,"context_line":"server_host_create:"},{"line_number":5940,"context_line":"  description: |"},{"line_number":5941,"context_line":"    The name of the host to which the server is created. The API will return"},{"line_number":5942,"context_line":"    400 if no compute nodes are found with the given host. By default, it"},{"line_number":5943,"context_line":"    can be specified by administrators only."},{"line_number":5944,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":15,"id":"dfbec78f_689612f3","line":5941,"range":{"start_line":5941,"start_character":25,"end_line":5941,"end_character":47},"in_reply_to":"dfbec78f_e4b23849","updated":"2019-05-14 09:21:02.000000000","message":"Done","commit_id":"a8e895c35efbd5c5496060d99c062a474ce00a86"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1d785b8c283cfbf420e9af38c5f214b52bc1595b","unresolved":false,"context_lines":[{"line_number":5939,"context_line":"server_host_create:"},{"line_number":5940,"context_line":"  description: |"},{"line_number":5941,"context_line":"    The name of the host to which the server is created. The API will return"},{"line_number":5942,"context_line":"    400 if no compute nodes are found with the given host. By default, it"},{"line_number":5943,"context_line":"    can be specified by administrators only."},{"line_number":5944,"context_line":""},{"line_number":5945,"context_line":"    .. note::"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"dfbec78f_447b047a","line":5942,"range":{"start_line":5942,"start_character":53,"end_line":5942,"end_character":57},"updated":"2019-05-13 18:52:38.000000000","message":"host name","commit_id":"a8e895c35efbd5c5496060d99c062a474ce00a86"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"45215ccd665f35d6e31a394b18328817b6a19c1c","unresolved":false,"context_lines":[{"line_number":5939,"context_line":"server_host_create:"},{"line_number":5940,"context_line":"  description: |"},{"line_number":5941,"context_line":"    The name of the host to which the server is created. The API will return"},{"line_number":5942,"context_line":"    400 if no compute nodes are found with the given host. By default, it"},{"line_number":5943,"context_line":"    can be specified by administrators only."},{"line_number":5944,"context_line":""},{"line_number":5945,"context_line":"    .. note::"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"dfbec78f_889b4616","line":5942,"range":{"start_line":5942,"start_character":53,"end_line":5942,"end_character":57},"in_reply_to":"dfbec78f_447b047a","updated":"2019-05-14 09:21:02.000000000","message":"Done","commit_id":"a8e895c35efbd5c5496060d99c062a474ce00a86"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1d785b8c283cfbf420e9af38c5f214b52bc1595b","unresolved":false,"context_lines":[{"line_number":5961,"context_line":"# This is the hypervisor_hostname in a POST (create instance) request body."},{"line_number":5962,"context_line":"server_hypervisor_hostname_create:"},{"line_number":5963,"context_line":"  description: |"},{"line_number":5964,"context_line":"    The hostname of the hypervisor to which the server is created. The API"},{"line_number":5965,"context_line":"    will return 400 if no compute nodes are found with the given hypervisor"},{"line_number":5966,"context_line":"    hostname. By default, it can be specified by administrators only."},{"line_number":5967,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":15,"id":"dfbec78f_24961095","line":5964,"range":{"start_line":5964,"start_character":35,"end_line":5964,"end_character":57},"updated":"2019-05-13 18:52:38.000000000","message":"ditto","commit_id":"a8e895c35efbd5c5496060d99c062a474ce00a86"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"45215ccd665f35d6e31a394b18328817b6a19c1c","unresolved":false,"context_lines":[{"line_number":5961,"context_line":"# This is the hypervisor_hostname in a POST (create instance) request body."},{"line_number":5962,"context_line":"server_hypervisor_hostname_create:"},{"line_number":5963,"context_line":"  description: |"},{"line_number":5964,"context_line":"    The hostname of the hypervisor to which the server is created. The API"},{"line_number":5965,"context_line":"    will return 400 if no compute nodes are found with the given hypervisor"},{"line_number":5966,"context_line":"    hostname. By default, it can be specified by administrators only."},{"line_number":5967,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":15,"id":"dfbec78f_289c9a0c","line":5964,"range":{"start_line":5964,"start_character":35,"end_line":5964,"end_character":57},"in_reply_to":"dfbec78f_24961095","updated":"2019-05-14 09:21:02.000000000","message":"Done","commit_id":"a8e895c35efbd5c5496060d99c062a474ce00a86"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"2b9d8b2f0c36ae5eabfd2492a1e4fbe09b137a02","unresolved":false,"context_lines":[{"line_number":5963,"context_line":"    default, it can be specified by administrators only."},{"line_number":5964,"context_line":""},{"line_number":5965,"context_line":"    .. note::"},{"line_number":5966,"context_line":"     Prior to microversion 2.74, you can also specify the forced host in the"},{"line_number":5967,"context_line":"     ``availability_zone``. Specifying a forced host will bypass validation"},{"line_number":5968,"context_line":"     by the scheduler."},{"line_number":5969,"context_line":"  in: body"}],"source_content_type":"text/x-yaml","patch_set":19,"id":"bfb3d3c7_842177a2","line":5966,"range":{"start_line":5966,"start_character":5,"end_line":5966,"end_character":31},"updated":"2019-05-20 16:15:01.000000000","message":"I can see that in the previous review this note was asked to be added which makes sense but from what I can follow on your merged spec, you are still keeping the avz:host:node for \u003e\u003d2.74 microversion also right (https://review.opendev.org/#/c/645458/18/specs/train/approved/add-host-and-hypervisor-hostname-flag-to-create-server.rst@54)? I don\u0027t think its only \"prior to 2.74\", its only that its mutually exclusive from this microversion and so if you specify both you will end up with an error - which should be called out either here or somewhere in the api-ref documentation.","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"1a188bc4c941f73eb0dd6fa9cce1587006570496","unresolved":false,"context_lines":[{"line_number":5963,"context_line":"    default, it can be specified by administrators only."},{"line_number":5964,"context_line":""},{"line_number":5965,"context_line":"    .. note::"},{"line_number":5966,"context_line":"     Prior to microversion 2.74, you can also specify the forced host in the"},{"line_number":5967,"context_line":"     ``availability_zone``. Specifying a forced host will bypass validation"},{"line_number":5968,"context_line":"     by the scheduler."},{"line_number":5969,"context_line":"  in: body"}],"source_content_type":"text/x-yaml","patch_set":19,"id":"bfb3d3c7_2b95efe4","line":5966,"range":{"start_line":5966,"start_character":5,"end_line":5966,"end_character":31},"in_reply_to":"bfb3d3c7_842177a2","updated":"2019-05-21 07:32:00.000000000","message":"A good point. It\u0027s my wrong description.\nDone.","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"2b9d8b2f0c36ae5eabfd2492a1e4fbe09b137a02","unresolved":false,"context_lines":[{"line_number":5981,"context_line":"# This is the hypervisor_hostname in a POST (create instance) request body."},{"line_number":5982,"context_line":"server_hypervisor_hostname_create:"},{"line_number":5983,"context_line":"  description: |"},{"line_number":5984,"context_line":"    The hostname of the hypervisor on which the server is to be created."},{"line_number":5985,"context_line":"    The API will return 400 if no compute nodes are found with the given"},{"line_number":5986,"context_line":"    hypervisor hostname. By default, it can be specified by administrators"},{"line_number":5987,"context_line":"    only."}],"source_content_type":"text/x-yaml","patch_set":19,"id":"bfb3d3c7_c49a0fc4","line":5984,"range":{"start_line":5984,"start_character":8,"end_line":5984,"end_character":34},"updated":"2019-05-20 16:15:01.000000000","message":"This is confusing for me, I would expect this to be just \"name of the hypervisor\" or \"name of the compute_node\" because saying hostname (although I know the parameter has this in it) sort of reminds me of compute_node.host which is indeed the above host key. But this could just be me. If others find it confusing as well you can change it.","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"1a188bc4c941f73eb0dd6fa9cce1587006570496","unresolved":false,"context_lines":[{"line_number":5981,"context_line":"# This is the hypervisor_hostname in a POST (create instance) request body."},{"line_number":5982,"context_line":"server_hypervisor_hostname_create:"},{"line_number":5983,"context_line":"  description: |"},{"line_number":5984,"context_line":"    The hostname of the hypervisor on which the server is to be created."},{"line_number":5985,"context_line":"    The API will return 400 if no compute nodes are found with the given"},{"line_number":5986,"context_line":"    hypervisor hostname. By default, it can be specified by administrators"},{"line_number":5987,"context_line":"    only."}],"source_content_type":"text/x-yaml","patch_set":19,"id":"bfb3d3c7_cb21b3b6","line":5984,"range":{"start_line":5984,"start_character":8,"end_line":5984,"end_character":34},"in_reply_to":"bfb3d3c7_c49a0fc4","updated":"2019-05-21 07:32:00.000000000","message":"To be confirmed  :)\nIf it really confusing for others too, it\u0027s right for me to change it.","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"2b9d8b2f0c36ae5eabfd2492a1e4fbe09b137a02","unresolved":false,"context_lines":[{"line_number":5987,"context_line":"    only."},{"line_number":5988,"context_line":""},{"line_number":5989,"context_line":"    .. note::"},{"line_number":5990,"context_line":"     Prior to microversion 2.74, you can also specify the forced node in the"},{"line_number":5991,"context_line":"     ``availability_zone``. Specifying a forced node will bypass validation"},{"line_number":5992,"context_line":"     by the scheduler."},{"line_number":5993,"context_line":"  in: body"}],"source_content_type":"text/x-yaml","patch_set":19,"id":"bfb3d3c7_2419ab78","line":5990,"range":{"start_line":5990,"start_character":5,"end_line":5990,"end_character":31},"updated":"2019-05-20 16:15:01.000000000","message":"same as above.","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"1a188bc4c941f73eb0dd6fa9cce1587006570496","unresolved":false,"context_lines":[{"line_number":5987,"context_line":"    only."},{"line_number":5988,"context_line":""},{"line_number":5989,"context_line":"    .. note::"},{"line_number":5990,"context_line":"     Prior to microversion 2.74, you can also specify the forced node in the"},{"line_number":5991,"context_line":"     ``availability_zone``. Specifying a forced node will bypass validation"},{"line_number":5992,"context_line":"     by the scheduler."},{"line_number":5993,"context_line":"  in: body"}],"source_content_type":"text/x-yaml","patch_set":19,"id":"bfb3d3c7_6b59a758","line":5990,"range":{"start_line":5990,"start_character":5,"end_line":5990,"end_character":31},"in_reply_to":"bfb3d3c7_2419ab78","updated":"2019-05-21 07:32:00.000000000","message":"Done","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":5958,"context_line":"# This is the host in a POST (create instance) request body."},{"line_number":5959,"context_line":"server_host_create:"},{"line_number":5960,"context_line":"  description: |"},{"line_number":5961,"context_line":"    The name of the host on which the server is to be created. The API will"},{"line_number":5962,"context_line":"    return 400 if no compute nodes are found with the given host name. By"},{"line_number":5963,"context_line":"    default, it can be specified by administrators only."},{"line_number":5964,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":29,"id":"9fb8cfa7_dbf8817d","line":5961,"range":{"start_line":5961,"start_character":20,"end_line":5961,"end_character":24},"updated":"2019-06-20 20:54:09.000000000","message":"compute service host","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":5958,"context_line":"# This is the host in a POST (create instance) request body."},{"line_number":5959,"context_line":"server_host_create:"},{"line_number":5960,"context_line":"  description: |"},{"line_number":5961,"context_line":"    The name of the host on which the server is to be created. The API will"},{"line_number":5962,"context_line":"    return 400 if no compute nodes are found with the given host name. By"},{"line_number":5963,"context_line":"    default, it can be specified by administrators only."},{"line_number":5964,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":29,"id":"9fb8cfa7_fe0c4e43","line":5961,"range":{"start_line":5961,"start_character":20,"end_line":5961,"end_character":24},"in_reply_to":"9fb8cfa7_dbf8817d","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":5959,"context_line":"server_host_create:"},{"line_number":5960,"context_line":"  description: |"},{"line_number":5961,"context_line":"    The name of the host on which the server is to be created. The API will"},{"line_number":5962,"context_line":"    return 400 if no compute nodes are found with the given host name. By"},{"line_number":5963,"context_line":"    default, it can be specified by administrators only."},{"line_number":5964,"context_line":""},{"line_number":5965,"context_line":"    .. note::"}],"source_content_type":"text/x-yaml","patch_set":29,"id":"9fb8cfa7_1bfff967","line":5962,"range":{"start_line":5962,"start_character":21,"end_line":5962,"end_character":34},"updated":"2019-06-20 20:54:09.000000000","message":"nit: the API resource is a \"compute service\" so I\u0027d say \"if no compute services are found\".","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":5959,"context_line":"server_host_create:"},{"line_number":5960,"context_line":"  description: |"},{"line_number":5961,"context_line":"    The name of the host on which the server is to be created. The API will"},{"line_number":5962,"context_line":"    return 400 if no compute nodes are found with the given host name. By"},{"line_number":5963,"context_line":"    default, it can be specified by administrators only."},{"line_number":5964,"context_line":""},{"line_number":5965,"context_line":"    .. note::"}],"source_content_type":"text/x-yaml","patch_set":29,"id":"9fb8cfa7_3908c026","line":5962,"range":{"start_line":5962,"start_character":21,"end_line":5962,"end_character":34},"in_reply_to":"9fb8cfa7_1bfff967","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":5964,"context_line":""},{"line_number":5965,"context_line":"    .. note::"},{"line_number":5966,"context_line":"     Now you can still specify the forced host in the ``availability_zone`` as"},{"line_number":5967,"context_line":"     well as before. But specifying ``host`` and ``az:host:node`` together is"},{"line_number":5968,"context_line":"     not allowed."},{"line_number":5969,"context_line":"  in: body"},{"line_number":5970,"context_line":"  required: false"}],"source_content_type":"text/x-yaml","patch_set":29,"id":"9fb8cfa7_bb282d97","line":5967,"range":{"start_line":5967,"start_character":51,"end_line":5967,"end_character":53},"updated":"2019-06-20 20:54:09.000000000","message":"Use \"zone\" rather than \"az\".","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":5964,"context_line":""},{"line_number":5965,"context_line":"    .. note::"},{"line_number":5966,"context_line":"     Now you can still specify the forced host in the ``availability_zone`` as"},{"line_number":5967,"context_line":"     well as before. But specifying ``host`` and ``az:host:node`` together is"},{"line_number":5968,"context_line":"     not allowed."},{"line_number":5969,"context_line":"  in: body"},{"line_number":5970,"context_line":"  required: false"}],"source_content_type":"text/x-yaml","patch_set":29,"id":"9fb8cfa7_db6ba11c","line":5967,"range":{"start_line":5967,"start_character":10,"end_line":5967,"end_character":19},"updated":"2019-06-20 20:54:09.000000000","message":"Would be nice to link to this:\n\nhttps://docs.openstack.org/nova/latest/admin/availability-zones.html\n\nlike:\n\n`as before \u003chttps://docs.openstack.org/nova/latest/admin/availability-zones.html\u003e`_\n\n\nAlso, you should definitely update https://docs.openstack.org/nova/latest/admin/availability-zones.html somewhere to mention the new functionality in the new microversion. I would mention something to the effect of \"Starting with the 2.74 microversion, there are two ways to specify a host and/or node when creating a server...\" and then go on to detail the microversion scenario and the legacy forced host/node scenario. We could probably also mention the differences (one bypasses the scheduler [which is dangerous] and one does not).","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":5964,"context_line":""},{"line_number":5965,"context_line":"    .. note::"},{"line_number":5966,"context_line":"     Now you can still specify the forced host in the ``availability_zone`` as"},{"line_number":5967,"context_line":"     well as before. But specifying ``host`` and ``az:host:node`` together is"},{"line_number":5968,"context_line":"     not allowed."},{"line_number":5969,"context_line":"  in: body"},{"line_number":5970,"context_line":"  required: false"}],"source_content_type":"text/x-yaml","patch_set":29,"id":"9fb8cfa7_190dbc34","line":5967,"range":{"start_line":5967,"start_character":51,"end_line":5967,"end_character":53},"in_reply_to":"9fb8cfa7_bb282d97","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":5964,"context_line":""},{"line_number":5965,"context_line":"    .. note::"},{"line_number":5966,"context_line":"     Now you can still specify the forced host in the ``availability_zone`` as"},{"line_number":5967,"context_line":"     well as before. But specifying ``host`` and ``az:host:node`` together is"},{"line_number":5968,"context_line":"     not allowed."},{"line_number":5969,"context_line":"  in: body"},{"line_number":5970,"context_line":"  required: false"}],"source_content_type":"text/x-yaml","patch_set":29,"id":"9fb8cfa7_de286a98","line":5967,"range":{"start_line":5967,"start_character":10,"end_line":5967,"end_character":19},"in_reply_to":"9fb8cfa7_d65e1844","updated":"2019-06-25 10:11:48.000000000","message":"Done.\nA new patch[1]\n\n[1] https://review.opendev.org/#/c/666767/","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f6c9294ad3de393028a04869136bad238cee134a","unresolved":false,"context_lines":[{"line_number":5964,"context_line":""},{"line_number":5965,"context_line":"    .. note::"},{"line_number":5966,"context_line":"     Now you can still specify the forced host in the ``availability_zone`` as"},{"line_number":5967,"context_line":"     well as before. But specifying ``host`` and ``az:host:node`` together is"},{"line_number":5968,"context_line":"     not allowed."},{"line_number":5969,"context_line":"  in: body"},{"line_number":5970,"context_line":"  required: false"}],"source_content_type":"text/x-yaml","patch_set":29,"id":"9fb8cfa7_d65e1844","line":5967,"range":{"start_line":5967,"start_character":10,"end_line":5967,"end_character":19},"in_reply_to":"9fb8cfa7_db6ba11c","updated":"2019-06-20 20:57:33.000000000","message":"\u003e Also, you should definitely update https://docs.openstack.org/nova/latest/admin/availability-zones.html\n\nFeel free to do this in a separate follow up change since it could take awhile to review a docs patch for that - those require some time to review since they are user-facing docs.","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":5964,"context_line":""},{"line_number":5965,"context_line":"    .. note::"},{"line_number":5966,"context_line":"     Now you can still specify the forced host in the ``availability_zone`` as"},{"line_number":5967,"context_line":"     well as before. But specifying ``host`` and ``az:host:node`` together is"},{"line_number":5968,"context_line":"     not allowed."},{"line_number":5969,"context_line":"  in: body"},{"line_number":5970,"context_line":"  required: false"}],"source_content_type":"text/x-yaml","patch_set":29,"id":"9fb8cfa7_be2d76a9","line":5967,"range":{"start_line":5967,"start_character":10,"end_line":5967,"end_character":19},"in_reply_to":"9fb8cfa7_db6ba11c","updated":"2019-06-25 10:11:48.000000000","message":"Done.\nAdd the link.","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":5982,"context_line":"server_hypervisor_hostname_create:"},{"line_number":5983,"context_line":"  description: |"},{"line_number":5984,"context_line":"    The hostname of the hypervisor on which the server is to be created."},{"line_number":5985,"context_line":"    The API will return 400 if no compute nodes are found with the given"},{"line_number":5986,"context_line":"    hypervisor hostname. By default, it can be specified by administrators"},{"line_number":5987,"context_line":"    only."},{"line_number":5988,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":29,"id":"9fb8cfa7_fbd465bd","line":5985,"range":{"start_line":5985,"start_character":34,"end_line":5985,"end_character":47},"updated":"2019-06-20 20:54:09.000000000","message":"hypervisors (use the API resource not the internal data model object name)","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":5982,"context_line":"server_hypervisor_hostname_create:"},{"line_number":5983,"context_line":"  description: |"},{"line_number":5984,"context_line":"    The hostname of the hypervisor on which the server is to be created."},{"line_number":5985,"context_line":"    The API will return 400 if no compute nodes are found with the given"},{"line_number":5986,"context_line":"    hypervisor hostname. By default, it can be specified by administrators"},{"line_number":5987,"context_line":"    only."},{"line_number":5988,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":29,"id":"9fb8cfa7_992a0c7c","line":5985,"range":{"start_line":5985,"start_character":34,"end_line":5985,"end_character":47},"in_reply_to":"9fb8cfa7_fbd465bd","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":5983,"context_line":"  description: |"},{"line_number":5984,"context_line":"    The hostname of the hypervisor on which the server is to be created."},{"line_number":5985,"context_line":"    The API will return 400 if no compute nodes are found with the given"},{"line_number":5986,"context_line":"    hypervisor hostname. By default, it can be specified by administrators"},{"line_number":5987,"context_line":"    only."},{"line_number":5988,"context_line":""},{"line_number":5989,"context_line":"    .. note::"}],"source_content_type":"text/x-yaml","patch_set":29,"id":"9fb8cfa7_7bf2b571","line":5986,"range":{"start_line":5986,"start_character":4,"end_line":5986,"end_character":14},"updated":"2019-06-20 20:54:09.000000000","message":"nix this","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":5983,"context_line":"  description: |"},{"line_number":5984,"context_line":"    The hostname of the hypervisor on which the server is to be created."},{"line_number":5985,"context_line":"    The API will return 400 if no compute nodes are found with the given"},{"line_number":5986,"context_line":"    hypervisor hostname. By default, it can be specified by administrators"},{"line_number":5987,"context_line":"    only."},{"line_number":5988,"context_line":""},{"line_number":5989,"context_line":"    .. note::"}],"source_content_type":"text/x-yaml","patch_set":29,"id":"9fb8cfa7_3921a0a0","line":5986,"range":{"start_line":5986,"start_character":4,"end_line":5986,"end_character":14},"in_reply_to":"9fb8cfa7_7bf2b571","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":5988,"context_line":""},{"line_number":5989,"context_line":"    .. note::"},{"line_number":5990,"context_line":"     Now you can still specify the forced node in the ``availability_zone``"},{"line_number":5991,"context_line":"     as well as before. But specifying ``hypervisor_hostname`` and"},{"line_number":5992,"context_line":"     ``az:host:node`` together is not allowed."},{"line_number":5993,"context_line":"  in: body"},{"line_number":5994,"context_line":"  required: false"}],"source_content_type":"text/x-yaml","patch_set":29,"id":"9fb8cfa7_5b9491e8","line":5991,"range":{"start_line":5991,"start_character":13,"end_line":5991,"end_character":22},"updated":"2019-06-20 20:54:09.000000000","message":"same as above","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":5988,"context_line":""},{"line_number":5989,"context_line":"    .. note::"},{"line_number":5990,"context_line":"     Now you can still specify the forced node in the ``availability_zone``"},{"line_number":5991,"context_line":"     as well as before. But specifying ``hypervisor_hostname`` and"},{"line_number":5992,"context_line":"     ``az:host:node`` together is not allowed."},{"line_number":5993,"context_line":"  in: body"},{"line_number":5994,"context_line":"  required: false"}],"source_content_type":"text/x-yaml","patch_set":29,"id":"9fb8cfa7_39568008","line":5991,"range":{"start_line":5991,"start_character":13,"end_line":5991,"end_character":22},"in_reply_to":"9fb8cfa7_5b9491e8","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":5989,"context_line":"    .. note::"},{"line_number":5990,"context_line":"     Now you can still specify the forced node in the ``availability_zone``"},{"line_number":5991,"context_line":"     as well as before. But specifying ``hypervisor_hostname`` and"},{"line_number":5992,"context_line":"     ``az:host:node`` together is not allowed."},{"line_number":5993,"context_line":"  in: body"},{"line_number":5994,"context_line":"  required: false"},{"line_number":5995,"context_line":"  type: string"}],"source_content_type":"text/x-yaml","patch_set":29,"id":"9fb8cfa7_1b137968","line":5992,"range":{"start_line":5992,"start_character":7,"end_line":5992,"end_character":9},"updated":"2019-06-20 20:54:09.000000000","message":"zone","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":5989,"context_line":"    .. note::"},{"line_number":5990,"context_line":"     Now you can still specify the forced node in the ``availability_zone``"},{"line_number":5991,"context_line":"     as well as before. But specifying ``hypervisor_hostname`` and"},{"line_number":5992,"context_line":"     ``az:host:node`` together is not allowed."},{"line_number":5993,"context_line":"  in: body"},{"line_number":5994,"context_line":"  required: false"},{"line_number":5995,"context_line":"  type: string"}],"source_content_type":"text/x-yaml","patch_set":29,"id":"9fb8cfa7_6bb89d29","line":5992,"range":{"start_line":5992,"start_character":7,"end_line":5992,"end_character":9},"in_reply_to":"9fb8cfa7_1b137968","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6748a83fec4837283b233037c94f750274600754","unresolved":false,"context_lines":[{"line_number":5963,"context_line":"    host name. By default, it can be specified by administrators only."},{"line_number":5964,"context_line":""},{"line_number":5965,"context_line":"    .. note::"},{"line_number":5966,"context_line":"     Now you can still specify the forced host in the ``availability_zone`` as"},{"line_number":5967,"context_line":"     well `as before https://docs.openstack.org/nova/latest/admin/availability-zones.html`-."},{"line_number":5968,"context_line":"     But specifying ``host`` and ``zone:host:node`` together is not allowed."},{"line_number":5969,"context_line":"  in: body"}],"source_content_type":"text/x-yaml","patch_set":30,"id":"7faddb67_442e26a6","line":5966,"range":{"start_line":5966,"start_character":5,"end_line":5966,"end_character":12},"updated":"2019-07-05 19:53:43.000000000","message":"nit: Just make this \"You can still\". \"Now\" might be confusing as time goes on.","commit_id":"592262e8cc75a698747b5bdafe1cfa0c8690cacd"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6748a83fec4837283b233037c94f750274600754","unresolved":false,"context_lines":[{"line_number":5964,"context_line":""},{"line_number":5965,"context_line":"    .. note::"},{"line_number":5966,"context_line":"     Now you can still specify the forced host in the ``availability_zone`` as"},{"line_number":5967,"context_line":"     well `as before https://docs.openstack.org/nova/latest/admin/availability-zones.html`-."},{"line_number":5968,"context_line":"     But specifying ``host`` and ``zone:host:node`` together is not allowed."},{"line_number":5969,"context_line":"  in: body"},{"line_number":5970,"context_line":"  required: false"}],"source_content_type":"text/x-yaml","patch_set":30,"id":"7faddb67_e4187282","line":5967,"range":{"start_line":5967,"start_character":90,"end_line":5967,"end_character":91},"updated":"2019-07-05 19:53:43.000000000","message":"This needs to be an underscore for the link to work.\n\nHowever, the more I think about this, I\u0027m not sure we should even have this note since we don\u0027t really want people using the forced host/node behavior with the availability_zone parameter. Are you OK with just dropping this note?","commit_id":"592262e8cc75a698747b5bdafe1cfa0c8690cacd"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6748a83fec4837283b233037c94f750274600754","unresolved":false,"context_lines":[{"line_number":5985,"context_line":"    The API will return 400 if no hypervisors are found with the given"},{"line_number":5986,"context_line":"    hostname. By default, it can be specified by administrators only."},{"line_number":5987,"context_line":""},{"line_number":5988,"context_line":"    .. note::"},{"line_number":5989,"context_line":"     Now you can still specify the forced node in the ``availability_zone``"},{"line_number":5990,"context_line":"     as well `as before https://docs.openstack.org/nova/latest/admin/availability-zones.html`-."},{"line_number":5991,"context_line":"     But specifying ``hypervisor_hostname`` and ``zone:host:node`` together"}],"source_content_type":"text/x-yaml","patch_set":30,"id":"7faddb67_9f0f8b2d","line":5988,"updated":"2019-07-05 19:53:43.000000000","message":"Same as above - I\u0027m thinking we should just drop the note that mentions the forced node case. It reads more like a commit message anyway.","commit_id":"592262e8cc75a698747b5bdafe1cfa0c8690cacd"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"26421cb7cf5dcf2a883236be82be27e74b94f3ab","unresolved":false,"context_lines":[{"line_number":4910,"context_line":"    :ref:`os-availability-zone` API, but you should avoid using the `default"},{"line_number":4911,"context_line":"    availability zone \u003chttps://docs.openstack.org/nova/latest/configuration/config.html#DEFAULT.default_availability_zone\u003e`_"},{"line_number":4912,"context_line":"    when creating the server.  The default availability zone is named ``nova``."},{"line_number":4913,"context_line":"    This AZ is only shown when listing the availability zones as an admin."},{"line_number":4914,"context_line":"  in: body"},{"line_number":4915,"context_line":"  required: false"},{"line_number":4916,"context_line":"  type: string"}],"source_content_type":"text/x-yaml","patch_set":35,"id":"7faddb67_06078884","line":4913,"updated":"2019-07-11 07:33:29.000000000","message":"ditto","commit_id":"564290ab145d2710d3e82b5c4871e647e4d516c4"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"26421cb7cf5dcf2a883236be82be27e74b94f3ab","unresolved":false,"context_lines":[{"line_number":5960,"context_line":"  description: |"},{"line_number":5961,"context_line":"    The name of the compute service host on which the server is to be created."},{"line_number":5962,"context_line":"    The API will return 400 if no compute services are found with the given"},{"line_number":5963,"context_line":"    host name. By default, it can be specified by administrators only."},{"line_number":5964,"context_line":"  in: body"},{"line_number":5965,"context_line":"  required: false"},{"line_number":5966,"context_line":"  type: string"}],"source_content_type":"text/x-yaml","patch_set":35,"id":"7faddb67_26e164d1","line":5963,"updated":"2019-07-11 07:33:29.000000000","message":"This parameter and the special ``availability_zone`` format of ``zone:host:node`` are mutually exclusive. If ...., it will return 400.","commit_id":"564290ab145d2710d3e82b5c4871e647e4d516c4"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"26421cb7cf5dcf2a883236be82be27e74b94f3ab","unresolved":false,"context_lines":[{"line_number":5978,"context_line":"  description: |"},{"line_number":5979,"context_line":"    The hostname of the hypervisor on which the server is to be created."},{"line_number":5980,"context_line":"    The API will return 400 if no hypervisors are found with the given"},{"line_number":5981,"context_line":"    hostname. By default, it can be specified by administrators only."},{"line_number":5982,"context_line":"  in: body"},{"line_number":5983,"context_line":"  required: false"},{"line_number":5984,"context_line":"  type: string"}],"source_content_type":"text/x-yaml","patch_set":35,"id":"7faddb67_a6cc7461","line":5981,"updated":"2019-07-11 07:33:29.000000000","message":"ditto","commit_id":"564290ab145d2710d3e82b5c4871e647e4d516c4"}],"api-ref/source/servers.inc":[{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"2b9d8b2f0c36ae5eabfd2492a1e4fbe09b137a02","unresolved":false,"context_lines":[{"line_number":425,"context_line":".. literalinclude:: ../../doc/api_samples/servers/v2.63/server-create-req.json"},{"line_number":426,"context_line":"   :language: javascript"},{"line_number":427,"context_line":""},{"line_number":428,"context_line":"**Example Create Server With Host and/or Hypervisor Hostname (v2.74)**"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":".. literalinclude:: ../../doc/api_samples/servers/v2.74/server-create-req.json"},{"line_number":431,"context_line":"   :language: javascript"}],"source_content_type":"text/x-c++src","patch_set":19,"id":"bfb3d3c7_e4cb931b","line":428,"updated":"2019-05-20 16:15:01.000000000","message":"I think this is not needed since its after-all just specifying host/hypervisor names, else we should update the 2.63 one/squash them. Its otherwise too many req samples to scroll through for every new key that gets added. But wait for other reviwer\u0027s comments and see what they feel.","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"1a188bc4c941f73eb0dd6fa9cce1587006570496","unresolved":false,"context_lines":[{"line_number":425,"context_line":".. literalinclude:: ../../doc/api_samples/servers/v2.63/server-create-req.json"},{"line_number":426,"context_line":"   :language: javascript"},{"line_number":427,"context_line":""},{"line_number":428,"context_line":"**Example Create Server With Host and/or Hypervisor Hostname (v2.74)**"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":".. literalinclude:: ../../doc/api_samples/servers/v2.74/server-create-req.json"},{"line_number":431,"context_line":"   :language: javascript"}],"source_content_type":"text/x-c++src","patch_set":19,"id":"bfb3d3c7_6b07671e","line":428,"in_reply_to":"bfb3d3c7_e4cb931b","updated":"2019-05-21 07:32:00.000000000","message":"To be confirmed too :)","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"2cc7ecc2c17eb7c8af0b808d5778e7862b2e3d3b","unresolved":false,"context_lines":[{"line_number":397,"context_line":"  - description: server_description"},{"line_number":398,"context_line":"  - tags: server_tags_create"},{"line_number":399,"context_line":"  - trusted_image_certificates: server_trusted_image_certificates_create_req"},{"line_number":400,"context_line":"  - host: server_host_create"},{"line_number":401,"context_line":"  - hypervisor_hostname: server_hypervisor_hostname_create"},{"line_number":402,"context_line":"  - os:scheduler_hints: os:scheduler_hints"},{"line_number":403,"context_line":"  - os:scheduler_hints.build_near_host_ip: os:scheduler_hints_build_near_host_ip"},{"line_number":404,"context_line":"  - os:scheduler_hints.cidr: os:scheduler_hints_cidr"}],"source_content_type":"text/x-c++src","patch_set":25,"id":"9fb8cfa7_1e0e0232","line":401,"range":{"start_line":400,"start_character":0,"end_line":401,"end_character":58},"updated":"2019-06-06 12:54:00.000000000","message":"let\u0027s specify these new parameters at the last for maintaining the ordering.","commit_id":"671beddcdc247aaa84c09040e2f0de1b64df3f6e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":429,"context_line":".. literalinclude:: ../../doc/api_samples/servers/v2.63/server-create-req.json"},{"line_number":430,"context_line":"   :language: javascript"},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"**Example Create Server With Host and/or Hypervisor Hostname (v2.74)**"},{"line_number":433,"context_line":""},{"line_number":434,"context_line":".. literalinclude:: ../../doc/api_samples/servers/v2.74/server-create-req.json"},{"line_number":435,"context_line":"   :language: javascript"}],"source_content_type":"text/x-c++src","patch_set":29,"id":"9fb8cfa7_bb7a6db7","line":432,"range":{"start_line":432,"start_character":34,"end_line":432,"end_character":40},"updated":"2019-06-20 20:54:09.000000000","message":"Just say \"and\" here since the sample uses both parameters.","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":429,"context_line":".. literalinclude:: ../../doc/api_samples/servers/v2.63/server-create-req.json"},{"line_number":430,"context_line":"   :language: javascript"},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"**Example Create Server With Host and/or Hypervisor Hostname (v2.74)**"},{"line_number":433,"context_line":""},{"line_number":434,"context_line":".. literalinclude:: ../../doc/api_samples/servers/v2.74/server-create-req.json"},{"line_number":435,"context_line":"   :language: javascript"}],"source_content_type":"text/x-c++src","patch_set":29,"id":"9fb8cfa7_19c61c4b","line":432,"range":{"start_line":432,"start_character":34,"end_line":432,"end_character":40},"in_reply_to":"9fb8cfa7_bb7a6db7","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"}],"doc/api_samples/servers/v2.74/server-create-req-with-host-and-node.json":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0156087112ada7addaa8578ab18ace4f3a815b5f","unresolved":false,"context_lines":[{"line_number":6,"context_line":"        \"name\" : \"new-server-test\","},{"line_number":7,"context_line":"        \"imageRef\" : \"70a599e0-31e7-49b7-b260-868f441e862b\","},{"line_number":8,"context_line":"        \"flavorRef\" : \"6\","},{"line_number":9,"context_line":"        \"availability_zone\": \"us-west\","},{"line_number":10,"context_line":"        \"OS-DCF:diskConfig\": \"AUTO\","},{"line_number":11,"context_line":"        \"metadata\" : {"},{"line_number":12,"context_line":"            \"My Server Name\" : \"Apache1\""}],"source_content_type":"application/json","patch_set":32,"id":"7faddb67_0e9b56c9","line":9,"updated":"2019-07-08 17:25:25.000000000","message":"Hmm, this could be confusing if we\u0027re showing host and hypervisor_hostname in the sample.","commit_id":"f5e46424f524e74cc2942148eb995c11d476d3d0"}],"doc/api_samples/servers/v2.74/server-create-resp.json":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1d785b8c283cfbf420e9af38c5f214b52bc1595b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"server\": {"},{"line_number":3,"context_line":"        \"OS-DCF:diskConfig\": \"AUTO\","},{"line_number":4,"context_line":"        \"adminPass\": \"DB2bQBhxvq8a\","}],"source_content_type":"application/json","patch_set":15,"id":"dfbec78f_24adb0e8","line":1,"updated":"2019-05-13 18:52:38.000000000","message":"is this used anywhere?\n\n[Later] Mmph, used in api samples tests.","commit_id":"a8e895c35efbd5c5496060d99c062a474ce00a86"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"45215ccd665f35d6e31a394b18328817b6a19c1c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"server\": {"},{"line_number":3,"context_line":"        \"OS-DCF:diskConfig\": \"AUTO\","},{"line_number":4,"context_line":"        \"adminPass\": \"DB2bQBhxvq8a\","}],"source_content_type":"application/json","patch_set":15,"id":"dfbec78f_28b57a7e","line":1,"in_reply_to":"dfbec78f_24adb0e8","updated":"2019-05-14 09:21:02.000000000","message":"\u003e is this used anywhere?\n \u003e \n \u003e [Later] Mmph, used in api samples tests.\n\nNo, it is used in api-ref/source/servers.inc :)","commit_id":"a8e895c35efbd5c5496060d99c062a474ce00a86"}],"nova/api/openstack/api_version_request.py":[{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"18a0f0c854226945c4606c8cf48fc786acddd20d","unresolved":false,"context_lines":[{"line_number":178,"context_line":"    * 2.72 - Add support for neutron ports with resource request during server"},{"line_number":179,"context_line":"             create. Server move operations are not yet supported for servers"},{"line_number":180,"context_line":"             with such ports."},{"line_number":181,"context_line":"    * 2.73 - Add the ``host`` parameter and ``hypervisor_hostname`` parameter"},{"line_number":182,"context_line":"             when creating a server."},{"line_number":183,"context_line":"\"\"\""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"# The minimum and maximum versions of the API supported"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fce034c_9d32a8f1","line":182,"range":{"start_line":181,"start_character":12,"end_line":182,"end_character":36},"updated":"2019-04-19 09:01:51.000000000","message":"could be better if you do like 2.71, I mean talk about the API instead of ``when creating a server``","commit_id":"3aea8b1abf244caa7956ceeb846d9a4010ab462c"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"4ac404fbdf44efe1fa503751c900d7ee91ba0bc9","unresolved":false,"context_lines":[{"line_number":178,"context_line":"    * 2.72 - Add support for neutron ports with resource request during server"},{"line_number":179,"context_line":"             create. Server move operations are not yet supported for servers"},{"line_number":180,"context_line":"             with such ports."},{"line_number":181,"context_line":"    * 2.73 - Add the ``host`` parameter and ``hypervisor_hostname`` parameter"},{"line_number":182,"context_line":"             when creating a server."},{"line_number":183,"context_line":"\"\"\""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"# The minimum and maximum versions of the API supported"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fce034c_bd71a446","line":182,"range":{"start_line":181,"start_character":12,"end_line":182,"end_character":36},"in_reply_to":"3fce034c_9d32a8f1","updated":"2019-04-19 09:55:05.000000000","message":"Done","commit_id":"3aea8b1abf244caa7956ceeb846d9a4010ab462c"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"2b9d8b2f0c36ae5eabfd2492a1e4fbe09b137a02","unresolved":false,"context_lines":[{"line_number":184,"context_line":"             ``POST /servers/{server_id}/action`` where the action is rebuild."},{"line_number":185,"context_line":"             It also supports ``locked`` as a filter/sort parameter for"},{"line_number":186,"context_line":"             ``GET /servers/detail`` and ``GET /servers``."},{"line_number":187,"context_line":"    * 2.74 - Adds the ``host`` and ``hypervisor_hostname`` fields to"},{"line_number":188,"context_line":"             ``POST /servers`` body request."},{"line_number":189,"context_line":"\"\"\""},{"line_number":190,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"bfb3d3c7_bf2604b7","line":187,"updated":"2019-05-20 16:15:01.000000000","message":"nit: could you add more information on what ``host`` and ``hypervisor_hostname`` fields are ? like that they can allow users to specify which or node they want their server to land on.","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"1a188bc4c941f73eb0dd6fa9cce1587006570496","unresolved":false,"context_lines":[{"line_number":184,"context_line":"             ``POST /servers/{server_id}/action`` where the action is rebuild."},{"line_number":185,"context_line":"             It also supports ``locked`` as a filter/sort parameter for"},{"line_number":186,"context_line":"             ``GET /servers/detail`` and ``GET /servers``."},{"line_number":187,"context_line":"    * 2.74 - Adds the ``host`` and ``hypervisor_hostname`` fields to"},{"line_number":188,"context_line":"             ``POST /servers`` body request."},{"line_number":189,"context_line":"\"\"\""},{"line_number":190,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"bfb3d3c7_bd3da2bc","line":187,"in_reply_to":"bfb3d3c7_bf2604b7","updated":"2019-05-21 07:32:00.000000000","message":"Done","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":185,"context_line":"             It also supports ``locked`` as a filter/sort parameter for"},{"line_number":186,"context_line":"             ``GET /servers/detail`` and ``GET /servers``."},{"line_number":187,"context_line":"    * 2.74 - Add support for specifying ``host`` and/or ``hypervisor_hostname``"},{"line_number":188,"context_line":"             in body request to ``POST /servers``. Allow users to specify which"},{"line_number":189,"context_line":"             host/node they want their servers to land on."},{"line_number":190,"context_line":"\"\"\""},{"line_number":191,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_1b45b970","line":188,"range":{"start_line":188,"start_character":16,"end_line":188,"end_character":28},"updated":"2019-06-20 20:54:09.000000000","message":"request body","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":185,"context_line":"             It also supports ``locked`` as a filter/sort parameter for"},{"line_number":186,"context_line":"             ``GET /servers/detail`` and ``GET /servers``."},{"line_number":187,"context_line":"    * 2.74 - Add support for specifying ``host`` and/or ``hypervisor_hostname``"},{"line_number":188,"context_line":"             in body request to ``POST /servers``. Allow users to specify which"},{"line_number":189,"context_line":"             host/node they want their servers to land on."},{"line_number":190,"context_line":"\"\"\""},{"line_number":191,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_b9c4b041","line":188,"range":{"start_line":188,"start_character":16,"end_line":188,"end_character":28},"in_reply_to":"9fb8cfa7_1b45b970","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":186,"context_line":"             ``GET /servers/detail`` and ``GET /servers``."},{"line_number":187,"context_line":"    * 2.74 - Add support for specifying ``host`` and/or ``hypervisor_hostname``"},{"line_number":188,"context_line":"             in body request to ``POST /servers``. Allow users to specify which"},{"line_number":189,"context_line":"             host/node they want their servers to land on."},{"line_number":190,"context_line":"\"\"\""},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"# The minimum and maximum versions of the API supported"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_bb534d39","line":189,"range":{"start_line":189,"start_character":47,"end_line":189,"end_character":58},"updated":"2019-06-20 20:54:09.000000000","message":"nit: \"to land on and still be validated by the scheduler.\"","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":186,"context_line":"             ``GET /servers/detail`` and ``GET /servers``."},{"line_number":187,"context_line":"    * 2.74 - Add support for specifying ``host`` and/or ``hypervisor_hostname``"},{"line_number":188,"context_line":"             in body request to ``POST /servers``. Allow users to specify which"},{"line_number":189,"context_line":"             host/node they want their servers to land on."},{"line_number":190,"context_line":"\"\"\""},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"# The minimum and maximum versions of the API supported"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_99df6c0b","line":189,"range":{"start_line":189,"start_character":47,"end_line":189,"end_character":58},"in_reply_to":"9fb8cfa7_bb534d39","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"}],"nova/api/openstack/compute/rest_api_version_history.rst":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1d785b8c283cfbf420e9af38c5f214b52bc1595b","unresolved":false,"context_lines":[{"line_number":944,"context_line":"2.74"},{"line_number":945,"context_line":"----"},{"line_number":946,"context_line":""},{"line_number":947,"context_line":"The ``host`` and ``hypervisor_hostname`` optional parameters will be in the"},{"line_number":948,"context_line":"request body of the following API to create new servers:"},{"line_number":949,"context_line":""},{"line_number":950,"context_line":"* ``POST /servers``"}],"source_content_type":"text/x-rst","patch_set":15,"id":"dfbec78f_a453e016","line":947,"updated":"2019-05-13 18:52:38.000000000","message":"This could use more detail (and then you can copy/paste the same to your reno etc.) Suggest:\n\nAdds support for specifying optional ``host`` and/or ``hypervisor_hostname`` parameters in the request body of ``POST /servers``. These request a specific destination host/node for the servers. These parameters are mutually exclusive with ``az:host:node``. Unlike ``az:host:node``, the ``host`` and ``hypervisor_hostname`` parameters still allow scheduler filters to be run, resulting in earlier failure if the requested host/node is unavailable or otherwise unsuitable.","commit_id":"a8e895c35efbd5c5496060d99c062a474ce00a86"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"45215ccd665f35d6e31a394b18328817b6a19c1c","unresolved":false,"context_lines":[{"line_number":944,"context_line":"2.74"},{"line_number":945,"context_line":"----"},{"line_number":946,"context_line":""},{"line_number":947,"context_line":"The ``host`` and ``hypervisor_hostname`` optional parameters will be in the"},{"line_number":948,"context_line":"request body of the following API to create new servers:"},{"line_number":949,"context_line":""},{"line_number":950,"context_line":"* ``POST /servers``"}],"source_content_type":"text/x-rst","patch_set":15,"id":"dfbec78f_63007502","line":947,"in_reply_to":"dfbec78f_a453e016","updated":"2019-05-14 09:21:02.000000000","message":"Done","commit_id":"a8e895c35efbd5c5496060d99c062a474ce00a86"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"2cc7ecc2c17eb7c8af0b808d5778e7862b2e3d3b","unresolved":false,"context_lines":[{"line_number":946,"context_line":""},{"line_number":947,"context_line":"API microversion 2.74 adds support for specifying optional ``host`` and/or"},{"line_number":948,"context_line":"``hypervisor_hostname`` parameters in the request body of ``POST /servers``."},{"line_number":949,"context_line":"These request a specific destination host/node for the servers. These"},{"line_number":950,"context_line":"parameters are mutually exclusive with ``az:host:node``. Unlike"},{"line_number":951,"context_line":"``az:host:node``, the ``host`` and/or ``hypervisor_hostname`` parameters"},{"line_number":952,"context_line":"still allow scheduler filters to be run, resulting in earlier failure if"}],"source_content_type":"text/x-rst","patch_set":25,"id":"9fb8cfa7_7e9b7ec8","line":949,"range":{"start_line":949,"start_character":47,"end_line":949,"end_character":62},"updated":"2019-06-06 12:54:00.000000000","message":"\u0027to boot the requested server\u0027","commit_id":"671beddcdc247aaa84c09040e2f0de1b64df3f6e"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":946,"context_line":""},{"line_number":947,"context_line":"API microversion 2.74 adds support for specifying optional ``host`` and/or"},{"line_number":948,"context_line":"``hypervisor_hostname`` parameters in the request body of ``POST /servers``."},{"line_number":949,"context_line":"These request a specific destination host/node for the servers. These"},{"line_number":950,"context_line":"parameters are mutually exclusive with ``az:host:node``. Unlike"},{"line_number":951,"context_line":"``az:host:node``, the ``host`` and/or ``hypervisor_hostname`` parameters"},{"line_number":952,"context_line":"still allow scheduler filters to be run, resulting in earlier failure if"}],"source_content_type":"text/x-rst","patch_set":25,"id":"9fb8cfa7_b201b908","line":949,"range":{"start_line":949,"start_character":47,"end_line":949,"end_character":62},"in_reply_to":"9fb8cfa7_7e9b7ec8","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"671beddcdc247aaa84c09040e2f0de1b64df3f6e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":947,"context_line":"API microversion 2.74 adds support for specifying optional ``host`` and/or"},{"line_number":948,"context_line":"``hypervisor_hostname`` parameters in the request body of ``POST /servers``."},{"line_number":949,"context_line":"These request a specific destination host/node to boot the requested server."},{"line_number":950,"context_line":"These parameters are mutually exclusive with ``az:host:node``. Unlike"},{"line_number":951,"context_line":"``az:host:node``, the ``host`` and/or ``hypervisor_hostname`` parameters"},{"line_number":952,"context_line":"still allow scheduler filters to be run, resulting in earlier failure if"},{"line_number":953,"context_line":"the requested host/node is unavailable or otherwise unsuitable."}],"source_content_type":"text/x-rst","patch_set":29,"id":"9fb8cfa7_3b3d1ddd","line":950,"range":{"start_line":950,"start_character":40,"end_line":950,"end_character":61},"updated":"2019-06-20 20:54:09.000000000","message":"I\u0027d say, \"exclusive with the special ``availability_zone`` format of ``zone:host:node``.\"","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":947,"context_line":"API microversion 2.74 adds support for specifying optional ``host`` and/or"},{"line_number":948,"context_line":"``hypervisor_hostname`` parameters in the request body of ``POST /servers``."},{"line_number":949,"context_line":"These request a specific destination host/node to boot the requested server."},{"line_number":950,"context_line":"These parameters are mutually exclusive with ``az:host:node``. Unlike"},{"line_number":951,"context_line":"``az:host:node``, the ``host`` and/or ``hypervisor_hostname`` parameters"},{"line_number":952,"context_line":"still allow scheduler filters to be run, resulting in earlier failure if"},{"line_number":953,"context_line":"the requested host/node is unavailable or otherwise unsuitable."}],"source_content_type":"text/x-rst","patch_set":29,"id":"9fb8cfa7_59025471","line":950,"range":{"start_line":950,"start_character":40,"end_line":950,"end_character":61},"in_reply_to":"9fb8cfa7_3b3d1ddd","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":948,"context_line":"``hypervisor_hostname`` parameters in the request body of ``POST /servers``."},{"line_number":949,"context_line":"These request a specific destination host/node to boot the requested server."},{"line_number":950,"context_line":"These parameters are mutually exclusive with ``az:host:node``. Unlike"},{"line_number":951,"context_line":"``az:host:node``, the ``host`` and/or ``hypervisor_hostname`` parameters"},{"line_number":952,"context_line":"still allow scheduler filters to be run, resulting in earlier failure if"},{"line_number":953,"context_line":"the requested host/node is unavailable or otherwise unsuitable."}],"source_content_type":"text/x-rst","patch_set":29,"id":"9fb8cfa7_db23a1bd","line":951,"range":{"start_line":951,"start_character":2,"end_line":951,"end_character":4},"updated":"2019-06-20 20:54:09.000000000","message":"zone","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":948,"context_line":"``hypervisor_hostname`` parameters in the request body of ``POST /servers``."},{"line_number":949,"context_line":"These request a specific destination host/node to boot the requested server."},{"line_number":950,"context_line":"These parameters are mutually exclusive with ``az:host:node``. Unlike"},{"line_number":951,"context_line":"``az:host:node``, the ``host`` and/or ``hypervisor_hostname`` parameters"},{"line_number":952,"context_line":"still allow scheduler filters to be run, resulting in earlier failure if"},{"line_number":953,"context_line":"the requested host/node is unavailable or otherwise unsuitable."}],"source_content_type":"text/x-rst","patch_set":29,"id":"9fb8cfa7_39ff6068","line":951,"range":{"start_line":951,"start_character":2,"end_line":951,"end_character":4},"in_reply_to":"9fb8cfa7_db23a1bd","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"f45016c3092c930ae9d655a9b0889728cec42add","unresolved":false,"context_lines":[{"line_number":949,"context_line":"These request a specific destination host/node to boot the requested server."},{"line_number":950,"context_line":"These parameters are mutually exclusive with ``az:host:node``. Unlike"},{"line_number":951,"context_line":"``az:host:node``, the ``host`` and/or ``hypervisor_hostname`` parameters"},{"line_number":952,"context_line":"still allow scheduler filters to be run, resulting in earlier failure if"},{"line_number":953,"context_line":"the requested host/node is unavailable or otherwise unsuitable."}],"source_content_type":"text/x-rst","patch_set":29,"id":"9fb8cfa7_ac6c5908","line":952,"range":{"start_line":952,"start_character":41,"end_line":952,"end_character":50},"updated":"2019-06-24 10:35:17.000000000","message":"nit, \"and resulting...\" sounds like two things, the running of the scheduler isn\u0027t the where we earliar failuer.","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"f45016c3092c930ae9d655a9b0889728cec42add","unresolved":false,"context_lines":[{"line_number":949,"context_line":"These request a specific destination host/node to boot the requested server."},{"line_number":950,"context_line":"These parameters are mutually exclusive with ``az:host:node``. Unlike"},{"line_number":951,"context_line":"``az:host:node``, the ``host`` and/or ``hypervisor_hostname`` parameters"},{"line_number":952,"context_line":"still allow scheduler filters to be run, resulting in earlier failure if"},{"line_number":953,"context_line":"the requested host/node is unavailable or otherwise unsuitable."}],"source_content_type":"text/x-rst","patch_set":29,"id":"9fb8cfa7_8c7155e1","line":952,"range":{"start_line":952,"start_character":12,"end_line":952,"end_character":29},"updated":"2019-06-24 10:35:17.000000000","message":"nit, s/scheduler filters/scheduler/,  actually we check with the placement also, not only running the filters.","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":949,"context_line":"These request a specific destination host/node to boot the requested server."},{"line_number":950,"context_line":"These parameters are mutually exclusive with ``az:host:node``. Unlike"},{"line_number":951,"context_line":"``az:host:node``, the ``host`` and/or ``hypervisor_hostname`` parameters"},{"line_number":952,"context_line":"still allow scheduler filters to be run, resulting in earlier failure if"},{"line_number":953,"context_line":"the requested host/node is unavailable or otherwise unsuitable."}],"source_content_type":"text/x-rst","patch_set":29,"id":"9fb8cfa7_ef7f8c63","line":952,"range":{"start_line":952,"start_character":12,"end_line":952,"end_character":29},"in_reply_to":"9fb8cfa7_8c7155e1","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":949,"context_line":"These request a specific destination host/node to boot the requested server."},{"line_number":950,"context_line":"These parameters are mutually exclusive with ``az:host:node``. Unlike"},{"line_number":951,"context_line":"``az:host:node``, the ``host`` and/or ``hypervisor_hostname`` parameters"},{"line_number":952,"context_line":"still allow scheduler filters to be run, resulting in earlier failure if"},{"line_number":953,"context_line":"the requested host/node is unavailable or otherwise unsuitable."}],"source_content_type":"text/x-rst","patch_set":29,"id":"9fb8cfa7_4fe33835","line":952,"range":{"start_line":952,"start_character":41,"end_line":952,"end_character":50},"in_reply_to":"9fb8cfa7_ac6c5908","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6748a83fec4837283b233037c94f750274600754","unresolved":false,"context_lines":[{"line_number":949,"context_line":"These request a specific destination host/node to boot the requested server."},{"line_number":950,"context_line":"These parameters are mutually exclusive with the special ``availability_zone``"},{"line_number":951,"context_line":"format of``zone:host:node``. Unlike ``zone:host:node``, the ``host`` and/or"},{"line_number":952,"context_line":"``hypervisor_hostname`` parameters still allow scheduler to be run."},{"line_number":953,"context_line":"If the requested host/node is unavailable or otherwise unsuitable, earlier"},{"line_number":954,"context_line":"failure will be raised."}],"source_content_type":"text/x-rst","patch_set":30,"id":"7faddb67_3fb8d728","line":952,"range":{"start_line":952,"start_character":47,"end_line":952,"end_character":56},"updated":"2019-07-05 19:53:43.000000000","message":"I think \"scheduler filters\" might have been more correct here. I understand what Alex said in PS29 but I think it is missing the point. When using the zone:host:node hack we go through placement but then we skip the filters here:\n\nhttps://github.com/openstack/nova/blob/713288286f3bc3d6db53d51d0450d37514d6a86e/nova/scheduler/host_manager.py#L585","commit_id":"592262e8cc75a698747b5bdafe1cfa0c8690cacd"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7d65a044feddf9283f739c08273f07d4fd6aa68a","unresolved":false,"context_lines":[{"line_number":948,"context_line":"and/or ``hypervisor_hostname`` parameters in the request body of"},{"line_number":949,"context_line":"``POST /servers``. These request a specific destination host/node"},{"line_number":950,"context_line":"to boot the requested server. These parameters are mutually exclusive"},{"line_number":951,"context_line":"with the special ``availability_zone`` format of``zone:host:node``."},{"line_number":952,"context_line":"Unlike ``zone:host:node``, the ``host`` and/or ``hypervisor_hostname``"},{"line_number":953,"context_line":"parameters still allow scheduler filters to be run. If the requested"},{"line_number":954,"context_line":"host/node is unavailable or otherwise unsuitable, earlier failure will"}],"source_content_type":"text/x-rst","patch_set":31,"id":"7faddb67_98cb1052","line":951,"range":{"start_line":951,"start_character":46,"end_line":951,"end_character":48},"updated":"2019-07-08 16:29:58.000000000","message":"Need a space between words here.","commit_id":"dd61ba7c63efc22716a6fbd63d720f448e01a670"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"93a01853832259a9fafc301ac27a67ba8f37c007","unresolved":false,"context_lines":[{"line_number":948,"context_line":"and/or ``hypervisor_hostname`` parameters in the request body of"},{"line_number":949,"context_line":"``POST /servers``. These request a specific destination host/node"},{"line_number":950,"context_line":"to boot the requested server. These parameters are mutually exclusive"},{"line_number":951,"context_line":"with the special ``availability_zone`` format of``zone:host:node``."},{"line_number":952,"context_line":"Unlike ``zone:host:node``, the ``host`` and/or ``hypervisor_hostname``"},{"line_number":953,"context_line":"parameters still allow scheduler filters to be run. If the requested"},{"line_number":954,"context_line":"host/node is unavailable or otherwise unsuitable, earlier failure will"}],"source_content_type":"text/x-rst","patch_set":31,"id":"7faddb67_2e041215","line":951,"range":{"start_line":951,"start_character":46,"end_line":951,"end_character":48},"in_reply_to":"7faddb67_98cb1052","updated":"2019-07-08 17:19:00.000000000","message":"Done","commit_id":"dd61ba7c63efc22716a6fbd63d720f448e01a670"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"4761efd7e752ea3a2bf7c18d1b38cfdf1a0cc4a8","unresolved":false,"context_lines":[{"line_number":954,"context_line":"host/node is unavailable or otherwise unsuitable, earlier failure will"},{"line_number":955,"context_line":"be raised."},{"line_number":956,"context_line":"There will be also a new policy named"},{"line_number":957,"context_line":"``os_compute_api:servers:create:requested_destination``. By default,"},{"line_number":958,"context_line":"it can be specified by administrators only."}],"source_content_type":"text/x-rst","patch_set":34,"id":"7faddb67_9f8684db","line":957,"range":{"start_line":957,"start_character":2,"end_line":957,"end_character":16},"updated":"2019-07-09 14:58:07.000000000","message":"fix it","commit_id":"8fa4d95d4393cdee23f01ca15349c2152da2dc13"}],"nova/api/openstack/compute/schemas/servers.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":359,"context_line":"# Add host and hypervisor_hostname in server"},{"line_number":360,"context_line":"base_create_v274 \u003d copy.deepcopy(base_create_v267)"},{"line_number":361,"context_line":"base_create_v274[\u0027properties\u0027][\u0027server\u0027]["},{"line_number":362,"context_line":"    \u0027properties\u0027][\u0027host\u0027] \u003d parameter_types.hostname"},{"line_number":363,"context_line":"base_create_v274[\u0027properties\u0027][\u0027server\u0027]["},{"line_number":364,"context_line":"    \u0027properties\u0027][\u0027hypervisor_hostname\u0027] \u003d parameter_types.hostname"},{"line_number":365,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_b6160449","line":362,"range":{"start_line":362,"start_character":28,"end_line":362,"end_character":52},"updated":"2019-06-20 20:54:09.000000000","message":"This matches the os-services host parameter schema so I think this is OK:\n\nhttps://github.com/openstack/nova/blob/fae51fcb1bf991cd04a3772693025df4d0a37bcf/nova/api/openstack/compute/schemas/services.py#L20","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":361,"context_line":"base_create_v274[\u0027properties\u0027][\u0027server\u0027]["},{"line_number":362,"context_line":"    \u0027properties\u0027][\u0027host\u0027] \u003d parameter_types.hostname"},{"line_number":363,"context_line":"base_create_v274[\u0027properties\u0027][\u0027server\u0027]["},{"line_number":364,"context_line":"    \u0027properties\u0027][\u0027hypervisor_hostname\u0027] \u003d parameter_types.hostname"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"base_update \u003d {"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_3659b434","line":364,"range":{"start_line":364,"start_character":43,"end_line":364,"end_character":67},"updated":"2019-06-20 20:54:09.000000000","message":"And this matches the hypervisor_hostname schema for the os-hypervisors API so I think this is also OK:\n\nhttps://github.com/openstack/nova/blob/fae51fcb1bf991cd04a3772693025df4d0a37bcf/nova/api/openstack/compute/schemas/hypervisors.py#L38","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"}],"nova/api/openstack/compute/servers.py":[{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"592fccaee86e9fa22833fe31f6c05ef06cb7141d","unresolved":false,"context_lines":[{"line_number":657,"context_line":"                if host or node:"},{"line_number":658,"context_line":"                    msg \u003d _(\"Can not set both old way az:host:node and new \""},{"line_number":659,"context_line":"                            \"way host and hypervisor_hostname\")"},{"line_number":660,"context_line":"                    raise exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":661,"context_line":"            if requested_host:"},{"line_number":662,"context_line":"                create_kwargs[\u0027requested_host\u0027] \u003d requested_host"},{"line_number":663,"context_line":"            if requested_hypervisor_hostname:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fce034c_cd43be6b","line":660,"range":{"start_line":660,"start_character":30,"end_line":660,"end_character":42},"updated":"2019-04-18 12:24:07.000000000","message":"In the spec what\u0027s been written is HTTP 400 Bad Request, and I think that\u0027s more appropriate.","commit_id":"31b795544fd0ce59ac59df6668b6b50c15a8fdb7"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"28d2d4733bd7f16b751419b4b846d1c6aa9e650f","unresolved":false,"context_lines":[{"line_number":657,"context_line":"                if host or node:"},{"line_number":658,"context_line":"                    msg \u003d _(\"Can not set both old way az:host:node and new \""},{"line_number":659,"context_line":"                            \"way host and hypervisor_hostname\")"},{"line_number":660,"context_line":"                    raise exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":661,"context_line":"            if requested_host:"},{"line_number":662,"context_line":"                create_kwargs[\u0027requested_host\u0027] \u003d requested_host"},{"line_number":663,"context_line":"            if requested_hypervisor_hostname:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fce034c_ae618907","line":660,"range":{"start_line":660,"start_character":30,"end_line":660,"end_character":42},"in_reply_to":"3fce034c_cd43be6b","updated":"2019-04-18 15:38:37.000000000","message":"Done","commit_id":"31b795544fd0ce59ac59df6668b6b50c15a8fdb7"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"18a0f0c854226945c4606c8cf48fc786acddd20d","unresolved":false,"context_lines":[{"line_number":652,"context_line":"                server_dict.get(\u0027hypervisor_hostname\u0027)"},{"line_number":653,"context_line":"            if requested_host or requested_hypervisor_hostname:"},{"line_number":654,"context_line":"                context.can("},{"line_number":655,"context_line":"                    server_policies.SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":656,"context_line":"                    {})"},{"line_number":657,"context_line":"                if host or node:"},{"line_number":658,"context_line":"                    msg \u003d _(\"The new mechanism with host and/or\""}],"source_content_type":"text/x-python","patch_set":7,"id":"3fce034c_9d47084d","line":655,"range":{"start_line":655,"start_character":20,"end_line":655,"end_character":76},"updated":"2019-04-19 09:01:51.000000000","message":"I didn\u0027t go through the spec yet, so I don\u0027t know wheter this has been discussed, I will do it latter, but could we just use the old policy? I don\u0027t see why we should not use it?","commit_id":"3aea8b1abf244caa7956ceeb846d9a4010ab462c"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"9d452c00bc80bf87e8e4b72250046a3df840f87b","unresolved":false,"context_lines":[{"line_number":711,"context_line":"        except exception.ImageNotFound:"},{"line_number":712,"context_line":"            msg \u003d _(\"Can not find requested image\")"},{"line_number":713,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":714,"context_line":"        except exception.ComputeNodeNotFound:"},{"line_number":715,"context_line":"            msg \u003d _(\"Can not find compute node\")"},{"line_number":716,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":717,"context_line":"        except exception.KeypairNotFound:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fce034c_84aa616e","line":714,"range":{"start_line":714,"start_character":25,"end_line":714,"end_character":44},"updated":"2019-04-19 02:36:30.000000000","message":"This exception is not defined.","commit_id":"3aea8b1abf244caa7956ceeb846d9a4010ab462c"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"4ac404fbdf44efe1fa503751c900d7ee91ba0bc9","unresolved":false,"context_lines":[{"line_number":711,"context_line":"        except exception.ImageNotFound:"},{"line_number":712,"context_line":"            msg \u003d _(\"Can not find requested image\")"},{"line_number":713,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":714,"context_line":"        except exception.ComputeNodeNotFound:"},{"line_number":715,"context_line":"            msg \u003d _(\"Can not find compute node\")"},{"line_number":716,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":717,"context_line":"        except exception.KeypairNotFound:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fce034c_e9ed39b7","line":714,"range":{"start_line":714,"start_character":25,"end_line":714,"end_character":44},"in_reply_to":"3fce034c_84aa616e","updated":"2019-04-19 09:55:05.000000000","message":"Done","commit_id":"3aea8b1abf244caa7956ceeb846d9a4010ab462c"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"9cbd65c7b57f9df09b2b518f46466b114e66bfce","unresolved":false,"context_lines":[{"line_number":648,"context_line":""},{"line_number":649,"context_line":"        if api_version_request.is_supported(req, min_version\u003d\u00272.73\u0027):"},{"line_number":650,"context_line":"            requested_host \u003d server_dict.get(\u0027host\u0027)"},{"line_number":651,"context_line":"            requested_hypervisor_hostname \u003d \\"},{"line_number":652,"context_line":"                server_dict.get(\u0027hypervisor_hostname\u0027)"},{"line_number":653,"context_line":"            if requested_host or requested_hypervisor_hostname:"},{"line_number":654,"context_line":"                context.can("}],"source_content_type":"text/x-python","patch_set":9,"id":"1fcbff3d_cb49f532","line":651,"range":{"start_line":651,"start_character":44,"end_line":651,"end_character":45},"updated":"2019-04-20 04:37:29.000000000","message":"nit:#It is preferred to wrap long lines in parentheses and not a backslash for line continuation.\nlike:https://docs.openstack.org/hacking/latest/user/hacking.html#general","commit_id":"d3924749979612e6f32c346dd0d1b49cceca529f"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"eb1e39b04682b3b8c3b27889e1021ab93e96aee4","unresolved":false,"context_lines":[{"line_number":648,"context_line":""},{"line_number":649,"context_line":"        if api_version_request.is_supported(req, min_version\u003d\u00272.73\u0027):"},{"line_number":650,"context_line":"            requested_host \u003d server_dict.get(\u0027host\u0027)"},{"line_number":651,"context_line":"            requested_hypervisor_hostname \u003d \\"},{"line_number":652,"context_line":"                server_dict.get(\u0027hypervisor_hostname\u0027)"},{"line_number":653,"context_line":"            if requested_host or requested_hypervisor_hostname:"},{"line_number":654,"context_line":"                context.can("}],"source_content_type":"text/x-python","patch_set":9,"id":"ffb9cba7_c51b0971","line":651,"range":{"start_line":651,"start_character":44,"end_line":651,"end_character":45},"in_reply_to":"1fcbff3d_cb49f532","updated":"2019-04-22 02:22:56.000000000","message":"In fact, it is not a rule of pep8 or we check it in tox. But ok, I take in.","commit_id":"d3924749979612e6f32c346dd0d1b49cceca529f"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"9cbd65c7b57f9df09b2b518f46466b114e66bfce","unresolved":false,"context_lines":[{"line_number":662,"context_line":"            if requested_host:"},{"line_number":663,"context_line":"                create_kwargs[\u0027requested_host\u0027] \u003d requested_host"},{"line_number":664,"context_line":"            if requested_hypervisor_hostname:"},{"line_number":665,"context_line":"                create_kwargs[\u0027requested_hypervisor_hostname\u0027] \u003d \\"},{"line_number":666,"context_line":"                    requested_hypervisor_hostname"},{"line_number":667,"context_line":""},{"line_number":668,"context_line":"        # NOTE(danms): Don\u0027t require an answer from all cells here, as"}],"source_content_type":"text/x-python","patch_set":9,"id":"1fcbff3d_eb463122","line":665,"range":{"start_line":665,"start_character":65,"end_line":665,"end_character":66},"updated":"2019-04-20 04:37:29.000000000","message":"ditto","commit_id":"d3924749979612e6f32c346dd0d1b49cceca529f"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"eb1e39b04682b3b8c3b27889e1021ab93e96aee4","unresolved":false,"context_lines":[{"line_number":662,"context_line":"            if requested_host:"},{"line_number":663,"context_line":"                create_kwargs[\u0027requested_host\u0027] \u003d requested_host"},{"line_number":664,"context_line":"            if requested_hypervisor_hostname:"},{"line_number":665,"context_line":"                create_kwargs[\u0027requested_hypervisor_hostname\u0027] \u003d \\"},{"line_number":666,"context_line":"                    requested_hypervisor_hostname"},{"line_number":667,"context_line":""},{"line_number":668,"context_line":"        # NOTE(danms): Don\u0027t require an answer from all cells here, as"}],"source_content_type":"text/x-python","patch_set":9,"id":"ffb9cba7_e5188d76","line":665,"range":{"start_line":665,"start_character":65,"end_line":665,"end_character":66},"in_reply_to":"1fcbff3d_eb463122","updated":"2019-04-22 02:22:56.000000000","message":"Done","commit_id":"d3924749979612e6f32c346dd0d1b49cceca529f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1d785b8c283cfbf420e9af38c5f214b52bc1595b","unresolved":false,"context_lines":[{"line_number":664,"context_line":"                    server_policies.SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":665,"context_line":"                    {})"},{"line_number":666,"context_line":"                if host or node:"},{"line_number":667,"context_line":"                    msg \u003d _(\"The new mechanism with host and/or\""},{"line_number":668,"context_line":"                            \"hypervisor_hostname and the old mechanism\""},{"line_number":669,"context_line":"                            \"with az:host:node are mutually exclusive.\")"},{"line_number":670,"context_line":"                    raise exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_6937014f","line":667,"range":{"start_line":667,"start_character":62,"end_line":667,"end_character":64},"updated":"2019-05-13 18:52:38.000000000","message":"space","commit_id":"a8e895c35efbd5c5496060d99c062a474ce00a86"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"45215ccd665f35d6e31a394b18328817b6a19c1c","unresolved":false,"context_lines":[{"line_number":664,"context_line":"                    server_policies.SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":665,"context_line":"                    {})"},{"line_number":666,"context_line":"                if host or node:"},{"line_number":667,"context_line":"                    msg \u003d _(\"The new mechanism with host and/or\""},{"line_number":668,"context_line":"                            \"hypervisor_hostname and the old mechanism\""},{"line_number":669,"context_line":"                            \"with az:host:node are mutually exclusive.\")"},{"line_number":670,"context_line":"                    raise exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_c316014a","line":667,"range":{"start_line":667,"start_character":62,"end_line":667,"end_character":64},"in_reply_to":"dfbec78f_6937014f","updated":"2019-05-14 09:21:02.000000000","message":"Done","commit_id":"a8e895c35efbd5c5496060d99c062a474ce00a86"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1d785b8c283cfbf420e9af38c5f214b52bc1595b","unresolved":false,"context_lines":[{"line_number":665,"context_line":"                    {})"},{"line_number":666,"context_line":"                if host or node:"},{"line_number":667,"context_line":"                    msg \u003d _(\"The new mechanism with host and/or\""},{"line_number":668,"context_line":"                            \"hypervisor_hostname and the old mechanism\""},{"line_number":669,"context_line":"                            \"with az:host:node are mutually exclusive.\")"},{"line_number":670,"context_line":"                    raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":671,"context_line":"            if requested_host:"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_0940c5a4","line":668,"range":{"start_line":668,"start_character":69,"end_line":668,"end_character":71},"updated":"2019-05-13 18:52:38.000000000","message":"space","commit_id":"a8e895c35efbd5c5496060d99c062a474ce00a86"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"45215ccd665f35d6e31a394b18328817b6a19c1c","unresolved":false,"context_lines":[{"line_number":665,"context_line":"                    {})"},{"line_number":666,"context_line":"                if host or node:"},{"line_number":667,"context_line":"                    msg \u003d _(\"The new mechanism with host and/or\""},{"line_number":668,"context_line":"                            \"hypervisor_hostname and the old mechanism\""},{"line_number":669,"context_line":"                            \"with az:host:node are mutually exclusive.\")"},{"line_number":670,"context_line":"                    raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":671,"context_line":"            if requested_host:"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_63295588","line":668,"range":{"start_line":668,"start_character":69,"end_line":668,"end_character":71},"in_reply_to":"dfbec78f_0940c5a4","updated":"2019-05-14 09:21:02.000000000","message":"Done","commit_id":"a8e895c35efbd5c5496060d99c062a474ce00a86"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"bb34f396110781a02c4bf0b633de341200308431","unresolved":false,"context_lines":[{"line_number":654,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dsix.text_type(err))"},{"line_number":655,"context_line":"        if host or node:"},{"line_number":656,"context_line":"            context.can(server_policies.SERVERS % \u0027create:forced_host\u0027, {})"},{"line_number":657,"context_line":""},{"line_number":658,"context_line":"        if api_version_request.is_supported(req, min_version\u003d\u00272.74\u0027):"},{"line_number":659,"context_line":"            requested_host \u003d server_dict.get(\u0027host\u0027)"},{"line_number":660,"context_line":"            requested_hypervisor_hostname \u003d server_dict.get("},{"line_number":661,"context_line":"                \u0027hypervisor_hostname\u0027)"},{"line_number":662,"context_line":"            if requested_host or requested_hypervisor_hostname:"},{"line_number":663,"context_line":"                context.can("},{"line_number":664,"context_line":"                    server_policies.SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":665,"context_line":"                    {})"},{"line_number":666,"context_line":"                if host or node:"},{"line_number":667,"context_line":"                    msg \u003d _(\"The new mechanism with host and/or \""},{"line_number":668,"context_line":"                            \"hypervisor_hostname and the old mechanism \""},{"line_number":669,"context_line":"                            \"with az:host:node are mutually exclusive.\")"},{"line_number":670,"context_line":"                    raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":671,"context_line":"            if requested_host:"},{"line_number":672,"context_line":"                create_kwargs[\u0027requested_host\u0027] \u003d requested_host"},{"line_number":673,"context_line":"            if requested_hypervisor_hostname:"},{"line_number":674,"context_line":"                create_kwargs[\u0027requested_hypervisor_hostname\u0027] \u003d ("},{"line_number":675,"context_line":"                    requested_hypervisor_hostname)"},{"line_number":676,"context_line":""},{"line_number":677,"context_line":"        # NOTE(danms): Don\u0027t require an answer from all cells here, as"},{"line_number":678,"context_line":"        # we assume that if a cell isn\u0027t reporting we won\u0027t schedule into"}],"source_content_type":"text/x-python","patch_set":17,"id":"dfbec78f_c77b5a25","line":675,"range":{"start_line":657,"start_character":0,"end_line":675,"end_character":50},"updated":"2019-05-15 08:19:01.000000000","message":"missing unittest for those.","commit_id":"522c2064bb63ce499c540d28786f5e775a0ac85e"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"7daac8bba1d6fc3733bc3876b03405db6e955a70","unresolved":false,"context_lines":[{"line_number":654,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dsix.text_type(err))"},{"line_number":655,"context_line":"        if host or node:"},{"line_number":656,"context_line":"            context.can(server_policies.SERVERS % \u0027create:forced_host\u0027, {})"},{"line_number":657,"context_line":""},{"line_number":658,"context_line":"        if api_version_request.is_supported(req, min_version\u003d\u00272.74\u0027):"},{"line_number":659,"context_line":"            requested_host \u003d server_dict.get(\u0027host\u0027)"},{"line_number":660,"context_line":"            requested_hypervisor_hostname \u003d server_dict.get("},{"line_number":661,"context_line":"                \u0027hypervisor_hostname\u0027)"},{"line_number":662,"context_line":"            if requested_host or requested_hypervisor_hostname:"},{"line_number":663,"context_line":"                context.can("},{"line_number":664,"context_line":"                    server_policies.SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":665,"context_line":"                    {})"},{"line_number":666,"context_line":"                if host or node:"},{"line_number":667,"context_line":"                    msg \u003d _(\"The new mechanism with host and/or \""},{"line_number":668,"context_line":"                            \"hypervisor_hostname and the old mechanism \""},{"line_number":669,"context_line":"                            \"with az:host:node are mutually exclusive.\")"},{"line_number":670,"context_line":"                    raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":671,"context_line":"            if requested_host:"},{"line_number":672,"context_line":"                create_kwargs[\u0027requested_host\u0027] \u003d requested_host"},{"line_number":673,"context_line":"            if requested_hypervisor_hostname:"},{"line_number":674,"context_line":"                create_kwargs[\u0027requested_hypervisor_hostname\u0027] \u003d ("},{"line_number":675,"context_line":"                    requested_hypervisor_hostname)"},{"line_number":676,"context_line":""},{"line_number":677,"context_line":"        # NOTE(danms): Don\u0027t require an answer from all cells here, as"},{"line_number":678,"context_line":"        # we assume that if a cell isn\u0027t reporting we won\u0027t schedule into"}],"source_content_type":"text/x-python","patch_set":17,"id":"dfbec78f_c9859b08","line":675,"range":{"start_line":657,"start_character":0,"end_line":675,"end_character":50},"in_reply_to":"dfbec78f_c77b5a25","updated":"2019-05-20 06:42:22.000000000","message":"\u003e missing unittest for those.\n\nDone. Add unit test for it in tests/unit/api/openstack/compute/test_serversV21.py.","commit_id":"522c2064bb63ce499c540d28786f5e775a0ac85e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1d696731221dd9d5c7ff4545f9284ac29e07401a","unresolved":false,"context_lines":[{"line_number":654,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dsix.text_type(err))"},{"line_number":655,"context_line":"        if host or node:"},{"line_number":656,"context_line":"            context.can(server_policies.SERVERS % \u0027create:forced_host\u0027, {})"},{"line_number":657,"context_line":""},{"line_number":658,"context_line":"        if api_version_request.is_supported(req, min_version\u003d\u00272.74\u0027):"},{"line_number":659,"context_line":"            requested_host \u003d server_dict.get(\u0027host\u0027)"},{"line_number":660,"context_line":"            requested_hypervisor_hostname \u003d server_dict.get("},{"line_number":661,"context_line":"                \u0027hypervisor_hostname\u0027)"},{"line_number":662,"context_line":"            if requested_host or requested_hypervisor_hostname:"},{"line_number":663,"context_line":"                context.can("},{"line_number":664,"context_line":"                    server_policies.SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":665,"context_line":"                    {})"},{"line_number":666,"context_line":"                if host or node:"},{"line_number":667,"context_line":"                    msg \u003d _(\"The new mechanism with host and/or \""},{"line_number":668,"context_line":"                            \"hypervisor_hostname and the old mechanism \""},{"line_number":669,"context_line":"                            \"with az:host:node are mutually exclusive.\")"},{"line_number":670,"context_line":"                    raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":671,"context_line":"            if requested_host:"},{"line_number":672,"context_line":"                create_kwargs[\u0027requested_host\u0027] \u003d requested_host"},{"line_number":673,"context_line":"            if requested_hypervisor_hostname:"},{"line_number":674,"context_line":"                create_kwargs[\u0027requested_hypervisor_hostname\u0027] \u003d ("},{"line_number":675,"context_line":"                    requested_hypervisor_hostname)"},{"line_number":676,"context_line":""},{"line_number":677,"context_line":"        # NOTE(danms): Don\u0027t require an answer from all cells here, as"},{"line_number":678,"context_line":"        # we assume that if a cell isn\u0027t reporting we won\u0027t schedule into"}],"source_content_type":"text/x-python","patch_set":17,"id":"dfbec78f_e701a36b","line":675,"range":{"start_line":657,"start_character":0,"end_line":675,"end_character":50},"in_reply_to":"dfbec78f_c77b5a25","updated":"2019-05-16 13:49:35.000000000","message":"Do we have functional tests covering this stuff? I\u0027m generally OK with not duplicating unit tests if there are functional tests for the same coverage, and for API changes that usually means doing the happy path positive testing with functional tests and the negative scenario testing, like input validation, with unit tests. I definitely think we should have some functional tests for this change to make sure it behaves as we expect and goes through scheduling and all that. I\u0027m not sure if the API samples tests are that inclusive.","commit_id":"522c2064bb63ce499c540d28786f5e775a0ac85e"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"2b9d8b2f0c36ae5eabfd2492a1e4fbe09b137a02","unresolved":false,"context_lines":[{"line_number":574,"context_line":"    @validation.schema(schema_servers.base_create_v252, \u00272.52\u0027, \u00272.56\u0027)"},{"line_number":575,"context_line":"    @validation.schema(schema_servers.base_create_v257, \u00272.57\u0027, \u00272.62\u0027)"},{"line_number":576,"context_line":"    @validation.schema(schema_servers.base_create_v263, \u00272.63\u0027, \u00272.66\u0027)"},{"line_number":577,"context_line":"    @validation.schema(schema_servers.base_create_v267, \u00272.67\u0027, \u00272.72\u0027)"},{"line_number":578,"context_line":"    @validation.schema(schema_servers.base_create_v274, \u00272.74\u0027)"},{"line_number":579,"context_line":"    def create(self, req, body):"},{"line_number":580,"context_line":"        \"\"\"Creates a new server for a given user.\"\"\""}],"source_content_type":"text/x-python","patch_set":19,"id":"bfb3d3c7_049ee762","line":577,"range":{"start_line":577,"start_character":68,"end_line":577,"end_character":69},"updated":"2019-05-20 16:15:01.000000000","message":"3","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"1a188bc4c941f73eb0dd6fa9cce1587006570496","unresolved":false,"context_lines":[{"line_number":574,"context_line":"    @validation.schema(schema_servers.base_create_v252, \u00272.52\u0027, \u00272.56\u0027)"},{"line_number":575,"context_line":"    @validation.schema(schema_servers.base_create_v257, \u00272.57\u0027, \u00272.62\u0027)"},{"line_number":576,"context_line":"    @validation.schema(schema_servers.base_create_v263, \u00272.63\u0027, \u00272.66\u0027)"},{"line_number":577,"context_line":"    @validation.schema(schema_servers.base_create_v267, \u00272.67\u0027, \u00272.72\u0027)"},{"line_number":578,"context_line":"    @validation.schema(schema_servers.base_create_v274, \u00272.74\u0027)"},{"line_number":579,"context_line":"    def create(self, req, body):"},{"line_number":580,"context_line":"        \"\"\"Creates a new server for a given user.\"\"\""}],"source_content_type":"text/x-python","patch_set":19,"id":"bfb3d3c7_7d472a4d","line":577,"range":{"start_line":577,"start_character":68,"end_line":577,"end_character":69},"in_reply_to":"bfb3d3c7_049ee762","updated":"2019-05-21 07:32:00.000000000","message":"Done","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"2b9d8b2f0c36ae5eabfd2492a1e4fbe09b137a02","unresolved":false,"context_lines":[{"line_number":663,"context_line":"                context.can("},{"line_number":664,"context_line":"                    server_policies.SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":665,"context_line":"                    {})"},{"line_number":666,"context_line":"                if host or node:"},{"line_number":667,"context_line":"                    msg \u003d _(\"The new mechanism with host and/or \""},{"line_number":668,"context_line":"                            \"hypervisor_hostname and the old mechanism \""},{"line_number":669,"context_line":"                            \"with az:host:node are mutually exclusive.\")"}],"source_content_type":"text/x-python","patch_set":19,"id":"bfb3d3c7_bfa924e0","line":666,"updated":"2019-05-20 16:15:01.000000000","message":"so first the policy for create:forced_host will be checked and then this. cool.","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"2b9d8b2f0c36ae5eabfd2492a1e4fbe09b137a02","unresolved":false,"context_lines":[{"line_number":664,"context_line":"                    server_policies.SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":665,"context_line":"                    {})"},{"line_number":666,"context_line":"                if host or node:"},{"line_number":667,"context_line":"                    msg \u003d _(\"The new mechanism with host and/or \""},{"line_number":668,"context_line":"                            \"hypervisor_hostname and the old mechanism \""},{"line_number":669,"context_line":"                            \"with az:host:node are mutually exclusive.\")"},{"line_number":670,"context_line":"                    raise exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":19,"id":"bfb3d3c7_1fe63046","line":667,"range":{"start_line":667,"start_character":33,"end_line":667,"end_character":46},"updated":"2019-05-20 16:15:01.000000000","message":"I understand what you mean here by new and old mechanism, but I would have just preferred \"Specifying host and/or hypervisor_hostname and az:host:node are together is not allowed\" or something, because \"az:host:node\" is not an old mechanism in the sense it still exists right ?","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"1a188bc4c941f73eb0dd6fa9cce1587006570496","unresolved":false,"context_lines":[{"line_number":664,"context_line":"                    server_policies.SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":665,"context_line":"                    {})"},{"line_number":666,"context_line":"                if host or node:"},{"line_number":667,"context_line":"                    msg \u003d _(\"The new mechanism with host and/or \""},{"line_number":668,"context_line":"                            \"hypervisor_hostname and the old mechanism \""},{"line_number":669,"context_line":"                            \"with az:host:node are mutually exclusive.\")"},{"line_number":670,"context_line":"                    raise exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":19,"id":"bfb3d3c7_9d977e91","line":667,"range":{"start_line":667,"start_character":33,"end_line":667,"end_character":46},"in_reply_to":"bfb3d3c7_1fe63046","updated":"2019-05-21 07:32:00.000000000","message":"Done. Remove the \u0027new\u0027 and \u0027old\u0027 words which let us confusing.","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f23c1ba5cbf78d386cb63fd4b803c4311ee3d13b","unresolved":false,"context_lines":[{"line_number":721,"context_line":"            msg \u003d _(\"Can not find requested image\")"},{"line_number":722,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":723,"context_line":"        except exception.ComputeHostNotFound:"},{"line_number":724,"context_line":"            msg \u003d _(\"Can not find requested compute host\")"},{"line_number":725,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":726,"context_line":"        except exception.KeypairNotFound:"},{"line_number":727,"context_line":"            msg \u003d _(\"Invalid key_name provided.\")"}],"source_content_type":"text/x-python","patch_set":21,"id":"bfb3d3c7_7c7a2cba","line":724,"range":{"start_line":724,"start_character":44,"end_line":724,"end_character":57},"updated":"2019-05-30 13:54:16.000000000","message":"This is misleading, It could be that the requested host was found but the requested hypervisor_hostname was not found","commit_id":"0dee0d36de7267af9303aa004d0f2ab7cdd0a77f"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"5be109e23758eef368874a8f6e9ace4f62cb90bf","unresolved":false,"context_lines":[{"line_number":721,"context_line":"            msg \u003d _(\"Can not find requested image\")"},{"line_number":722,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":723,"context_line":"        except exception.ComputeHostNotFound:"},{"line_number":724,"context_line":"            msg \u003d _(\"Can not find requested compute host\")"},{"line_number":725,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":726,"context_line":"        except exception.KeypairNotFound:"},{"line_number":727,"context_line":"            msg \u003d _(\"Invalid key_name provided.\")"}],"source_content_type":"text/x-python","patch_set":21,"id":"bfb3d3c7_fc8b6abc","line":724,"range":{"start_line":724,"start_character":44,"end_line":724,"end_character":57},"in_reply_to":"bfb3d3c7_7c7a2cba","updated":"2019-05-31 03:40:45.000000000","message":"emmm...\ns/compute host/compute node/g\n??\nHere after we check host/node from db, if we do not find any compute_nodes, we raise this exception.","commit_id":"0dee0d36de7267af9303aa004d0f2ab7cdd0a77f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":654,"context_line":"        if host or node:"},{"line_number":655,"context_line":"            context.can(server_policies.SERVERS % \u0027create:forced_host\u0027, {})"},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"        if api_version_request.is_supported(req, min_version\u003d\u00272.74\u0027):"},{"line_number":658,"context_line":"            requested_host \u003d server_dict.get(\u0027host\u0027)"},{"line_number":659,"context_line":"            requested_hypervisor_hostname \u003d server_dict.get("},{"line_number":660,"context_line":"                \u0027hypervisor_hostname\u0027)"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_16a4b007","line":657,"updated":"2019-06-20 20:54:09.000000000","message":"This create() method is already big. Could we move this block into a private helper method like _process_bdms_for_create and _process_networks_for_create?","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":654,"context_line":"        if host or node:"},{"line_number":655,"context_line":"            context.can(server_policies.SERVERS % \u0027create:forced_host\u0027, {})"},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"        if api_version_request.is_supported(req, min_version\u003d\u00272.74\u0027):"},{"line_number":658,"context_line":"            requested_host \u003d server_dict.get(\u0027host\u0027)"},{"line_number":659,"context_line":"            requested_hypervisor_hostname \u003d server_dict.get("},{"line_number":660,"context_line":"                \u0027hypervisor_hostname\u0027)"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_f9546856","line":657,"in_reply_to":"9fb8cfa7_16a4b007","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":659,"context_line":"            requested_hypervisor_hostname \u003d server_dict.get("},{"line_number":660,"context_line":"                \u0027hypervisor_hostname\u0027)"},{"line_number":661,"context_line":"            if requested_host or requested_hypervisor_hostname:"},{"line_number":662,"context_line":"                context.can("},{"line_number":663,"context_line":"                    server_policies.SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":664,"context_line":"                    {})"},{"line_number":665,"context_line":"                if host or node:"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_b6f7e459","line":662,"updated":"2019-06-20 20:54:09.000000000","message":"I don\u0027t see a test where we validate that the policy check fails and raises a Forbidden 403 response error.","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":659,"context_line":"            requested_hypervisor_hostname \u003d server_dict.get("},{"line_number":660,"context_line":"                \u0027hypervisor_hostname\u0027)"},{"line_number":661,"context_line":"            if requested_host or requested_hypervisor_hostname:"},{"line_number":662,"context_line":"                context.can("},{"line_number":663,"context_line":"                    server_policies.SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":664,"context_line":"                    {})"},{"line_number":665,"context_line":"                if host or node:"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_af01c2b1","line":662,"in_reply_to":"9fb8cfa7_b6f7e459","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":659,"context_line":"            requested_hypervisor_hostname \u003d server_dict.get("},{"line_number":660,"context_line":"                \u0027hypervisor_hostname\u0027)"},{"line_number":661,"context_line":"            if requested_host or requested_hypervisor_hostname:"},{"line_number":662,"context_line":"                context.can("},{"line_number":663,"context_line":"                    server_policies.SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":664,"context_line":"                    {})"},{"line_number":665,"context_line":"                if host or node:"},{"line_number":666,"context_line":"                    msg \u003d _(\"One mechanism with host and/or \""},{"line_number":667,"context_line":"                            \"hypervisor_hostname and another mechanism \""}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_d6adb8ea","line":664,"range":{"start_line":662,"start_character":16,"end_line":664,"end_character":23},"updated":"2019-06-20 20:54:09.000000000","message":"Since you\u0027re not passing fatal\u003dFalse this will raise Forbidden if the user fails the policy check. It might be good to leave a simple comment reminding that this will raise Forbidden if the policy check fails.","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":659,"context_line":"            requested_hypervisor_hostname \u003d server_dict.get("},{"line_number":660,"context_line":"                \u0027hypervisor_hostname\u0027)"},{"line_number":661,"context_line":"            if requested_host or requested_hypervisor_hostname:"},{"line_number":662,"context_line":"                context.can("},{"line_number":663,"context_line":"                    server_policies.SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":664,"context_line":"                    {})"},{"line_number":665,"context_line":"                if host or node:"},{"line_number":666,"context_line":"                    msg \u003d _(\"One mechanism with host and/or \""},{"line_number":667,"context_line":"                            \"hypervisor_hostname and another mechanism \""}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_b9e350a4","line":664,"range":{"start_line":662,"start_character":16,"end_line":664,"end_character":23},"in_reply_to":"9fb8cfa7_d6adb8ea","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":665,"context_line":"                if host or node:"},{"line_number":666,"context_line":"                    msg \u003d _(\"One mechanism with host and/or \""},{"line_number":667,"context_line":"                            \"hypervisor_hostname and another mechanism \""},{"line_number":668,"context_line":"                            \"with az:host:node are mutually exclusive.\")"},{"line_number":669,"context_line":"                    raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":670,"context_line":"            if requested_host:"},{"line_number":671,"context_line":"                create_kwargs[\u0027requested_host\u0027] \u003d requested_host"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_56830857","line":668,"range":{"start_line":668,"start_character":34,"end_line":668,"end_character":36},"updated":"2019-06-20 20:54:09.000000000","message":"zone","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":665,"context_line":"                if host or node:"},{"line_number":666,"context_line":"                    msg \u003d _(\"One mechanism with host and/or \""},{"line_number":667,"context_line":"                            \"hypervisor_hostname and another mechanism \""},{"line_number":668,"context_line":"                            \"with az:host:node are mutually exclusive.\")"},{"line_number":669,"context_line":"                    raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":670,"context_line":"            if requested_host:"},{"line_number":671,"context_line":"                create_kwargs[\u0027requested_host\u0027] \u003d requested_host"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_79ef1887","line":668,"range":{"start_line":668,"start_character":34,"end_line":668,"end_character":36},"in_reply_to":"9fb8cfa7_56830857","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":667,"context_line":"                            \"hypervisor_hostname and another mechanism \""},{"line_number":668,"context_line":"                            \"with az:host:node are mutually exclusive.\")"},{"line_number":669,"context_line":"                    raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":670,"context_line":"            if requested_host:"},{"line_number":671,"context_line":"                create_kwargs[\u0027requested_host\u0027] \u003d requested_host"},{"line_number":672,"context_line":"            if requested_hypervisor_hostname:"},{"line_number":673,"context_line":"                create_kwargs[\u0027requested_hypervisor_hostname\u0027] \u003d ("},{"line_number":674,"context_line":"                    requested_hypervisor_hostname)"},{"line_number":675,"context_line":""},{"line_number":676,"context_line":"        # NOTE(danms): Don\u0027t require an answer from all cells here, as"},{"line_number":677,"context_line":"        # we assume that if a cell isn\u0027t reporting we won\u0027t schedule into"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_76d40c48","line":674,"range":{"start_line":670,"start_character":12,"end_line":674,"end_character":50},"updated":"2019-06-20 20:54:09.000000000","message":"We could probably use:\n\nhelpers.translate_attributes(helpers.CREATE,\n                             server_dict, create_kwargs)\n\nhere but we don\u0027t have to. We could also drop the if conditions since if the user didn\u0027t specify these parameters they\u0027ll default to None (because of the .get() above) and pass None to the API code and the kwargs default to None anyway.\n\nThese are just nits. You can address them if you feel like it makes things cleaner.","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":667,"context_line":"                            \"hypervisor_hostname and another mechanism \""},{"line_number":668,"context_line":"                            \"with az:host:node are mutually exclusive.\")"},{"line_number":669,"context_line":"                    raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":670,"context_line":"            if requested_host:"},{"line_number":671,"context_line":"                create_kwargs[\u0027requested_host\u0027] \u003d requested_host"},{"line_number":672,"context_line":"            if requested_hypervisor_hostname:"},{"line_number":673,"context_line":"                create_kwargs[\u0027requested_hypervisor_hostname\u0027] \u003d ("},{"line_number":674,"context_line":"                    requested_hypervisor_hostname)"},{"line_number":675,"context_line":""},{"line_number":676,"context_line":"        # NOTE(danms): Don\u0027t require an answer from all cells here, as"},{"line_number":677,"context_line":"        # we assume that if a cell isn\u0027t reporting we won\u0027t schedule into"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_99f20c6f","line":674,"range":{"start_line":670,"start_character":12,"end_line":674,"end_character":50},"in_reply_to":"9fb8cfa7_76d40c48","updated":"2019-06-25 10:11:48.000000000","message":"Done.\nYeah, I drop the if conditions here. :)","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":721,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":722,"context_line":"        except exception.ComputeHostNotFound:"},{"line_number":723,"context_line":"            msg \u003d _(\"Can not find requested compute host\")"},{"line_number":724,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":725,"context_line":"        except exception.KeypairNotFound:"},{"line_number":726,"context_line":"            msg \u003d _(\"Invalid key_name provided.\")"},{"line_number":727,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_3643f415","line":724,"range":{"start_line":724,"start_character":37,"end_line":724,"end_character":52},"updated":"2019-06-20 20:54:09.000000000","message":"Why not just use explanation\u003derror.format_message() here?","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":721,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":722,"context_line":"        except exception.ComputeHostNotFound:"},{"line_number":723,"context_line":"            msg \u003d _(\"Can not find requested compute host\")"},{"line_number":724,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":725,"context_line":"        except exception.KeypairNotFound:"},{"line_number":726,"context_line":"            msg \u003d _(\"Invalid key_name provided.\")"},{"line_number":727,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_eb59edfd","line":724,"range":{"start_line":724,"start_character":37,"end_line":724,"end_character":52},"in_reply_to":"9fb8cfa7_3643f415","updated":"2019-06-25 10:11:48.000000000","message":"Done.\nRemove it here and add it below.","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6748a83fec4837283b233037c94f750274600754","unresolved":false,"context_lines":[{"line_number":580,"context_line":"        if requested_host or requested_hypervisor_hostname:"},{"line_number":581,"context_line":"            # If the policy check fails, this will raise Forbidden exception."},{"line_number":582,"context_line":"            context.can("},{"line_number":583,"context_line":"                server_policies.SERVERS % \u0027create:requested_destination\u0027, {})"},{"line_number":584,"context_line":"            if host or node:"},{"line_number":585,"context_line":"                msg \u003d _(\"One mechanism with host and/or \""},{"line_number":586,"context_line":"                        \"hypervisor_hostname and another mechanism \""}],"source_content_type":"text/x-python","patch_set":30,"id":"7faddb67_3f91b79a","line":583,"range":{"start_line":583,"start_character":74,"end_line":583,"end_character":76},"updated":"2019-07-05 19:53:43.000000000","message":"Should probably pass a target like the methods above.","commit_id":"592262e8cc75a698747b5bdafe1cfa0c8690cacd"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6748a83fec4837283b233037c94f750274600754","unresolved":false,"context_lines":[{"line_number":684,"context_line":"            context.can(server_policies.SERVERS % \u0027create:forced_host\u0027, {})"},{"line_number":685,"context_line":""},{"line_number":686,"context_line":"        if api_version_request.is_supported(req, min_version\u003d\u00272.74\u0027):"},{"line_number":687,"context_line":"            self._process_hosts_for_create(context, server_dict,"},{"line_number":688,"context_line":"                                           create_kwargs, host, node)"},{"line_number":689,"context_line":""},{"line_number":690,"context_line":"        # NOTE(danms): Don\u0027t require an answer from all cells here, as"}],"source_content_type":"text/x-python","patch_set":30,"id":"7faddb67_ffe8ff16","line":687,"range":{"start_line":687,"start_character":17,"end_line":687,"end_character":42},"updated":"2019-07-05 19:53:43.000000000","message":"Pass the target variable to this method as well for the context.can call.","commit_id":"592262e8cc75a698747b5bdafe1cfa0c8690cacd"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"f35443b9b969e0a7826161cf436ab571e198b193","unresolved":false,"context_lines":[{"line_number":582,"context_line":"            # If the policy check fails, this will raise Forbidden exception."},{"line_number":583,"context_line":"            context.can("},{"line_number":584,"context_line":"                server_policies.SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":585,"context_line":"                target\u003dtarget)"},{"line_number":586,"context_line":"            if host or node:"},{"line_number":587,"context_line":"                msg \u003d _(\"One mechanism with host and/or \""},{"line_number":588,"context_line":"                        \"hypervisor_hostname and another mechanism \""}],"source_content_type":"text/x-python","patch_set":33,"id":"7faddb67_e26da698","line":585,"range":{"start_line":585,"start_character":16,"end_line":585,"end_character":29},"updated":"2019-07-09 02:56:09.000000000","message":"let\u0027s pass {} here as check_str which is admin_api does not need anything from target to evaluate. \n\nWith new policy improvement work[1], we are going to remove the default target which is nothing but context.project_id/user_id itself and replace them with an actual target like instance.project_id or {} etc.\n\n[1] https://specs.openstack.org/openstack/nova-specs/specs/train/approved/policy-default-refresh.html#proposed-change","commit_id":"2445ab285d6def04fc0d57ead668da0ef8ea3236"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"720e523dd6247a2d7f02dda609dcec163f7aa0e9","unresolved":false,"context_lines":[{"line_number":582,"context_line":"            # If the policy check fails, this will raise Forbidden exception."},{"line_number":583,"context_line":"            context.can("},{"line_number":584,"context_line":"                server_policies.SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":585,"context_line":"                target\u003dtarget)"},{"line_number":586,"context_line":"            if host or node:"},{"line_number":587,"context_line":"                msg \u003d _(\"One mechanism with host and/or \""},{"line_number":588,"context_line":"                        \"hypervisor_hostname and another mechanism \""}],"source_content_type":"text/x-python","patch_set":33,"id":"7faddb67_e92ee6f8","line":585,"range":{"start_line":585,"start_character":16,"end_line":585,"end_character":29},"in_reply_to":"7faddb67_69467624","updated":"2019-07-09 13:38:41.000000000","message":"yeah, +1 on not to respin for this especially.","commit_id":"2445ab285d6def04fc0d57ead668da0ef8ea3236"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e23b724685e21775c1508ace52d26ee1a58fe0c5","unresolved":false,"context_lines":[{"line_number":582,"context_line":"            # If the policy check fails, this will raise Forbidden exception."},{"line_number":583,"context_line":"            context.can("},{"line_number":584,"context_line":"                server_policies.SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":585,"context_line":"                target\u003dtarget)"},{"line_number":586,"context_line":"            if host or node:"},{"line_number":587,"context_line":"                msg \u003d _(\"One mechanism with host and/or \""},{"line_number":588,"context_line":"                        \"hypervisor_hostname and another mechanism \""}],"source_content_type":"text/x-python","patch_set":33,"id":"7faddb67_69467624","line":585,"range":{"start_line":585,"start_character":16,"end_line":585,"end_character":29},"in_reply_to":"7faddb67_e26da698","updated":"2019-07-09 13:28:51.000000000","message":"I asked him specifically to pass the target through here like in the _process_networks_for_create and _process_bdms_for_create methods above. I\u0027d rather not respin this just for this change, especially if those other methods are going to have to be changed for the same reason later.","commit_id":"2445ab285d6def04fc0d57ead668da0ef8ea3236"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"323b65934c5cea1ba36b8982bf76b268b89d5e54","unresolved":false,"context_lines":[{"line_number":581,"context_line":"        if requested_host or requested_hypervisor_hostname:"},{"line_number":582,"context_line":"            # If the policy check fails, this will raise Forbidden exception."},{"line_number":583,"context_line":"            context.can("},{"line_number":584,"context_line":"                server_policies.SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":585,"context_line":"                target\u003dtarget)"},{"line_number":586,"context_line":"            if host or node:"},{"line_number":587,"context_line":"                msg \u003d _(\"One mechanism with host and/or \""}],"source_content_type":"text/x-python","patch_set":34,"id":"7faddb67_bf8fc021","line":584,"updated":"2019-07-09 14:44:38.000000000","message":"This is wrong.","commit_id":"8fa4d95d4393cdee23f01ca15349c2152da2dc13"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"4761efd7e752ea3a2bf7c18d1b38cfdf1a0cc4a8","unresolved":false,"context_lines":[{"line_number":581,"context_line":"        if requested_host or requested_hypervisor_hostname:"},{"line_number":582,"context_line":"            # If the policy check fails, this will raise Forbidden exception."},{"line_number":583,"context_line":"            context.can("},{"line_number":584,"context_line":"                server_policies.SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":585,"context_line":"                target\u003dtarget)"},{"line_number":586,"context_line":"            if host or node:"},{"line_number":587,"context_line":"                msg \u003d _(\"One mechanism with host and/or \""}],"source_content_type":"text/x-python","patch_set":34,"id":"7faddb67_3f3f5026","line":584,"in_reply_to":"7faddb67_bf8fc021","updated":"2019-07-09 14:58:07.000000000","message":"Done","commit_id":"8fa4d95d4393cdee23f01ca15349c2152da2dc13"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"02cbd336453e14b6542b30281f53f80b4fe3cb55","unresolved":false,"context_lines":[{"line_number":584,"context_line":"            if host or node:"},{"line_number":585,"context_line":"                msg \u003d _(\"One mechanism with host and/or \""},{"line_number":586,"context_line":"                        \"hypervisor_hostname and another mechanism \""},{"line_number":587,"context_line":"                        \"with zone:host:node are mutually exclusive.\")"},{"line_number":588,"context_line":"                raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":589,"context_line":"        create_kwargs[\u0027requested_host\u0027] \u003d requested_host"},{"line_number":590,"context_line":"        create_kwargs[\u0027requested_hypervisor_hostname\u0027] \u003d ("}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_5daf8ae2","line":587,"updated":"2019-07-11 15:25:34.000000000","message":"++","commit_id":"564290ab145d2710d3e82b5c4871e647e4d516c4"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"17cbdd6f46ee9db2ed5f1027116b84c73d671da9","unresolved":false,"context_lines":[{"line_number":582,"context_line":"            # If the policy check fails, this will raise Forbidden exception."},{"line_number":583,"context_line":"            context.can(server_policies.REQUESTED_DESTINATION, target\u003dtarget)"},{"line_number":584,"context_line":"            if host or node:"},{"line_number":585,"context_line":"                msg \u003d _(\"One mechanism with host and/or \""},{"line_number":586,"context_line":"                        \"hypervisor_hostname and another mechanism \""},{"line_number":587,"context_line":"                        \"with zone:host:node are mutually exclusive.\")"},{"line_number":588,"context_line":"                raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":589,"context_line":"        create_kwargs[\u0027requested_host\u0027] \u003d requested_host"},{"line_number":590,"context_line":"        create_kwargs[\u0027requested_hypervisor_hostname\u0027] \u003d ("}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_7daa86d2","line":587,"range":{"start_line":585,"start_character":0,"end_line":587,"end_character":70},"updated":"2019-07-11 15:21:07.000000000","message":"This reads rather oddly but I can\u0027t actually think of a better wording at the moment. TBD.","commit_id":"564290ab145d2710d3e82b5c4871e647e4d516c4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"736aaf7f8cded74f690d8d4cee3df9982ff7f234","unresolved":false,"context_lines":[{"line_number":582,"context_line":"            # If the policy check fails, this will raise Forbidden exception."},{"line_number":583,"context_line":"            context.can(server_policies.REQUESTED_DESTINATION, target\u003dtarget)"},{"line_number":584,"context_line":"            if host or node:"},{"line_number":585,"context_line":"                msg \u003d _(\"One mechanism with host and/or \""},{"line_number":586,"context_line":"                        \"hypervisor_hostname and another mechanism \""},{"line_number":587,"context_line":"                        \"with zone:host:node are mutually exclusive.\")"},{"line_number":588,"context_line":"                raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":589,"context_line":"        create_kwargs[\u0027requested_host\u0027] \u003d requested_host"},{"line_number":590,"context_line":"        create_kwargs[\u0027requested_hypervisor_hostname\u0027] \u003d ("}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_7dcb6671","line":587,"range":{"start_line":585,"start_character":0,"end_line":587,"end_character":70},"in_reply_to":"7faddb67_7daa86d2","updated":"2019-07-11 15:25:19.000000000","message":"if host:\n   msg \u003d _(\"Specifying host and availability_zone with \"\n           \"zone:host format is mutually exclusive.\")\n   raise ...\nelif node:\n   msg \u003d _(\"Specifying hypervisor_hostname and \"\n           \"availability_zone with zone:*:node format is \"\n           \"mutually exclusive.\")\n   raise ...","commit_id":"564290ab145d2710d3e82b5c4871e647e4d516c4"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"02cbd336453e14b6542b30281f53f80b4fe3cb55","unresolved":false,"context_lines":[{"line_number":681,"context_line":"        except exception.InvalidInput as err:"},{"line_number":682,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dsix.text_type(err))"},{"line_number":683,"context_line":"        if host or node:"},{"line_number":684,"context_line":"            context.can(server_policies.SERVERS % \u0027create:forced_host\u0027, {})"},{"line_number":685,"context_line":""},{"line_number":686,"context_line":"        if api_version_request.is_supported(req, min_version\u003d\u00272.74\u0027):"},{"line_number":687,"context_line":"            self._process_hosts_for_create(context, target, server_dict,"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_9d7e6269","line":684,"updated":"2019-07-11 15:25:34.000000000","message":"FWIW, I\u0027d recommend to stop supporting this by the next release with a new microversion","commit_id":"564290ab145d2710d3e82b5c4871e647e4d516c4"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"17cbdd6f46ee9db2ed5f1027116b84c73d671da9","unresolved":false,"context_lines":[{"line_number":672,"context_line":"            context.can(server_policies.SERVERS % \u0027create:trusted_certs\u0027,"},{"line_number":673,"context_line":"                        target\u003dtarget)"},{"line_number":674,"context_line":""},{"line_number":675,"context_line":"        # TODO(Shao He, Feng) move this policy check to os-availability-zone"},{"line_number":676,"context_line":"        # extension after refactor it."},{"line_number":677,"context_line":"        parse_az \u003d self.compute_api.parse_availability_zone"},{"line_number":678,"context_line":"        try:"},{"line_number":679,"context_line":"            availability_zone, host, node \u003d parse_az(context,"},{"line_number":680,"context_line":"                                                     availability_zone)"},{"line_number":681,"context_line":"        except exception.InvalidInput as err:"},{"line_number":682,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dsix.text_type(err))"},{"line_number":683,"context_line":"        if host or node:"},{"line_number":684,"context_line":"            context.can(server_policies.SERVERS % \u0027create:forced_host\u0027, {})"},{"line_number":685,"context_line":""},{"line_number":686,"context_line":"        if api_version_request.is_supported(req, min_version\u003d\u00272.74\u0027):"},{"line_number":687,"context_line":"            self._process_hosts_for_create(context, target, server_dict,"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_fd875660","line":684,"range":{"start_line":675,"start_character":0,"end_line":684,"end_character":75},"updated":"2019-07-11 15:21:07.000000000","message":"I probably would have moved this out to the same function so they could all exist in the same place","commit_id":"564290ab145d2710d3e82b5c4871e647e4d516c4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d01e2e50283b5a7347f2962750ec4191525d1e4f","unresolved":false,"context_lines":[{"line_number":681,"context_line":"        except exception.InvalidInput as err:"},{"line_number":682,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dsix.text_type(err))"},{"line_number":683,"context_line":"        if host or node:"},{"line_number":684,"context_line":"            context.can(server_policies.SERVERS % \u0027create:forced_host\u0027, {})"},{"line_number":685,"context_line":""},{"line_number":686,"context_line":"        if api_version_request.is_supported(req, min_version\u003d\u00272.74\u0027):"},{"line_number":687,"context_line":"            self._process_hosts_for_create(context, target, server_dict,"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_60f979c6","line":684,"in_reply_to":"7faddb67_9d7e6269","updated":"2019-07-11 16:03:59.000000000","message":"There was discussion in the spec about deprecating the usage of this in *this* microversion since an alternative is available but we didn\u0027t go that route for whatever reason, so IDK how much I (personally) care about deprecating it later.","commit_id":"564290ab145d2710d3e82b5c4871e647e4d516c4"}],"nova/compute/api.py":[{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"592fccaee86e9fa22833fe31f6c05ef06cb7141d","unresolved":false,"context_lines":[{"line_number":941,"context_line":"                context, requested_host, requested_hypervisor_hostname)"},{"line_number":942,"context_line":"        elif requested_host:"},{"line_number":943,"context_line":"            compute_node \u003d objects.ComputeNode.\\"},{"line_number":944,"context_line":"                get_first_node_by_host_for_old_compat(context, requested_host)"},{"line_number":945,"context_line":"        elif requested_hypervisor_hostname:"},{"line_number":946,"context_line":"            compute_node \u003d objects.ComputeNode. \\"},{"line_number":947,"context_line":"                get_by_nodename(context, requested_hypervisor_hostname)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fce034c_c8dacc49","line":944,"range":{"start_line":944,"start_character":16,"end_line":944,"end_character":53},"updated":"2019-04-18 12:24:07.000000000","message":"Looks like this gets the first node anyway, which should not happen in ironic case?\n\nIf an ironic host \"host1\" has 100 nodes \"node1, node2, node3, ... node100\" and a user specifies the \"host1\" and no node, we have to...\n\n\n1. give up choosing a node returning 400 \"multiple nodes are found please specify the exact node to which you want to deploy\"\n2. let all the nodes go through the scheduler and let scheduler picks one node.\n\n\n*I* would take option 2 to make compatible with the existing forced_host behavior setting only destination.host and None to the destination.node here and filters the host later in get_filtered_hosts().\n\n\nWhat you do here is,\n\n3. just pick up one of the 100 nodes and ask scheduler if it satisfies the requested resource disregarding the rest 99 nodes.  -  I\u0027m -1 to this option. :(","commit_id":"31b795544fd0ce59ac59df6668b6b50c15a8fdb7"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"28d2d4733bd7f16b751419b4b846d1c6aa9e650f","unresolved":false,"context_lines":[{"line_number":941,"context_line":"                context, requested_host, requested_hypervisor_hostname)"},{"line_number":942,"context_line":"        elif requested_host:"},{"line_number":943,"context_line":"            compute_node \u003d objects.ComputeNode.\\"},{"line_number":944,"context_line":"                get_first_node_by_host_for_old_compat(context, requested_host)"},{"line_number":945,"context_line":"        elif requested_hypervisor_hostname:"},{"line_number":946,"context_line":"            compute_node \u003d objects.ComputeNode. \\"},{"line_number":947,"context_line":"                get_by_nodename(context, requested_hypervisor_hostname)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fce034c_d787c4b4","line":944,"range":{"start_line":944,"start_character":16,"end_line":944,"end_character":53},"in_reply_to":"3fce034c_c8dacc49","updated":"2019-04-18 15:38:37.000000000","message":"\u003e Looks like this gets the first node anyway, which should not happen\n \u003e in ironic case?\n \u003e \n \u003e If an ironic host \"host1\" has 100 nodes \"node1, node2, node3, ...\n \u003e node100\" and a user specifies the \"host1\" and no node, we have\n \u003e to...\n \u003e \n \u003e \n \u003e 1. give up choosing a node returning 400 \"multiple nodes are found\n \u003e please specify the exact node to which you want to deploy\"\n\nMaybe it can be considered as an alternative option.\n\n \u003e 2. let all the nodes go through the scheduler and let scheduler\n \u003e picks one node.\n \u003e \n \u003e \n \u003e *I* would take option 2 to make compatible with the existing\n \u003e forced_host behavior setting only destination.host and None to the\n \u003e destination.node here and filters the host later in\n \u003e get_filtered_hosts().\n \u003e \n\nYeah. of course. Change the _get_hosts_matching_request function of get_filtered_hosts in host_manager.py.\n            if node:\n                requested_nodes \u003d [x for x in hosts\n                                   if x.host \u003d\u003d host and x.nodename \u003d\u003d node]\n            else:\n                requested_nodes \u003d [x for x in hosts\n                                   if x.host \u003d\u003d host]\n\n \u003e \n \u003e What you do here is,\n \u003e \n \u003e 3. just pick up one of the 100 nodes and ask scheduler if it\n \u003e satisfies the requested resource disregarding the rest 99 nodes.  -\n \u003e  I\u0027m -1 to this option. :(\n\nAfter I think about the ironic deployments again, here to get the first node with many compute nodes is an ugly way. If we only have nova-compte-ironic server on a host first, then we create 3 ironic nodes. Later, we start the nova-compute service. So in fact, we will get 3 ironic compute nodes at first then nova compute node.","commit_id":"31b795544fd0ce59ac59df6668b6b50c15a8fdb7"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"592fccaee86e9fa22833fe31f6c05ef06cb7141d","unresolved":false,"context_lines":[{"line_number":987,"context_line":"                req_spec.num_instances \u003d num_instances"},{"line_number":988,"context_line":"                req_spec.create()"},{"line_number":989,"context_line":""},{"line_number":990,"context_line":"                # NOTE(stephenfin): The network_metadata field is not persisted"},{"line_number":991,"context_line":"                # and is therefore set after \u0027create\u0027 is called."},{"line_number":992,"context_line":"                if network_metadata:"},{"line_number":993,"context_line":"                    req_spec.network_metadata \u003d network_metadata"},{"line_number":994,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3fce034c_48bd7c00","line":991,"range":{"start_line":990,"start_character":16,"end_line":991,"end_character":64},"updated":"2019-04-18 12:24:07.000000000","message":"See this comment. I guess the requested_destination doesn\u0027t persist even if it is set before create() is called, but yeah, I feel better if it is called after create() is called?","commit_id":"31b795544fd0ce59ac59df6668b6b50c15a8fdb7"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"28d2d4733bd7f16b751419b4b846d1c6aa9e650f","unresolved":false,"context_lines":[{"line_number":987,"context_line":"                req_spec.num_instances \u003d num_instances"},{"line_number":988,"context_line":"                req_spec.create()"},{"line_number":989,"context_line":""},{"line_number":990,"context_line":"                # NOTE(stephenfin): The network_metadata field is not persisted"},{"line_number":991,"context_line":"                # and is therefore set after \u0027create\u0027 is called."},{"line_number":992,"context_line":"                if network_metadata:"},{"line_number":993,"context_line":"                    req_spec.network_metadata \u003d network_metadata"},{"line_number":994,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3fce034c_312df8fd","line":991,"range":{"start_line":990,"start_character":16,"end_line":991,"end_character":64},"in_reply_to":"3fce034c_48bd7c00","updated":"2019-04-18 15:38:37.000000000","message":"Done.\nGreat. Yeah, as discussed in the spec, we will not persist the requested_destination. thanks :)","commit_id":"31b795544fd0ce59ac59df6668b6b50c15a8fdb7"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"9cbd65c7b57f9df09b2b518f46466b114e66bfce","unresolved":false,"context_lines":[{"line_number":935,"context_line":"            network_metadata\u003dNone, requested_host\u003dNone,"},{"line_number":936,"context_line":"            requested_hypervisor_hostname\u003dNone):"},{"line_number":937,"context_line":"        # Check requested_host and requested_hypervisor_hostname"},{"line_number":938,"context_line":"        compute_nodes \u003d []"},{"line_number":939,"context_line":"        if requested_host and requested_hypervisor_hostname:"},{"line_number":940,"context_line":"            compute_nodes \u003d [objects.ComputeNode.get_by_host_and_nodename("},{"line_number":941,"context_line":"                context, requested_host, requested_hypervisor_hostname)]"}],"source_content_type":"text/x-python","patch_set":9,"id":"1fcbff3d_6bbc81bb","line":938,"range":{"start_line":938,"start_character":8,"end_line":938,"end_character":21},"updated":"2019-04-20 04:37:29.000000000","message":"I think this parameter can be removed, this logical just only to judge the \u0027requested_host\u0027 and/or \u0027requested_hypervisor_hostname\u0027 are/is legal.","commit_id":"d3924749979612e6f32c346dd0d1b49cceca529f"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"eb1e39b04682b3b8c3b27889e1021ab93e96aee4","unresolved":false,"context_lines":[{"line_number":935,"context_line":"            network_metadata\u003dNone, requested_host\u003dNone,"},{"line_number":936,"context_line":"            requested_hypervisor_hostname\u003dNone):"},{"line_number":937,"context_line":"        # Check requested_host and requested_hypervisor_hostname"},{"line_number":938,"context_line":"        compute_nodes \u003d []"},{"line_number":939,"context_line":"        if requested_host and requested_hypervisor_hostname:"},{"line_number":940,"context_line":"            compute_nodes \u003d [objects.ComputeNode.get_by_host_and_nodename("},{"line_number":941,"context_line":"                context, requested_host, requested_hypervisor_hostname)]"}],"source_content_type":"text/x-python","patch_set":9,"id":"ffb9cba7_e5316dee","line":938,"range":{"start_line":938,"start_character":8,"end_line":938,"end_character":21},"in_reply_to":"1fcbff3d_6bbc81bb","updated":"2019-04-22 02:22:56.000000000","message":"Remove the variable compute_nodes.","commit_id":"d3924749979612e6f32c346dd0d1b49cceca529f"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"eb1e39b04682b3b8c3b27889e1021ab93e96aee4","unresolved":false,"context_lines":[{"line_number":936,"context_line":"            requested_hypervisor_hostname\u003dNone):"},{"line_number":937,"context_line":"        # Check requested_host and requested_hypervisor_hostname"},{"line_number":938,"context_line":"        compute_nodes \u003d []"},{"line_number":939,"context_line":"        if requested_host and requested_hypervisor_hostname:"},{"line_number":940,"context_line":"            compute_nodes \u003d [objects.ComputeNode.get_by_host_and_nodename("},{"line_number":941,"context_line":"                context, requested_host, requested_hypervisor_hostname)]"},{"line_number":942,"context_line":"        elif requested_host:"},{"line_number":943,"context_line":"            compute_nodes \u003d objects.ComputeNodeList.get_all_by_host("},{"line_number":944,"context_line":"                context, requested_host)"},{"line_number":945,"context_line":"        elif requested_hypervisor_hostname:"},{"line_number":946,"context_line":"            compute_nodes \u003d [objects.ComputeNode.get_by_nodename("},{"line_number":947,"context_line":"                context, requested_hypervisor_hostname)]"},{"line_number":948,"context_line":"        # Check quotas"},{"line_number":949,"context_line":"        num_instances \u003d compute_utils.check_num_instances_quota("},{"line_number":950,"context_line":"                context, instance_type, min_count, max_count)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ffb9cba7_854c3177","line":947,"range":{"start_line":939,"start_character":8,"end_line":947,"end_character":56},"updated":"2019-04-22 02:22:56.000000000","message":"Here we do not need the return value. Just check whether we can get the compute node with supplied requested_host and/or requested_hypervisor_hostname.","commit_id":"d3924749979612e6f32c346dd0d1b49cceca529f"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"9cbd65c7b57f9df09b2b518f46466b114e66bfce","unresolved":false,"context_lines":[{"line_number":989,"context_line":""},{"line_number":990,"context_line":"                # NOTE(boxiang): The requested_destination field is not"},{"line_number":991,"context_line":"                # persisted and is therefore set after \u0027create\u0027 is called."},{"line_number":992,"context_line":"                if len(compute_nodes) \u003d\u003d 1:"},{"line_number":993,"context_line":"                    req_spec.requested_destination \u003d objects.Destination("},{"line_number":994,"context_line":"                        host\u003drequested_host,"},{"line_number":995,"context_line":"                        node\u003drequested_hypervisor_hostname)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1fcbff3d_cbe5750c","line":992,"range":{"start_line":992,"start_character":15,"end_line":992,"end_character":43},"updated":"2019-04-20 04:37:29.000000000","message":"This is the same as line939(if requested_host and requested_hypervisor_hostname:), this judgment is not easy to understand, can you add a flag, such as has_hypervisor_name? Or still use \u0027if requested_host and requested_hypervisor_hostname:\u0027 as a condition?","commit_id":"d3924749979612e6f32c346dd0d1b49cceca529f"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"eb1e39b04682b3b8c3b27889e1021ab93e96aee4","unresolved":false,"context_lines":[{"line_number":989,"context_line":""},{"line_number":990,"context_line":"                # NOTE(boxiang): The requested_destination field is not"},{"line_number":991,"context_line":"                # persisted and is therefore set after \u0027create\u0027 is called."},{"line_number":992,"context_line":"                if len(compute_nodes) \u003d\u003d 1:"},{"line_number":993,"context_line":"                    req_spec.requested_destination \u003d objects.Destination("},{"line_number":994,"context_line":"                        host\u003drequested_host,"},{"line_number":995,"context_line":"                        node\u003drequested_hypervisor_hostname)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ffb9cba7_a52cd599","line":992,"range":{"start_line":992,"start_character":15,"end_line":992,"end_character":43},"in_reply_to":"1fcbff3d_cbe5750c","updated":"2019-04-22 02:22:56.000000000","message":"Done","commit_id":"d3924749979612e6f32c346dd0d1b49cceca529f"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"9cbd65c7b57f9df09b2b518f46466b114e66bfce","unresolved":false,"context_lines":[{"line_number":997,"context_line":"                    req_spec.requested_destination \u003d objects.Destination("},{"line_number":998,"context_line":"                        host\u003drequested_host,"},{"line_number":999,"context_line":"                        node\u003dNone"},{"line_number":1000,"context_line":"                    )"},{"line_number":1001,"context_line":""},{"line_number":1002,"context_line":"                # Create an instance object, but do not store in db yet."},{"line_number":1003,"context_line":"                instance \u003d objects.Instance(context\u003dcontext)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1fcbff3d_2b13d90f","line":1000,"range":{"start_line":1000,"start_character":19,"end_line":1000,"end_character":21},"updated":"2019-04-20 04:37:29.000000000","message":"nit: No need to wrap, I think it\u0027s behind \u0027node\u003dNone\u0027 is ok.","commit_id":"d3924749979612e6f32c346dd0d1b49cceca529f"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"eb1e39b04682b3b8c3b27889e1021ab93e96aee4","unresolved":false,"context_lines":[{"line_number":997,"context_line":"                    req_spec.requested_destination \u003d objects.Destination("},{"line_number":998,"context_line":"                        host\u003drequested_host,"},{"line_number":999,"context_line":"                        node\u003dNone"},{"line_number":1000,"context_line":"                    )"},{"line_number":1001,"context_line":""},{"line_number":1002,"context_line":"                # Create an instance object, but do not store in db yet."},{"line_number":1003,"context_line":"                instance \u003d objects.Instance(context\u003dcontext)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ffb9cba7_852751b7","line":1000,"range":{"start_line":1000,"start_character":19,"end_line":1000,"end_character":21},"in_reply_to":"1fcbff3d_2b13d90f","updated":"2019-04-22 02:22:56.000000000","message":"Done","commit_id":"d3924749979612e6f32c346dd0d1b49cceca529f"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"abf5b5acafe3cfcd2ccd8929165e82259f277175","unresolved":false,"context_lines":[{"line_number":1001,"context_line":"                elif requested_hypervisor_hostname or ("},{"line_number":1002,"context_line":"                        requested_host and requested_hypervisor_hostname):"},{"line_number":1003,"context_line":"                    req_spec.requested_destination \u003d objects.Destination("},{"line_number":1004,"context_line":"                        host\u003drequested_host,"},{"line_number":1005,"context_line":"                        node\u003drequested_hypervisor_hostname)"},{"line_number":1006,"context_line":""},{"line_number":1007,"context_line":"                # Create an instance object, but do not store in db yet."}],"source_content_type":"text/x-python","patch_set":11,"id":"ffb9cba7_cf39d141","line":1004,"range":{"start_line":1004,"start_character":29,"end_line":1004,"end_character":43},"updated":"2019-04-23 01:59:28.000000000","message":"How to deal with reuested_host\u003dNone here? I have not found any treatment for this situation in your judgment conditions.","commit_id":"a1697aca38d03f8a50409c863e2cd5fee3c3942e"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"d35eb7f7d28aae7de8f830df5b8b72d1cee71e93","unresolved":false,"context_lines":[{"line_number":1001,"context_line":"                elif requested_hypervisor_hostname or ("},{"line_number":1002,"context_line":"                        requested_host and requested_hypervisor_hostname):"},{"line_number":1003,"context_line":"                    req_spec.requested_destination \u003d objects.Destination("},{"line_number":1004,"context_line":"                        host\u003drequested_host,"},{"line_number":1005,"context_line":"                        node\u003drequested_hypervisor_hostname)"},{"line_number":1006,"context_line":""},{"line_number":1007,"context_line":"                # Create an instance object, but do not store in db yet."}],"source_content_type":"text/x-python","patch_set":11,"id":"ffb9cba7_ed2cda9a","line":1004,"range":{"start_line":1004,"start_character":29,"end_line":1004,"end_character":43},"in_reply_to":"ffb9cba7_cf39d141","updated":"2019-04-23 08:09:30.000000000","message":"It\u0027s my fault. I have fixed it now.","commit_id":"a1697aca38d03f8a50409c863e2cd5fee3c3942e"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"d35eb7f7d28aae7de8f830df5b8b72d1cee71e93","unresolved":false,"context_lines":[{"line_number":936,"context_line":"            requested_hypervisor_hostname\u003dNone):"},{"line_number":937,"context_line":"        # Check whether we can get compute node(s) with requested_host"},{"line_number":938,"context_line":"        # and/or requested_hypervisor_hostname."},{"line_number":939,"context_line":"        compute_node \u003d None"},{"line_number":940,"context_line":"        if requested_host and requested_hypervisor_hostname:"},{"line_number":941,"context_line":"            compute_node \u003d objects.ComputeNode.get_by_host_and_nodename("},{"line_number":942,"context_line":"                context, requested_host, requested_hypervisor_hostname)"},{"line_number":943,"context_line":"        elif requested_hypervisor_hostname:"},{"line_number":944,"context_line":"            compute_node \u003d objects.ComputeNode.get_by_nodename("},{"line_number":945,"context_line":"                context, requested_hypervisor_hostname)"},{"line_number":946,"context_line":"        elif requested_host:"},{"line_number":947,"context_line":"            objects.ComputeNodeList.get_all_by_host("},{"line_number":948,"context_line":"                context, requested_host)"},{"line_number":949,"context_line":"        # Check quotas"},{"line_number":950,"context_line":"        num_instances \u003d compute_utils.check_num_instances_quota("},{"line_number":951,"context_line":"                context, instance_type, min_count, max_count)"}],"source_content_type":"text/x-python","patch_set":12,"id":"ffb9cba7_2d5192d9","line":948,"range":{"start_line":939,"start_character":8,"end_line":948,"end_character":40},"updated":"2019-04-23 08:09:30.000000000","message":"the variable only needs when you get at most one compute node. Just pass down to get host and hypervisor_hostname from compute_node object.","commit_id":"81a09c455d985ce42c7f9e2ef7c3e13b05a7f65b"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"d35eb7f7d28aae7de8f830df5b8b72d1cee71e93","unresolved":false,"context_lines":[{"line_number":999,"context_line":"                # And if we only supply the requested hypervisor hostname"},{"line_number":1000,"context_line":"                # and/or requested host, we will get at most one compute"},{"line_number":1001,"context_line":"                # node."},{"line_number":1002,"context_line":"                if requested_hypervisor_hostname:"},{"line_number":1003,"context_line":"                    req_spec.requested_destination \u003d objects.Destination("},{"line_number":1004,"context_line":"                        host\u003dcompute_node.host,"},{"line_number":1005,"context_line":"                        node\u003dcompute_node.hypervisor_hostname)"}],"source_content_type":"text/x-python","patch_set":12,"id":"ffb9cba7_8df2fe05","line":1002,"range":{"start_line":1002,"start_character":16,"end_line":1002,"end_character":49},"updated":"2019-04-23 08:09:30.000000000","message":"if you supply hypervisor_hostname and/or host, you will get at most one compute node.","commit_id":"81a09c455d985ce42c7f9e2ef7c3e13b05a7f65b"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"d35eb7f7d28aae7de8f830df5b8b72d1cee71e93","unresolved":false,"context_lines":[{"line_number":1003,"context_line":"                    req_spec.requested_destination \u003d objects.Destination("},{"line_number":1004,"context_line":"                        host\u003dcompute_node.host,"},{"line_number":1005,"context_line":"                        node\u003dcompute_node.hypervisor_hostname)"},{"line_number":1006,"context_line":"                elif requested_host:"},{"line_number":1007,"context_line":"                    req_spec.requested_destination \u003d objects.Destination("},{"line_number":1008,"context_line":"                        host\u003drequested_host,"},{"line_number":1009,"context_line":"                        node\u003dNone)"}],"source_content_type":"text/x-python","patch_set":12,"id":"ffb9cba7_6dc22a88","line":1006,"range":{"start_line":1006,"start_character":16,"end_line":1006,"end_character":36},"updated":"2019-04-23 08:09:30.000000000","message":"else you supply host and no hypervisor_hostname, you will get more than one compute node.","commit_id":"81a09c455d985ce42c7f9e2ef7c3e13b05a7f65b"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"2259bcd9f0467d09ab55c7e6472429e399a40126","unresolved":false,"context_lines":[{"line_number":944,"context_line":"            compute_node \u003d objects.ComputeNode.get_by_nodename("},{"line_number":945,"context_line":"                context, requested_hypervisor_hostname)"},{"line_number":946,"context_line":"        elif requested_host:"},{"line_number":947,"context_line":"            objects.ComputeNodeList.get_all_by_host("},{"line_number":948,"context_line":"                context, requested_host)"},{"line_number":949,"context_line":"        # Check quotas"},{"line_number":950,"context_line":"        num_instances \u003d compute_utils.check_num_instances_quota("},{"line_number":951,"context_line":"                context, instance_type, min_count, max_count)"}],"source_content_type":"text/x-python","patch_set":13,"id":"ffb9cba7_1412230a","line":948,"range":{"start_line":947,"start_character":0,"end_line":948,"end_character":40},"updated":"2019-04-29 20:33:36.000000000","message":"I would measure the length of this and if the length is one, I would substitute it for the `compute_node`, why not?","commit_id":"f1b9be4c20e6e616cca8f164674b8f218dca3448"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1d785b8c283cfbf420e9af38c5f214b52bc1595b","unresolved":false,"context_lines":[{"line_number":989,"context_line":"        elif requested_hypervisor_hostname:"},{"line_number":990,"context_line":"            compute_node \u003d objects.ComputeNode.get_by_nodename("},{"line_number":991,"context_line":"                context, requested_hypervisor_hostname)"},{"line_number":992,"context_line":"        elif requested_host:"},{"line_number":993,"context_line":"            objects.ComputeNodeList.get_all_by_host("},{"line_number":994,"context_line":"                context, requested_host)"},{"line_number":995,"context_line":"        # Check quotas"},{"line_number":996,"context_line":"        num_instances \u003d compute_utils.check_num_instances_quota("},{"line_number":997,"context_line":"                context, instance_type, min_count, max_count)"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_0961a505","line":994,"range":{"start_line":992,"start_character":0,"end_line":994,"end_character":40},"updated":"2019-05-13 18:52:38.000000000","message":"So are we only doing this as a check, to raise ComputeHostNotFound if requested_host is bogus?","commit_id":"a8e895c35efbd5c5496060d99c062a474ce00a86"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"45215ccd665f35d6e31a394b18328817b6a19c1c","unresolved":false,"context_lines":[{"line_number":989,"context_line":"        elif requested_hypervisor_hostname:"},{"line_number":990,"context_line":"            compute_node \u003d objects.ComputeNode.get_by_nodename("},{"line_number":991,"context_line":"                context, requested_hypervisor_hostname)"},{"line_number":992,"context_line":"        elif requested_host:"},{"line_number":993,"context_line":"            objects.ComputeNodeList.get_all_by_host("},{"line_number":994,"context_line":"                context, requested_host)"},{"line_number":995,"context_line":"        # Check quotas"},{"line_number":996,"context_line":"        num_instances \u003d compute_utils.check_num_instances_quota("},{"line_number":997,"context_line":"                context, instance_type, min_count, max_count)"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_637715a2","line":994,"range":{"start_line":992,"start_character":0,"end_line":994,"end_character":40},"in_reply_to":"dfbec78f_0961a505","updated":"2019-05-14 09:21:02.000000000","message":"\u003e So are we only doing this as a check, to raise ComputeHostNotFound\n \u003e if requested_host is bogus?\n\nNo. All of them includes get_by_host_and_nodename, get_by_nodename and get_all_by_host will raise ComputeHostNotFound.","commit_id":"a8e895c35efbd5c5496060d99c062a474ce00a86"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"bb34f396110781a02c4bf0b633de341200308431","unresolved":false,"context_lines":[{"line_number":983,"context_line":"        # Check whether we can get compute node(s) with requested_host"},{"line_number":984,"context_line":"        # and/or requested_hypervisor_hostname."},{"line_number":985,"context_line":"        compute_node \u003d None"},{"line_number":986,"context_line":"        if requested_host and requested_hypervisor_hostname:"},{"line_number":987,"context_line":"            compute_node \u003d objects.ComputeNode.get_by_host_and_nodename("},{"line_number":988,"context_line":"                context, requested_host, requested_hypervisor_hostname)"},{"line_number":989,"context_line":"        elif requested_hypervisor_hostname:"},{"line_number":990,"context_line":"            compute_node \u003d objects.ComputeNode.get_by_nodename("},{"line_number":991,"context_line":"                context, requested_hypervisor_hostname)"},{"line_number":992,"context_line":"        elif requested_host:"},{"line_number":993,"context_line":"            objects.ComputeNodeList.get_all_by_host("},{"line_number":994,"context_line":"                context, requested_host)"},{"line_number":995,"context_line":"        # Check quotas"},{"line_number":996,"context_line":"        num_instances \u003d compute_utils.check_num_instances_quota("}],"source_content_type":"text/x-python","patch_set":17,"id":"dfbec78f_e7821e00","line":993,"range":{"start_line":986,"start_character":8,"end_line":993,"end_character":52},"updated":"2019-05-15 08:19:01.000000000","message":"we are missing unittest for those","commit_id":"522c2064bb63ce499c540d28786f5e775a0ac85e"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"7daac8bba1d6fc3733bc3876b03405db6e955a70","unresolved":false,"context_lines":[{"line_number":983,"context_line":"        # Check whether we can get compute node(s) with requested_host"},{"line_number":984,"context_line":"        # and/or requested_hypervisor_hostname."},{"line_number":985,"context_line":"        compute_node \u003d None"},{"line_number":986,"context_line":"        if requested_host and requested_hypervisor_hostname:"},{"line_number":987,"context_line":"            compute_node \u003d objects.ComputeNode.get_by_host_and_nodename("},{"line_number":988,"context_line":"                context, requested_host, requested_hypervisor_hostname)"},{"line_number":989,"context_line":"        elif requested_hypervisor_hostname:"},{"line_number":990,"context_line":"            compute_node \u003d objects.ComputeNode.get_by_nodename("},{"line_number":991,"context_line":"                context, requested_hypervisor_hostname)"},{"line_number":992,"context_line":"        elif requested_host:"},{"line_number":993,"context_line":"            objects.ComputeNodeList.get_all_by_host("},{"line_number":994,"context_line":"                context, requested_host)"},{"line_number":995,"context_line":"        # Check quotas"},{"line_number":996,"context_line":"        num_instances \u003d compute_utils.check_num_instances_quota("}],"source_content_type":"text/x-python","patch_set":17,"id":"bfb3d3c7_5d4b7786","line":993,"range":{"start_line":986,"start_character":8,"end_line":993,"end_character":52},"in_reply_to":"dfbec78f_e7821e00","updated":"2019-05-20 06:42:22.000000000","message":"Done","commit_id":"522c2064bb63ce499c540d28786f5e775a0ac85e"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"bb34f396110781a02c4bf0b633de341200308431","unresolved":false,"context_lines":[{"line_number":991,"context_line":"                context, requested_hypervisor_hostname)"},{"line_number":992,"context_line":"        elif requested_host:"},{"line_number":993,"context_line":"            objects.ComputeNodeList.get_all_by_host("},{"line_number":994,"context_line":"                context, requested_host)"},{"line_number":995,"context_line":"        # Check quotas"},{"line_number":996,"context_line":"        num_instances \u003d compute_utils.check_num_instances_quota("},{"line_number":997,"context_line":"                context, instance_type, min_count, max_count)"}],"source_content_type":"text/x-python","patch_set":17,"id":"dfbec78f_043df0db","line":994,"updated":"2019-05-15 08:19:01.000000000","message":"we can create \u0027objects.Destination\u0027 at here, then at later, we just assign the that obj to the request_spec obj. That is more clear.\n\nAnd I prefer put those into a sub-method.","commit_id":"522c2064bb63ce499c540d28786f5e775a0ac85e"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"7daac8bba1d6fc3733bc3876b03405db6e955a70","unresolved":false,"context_lines":[{"line_number":991,"context_line":"                context, requested_hypervisor_hostname)"},{"line_number":992,"context_line":"        elif requested_host:"},{"line_number":993,"context_line":"            objects.ComputeNodeList.get_all_by_host("},{"line_number":994,"context_line":"                context, requested_host)"},{"line_number":995,"context_line":"        # Check quotas"},{"line_number":996,"context_line":"        num_instances \u003d compute_utils.check_num_instances_quota("},{"line_number":997,"context_line":"                context, instance_type, min_count, max_count)"}],"source_content_type":"text/x-python","patch_set":17,"id":"dfbec78f_dbe560dd","line":994,"in_reply_to":"dfbec78f_043df0db","updated":"2019-05-20 06:42:22.000000000","message":"Done","commit_id":"522c2064bb63ce499c540d28786f5e775a0ac85e"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"2b9d8b2f0c36ae5eabfd2492a1e4fbe09b137a02","unresolved":false,"context_lines":[{"line_number":978,"context_line":"                                     hypervisor_hostname\u003dNone):"},{"line_number":979,"context_line":"        destination \u003d None"},{"line_number":980,"context_line":"        if host and hypervisor_hostname:"},{"line_number":981,"context_line":"            objects.ComputeNode.get_by_host_and_nodename("},{"line_number":982,"context_line":"                context, host, hypervisor_hostname)"},{"line_number":983,"context_line":"            destination \u003d objects.Destination("},{"line_number":984,"context_line":"                host\u003dhost, node\u003dhypervisor_hostname)"}],"source_content_type":"text/x-python","patch_set":19,"id":"bfb3d3c7_3fe1b49b","line":981,"range":{"start_line":981,"start_character":12,"end_line":981,"end_character":56},"updated":"2019-05-20 16:15:01.000000000","message":"why are we doing this query ? Is it to just check and see if it exists ?\n\n(later)\n\nI see the comment on L1002. Does this mean we just repeat this query again here: https://github.com/openstack/nova/blob/66a77f2fb75bbb9daebdca1cad0255ecafe41e92/nova/scheduler/utils.py#L528 ? Is the check here necessary ? since the same check is done before the call to placement in the scheduler.\n\nTo me this function seems redundant given we do the same stuff again in https://github.com/openstack/nova/blob/66a77f2fb75bbb9daebdca1cad0255ecafe41e92/nova/scheduler/host_manager.py#L654.","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"1a188bc4c941f73eb0dd6fa9cce1587006570496","unresolved":false,"context_lines":[{"line_number":978,"context_line":"                                     hypervisor_hostname\u003dNone):"},{"line_number":979,"context_line":"        destination \u003d None"},{"line_number":980,"context_line":"        if host and hypervisor_hostname:"},{"line_number":981,"context_line":"            objects.ComputeNode.get_by_host_and_nodename("},{"line_number":982,"context_line":"                context, host, hypervisor_hostname)"},{"line_number":983,"context_line":"            destination \u003d objects.Destination("},{"line_number":984,"context_line":"                host\u003dhost, node\u003dhypervisor_hostname)"}],"source_content_type":"text/x-python","patch_set":19,"id":"bfb3d3c7_6bfd2739","line":981,"range":{"start_line":981,"start_character":12,"end_line":981,"end_character":56},"in_reply_to":"bfb3d3c7_3fe1b49b","updated":"2019-05-21 07:32:00.000000000","message":"\u003e why are we doing this query ? Is it to just check and see if it\n \u003e exists ?\n \u003e \n\nAs described in approved spec[1], we will do check first in api.\n\n[1] https://review.opendev.org/#/c/645458/18/specs/train/approved/add-host-and-hypervisor-hostname-flag-to-create-server.rst@123\n\n \u003e (later)\n \u003e \n \u003e I see the comment on L1002. Does this mean we just repeat this\n \u003e query again here: https://github.com/openstack/nova/blob/66a77f2fb75bbb9daebdca1cad0255ecafe41e92/nova/scheduler/utils.py#L528\n \u003e ? Is the check here necessary ? since the same check is done before\n \u003e the call to placement in the scheduler.\n \u003e \n \u003e To me this function seems redundant given we do the same stuff\n \u003e again in https://github.com/openstack/nova/blob/66a77f2fb75bbb9daebdca1cad0255ecafe41e92/nova/scheduler/host_manager.py#L654.\n\nAs you mentioned above, I read the codes. You are right. We will query and check whether we can get the compute node(s) with requested_destination later in select_destinations function.\n\nIf I don\u0027t check and query the compute node here, I can just set host and/or hypervisor_hostname into destination object.\n\nSo that, if we do not check here, do I update the spec to follow up the behavior of this patch?","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6156a4c1baf3fc536580892700a119b8d384322e","unresolved":false,"context_lines":[{"line_number":978,"context_line":"                                     hypervisor_hostname\u003dNone):"},{"line_number":979,"context_line":"        destination \u003d None"},{"line_number":980,"context_line":"        if host and hypervisor_hostname:"},{"line_number":981,"context_line":"            objects.ComputeNode.get_by_host_and_nodename("},{"line_number":982,"context_line":"                context, host, hypervisor_hostname)"},{"line_number":983,"context_line":"            destination \u003d objects.Destination("},{"line_number":984,"context_line":"                host\u003dhost, node\u003dhypervisor_hostname)"}],"source_content_type":"text/x-python","patch_set":19,"id":"bfb3d3c7_b225a4c4","line":981,"range":{"start_line":981,"start_character":12,"end_line":981,"end_character":56},"in_reply_to":"bfb3d3c7_678eb379","updated":"2019-05-22 21:09:57.000000000","message":"It\u0027s a difference of failing fast in the API with a 400 error to the user or failing late during scheduling with a NoValidHost error and the server(s) going into ERROR status. With any pre-created resource in a server create request, we generally make sure those exist in the API, correct? Like images, volumes, ports. Failing fast in the API should be a better user experience.\n\nI understand the performance concern, but these are admin-only by default so how much do we expect to be hitting this code for \u0027normal\u0027 tenant user scenarios?\n\nSince there seems to be a debate here which has led to a spec update:\n\nhttps://review.opendev.org/#/c/660560/\n\nI would suggest taking this to the mailing list (or the weekly nova meeting) to get wider input on what most people would expect to see, early validation in the API or late validation in the scheduler.","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"95324d659a7f7adf274230b23947fc2b2ce90452","unresolved":false,"context_lines":[{"line_number":978,"context_line":"                                     hypervisor_hostname\u003dNone):"},{"line_number":979,"context_line":"        destination \u003d None"},{"line_number":980,"context_line":"        if host and hypervisor_hostname:"},{"line_number":981,"context_line":"            objects.ComputeNode.get_by_host_and_nodename("},{"line_number":982,"context_line":"                context, host, hypervisor_hostname)"},{"line_number":983,"context_line":"            destination \u003d objects.Destination("},{"line_number":984,"context_line":"                host\u003dhost, node\u003dhypervisor_hostname)"}],"source_content_type":"text/x-python","patch_set":19,"id":"bfb3d3c7_678eb379","line":981,"range":{"start_line":981,"start_character":12,"end_line":981,"end_character":56},"in_reply_to":"bfb3d3c7_6bfd2739","updated":"2019-05-21 11:45:40.000000000","message":"I understand a validation of \"if it exists\" must be done, but I just don\u0027t like the same queries been done again from perf pov.","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"eded96a38f7b3f86eb4e10a6859b6753b2ea38b4","unresolved":false,"context_lines":[{"line_number":979,"context_line":"        destination \u003d None"},{"line_number":980,"context_line":"        if host and hypervisor_hostname:"},{"line_number":981,"context_line":"            objects.ComputeNode.get_by_host_and_nodename("},{"line_number":982,"context_line":"                context, host, hypervisor_hostname)"},{"line_number":983,"context_line":"            destination \u003d objects.Destination("},{"line_number":984,"context_line":"                host\u003dhost, node\u003dhypervisor_hostname)"},{"line_number":985,"context_line":"        elif hypervisor_hostname:"}],"source_content_type":"text/x-python","patch_set":19,"id":"bfb3d3c7_5f24a8c6","line":982,"range":{"start_line":982,"start_character":16,"end_line":982,"end_character":23},"updated":"2019-05-20 16:16:32.000000000","message":"btw,is this context actually cell-targeted ? doesn\u0027t seem so.","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"95324d659a7f7adf274230b23947fc2b2ce90452","unresolved":false,"context_lines":[{"line_number":979,"context_line":"        destination \u003d None"},{"line_number":980,"context_line":"        if host and hypervisor_hostname:"},{"line_number":981,"context_line":"            objects.ComputeNode.get_by_host_and_nodename("},{"line_number":982,"context_line":"                context, host, hypervisor_hostname)"},{"line_number":983,"context_line":"            destination \u003d objects.Destination("},{"line_number":984,"context_line":"                host\u003dhost, node\u003dhypervisor_hostname)"},{"line_number":985,"context_line":"        elif hypervisor_hostname:"}],"source_content_type":"text/x-python","patch_set":19,"id":"bfb3d3c7_27d75b4e","line":982,"range":{"start_line":982,"start_character":16,"end_line":982,"end_character":23},"in_reply_to":"bfb3d3c7_3d33f2ad","updated":"2019-05-21 11:45:40.000000000","message":"Yep and this means you need to query the HostMappings for the given host and get the cell. However if only the hypervisor_hostname is given we won\u0027t be able to get the cell from the host_mappings which means you will be going into all the cells which is why I was saying its expensive to repeat this operation. We could just got to the host_manager and add a \"ComputeNode Not Found\" part there IMHO. See if the cores who approved the spec are okay with this or have better ideas.","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"1a188bc4c941f73eb0dd6fa9cce1587006570496","unresolved":false,"context_lines":[{"line_number":979,"context_line":"        destination \u003d None"},{"line_number":980,"context_line":"        if host and hypervisor_hostname:"},{"line_number":981,"context_line":"            objects.ComputeNode.get_by_host_and_nodename("},{"line_number":982,"context_line":"                context, host, hypervisor_hostname)"},{"line_number":983,"context_line":"            destination \u003d objects.Destination("},{"line_number":984,"context_line":"                host\u003dhost, node\u003dhypervisor_hostname)"},{"line_number":985,"context_line":"        elif hypervisor_hostname:"}],"source_content_type":"text/x-python","patch_set":19,"id":"bfb3d3c7_3d33f2ad","line":982,"range":{"start_line":982,"start_character":16,"end_line":982,"end_character":23},"in_reply_to":"bfb3d3c7_5f24a8c6","updated":"2019-05-21 07:32:00.000000000","message":"Yeah, you are right. If we really do this, we must fix this wrong context.","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"2b9d8b2f0c36ae5eabfd2492a1e4fbe09b137a02","unresolved":false,"context_lines":[{"line_number":1005,"context_line":"        # So that if we only supply the requested host here, we"},{"line_number":1006,"context_line":"        # will get more than one compute node. We just pass the"},{"line_number":1007,"context_line":"        # host to the destination object of requested_destination."},{"line_number":1008,"context_line":"        # And let the scheduler filters to select the most suitable"},{"line_number":1009,"context_line":"        # compute node to create servers."},{"line_number":1010,"context_line":"        # And if we only supply the requested hypervisor hostname"},{"line_number":1011,"context_line":"        # and/or requested host, we will get at most one compute"}],"source_content_type":"text/x-python","patch_set":19,"id":"bfb3d3c7_bf5e04e4","line":1008,"range":{"start_line":1008,"start_character":10,"end_line":1008,"end_character":11},"updated":"2019-05-20 16:15:01.000000000","message":"nit: a","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"2b9d8b2f0c36ae5eabfd2492a1e4fbe09b137a02","unresolved":false,"context_lines":[{"line_number":1005,"context_line":"        # So that if we only supply the requested host here, we"},{"line_number":1006,"context_line":"        # will get more than one compute node. We just pass the"},{"line_number":1007,"context_line":"        # host to the destination object of requested_destination."},{"line_number":1008,"context_line":"        # And let the scheduler filters to select the most suitable"},{"line_number":1009,"context_line":"        # compute node to create servers."},{"line_number":1010,"context_line":"        # And if we only supply the requested hypervisor hostname"},{"line_number":1011,"context_line":"        # and/or requested host, we will get at most one compute"}],"source_content_type":"text/x-python","patch_set":19,"id":"bfb3d3c7_3f51b4d9","line":1008,"range":{"start_line":1008,"start_character":40,"end_line":1008,"end_character":42},"updated":"2019-05-20 16:15:01.000000000","message":"nit: nix","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"1a188bc4c941f73eb0dd6fa9cce1587006570496","unresolved":false,"context_lines":[{"line_number":1005,"context_line":"        # So that if we only supply the requested host here, we"},{"line_number":1006,"context_line":"        # will get more than one compute node. We just pass the"},{"line_number":1007,"context_line":"        # host to the destination object of requested_destination."},{"line_number":1008,"context_line":"        # And let the scheduler filters to select the most suitable"},{"line_number":1009,"context_line":"        # compute node to create servers."},{"line_number":1010,"context_line":"        # And if we only supply the requested hypervisor hostname"},{"line_number":1011,"context_line":"        # and/or requested host, we will get at most one compute"}],"source_content_type":"text/x-python","patch_set":19,"id":"bfb3d3c7_bde36205","line":1008,"range":{"start_line":1008,"start_character":40,"end_line":1008,"end_character":42},"in_reply_to":"bfb3d3c7_3f51b4d9","updated":"2019-05-21 07:32:00.000000000","message":"why?","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"95324d659a7f7adf274230b23947fc2b2ce90452","unresolved":false,"context_lines":[{"line_number":1005,"context_line":"        # So that if we only supply the requested host here, we"},{"line_number":1006,"context_line":"        # will get more than one compute node. We just pass the"},{"line_number":1007,"context_line":"        # host to the destination object of requested_destination."},{"line_number":1008,"context_line":"        # And let the scheduler filters to select the most suitable"},{"line_number":1009,"context_line":"        # compute node to create servers."},{"line_number":1010,"context_line":"        # And if we only supply the requested hypervisor hostname"},{"line_number":1011,"context_line":"        # and/or requested host, we will get at most one compute"}],"source_content_type":"text/x-python","patch_set":19,"id":"bfb3d3c7_6760f3cf","line":1008,"range":{"start_line":1008,"start_character":40,"end_line":1008,"end_character":42},"in_reply_to":"bfb3d3c7_bde36205","updated":"2019-05-21 11:45:40.000000000","message":"You could just remove the full stop after \"requested_destination\" and continue this sentence with \"and let the..\" because sentences don\u0027t begin with a conjunction. Its a nit like I pointed out, not a biggie, as I was reading I just corrected it (I am not a native speaker, so I don\u0027t mind this).","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"1a188bc4c941f73eb0dd6fa9cce1587006570496","unresolved":false,"context_lines":[{"line_number":1005,"context_line":"        # So that if we only supply the requested host here, we"},{"line_number":1006,"context_line":"        # will get more than one compute node. We just pass the"},{"line_number":1007,"context_line":"        # host to the destination object of requested_destination."},{"line_number":1008,"context_line":"        # And let the scheduler filters to select the most suitable"},{"line_number":1009,"context_line":"        # compute node to create servers."},{"line_number":1010,"context_line":"        # And if we only supply the requested hypervisor hostname"},{"line_number":1011,"context_line":"        # and/or requested host, we will get at most one compute"}],"source_content_type":"text/x-python","patch_set":19,"id":"bfb3d3c7_fde1daff","line":1008,"range":{"start_line":1008,"start_character":10,"end_line":1008,"end_character":11},"in_reply_to":"bfb3d3c7_bf5e04e4","updated":"2019-05-21 07:32:00.000000000","message":"\u003e nit: a\n\nreally?","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2b9c7e532a31438f1f6e46c5ea8baf1762ed8858","unresolved":false,"context_lines":[{"line_number":974,"context_line":"        im.create()"},{"line_number":975,"context_line":""},{"line_number":976,"context_line":"    @staticmethod"},{"line_number":977,"context_line":"    def _retrieve_destination_object(context, host\u003dNone,"},{"line_number":978,"context_line":"                                     hypervisor_hostname\u003dNone):"},{"line_number":979,"context_line":"        destination \u003d None"},{"line_number":980,"context_line":"        if host and hypervisor_hostname:"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_559f72b3","line":977,"updated":"2019-05-22 21:19:09.000000000","message":"None of the query methods in here work. The compute nodes are in the cells, which means you would need to:\n\n1. if host is not None, you would need to lookup the host mapping to find the cell mapping and then pull the instance from there (or just assume if the host mapping exists the node should exist and don\u0027t look in the cell\n\n2. if there is no host, but hypervisor_hostname is not none, then you need to iterate the cells looking for the one that has that node, which is probably why Surya is worried about how expensive this could be","commit_id":"79aac4fcd3f134919969ed6f08bc7ea2595db640"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4aab25c2e2731bcb4c6d6f04b437fba280998754","unresolved":false,"context_lines":[{"line_number":974,"context_line":"        im.create()"},{"line_number":975,"context_line":""},{"line_number":976,"context_line":"    @staticmethod"},{"line_number":977,"context_line":"    def _retrieve_destination_object(context, host\u003dNone,"},{"line_number":978,"context_line":"                                     hypervisor_hostname\u003dNone):"},{"line_number":979,"context_line":"        destination \u003d None"},{"line_number":980,"context_line":"        if host and hypervisor_hostname:"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_750396b9","line":977,"in_reply_to":"bfb3d3c7_35619eaa","updated":"2019-05-22 21:25:59.000000000","message":"Another thing is we could add a uuid field to the Destination object such that resources_from_request_spec in the scheduler wouldn\u0027t have to figure this out again if we already looked up the node in the API and set the compute node uuid on the request spec.","commit_id":"79aac4fcd3f134919969ed6f08bc7ea2595db640"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"57b71f66a7931593142ff1bfea3f56c6b5012369","unresolved":false,"context_lines":[{"line_number":974,"context_line":"        im.create()"},{"line_number":975,"context_line":""},{"line_number":976,"context_line":"    @staticmethod"},{"line_number":977,"context_line":"    def _retrieve_destination_object(context, host\u003dNone,"},{"line_number":978,"context_line":"                                     hypervisor_hostname\u003dNone):"},{"line_number":979,"context_line":"        destination \u003d None"},{"line_number":980,"context_line":"        if host and hypervisor_hostname:"}],"source_content_type":"text/x-python","patch_set":20,"id":"bfb3d3c7_35619eaa","line":977,"in_reply_to":"bfb3d3c7_559f72b3","updated":"2019-05-22 21:22:21.000000000","message":"I see Surya already pointed this out:\n\nhttps://review.opendev.org/#/c/645520/19/nova/compute/api.py@982\n\nSo how about as a compromise we do this:\n\n1. if host is not None, we look up the host mapping since that\u0027s cheap and easy\n\n2. if host is None, then we leave the validation to the scheduler\n\nI think the more normal case is going to be someone specifying a host rather than the node, because for everything other than ironic they are the same.","commit_id":"79aac4fcd3f134919969ed6f08bc7ea2595db640"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f23c1ba5cbf78d386cb63fd4b803c4311ee3d13b","unresolved":false,"context_lines":[{"line_number":1026,"context_line":"            destination \u003d objects.Destination(host\u003dcompute_nodes[0].host,"},{"line_number":1027,"context_line":"                node\u003dcompute_nodes[0].hypervisor_hostname)"},{"line_number":1028,"context_line":"        else:"},{"line_number":1029,"context_line":"            # Same host has more than one hypervisor."},{"line_number":1030,"context_line":"            destination \u003d objects.Destination(host\u003dcompute_nodes[0].host,"},{"line_number":1031,"context_line":"                node\u003dNone)"},{"line_number":1032,"context_line":"        return destination"}],"source_content_type":"text/x-python","patch_set":21,"id":"bfb3d3c7_9c628009","line":1029,"range":{"start_line":1029,"start_character":14,"end_line":1029,"end_character":18},"updated":"2019-05-30 13:54:16.000000000","message":"Some?","commit_id":"0dee0d36de7267af9303aa004d0f2ab7cdd0a77f"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"5be109e23758eef368874a8f6e9ace4f62cb90bf","unresolved":false,"context_lines":[{"line_number":1026,"context_line":"            destination \u003d objects.Destination(host\u003dcompute_nodes[0].host,"},{"line_number":1027,"context_line":"                node\u003dcompute_nodes[0].hypervisor_hostname)"},{"line_number":1028,"context_line":"        else:"},{"line_number":1029,"context_line":"            # Same host has more than one hypervisor."},{"line_number":1030,"context_line":"            destination \u003d objects.Destination(host\u003dcompute_nodes[0].host,"},{"line_number":1031,"context_line":"                node\u003dNone)"},{"line_number":1032,"context_line":"        return destination"}],"source_content_type":"text/x-python","patch_set":21,"id":"bfb3d3c7_9c658e20","line":1029,"range":{"start_line":1029,"start_character":14,"end_line":1029,"end_character":18},"in_reply_to":"bfb3d3c7_9c628009","updated":"2019-05-31 03:40:45.000000000","message":"\u003e Some?\n\nNo. I just mean that one host may have more than one node. eg: ironic deployments.\n\n\"For example, one host may have more than one compute node in ironic deployment.\" How about this annotation? :)","commit_id":"0dee0d36de7267af9303aa004d0f2ab7cdd0a77f"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"2cc7ecc2c17eb7c8af0b808d5778e7862b2e3d3b","unresolved":false,"context_lines":[{"line_number":1009,"context_line":"            destination \u003d objects.Destination()"},{"line_number":1010,"context_line":"            if requested_host:"},{"line_number":1011,"context_line":"                destination.host \u003d requested_host"},{"line_number":1012,"context_line":"            destination.node \u003d requested_hypervisor_hostname"},{"line_number":1013,"context_line":"        # Check quotas"},{"line_number":1014,"context_line":"        num_instances \u003d compute_utils.check_num_instances_quota("},{"line_number":1015,"context_line":"                context, instance_type, min_count, max_count)"}],"source_content_type":"text/x-python","patch_set":25,"id":"9fb8cfa7_fecf6e7c","line":1012,"range":{"start_line":1012,"start_character":31,"end_line":1012,"end_character":60},"updated":"2019-06-06 12:54:00.000000000","message":"should not we check this for None? otherwise, we might end up adding None as node in RequestSpec","commit_id":"671beddcdc247aaa84c09040e2f0de1b64df3f6e"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":1009,"context_line":"            destination \u003d objects.Destination()"},{"line_number":1010,"context_line":"            if requested_host:"},{"line_number":1011,"context_line":"                destination.host \u003d requested_host"},{"line_number":1012,"context_line":"            destination.node \u003d requested_hypervisor_hostname"},{"line_number":1013,"context_line":"        # Check quotas"},{"line_number":1014,"context_line":"        num_instances \u003d compute_utils.check_num_instances_quota("},{"line_number":1015,"context_line":"                context, instance_type, min_count, max_count)"}],"source_content_type":"text/x-python","patch_set":25,"id":"9fb8cfa7_79c71814","line":1012,"range":{"start_line":1012,"start_character":31,"end_line":1012,"end_character":60},"in_reply_to":"9fb8cfa7_fecf6e7c","updated":"2019-06-25 10:11:48.000000000","message":"The host of destination can not be set None. So we check it. But I think it is not necessary for us to check the node. How do you think about it?","commit_id":"671beddcdc247aaa84c09040e2f0de1b64df3f6e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":1010,"context_line":"                                        requested_hypervisor_hostname)"},{"line_number":1011,"context_line":"            destination \u003d objects.Destination()"},{"line_number":1012,"context_line":"            if requested_host:"},{"line_number":1013,"context_line":"                destination.host \u003d requested_host"},{"line_number":1014,"context_line":"            destination.node \u003d requested_hypervisor_hostname"},{"line_number":1015,"context_line":"        # Check quotas"},{"line_number":1016,"context_line":"        num_instances \u003d compute_utils.check_num_instances_quota("}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_3611b405","line":1013,"updated":"2019-06-20 20:54:09.000000000","message":"This is OK because even though Destination.host is not nullable, if host is not specified we just don\u0027t set the field. Looks good.","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":1011,"context_line":"            destination \u003d objects.Destination()"},{"line_number":1012,"context_line":"            if requested_host:"},{"line_number":1013,"context_line":"                destination.host \u003d requested_host"},{"line_number":1014,"context_line":"            destination.node \u003d requested_hypervisor_hostname"},{"line_number":1015,"context_line":"        # Check quotas"},{"line_number":1016,"context_line":"        num_instances \u003d compute_utils.check_num_instances_quota("},{"line_number":1017,"context_line":"                context, instance_type, min_count, max_count)"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_960180b2","line":1014,"updated":"2019-06-20 20:54:09.000000000","message":"And in this case if hypervisor_hostname is None this is OK because Destination.node is nullable.","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":1049,"context_line":"                req_spec.num_instances \u003d num_instances"},{"line_number":1050,"context_line":""},{"line_number":1051,"context_line":"                # NOTE(stephenfin): The network_metadata field is not persisted"},{"line_number":1052,"context_line":"                # and is therefore set after \u0027create\u0027 is called."},{"line_number":1053,"context_line":"                if network_metadata:"},{"line_number":1054,"context_line":"                    req_spec.network_metadata \u003d network_metadata"},{"line_number":1055,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_36df743b","line":1052,"range":{"start_line":1052,"start_character":18,"end_line":1052,"end_character":64},"updated":"2019-06-20 20:54:09.000000000","message":"Oh you copied this which is old - yeah this is no longer true (and is misleading) since the RequestSpec is created in _create_reqspec_buildreq_instmapping now. Anyway, don\u0027t copy this since it\u0027s wrong now.","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"f45016c3092c930ae9d655a9b0889728cec42add","unresolved":false,"context_lines":[{"line_number":1048,"context_line":"                # batch."},{"line_number":1049,"context_line":"                req_spec.num_instances \u003d num_instances"},{"line_number":1050,"context_line":""},{"line_number":1051,"context_line":"                # NOTE(stephenfin): The network_metadata field is not persisted"},{"line_number":1052,"context_line":"                # and is therefore set after \u0027create\u0027 is called."},{"line_number":1053,"context_line":"                if network_metadata:"},{"line_number":1054,"context_line":"                    req_spec.network_metadata \u003d network_metadata"},{"line_number":1055,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_57176646","line":1052,"range":{"start_line":1051,"start_character":16,"end_line":1052,"end_character":64},"updated":"2019-06-24 10:35:17.000000000","message":"this is a regression?, see the line 1106","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"550edcb2704daa8d465b06fbf1f12cfe002b44b8","unresolved":false,"context_lines":[{"line_number":1048,"context_line":"                # batch."},{"line_number":1049,"context_line":"                req_spec.num_instances \u003d num_instances"},{"line_number":1050,"context_line":""},{"line_number":1051,"context_line":"                # NOTE(stephenfin): The network_metadata field is not persisted"},{"line_number":1052,"context_line":"                # and is therefore set after \u0027create\u0027 is called."},{"line_number":1053,"context_line":"                if network_metadata:"},{"line_number":1054,"context_line":"                    req_spec.network_metadata \u003d network_metadata"},{"line_number":1055,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_9c089e28","line":1052,"range":{"start_line":1051,"start_character":16,"end_line":1052,"end_character":64},"in_reply_to":"9fb8cfa7_57176646","updated":"2019-06-24 10:38:51.000000000","message":"Submit a patch https://review.opendev.org/667061","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":1054,"context_line":"                    req_spec.network_metadata \u003d network_metadata"},{"line_number":1055,"context_line":""},{"line_number":1056,"context_line":"                # NOTE(boxiang): The requested_destination field is not"},{"line_number":1057,"context_line":"                # persisted and is therefore set after \u0027create\u0027 is called."},{"line_number":1058,"context_line":"                if destination:"},{"line_number":1059,"context_line":"                    req_spec.requested_destination \u003d destination"},{"line_number":1060,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_362a142c","line":1057,"range":{"start_line":1057,"start_character":28,"end_line":1057,"end_character":74},"updated":"2019-06-20 20:54:09.000000000","message":"This must be an old comment because the RequestSpec is created in _create_reqspec_buildreq_instmapping now which happens after this. I don\u0027t think we really need the comment either way.","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":1054,"context_line":"                    req_spec.network_metadata \u003d network_metadata"},{"line_number":1055,"context_line":""},{"line_number":1056,"context_line":"                # NOTE(boxiang): The requested_destination field is not"},{"line_number":1057,"context_line":"                # persisted and is therefore set after \u0027create\u0027 is called."},{"line_number":1058,"context_line":"                if destination:"},{"line_number":1059,"context_line":"                    req_spec.requested_destination \u003d destination"},{"line_number":1060,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_0bb9e1e7","line":1057,"range":{"start_line":1057,"start_character":28,"end_line":1057,"end_character":74},"in_reply_to":"9fb8cfa7_362a142c","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"f45016c3092c930ae9d655a9b0889728cec42add","unresolved":false,"context_lines":[{"line_number":1101,"context_line":"                # records in a single transaction so that if a DBError is"},{"line_number":1102,"context_line":"                # raised from any of them, all INSERTs will be rolled back and"},{"line_number":1103,"context_line":"                # no orphaned records will be left behind."},{"line_number":1104,"context_line":"                self._create_reqspec_buildreq_instmapping(context, req_spec,"},{"line_number":1105,"context_line":"                                                          build_request,"},{"line_number":1106,"context_line":"                                                          inst_mapping)"},{"line_number":1107,"context_line":""},{"line_number":1108,"context_line":"                instances_to_build.append("},{"line_number":1109,"context_line":"                    (req_spec, build_request, inst_mapping))"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_7712aa5a","line":1106,"range":{"start_line":1104,"start_character":16,"end_line":1106,"end_character":71},"updated":"2019-06-24 10:35:17.000000000","message":"sounds like, we have regression at here. We create the request spec at here.","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4e036f0030a05e4699afccbf71a4cef46c6ccf0a","unresolved":false,"context_lines":[{"line_number":1101,"context_line":"                # records in a single transaction so that if a DBError is"},{"line_number":1102,"context_line":"                # raised from any of them, all INSERTs will be rolled back and"},{"line_number":1103,"context_line":"                # no orphaned records will be left behind."},{"line_number":1104,"context_line":"                self._create_reqspec_buildreq_instmapping(context, req_spec,"},{"line_number":1105,"context_line":"                                                          build_request,"},{"line_number":1106,"context_line":"                                                          inst_mapping)"},{"line_number":1107,"context_line":""},{"line_number":1108,"context_line":"                instances_to_build.append("},{"line_number":1109,"context_line":"                    (req_spec, build_request, inst_mapping))"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_7dcd9f83","line":1106,"range":{"start_line":1104,"start_character":16,"end_line":1106,"end_character":71},"in_reply_to":"9fb8cfa7_7712aa5a","updated":"2019-06-24 18:30:04.000000000","message":"It\u0027s not a regression, the object itself controls what gets persisted and it doesn\u0027t persist network_metadata:\n\nhttps://github.com/openstack/nova/blob/ff0f33cf7e44c5d01f3fb999295eff4508c24a14/nova/objects/request_spec.py#L623","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"02cbd336453e14b6542b30281f53f80b4fe3cb55","unresolved":false,"context_lines":[{"line_number":1053,"context_line":"                    req_spec.network_metadata \u003d network_metadata"},{"line_number":1054,"context_line":""},{"line_number":1055,"context_line":"                if destination:"},{"line_number":1056,"context_line":"                    req_spec.requested_destination \u003d destination"},{"line_number":1057,"context_line":""},{"line_number":1058,"context_line":"                # Create an instance object, but do not store in db yet."},{"line_number":1059,"context_line":"                instance \u003d objects.Instance(context\u003dcontext)"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_fdd51644","line":1056,"updated":"2019-07-11 15:25:34.000000000","message":"++","commit_id":"564290ab145d2710d3e82b5c4871e647e4d516c4"}],"nova/policies/servers.py":[{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"2b9d8b2f0c36ae5eabfd2492a1e4fbe09b137a02","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":126,"context_line":"        SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":127,"context_line":"        base.RULE_ADMIN_API,"},{"line_number":128,"context_line":"        \"Create a server on the requested host\","},{"line_number":129,"context_line":"        ["},{"line_number":130,"context_line":"            {"},{"line_number":131,"context_line":"                \u0027method\u0027: \u0027POST\u0027,"}],"source_content_type":"text/x-python","patch_set":19,"id":"bfb3d3c7_1f92b0f7","line":128,"range":{"start_line":128,"start_character":32,"end_line":128,"end_character":46},"updated":"2019-05-20 16:15:01.000000000","message":"and/or compute_node right ?","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"1a188bc4c941f73eb0dd6fa9cce1587006570496","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":126,"context_line":"        SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":127,"context_line":"        base.RULE_ADMIN_API,"},{"line_number":128,"context_line":"        \"Create a server on the requested host\","},{"line_number":129,"context_line":"        ["},{"line_number":130,"context_line":"            {"},{"line_number":131,"context_line":"                \u0027method\u0027: \u0027POST\u0027,"}],"source_content_type":"text/x-python","patch_set":19,"id":"bfb3d3c7_3d369205","line":128,"range":{"start_line":128,"start_character":32,"end_line":128,"end_character":46},"in_reply_to":"bfb3d3c7_1f92b0f7","updated":"2019-05-21 07:32:00.000000000","message":"Done","commit_id":"7bb4ec7787ac4d12996ad313abe435fe997c946c"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"2cc7ecc2c17eb7c8af0b808d5778e7862b2e3d3b","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            }"},{"line_number":124,"context_line":"        ]),"},{"line_number":125,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":126,"context_line":"        SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":127,"context_line":"        base.RULE_ADMIN_API,"},{"line_number":128,"context_line":"        \"Create a server on the requested compute_node\","},{"line_number":129,"context_line":"        ["}],"source_content_type":"text/x-python","patch_set":25,"id":"9fb8cfa7_1eccc25f","line":126,"range":{"start_line":126,"start_character":7,"end_line":126,"end_character":49},"updated":"2019-06-06 12:54:00.000000000","message":"let\u0027s introduce new policy with new naming convention suggested by oslo policy[1]\n\nIn this case, it can be \u0027compute:server:create:requested_destination\u0027\n\n[1] https://docs.openstack.org/oslo.policy/latest/user/usage.html#naming-policies","commit_id":"671beddcdc247aaa84c09040e2f0de1b64df3f6e"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            }"},{"line_number":124,"context_line":"        ]),"},{"line_number":125,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":126,"context_line":"        SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":127,"context_line":"        base.RULE_ADMIN_API,"},{"line_number":128,"context_line":"        \"Create a server on the requested compute_node\","},{"line_number":129,"context_line":"        ["}],"source_content_type":"text/x-python","patch_set":25,"id":"9fb8cfa7_79be3866","line":126,"range":{"start_line":126,"start_character":7,"end_line":126,"end_character":49},"in_reply_to":"9fb8cfa7_1eccc25f","updated":"2019-06-25 10:11:48.000000000","message":"Hi, SERVERS here is already \"os_compute_api:servers:%s\". So I think it is not an issue. And it meets the naming convention of oslo policy.","commit_id":"671beddcdc247aaa84c09040e2f0de1b64df3f6e"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"f35443b9b969e0a7826161cf436ab571e198b193","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            }"},{"line_number":124,"context_line":"        ]),"},{"line_number":125,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":126,"context_line":"        SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":127,"context_line":"        base.RULE_ADMIN_API,"},{"line_number":128,"context_line":"        \"Create a server on the requested compute_node\","},{"line_number":129,"context_line":"        ["}],"source_content_type":"text/x-python","patch_set":25,"id":"7faddb67_62cc56bc","line":126,"range":{"start_line":126,"start_character":7,"end_line":126,"end_character":49},"in_reply_to":"9fb8cfa7_79be3866","updated":"2019-07-09 02:56:09.000000000","message":"os_compute_api is not as per standard you do not need to follow existing \u0027SERVERS\u0027 name. You can create new name with \u0027compute:\u0027 prefix itself.","commit_id":"671beddcdc247aaa84c09040e2f0de1b64df3f6e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":116,"context_line":"        SERVERS % \u0027create:forced_host\u0027,"},{"line_number":117,"context_line":"        base.RULE_ADMIN_API,"},{"line_number":118,"context_line":"        \"Create a server on the specified host\","},{"line_number":119,"context_line":"        ["},{"line_number":120,"context_line":"            {"},{"line_number":121,"context_line":"                \u0027method\u0027: \u0027POST\u0027,"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_96c8a074","line":118,"updated":"2019-06-20 20:54:09.000000000","message":"Hmm, we could/should probably update this to say that in this case the server is forced to the specified host by bypassing the scheduler filters unlike the os_compute_api:servers:create:requested_destination rule.","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":116,"context_line":"        SERVERS % \u0027create:forced_host\u0027,"},{"line_number":117,"context_line":"        base.RULE_ADMIN_API,"},{"line_number":118,"context_line":"        \"Create a server on the specified host\","},{"line_number":119,"context_line":"        ["},{"line_number":120,"context_line":"            {"},{"line_number":121,"context_line":"                \u0027method\u0027: \u0027POST\u0027,"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_2f839206","line":118,"in_reply_to":"9fb8cfa7_96c8a074","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":126,"context_line":"        SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":127,"context_line":"        base.RULE_ADMIN_API,"},{"line_number":128,"context_line":"        \"Create a server on the requested compute_node\","},{"line_number":129,"context_line":"        ["},{"line_number":130,"context_line":"            {"},{"line_number":131,"context_line":"                \u0027method\u0027: \u0027POST\u0027,"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_16aa7084","line":128,"range":{"start_line":128,"start_character":42,"end_line":128,"end_character":54},"updated":"2019-06-20 20:54:09.000000000","message":"compute service host and/or hypervisor_hostname.\n\nI would also mention something like, \"In this case the requested host and/or hypervisor_hostname is validated by the scheduler filters unlike the os_compute_api:servers:create:forced_host rule.\"","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":126,"context_line":"        SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":127,"context_line":"        base.RULE_ADMIN_API,"},{"line_number":128,"context_line":"        \"Create a server on the requested compute_node\","},{"line_number":129,"context_line":"        ["},{"line_number":130,"context_line":"            {"},{"line_number":131,"context_line":"                \u0027method\u0027: \u0027POST\u0027,"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_4f860616","line":128,"range":{"start_line":128,"start_character":42,"end_line":128,"end_character":54},"in_reply_to":"9fb8cfa7_16aa7084","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6748a83fec4837283b233037c94f750274600754","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        SERVERS % \u0027create:forced_host\u0027,"},{"line_number":117,"context_line":"        base.RULE_ADMIN_API,"},{"line_number":118,"context_line":"        \"\"\""},{"line_number":119,"context_line":"Create a server on the specified host."},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"In this case, the server is forced to launch on the specified"},{"line_number":122,"context_line":"host by bypassing the scheduler filters unlike the"}],"source_content_type":"text/x-python","patch_set":30,"id":"7faddb67_ff5f9fe2","line":119,"range":{"start_line":119,"start_character":33,"end_line":119,"end_character":38},"updated":"2019-07-05 19:53:43.000000000","message":"\"host and/or node.\" because this policy rule is used in both cases.","commit_id":"592262e8cc75a698747b5bdafe1cfa0c8690cacd"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6748a83fec4837283b233037c94f750274600754","unresolved":false,"context_lines":[{"line_number":119,"context_line":"Create a server on the specified host."},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"In this case, the server is forced to launch on the specified"},{"line_number":122,"context_line":"host by bypassing the scheduler filters unlike the"},{"line_number":123,"context_line":"os_compute_api:servers:create:requested_destination rule."},{"line_number":124,"context_line":"\"\"\","},{"line_number":125,"context_line":"        ["}],"source_content_type":"text/x-python","patch_set":30,"id":"7faddb67_bf5927ff","line":122,"range":{"start_line":122,"start_character":0,"end_line":122,"end_character":4},"updated":"2019-07-05 19:53:43.000000000","message":"host and/or node","commit_id":"592262e8cc75a698747b5bdafe1cfa0c8690cacd"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6748a83fec4837283b233037c94f750274600754","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"In this case, the server is forced to launch on the specified"},{"line_number":122,"context_line":"host by bypassing the scheduler filters unlike the"},{"line_number":123,"context_line":"os_compute_api:servers:create:requested_destination rule."},{"line_number":124,"context_line":"\"\"\","},{"line_number":125,"context_line":"        ["},{"line_number":126,"context_line":"            {"}],"source_content_type":"text/x-python","patch_set":30,"id":"7faddb67_df450319","line":123,"range":{"start_line":123,"start_character":0,"end_line":123,"end_character":51},"updated":"2019-07-05 19:53:43.000000000","message":"``os_compute_api:servers:create:requested_destination``","commit_id":"592262e8cc75a698747b5bdafe1cfa0c8690cacd"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6748a83fec4837283b233037c94f750274600754","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"In this case, the requested host and/or hypervisor_hostname is"},{"line_number":139,"context_line":"validated by the scheduler filters unlike the"},{"line_number":140,"context_line":"os_compute_api:servers:create:forced_host rule."},{"line_number":141,"context_line":"\"\"\","},{"line_number":142,"context_line":"        ["},{"line_number":143,"context_line":"            {"}],"source_content_type":"text/x-python","patch_set":30,"id":"7faddb67_df5e63e5","line":140,"range":{"start_line":140,"start_character":0,"end_line":140,"end_character":41},"updated":"2019-07-05 19:53:43.000000000","message":"``os_compute_api:servers:create:forced_host``","commit_id":"592262e8cc75a698747b5bdafe1cfa0c8690cacd"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"f35443b9b969e0a7826161cf436ab571e198b193","unresolved":false,"context_lines":[{"line_number":129,"context_line":"            }"},{"line_number":130,"context_line":"        ]),"},{"line_number":131,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":132,"context_line":"        SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":133,"context_line":"        base.RULE_ADMIN_API,"},{"line_number":134,"context_line":"        \"\"\""},{"line_number":135,"context_line":"Create a server on the requested compute service host and/or"}],"source_content_type":"text/x-python","patch_set":33,"id":"7faddb67_025002d4","line":132,"range":{"start_line":132,"start_character":8,"end_line":132,"end_character":15},"updated":"2019-07-09 02:56:09.000000000","message":"can we make it \u0027compute:\u0027 instead of \u0027os_compute_api:\u0027 ?","commit_id":"2445ab285d6def04fc0d57ead668da0ef8ea3236"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e23b724685e21775c1508ace52d26ee1a58fe0c5","unresolved":false,"context_lines":[{"line_number":129,"context_line":"            }"},{"line_number":130,"context_line":"        ]),"},{"line_number":131,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":132,"context_line":"        SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":133,"context_line":"        base.RULE_ADMIN_API,"},{"line_number":134,"context_line":"        \"\"\""},{"line_number":135,"context_line":"Create a server on the requested compute service host and/or"}],"source_content_type":"text/x-python","patch_set":33,"id":"7faddb67_a9122e08","line":132,"range":{"start_line":132,"start_character":8,"end_line":132,"end_character":15},"in_reply_to":"7faddb67_025002d4","updated":"2019-07-09 13:28:51.000000000","message":"\u003e can we make it \u0027compute:\u0027 instead of \u0027os_compute_api:\u0027 ?\n\nDo you mean the full policy rule would then be:\n\ncompute:servers:create:requested_destination\n\n? That\u0027s fine with me and what I did in the cross-cell resize blueprint:\n\nhttps://review.opendev.org/#/c/638269/35/nova/policies/servers.py","commit_id":"2445ab285d6def04fc0d57ead668da0ef8ea3236"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"720e523dd6247a2d7f02dda609dcec163f7aa0e9","unresolved":false,"context_lines":[{"line_number":129,"context_line":"            }"},{"line_number":130,"context_line":"        ]),"},{"line_number":131,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":132,"context_line":"        SERVERS % \u0027create:requested_destination\u0027,"},{"line_number":133,"context_line":"        base.RULE_ADMIN_API,"},{"line_number":134,"context_line":"        \"\"\""},{"line_number":135,"context_line":"Create a server on the requested compute service host and/or"}],"source_content_type":"text/x-python","patch_set":33,"id":"7faddb67_8984120e","line":132,"range":{"start_line":132,"start_character":8,"end_line":132,"end_character":15},"in_reply_to":"7faddb67_a9122e08","updated":"2019-07-09 13:38:41.000000000","message":"Yeah that right. \u0027compute:servers:create:requested_destination\u0027","commit_id":"2445ab285d6def04fc0d57ead668da0ef8ea3236"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"323b65934c5cea1ba36b8982bf76b268b89d5e54","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"In this case, the server is forced to launch on the specified"},{"line_number":123,"context_line":"host and/or node by bypassing the scheduler filters unlike the"},{"line_number":124,"context_line":"``os_compute_api:servers:create:requested_destination`` rule."},{"line_number":125,"context_line":"\"\"\","},{"line_number":126,"context_line":"        ["},{"line_number":127,"context_line":"            {"}],"source_content_type":"text/x-python","patch_set":34,"id":"7faddb67_dfa4fcbb","line":124,"range":{"start_line":124,"start_character":2,"end_line":124,"end_character":16},"updated":"2019-07-09 14:44:38.000000000","message":"This is old.","commit_id":"8fa4d95d4393cdee23f01ca15349c2152da2dc13"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"4761efd7e752ea3a2bf7c18d1b38cfdf1a0cc4a8","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"In this case, the server is forced to launch on the specified"},{"line_number":123,"context_line":"host and/or node by bypassing the scheduler filters unlike the"},{"line_number":124,"context_line":"``os_compute_api:servers:create:requested_destination`` rule."},{"line_number":125,"context_line":"\"\"\","},{"line_number":126,"context_line":"        ["},{"line_number":127,"context_line":"            {"}],"source_content_type":"text/x-python","patch_set":34,"id":"7faddb67_ff48d8cc","line":124,"range":{"start_line":124,"start_character":2,"end_line":124,"end_character":16},"in_reply_to":"7faddb67_dfa4fcbb","updated":"2019-07-09 14:58:07.000000000","message":"Done","commit_id":"8fa4d95d4393cdee23f01ca15349c2152da2dc13"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"8d83b07d591af2a11aa98f4e5c7e1692ff8bf44d","unresolved":false,"context_lines":[{"line_number":130,"context_line":"            }"},{"line_number":131,"context_line":"        ]),"},{"line_number":132,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":133,"context_line":"        REQUESTED_DESTINATION,"},{"line_number":134,"context_line":"        base.RULE_ADMIN_API,"},{"line_number":135,"context_line":"        \"\"\""},{"line_number":136,"context_line":"Create a server on the requested compute service host and/or"}],"source_content_type":"text/x-python","patch_set":34,"id":"7faddb67_c4142fa3","line":133,"range":{"start_line":133,"start_character":8,"end_line":133,"end_character":29},"updated":"2019-07-09 14:15:26.000000000","message":"With new policy name.","commit_id":"8fa4d95d4393cdee23f01ca15349c2152da2dc13"}],"nova/scheduler/host_manager.py":[{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"9d452c00bc80bf87e8e4b72250046a3df840f87b","unresolved":false,"context_lines":[{"line_number":545,"context_line":"                requested_nodes \u003d [x for x in hosts"},{"line_number":546,"context_line":"                                   if x.host \u003d\u003d host and x.nodename \u003d\u003d node]"},{"line_number":547,"context_line":"            else:"},{"line_number":548,"context_line":"                # NOTE(boxiang): When you specify the requested host on creating"},{"line_number":549,"context_line":"                # server, you may set only host for requested_destination."},{"line_number":550,"context_line":"                requested_nodes \u003d [x for x in hosts"},{"line_number":551,"context_line":"                                   if x.host \u003d\u003d host]"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fce034c_c4a4e9a8","line":548,"range":{"start_line":548,"start_character":0,"end_line":548,"end_character":80},"updated":"2019-04-19 02:36:30.000000000","message":"This line should be less than 80 characters.","commit_id":"3aea8b1abf244caa7956ceeb846d9a4010ab462c"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"4ac404fbdf44efe1fa503751c900d7ee91ba0bc9","unresolved":false,"context_lines":[{"line_number":545,"context_line":"                requested_nodes \u003d [x for x in hosts"},{"line_number":546,"context_line":"                                   if x.host \u003d\u003d host and x.nodename \u003d\u003d node]"},{"line_number":547,"context_line":"            else:"},{"line_number":548,"context_line":"                # NOTE(boxiang): When you specify the requested host on creating"},{"line_number":549,"context_line":"                # server, you may set only host for requested_destination."},{"line_number":550,"context_line":"                requested_nodes \u003d [x for x in hosts"},{"line_number":551,"context_line":"                                   if x.host \u003d\u003d host]"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fce034c_c98f1dcb","line":548,"range":{"start_line":548,"start_character":0,"end_line":548,"end_character":80},"in_reply_to":"3fce034c_c4a4e9a8","updated":"2019-04-19 09:55:05.000000000","message":"Done","commit_id":"3aea8b1abf244caa7956ceeb846d9a4010ab462c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1d785b8c283cfbf420e9af38c5f214b52bc1595b","unresolved":false,"context_lines":[{"line_number":546,"context_line":"                                   if x.host \u003d\u003d host and x.nodename \u003d\u003d node]"},{"line_number":547,"context_line":"            else:"},{"line_number":548,"context_line":"                # NOTE(boxiang): When you specify the requested host on"},{"line_number":549,"context_line":"                # creating server, you may set only host for"},{"line_number":550,"context_line":"                # requested_destination."},{"line_number":551,"context_line":"                requested_nodes \u003d [x for x in hosts"},{"line_number":552,"context_line":"                                   if x.host \u003d\u003d host]"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_496a3ded","line":549,"range":{"start_line":549,"start_character":39,"end_line":549,"end_character":56},"updated":"2019-05-13 18:52:38.000000000","message":"This wording is confusing, makes it sound like you\u0027re only allowed to set the host. I think what you meant is that it\u0027s possible that only the host (and not the node) is specified, right?","commit_id":"a8e895c35efbd5c5496060d99c062a474ce00a86"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"45215ccd665f35d6e31a394b18328817b6a19c1c","unresolved":false,"context_lines":[{"line_number":546,"context_line":"                                   if x.host \u003d\u003d host and x.nodename \u003d\u003d node]"},{"line_number":547,"context_line":"            else:"},{"line_number":548,"context_line":"                # NOTE(boxiang): When you specify the requested host on"},{"line_number":549,"context_line":"                # creating server, you may set only host for"},{"line_number":550,"context_line":"                # requested_destination."},{"line_number":551,"context_line":"                requested_nodes \u003d [x for x in hosts"},{"line_number":552,"context_line":"                                   if x.host \u003d\u003d host]"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_83a1e9fa","line":549,"range":{"start_line":549,"start_character":39,"end_line":549,"end_character":56},"in_reply_to":"dfbec78f_496a3ded","updated":"2019-05-14 09:21:02.000000000","message":"Yeah, Done. :)","commit_id":"a8e895c35efbd5c5496060d99c062a474ce00a86"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":538,"context_line":"                LOG.info(\"No nodes matched due to not matching \""},{"line_number":539,"context_line":"                         \"\u0027force_nodes\u0027 value of \u0027%s\u0027\", forced_nodes_str)"},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"        def _get_hosts_matching_request(hosts, requested_destination):"},{"line_number":542,"context_line":"            (host, node) \u003d (requested_destination.host,"},{"line_number":543,"context_line":"                            requested_destination.node)"},{"line_number":544,"context_line":"            if node:"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_762decfb","line":541,"range":{"start_line":541,"start_character":12,"end_line":541,"end_character":39},"updated":"2019-06-20 20:54:09.000000000","message":"It would be good to have some code comments in this method for the various cases, especially if we are relying on code in resources_from_request_spec to do some pre-filtering for us.","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":538,"context_line":"                LOG.info(\"No nodes matched due to not matching \""},{"line_number":539,"context_line":"                         \"\u0027force_nodes\u0027 value of \u0027%s\u0027\", forced_nodes_str)"},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"        def _get_hosts_matching_request(hosts, requested_destination):"},{"line_number":542,"context_line":"            (host, node) \u003d (requested_destination.host,"},{"line_number":543,"context_line":"                            requested_destination.node)"},{"line_number":544,"context_line":"            if node:"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_832831e2","line":541,"range":{"start_line":541,"start_character":12,"end_line":541,"end_character":39},"in_reply_to":"9fb8cfa7_762decfb","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":539,"context_line":"                         \"\u0027force_nodes\u0027 value of \u0027%s\u0027\", forced_nodes_str)"},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"        def _get_hosts_matching_request(hosts, requested_destination):"},{"line_number":542,"context_line":"            (host, node) \u003d (requested_destination.host,"},{"line_number":543,"context_line":"                            requested_destination.node)"},{"line_number":544,"context_line":"            if node:"},{"line_number":545,"context_line":"                requested_nodes \u003d [x for x in hosts"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_568ea827","line":542,"range":{"start_line":542,"start_character":28,"end_line":542,"end_character":54},"updated":"2019-06-20 20:54:09.000000000","message":"So even if host is not specified in the API, this is OK because _get_hosts_matching_request won\u0027t be called unless \u0027host\u0027 is in requested_destination (L567 below).","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":539,"context_line":"                         \"\u0027force_nodes\u0027 value of \u0027%s\u0027\", forced_nodes_str)"},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"        def _get_hosts_matching_request(hosts, requested_destination):"},{"line_number":542,"context_line":"            (host, node) \u003d (requested_destination.host,"},{"line_number":543,"context_line":"                            requested_destination.node)"},{"line_number":544,"context_line":"            if node:"},{"line_number":545,"context_line":"                requested_nodes \u003d [x for x in hosts"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_237f05e1","line":542,"range":{"start_line":542,"start_character":28,"end_line":542,"end_character":54},"in_reply_to":"9fb8cfa7_568ea827","updated":"2019-06-25 10:11:48.000000000","message":"Yeah, if we call the _get_hosts_matching_request, the host must be in requested_destination object.","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":541,"context_line":"        def _get_hosts_matching_request(hosts, requested_destination):"},{"line_number":542,"context_line":"            (host, node) \u003d (requested_destination.host,"},{"line_number":543,"context_line":"                            requested_destination.node)"},{"line_number":544,"context_line":"            if node:"},{"line_number":545,"context_line":"                requested_nodes \u003d [x for x in hosts"},{"line_number":546,"context_line":"                                   if x.host \u003d\u003d host and x.nodename \u003d\u003d node]"},{"line_number":547,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_b6a604ab","line":544,"updated":"2019-06-20 20:54:09.000000000","message":"OK so in this case, both host and hypervisor_hostname were specified in the API because if host was not specified we wouldn\u0027t be in this method, so in this case we want to filter on both host and nodename like before.","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":545,"context_line":"                requested_nodes \u003d [x for x in hosts"},{"line_number":546,"context_line":"                                   if x.host \u003d\u003d host and x.nodename \u003d\u003d node]"},{"line_number":547,"context_line":"            else:"},{"line_number":548,"context_line":"                requested_nodes \u003d [x for x in hosts"},{"line_number":549,"context_line":"                                   if x.host \u003d\u003d host]"},{"line_number":550,"context_line":"            if requested_nodes:"},{"line_number":551,"context_line":"                LOG.info(\u0027Host filter only checking host %(host)s and \u0027"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_16b110e2","line":548,"updated":"2019-06-20 20:54:09.000000000","message":"And in this case, the host was specified but not hypervisor_hostname, so we just filter on host and not nodename.\n\nWhat happens in the case that host is not specified but only hypervisor_hostname is? In that case we won\u0027t get into this method because Destination.host won\u0027t be set by the API. Where do we match the HostState to the requested node in that case? Is that what this is for?\n\nhttps://review.opendev.org/#/c/645520/29/nova/scheduler/utils.py","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":545,"context_line":"                requested_nodes \u003d [x for x in hosts"},{"line_number":546,"context_line":"                                   if x.host \u003d\u003d host and x.nodename \u003d\u003d node]"},{"line_number":547,"context_line":"            else:"},{"line_number":548,"context_line":"                requested_nodes \u003d [x for x in hosts"},{"line_number":549,"context_line":"                                   if x.host \u003d\u003d host]"},{"line_number":550,"context_line":"            if requested_nodes:"},{"line_number":551,"context_line":"                LOG.info(\u0027Host filter only checking host %(host)s and \u0027"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_434c79c7","line":548,"in_reply_to":"9fb8cfa7_16b110e2","updated":"2019-06-25 10:11:48.000000000","message":"There are three cases for API:\n1. only host\n2. only hypervisor_hostname\n3. both host and hypervisor_hostname\n\nIn fact, we will call the function resources_from_request_spec[0] in utils to do pre-filter. So we will get one node when only hypervisor_hostname is supplied.\n\n[0] https://review.opendev.org/#/c/645520/29/nova/scheduler/utils.py@528","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6748a83fec4837283b233037c94f750274600754","unresolved":false,"context_lines":[{"line_number":546,"context_line":"            Starting with API 2.74 microversion, we also can specify the"},{"line_number":547,"context_line":"            host/node to select hosts to launch a server:"},{"line_number":548,"context_line":"             - If only host(or only node)(or both host and node) is supplied"},{"line_number":549,"context_line":"               and we get one node from get_compute_nodes_by_host_or_node,"},{"line_number":550,"context_line":"               the destination will be set both host and node."},{"line_number":551,"context_line":"             - If only host is supplied and we get more than one node from"},{"line_number":552,"context_line":"               get_compute_nodes_by_host_or_node, the destination will only"}],"source_content_type":"text/x-python","patch_set":30,"id":"7faddb67_1f8f1b2b","line":549,"range":{"start_line":549,"start_character":40,"end_line":549,"end_character":73},"updated":"2019-07-05 19:53:43.000000000","message":"\"from get_compute_nodes_by_host_or_node in resources_from_request_spec, the destination...\"","commit_id":"592262e8cc75a698747b5bdafe1cfa0c8690cacd"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6748a83fec4837283b233037c94f750274600754","unresolved":false,"context_lines":[{"line_number":549,"context_line":"               and we get one node from get_compute_nodes_by_host_or_node,"},{"line_number":550,"context_line":"               the destination will be set both host and node."},{"line_number":551,"context_line":"             - If only host is supplied and we get more than one node from"},{"line_number":552,"context_line":"               get_compute_nodes_by_host_or_node, the destination will only"},{"line_number":553,"context_line":"               include host."},{"line_number":554,"context_line":"            \"\"\""},{"line_number":555,"context_line":"            (host, node) \u003d (requested_destination.host,"}],"source_content_type":"text/x-python","patch_set":30,"id":"7faddb67_ff8ebf25","line":552,"range":{"start_line":552,"start_character":15,"end_line":552,"end_character":48},"updated":"2019-07-05 19:53:43.000000000","message":"same - I want to make it clear where this is coming from because for someone that doesn\u0027t understand the tightly coupled nature of this code to that code, it would be confusing to read this and wonder what this is talking about since it doesn\u0027t call get_compute_nodes_by_host_or_node.","commit_id":"592262e8cc75a698747b5bdafe1cfa0c8690cacd"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"02cbd336453e14b6542b30281f53f80b4fe3cb55","unresolved":false,"context_lines":[{"line_number":562,"context_line":"                                   if x.host \u003d\u003d host and x.nodename \u003d\u003d node]"},{"line_number":563,"context_line":"            else:"},{"line_number":564,"context_line":"                requested_nodes \u003d [x for x in hosts"},{"line_number":565,"context_line":"                                   if x.host \u003d\u003d host]"},{"line_number":566,"context_line":"            if requested_nodes:"},{"line_number":567,"context_line":"                LOG.info(\u0027Host filter only checking host %(host)s and \u0027"},{"line_number":568,"context_line":"                         \u0027node %(node)s\u0027, {\u0027host\u0027: host, \u0027node\u0027: node})"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_5dd0ea1f","line":565,"updated":"2019-07-11 15:25:34.000000000","message":"I had some concerns with accepting a Destination object to be only having a host field set, but given https://review.opendev.org/#/c/645520/35/nova/scheduler/utils.py@528 I\u0027m all good.","commit_id":"564290ab145d2710d3e82b5c4871e647e4d516c4"}],"nova/scheduler/utils.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":496,"context_line":"    if \u0027requested_destination\u0027 in spec_obj:"},{"line_number":497,"context_line":"        destination \u003d spec_obj.requested_destination"},{"line_number":498,"context_line":"        if destination:"},{"line_number":499,"context_line":"            if \u0027host\u0027 in destination:"},{"line_number":500,"context_line":"                target_host \u003d destination.host"},{"line_number":501,"context_line":"            if \u0027node\u0027 in destination:"},{"line_number":502,"context_line":"                target_node \u003d destination.node"},{"line_number":503,"context_line":"            if \u0027cell\u0027 in destination:"},{"line_number":504,"context_line":"                target_cell \u003d destination.cell"},{"line_number":505,"context_line":"            if destination.aggregates:"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_964740bd","line":502,"range":{"start_line":499,"start_character":12,"end_line":502,"end_character":46},"updated":"2019-06-20 20:54:09.000000000","message":"OK so we get these in the non-force case.","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":532,"context_line":"                      {\u0027host\u0027: target_host, \u0027node\u0027: target_node})"},{"line_number":533,"context_line":"            raise exception.NoValidHost(reason\u003dreason)"},{"line_number":534,"context_line":"        if len(nodes) \u003d\u003d 1:"},{"line_number":535,"context_line":"            if \u0027requested_destination\u0027 in spec_obj and destination:"},{"line_number":536,"context_line":"                destination.host \u003d nodes[0].host"},{"line_number":537,"context_line":"                destination.node \u003d nodes[0].hypervisor_hostname"},{"line_number":538,"context_line":"            grp \u003d res_req.get_request_group(None)"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_3610d4a8","line":535,"range":{"start_line":535,"start_character":55,"end_line":535,"end_character":66},"updated":"2019-06-20 20:54:09.000000000","message":"A bit weird but OK, this is the variable set on L497 above.","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":534,"context_line":"        if len(nodes) \u003d\u003d 1:"},{"line_number":535,"context_line":"            if \u0027requested_destination\u0027 in spec_obj and destination:"},{"line_number":536,"context_line":"                destination.host \u003d nodes[0].host"},{"line_number":537,"context_line":"                destination.node \u003d nodes[0].hypervisor_hostname"},{"line_number":538,"context_line":"            grp \u003d res_req.get_request_group(None)"},{"line_number":539,"context_line":"            grp.in_tree \u003d nodes[0].uuid"},{"line_number":540,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_767bacf3","line":537,"updated":"2019-06-20 20:54:09.000000000","message":"We should have a comment for this code. I\u0027m guessing this is here so that HostManager.get_filtered_hosts will later reduce the number of HostState objects to run through the filters when only hypervisor_hostname is specified (but not host).","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":534,"context_line":"        if len(nodes) \u003d\u003d 1:"},{"line_number":535,"context_line":"            if \u0027requested_destination\u0027 in spec_obj and destination:"},{"line_number":536,"context_line":"                destination.host \u003d nodes[0].host"},{"line_number":537,"context_line":"                destination.node \u003d nodes[0].hypervisor_hostname"},{"line_number":538,"context_line":"            grp \u003d res_req.get_request_group(None)"},{"line_number":539,"context_line":"            grp.in_tree \u003d nodes[0].uuid"},{"line_number":540,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_8304b14b","line":537,"in_reply_to":"9fb8cfa7_767bacf3","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"}],"nova/tests/fixtures.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7d65a044feddf9283f739c08273f07d4fd6aa68a","unresolved":false,"context_lines":[{"line_number":759,"context_line":"            flavor.create()"},{"line_number":760,"context_line":""},{"line_number":761,"context_line":""},{"line_number":762,"context_line":"class DefaultComputeNodesFixture(fixtures.Fixture):"},{"line_number":763,"context_line":"    def setUp(self):"},{"line_number":764,"context_line":"        super(DefaultComputeNodesFixture, self).setUp()"},{"line_number":765,"context_line":"        ctxt \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":31,"id":"7faddb67_d8e668e9","line":762,"updated":"2019-07-08 16:29:58.000000000","message":"Can we delete this now? Nothing is using it anymore since you fixed the functional API samples tests to use a real compute node in the database.","commit_id":"dd61ba7c63efc22716a6fbd63d720f448e01a670"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"93a01853832259a9fafc301ac27a67ba8f37c007","unresolved":false,"context_lines":[{"line_number":759,"context_line":"            flavor.create()"},{"line_number":760,"context_line":""},{"line_number":761,"context_line":""},{"line_number":762,"context_line":"class DefaultComputeNodesFixture(fixtures.Fixture):"},{"line_number":763,"context_line":"    def setUp(self):"},{"line_number":764,"context_line":"        super(DefaultComputeNodesFixture, self).setUp()"},{"line_number":765,"context_line":"        ctxt \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":31,"id":"7faddb67_ce08de29","line":762,"in_reply_to":"7faddb67_d8e668e9","updated":"2019-07-08 17:19:00.000000000","message":"Done","commit_id":"dd61ba7c63efc22716a6fbd63d720f448e01a670"}],"nova/tests/functional/api_sample_tests/api_samples/servers/server-create-req-v274-host-and-node.json.tpl":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6748a83fec4837283b233037c94f750274600754","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"server\" : {"},{"line_number":3,"context_line":"        \"adminPass\": \"MySecretPass\","},{"line_number":4,"context_line":"        \"accessIPv4\": \"%(access_ip_v4)s\","}],"source_content_type":"text/x-smarty","patch_set":30,"id":"7faddb67_ffb79fd7","line":1,"updated":"2019-07-05 19:53:43.000000000","message":"Hmm, I see this was renamed from nova/tests/functional/api_sample_tests/api_samples/servers/v2.74/server-create-req.json.tpl in PS29. Normally the microversion should be a subdirectory like you had it rather than part of the sample name. Can we fix that?","commit_id":"592262e8cc75a698747b5bdafe1cfa0c8690cacd"}],"nova/tests/functional/api_sample_tests/api_samples/servers/server-create-req-v274-only-host.json.tpl":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6748a83fec4837283b233037c94f750274600754","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"server\" : {"},{"line_number":3,"context_line":"        \"adminPass\": \"MySecretPass\","},{"line_number":4,"context_line":"        \"accessIPv4\": \"%(access_ip_v4)s\","}],"source_content_type":"text/x-smarty","patch_set":30,"id":"7faddb67_bfb127e4","line":1,"updated":"2019-07-05 19:53:43.000000000","message":"As noted earlier, this should be in a microversion-specific subdirectory:\n\nnova/tests/functional/api_sample_tests/api_samples/servers/v2.74/\n\nThen you can take the v274 out of the filename.","commit_id":"592262e8cc75a698747b5bdafe1cfa0c8690cacd"}],"nova/tests/functional/api_sample_tests/api_samples/servers/server-create-req-v274-only-node.json.tpl":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6748a83fec4837283b233037c94f750274600754","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"server\" : {"},{"line_number":3,"context_line":"        \"adminPass\": \"MySecretPass\","},{"line_number":4,"context_line":"        \"accessIPv4\": \"%(access_ip_v4)s\","}],"source_content_type":"text/x-smarty","patch_set":30,"id":"7faddb67_5fc27335","line":1,"updated":"2019-07-05 19:53:43.000000000","message":"same comment as nova/tests/functional/api_sample_tests/api_samples/servers/server-create-req-v274-only-host.json.tpl","commit_id":"592262e8cc75a698747b5bdafe1cfa0c8690cacd"}],"nova/tests/functional/api_sample_tests/api_samples/servers/v2.74/server-create-req.json.tpl":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1d785b8c283cfbf420e9af38c5f214b52bc1595b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"dfbec78f_2987c9b7","line":21,"updated":"2019-05-13 18:52:38.000000000","message":"was this supposed to have \u0027host\u0027 or \u0027hypervisor_hostname\u0027 in it somewhere?","commit_id":"a8e895c35efbd5c5496060d99c062a474ce00a86"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"45215ccd665f35d6e31a394b18328817b6a19c1c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"dfbec78f_43f531ec","line":21,"in_reply_to":"dfbec78f_2987c9b7","updated":"2019-05-14 09:21:02.000000000","message":"Done. My fault.","commit_id":"a8e895c35efbd5c5496060d99c062a474ce00a86"}],"nova/tests/functional/api_sample_tests/test_servers.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1d785b8c283cfbf420e9af38c5f214b52bc1595b","unresolved":false,"context_lines":[{"line_number":581,"context_line":"    scenarios \u003d [(\u0027v2_74\u0027, {\u0027api_major_version\u0027: \u0027v2.1\u0027})]"},{"line_number":582,"context_line":""},{"line_number":583,"context_line":"    def setUp(self):"},{"line_number":584,"context_line":"        super(ServersSampleJson273Test, self).setUp()"},{"line_number":585,"context_line":"        self.common_subs \u003d {"},{"line_number":586,"context_line":"            \u0027hostid\u0027: \u0027[a-f0-9]+\u0027,"},{"line_number":587,"context_line":"            \u0027instance_name\u0027: \u0027instance-\\d{8}\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_c94cedc9","line":584,"range":{"start_line":584,"start_character":33,"end_line":584,"end_character":34},"updated":"2019-05-13 18:52:38.000000000","message":"4","commit_id":"a8e895c35efbd5c5496060d99c062a474ce00a86"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"45215ccd665f35d6e31a394b18328817b6a19c1c","unresolved":false,"context_lines":[{"line_number":581,"context_line":"    scenarios \u003d [(\u0027v2_74\u0027, {\u0027api_major_version\u0027: \u0027v2.1\u0027})]"},{"line_number":582,"context_line":""},{"line_number":583,"context_line":"    def setUp(self):"},{"line_number":584,"context_line":"        super(ServersSampleJson273Test, self).setUp()"},{"line_number":585,"context_line":"        self.common_subs \u003d {"},{"line_number":586,"context_line":"            \u0027hostid\u0027: \u0027[a-f0-9]+\u0027,"},{"line_number":587,"context_line":"            \u0027instance_name\u0027: \u0027instance-\\d{8}\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_43ce91b4","line":584,"range":{"start_line":584,"start_character":33,"end_line":584,"end_character":34},"in_reply_to":"dfbec78f_c94cedc9","updated":"2019-05-14 09:21:02.000000000","message":"Done","commit_id":"a8e895c35efbd5c5496060d99c062a474ce00a86"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"bb34f396110781a02c4bf0b633de341200308431","unresolved":false,"context_lines":[{"line_number":582,"context_line":""},{"line_number":583,"context_line":"    def setUp(self):"},{"line_number":584,"context_line":"        super(ServersSampleJson274Test, self).setUp()"},{"line_number":585,"context_line":"        self.common_subs \u003d {"},{"line_number":586,"context_line":"            \u0027hostid\u0027: \u0027[a-f0-9]+\u0027,"},{"line_number":587,"context_line":"            \u0027instance_name\u0027: \u0027instance-\\d{8}\u0027,"},{"line_number":588,"context_line":"            \u0027hypervisor_hostname\u0027: r\u0027[\\w\\.\\-]+\u0027,"},{"line_number":589,"context_line":"            \u0027hostname\u0027: r\u0027[\\w\\.\\-]+\u0027,"},{"line_number":590,"context_line":"            \u0027access_ip_v4\u0027: \u00271.2.3.4\u0027,"},{"line_number":591,"context_line":"            \u0027access_ip_v6\u0027: \u002780fe::\u0027,"},{"line_number":592,"context_line":"            \u0027user_data\u0027: (self.user_data if six.PY2"},{"line_number":593,"context_line":"                          else self.user_data.decode(\u0027utf-8\u0027)),"},{"line_number":594,"context_line":"            \u0027cdrive\u0027: \u0027.*\u0027,"},{"line_number":595,"context_line":"        }"},{"line_number":596,"context_line":""},{"line_number":597,"context_line":"    def test_servers_post(self):"},{"line_number":598,"context_line":"        def _fake_compute_node_get_by_host_and_nodename(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":17,"id":"dfbec78f_87ea42d5","line":595,"range":{"start_line":585,"start_character":8,"end_line":595,"end_character":9},"updated":"2019-05-15 08:19:01.000000000","message":"do you really need this? since we have subs in the _post_server method.","commit_id":"522c2064bb63ce499c540d28786f5e775a0ac85e"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"7daac8bba1d6fc3733bc3876b03405db6e955a70","unresolved":false,"context_lines":[{"line_number":582,"context_line":""},{"line_number":583,"context_line":"    def setUp(self):"},{"line_number":584,"context_line":"        super(ServersSampleJson274Test, self).setUp()"},{"line_number":585,"context_line":"        self.common_subs \u003d {"},{"line_number":586,"context_line":"            \u0027hostid\u0027: \u0027[a-f0-9]+\u0027,"},{"line_number":587,"context_line":"            \u0027instance_name\u0027: \u0027instance-\\d{8}\u0027,"},{"line_number":588,"context_line":"            \u0027hypervisor_hostname\u0027: r\u0027[\\w\\.\\-]+\u0027,"},{"line_number":589,"context_line":"            \u0027hostname\u0027: r\u0027[\\w\\.\\-]+\u0027,"},{"line_number":590,"context_line":"            \u0027access_ip_v4\u0027: \u00271.2.3.4\u0027,"},{"line_number":591,"context_line":"            \u0027access_ip_v6\u0027: \u002780fe::\u0027,"},{"line_number":592,"context_line":"            \u0027user_data\u0027: (self.user_data if six.PY2"},{"line_number":593,"context_line":"                          else self.user_data.decode(\u0027utf-8\u0027)),"},{"line_number":594,"context_line":"            \u0027cdrive\u0027: \u0027.*\u0027,"},{"line_number":595,"context_line":"        }"},{"line_number":596,"context_line":""},{"line_number":597,"context_line":"    def test_servers_post(self):"},{"line_number":598,"context_line":"        def _fake_compute_node_get_by_host_and_nodename(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":17,"id":"bfb3d3c7_67b1f08f","line":595,"range":{"start_line":585,"start_character":8,"end_line":595,"end_character":9},"in_reply_to":"dfbec78f_87ea42d5","updated":"2019-05-20 06:42:22.000000000","message":"Done. Remove it.","commit_id":"522c2064bb63ce499c540d28786f5e775a0ac85e"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"bb34f396110781a02c4bf0b633de341200308431","unresolved":false,"context_lines":[{"line_number":595,"context_line":"        }"},{"line_number":596,"context_line":""},{"line_number":597,"context_line":"    def test_servers_post(self):"},{"line_number":598,"context_line":"        def _fake_compute_node_get_by_host_and_nodename(*args, **kwargs):"},{"line_number":599,"context_line":"            return objects.ComputeNode("},{"line_number":600,"context_line":"                host\u003d\"compute-node-01\", hypervisor_hostname\u003d\"compute-node-01\")"},{"line_number":601,"context_line":""},{"line_number":602,"context_line":"        self.stub_out(\u0027nova.objects.ComputeNode.get_by_host_and_nodename\u0027,"},{"line_number":603,"context_line":"                      _fake_compute_node_get_by_host_and_nodename)"}],"source_content_type":"text/x-python","patch_set":17,"id":"dfbec78f_07b892e2","line":600,"range":{"start_line":598,"start_character":8,"end_line":600,"end_character":78},"updated":"2019-05-15 08:19:01.000000000","message":"In the functional test, we prefer to not fake the db call.","commit_id":"522c2064bb63ce499c540d28786f5e775a0ac85e"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"7daac8bba1d6fc3733bc3876b03405db6e955a70","unresolved":false,"context_lines":[{"line_number":595,"context_line":"        }"},{"line_number":596,"context_line":""},{"line_number":597,"context_line":"    def test_servers_post(self):"},{"line_number":598,"context_line":"        def _fake_compute_node_get_by_host_and_nodename(*args, **kwargs):"},{"line_number":599,"context_line":"            return objects.ComputeNode("},{"line_number":600,"context_line":"                host\u003d\"compute-node-01\", hypervisor_hostname\u003d\"compute-node-01\")"},{"line_number":601,"context_line":""},{"line_number":602,"context_line":"        self.stub_out(\u0027nova.objects.ComputeNode.get_by_host_and_nodename\u0027,"},{"line_number":603,"context_line":"                      _fake_compute_node_get_by_host_and_nodename)"}],"source_content_type":"text/x-python","patch_set":17,"id":"bfb3d3c7_c771bce2","line":600,"range":{"start_line":598,"start_character":8,"end_line":600,"end_character":78},"in_reply_to":"dfbec78f_07b892e2","updated":"2019-05-20 06:42:22.000000000","message":"\u003e In the functional test, we prefer to not fake the db call.\n\nIf do not fake the db, I meet the error msg.\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nFailed 1 tests - output below:\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nnova.tests.functional.api_sample_tests.test_servers.ServersSampleJson274Test.test_servers_post(v2_74)\n-----------------------------------------------------------------------------------------------------\n\nCaptured traceback:\n~~~~~~~~~~~~~~~~~~~\n    Traceback (most recent call last):\n      File \"nova/tests/functional/api_sample_tests/test_servers.py\", line 587, in test_servers_post\n        self._post_server(use_common_server_api_samples\u003dFalse)\n      File \"nova/tests/functional/api_sample_tests/test_servers.py\", line 93, in _post_server\n        response, 202)\n      File \"nova/tests/functional/api_samples_test_base.py\", line 366, in _verify_response\n        self.assertEqual(exp_code, response.status_code, message)\n      File \"/root/openstack/nova/.tox/functional/local/lib/python2.7/site-packages/testtools/testcase.py\", line 411, in assertEqual\n        self.assertThat(observed, matcher, message)\n      File \"/root/openstack/nova/.tox/functional/local/lib/python2.7/site-packages/testtools/testcase.py\", line 498, in assertThat\n        raise mismatch_error\n    testtools.matchers._impl.MismatchError: 202 !\u003d 400: {\"badRequest\": {\"message\": \"Can not find requested compute host\", \"code\": 400}}\n\nHow can I get the db info for the compute node.","commit_id":"522c2064bb63ce499c540d28786f5e775a0ac85e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":580,"context_line":"        super(ServersSampleJson274Test, self).setUp()"},{"line_number":581,"context_line":"        self.useFixture(nova_fixtures.DefaultComputeNodesFixture())"},{"line_number":582,"context_line":""},{"line_number":583,"context_line":"    def test_servers_post(self):"},{"line_number":584,"context_line":"        self._post_server(use_common_server_api_samples\u003dFalse)"},{"line_number":585,"context_line":""},{"line_number":586,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_b670440a","line":583,"updated":"2019-06-20 20:54:09.000000000","message":"It would probably be good to have 3 tests and 3 samples as a result:\n\n1. host only\n2. hypervisor_hostname only\n3. host and hypervisor_hostname\n\nOtherwise we don\u0027t have functional testing of the hypevisor_hostname only case which is the most complicated case in the scheduler host manager code and is different in the API validation (it\u0027s the one that uses placement).","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":580,"context_line":"        super(ServersSampleJson274Test, self).setUp()"},{"line_number":581,"context_line":"        self.useFixture(nova_fixtures.DefaultComputeNodesFixture())"},{"line_number":582,"context_line":""},{"line_number":583,"context_line":"    def test_servers_post(self):"},{"line_number":584,"context_line":"        self._post_server(use_common_server_api_samples\u003dFalse)"},{"line_number":585,"context_line":""},{"line_number":586,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_5949c6b4","line":583,"in_reply_to":"9fb8cfa7_b670440a","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6748a83fec4837283b233037c94f750274600754","unresolved":false,"context_lines":[{"line_number":580,"context_line":"        super(ServersSampleJson274Test, self).setUp()"},{"line_number":581,"context_line":""},{"line_number":582,"context_line":"    def test_servers_post_with_only_host(self):"},{"line_number":583,"context_line":"        self.common_req_names \u003d ["},{"line_number":584,"context_line":"            (\u00272.74\u0027, None, \u0027server-create-req-v274-only-host\u0027)]"},{"line_number":585,"context_line":"        self._post_server()"},{"line_number":586,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"7faddb67_1f0b9b8e","line":583,"updated":"2019-07-05 19:53:43.000000000","message":"This doesn\u0027t seem right and I\u0027m assuming you\u0027re doing this because you don\u0027t have the samples in a microversion-specific subdirectory. I think you want to have these samples in a v2.74 subdirectory and then you have to pass use_common_server_api_samples\u003dFalse like you were and also pass the sample name, e.g.:\n\nself._post_server(use_common_server_api_samples\u003dFalse)\n\nBut it looks like that\u0027s a problem because _post_server calls _get_request_name which only returns \"server-create-req\" if use_common_server_api_samples\u003dFalse...hmm, that\u0027s annoying.\n\nWe could modify _post_server and _get_request_name to provide an optional sample name, e.g.:\n\n    def _get_request_name(self, use_common, sample_name\u003dNone):\n        if not use_common:\n            return sample_name or \u0027server-create-req\u0027\n\n        api_version \u003d self.microversion or \u00272.1\u0027\n        for min, max, name in self.common_req_names:\n            if avr.APIVersionRequest(api_version).matches(\n                    avr.APIVersionRequest(min), avr.APIVersionRequest(max)):\n                return name\n\n    def _post_server(self,\n                     use_common_server_api_samples\u003dTrue, name\u003dNone,\n                     extra_subs\u003dNone,\n                     sample_name\u003dNone):\n        ...\n\nJust a thought. If this gets too messy you can just leave what you have and we can clean it up in a follow up patch (maybe leave a TODO if you just leave this as-is, e.g. TODO: move samples to microversion-specific subdirectory).","commit_id":"592262e8cc75a698747b5bdafe1cfa0c8690cacd"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6748a83fec4837283b233037c94f750274600754","unresolved":false,"context_lines":[{"line_number":587,"context_line":"    def test_servers_post_with_only_node(self):"},{"line_number":588,"context_line":"        self.common_req_names \u003d ["},{"line_number":589,"context_line":"            (\u00272.74\u0027, None, \u0027server-create-req-v274-only-node\u0027)]"},{"line_number":590,"context_line":"        self.stub_out(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":591,"context_line":"                      \u0027get_provider_by_name\u0027,"},{"line_number":592,"context_line":"                      lambda *a: [{\"id\": 1, \"name\": \"compute-node-1\"}])"},{"line_number":593,"context_line":"        self._post_server()"}],"source_content_type":"text/x-python","patch_set":30,"id":"7faddb67_df60a335","line":590,"updated":"2019-07-05 19:53:43.000000000","message":"Hmm, this isn\u0027t very good for a functional test. There should be an actual compute service started and running for this test, but it probably doesn\u0027t match the name of the node in your sample (it\u0027s probably fake-mini):\n\nhttps://github.com/openstack/nova/blob/713288286f3bc3d6db53d51d0450d37514d6a86e/nova/tests/functional/integrated_helpers.py#L106\n\nI think we should use the real compute service and placement resource provider code for the functional test, so if you want to make the test setup match the samples as you have them, I think you just need to override that method in your test class here, like this:\n\n    def _setup_compute_service(self):\n        return self.start_service(\u0027compute\u0027, host\u003d\u0027compute-node-1\u0027)","commit_id":"592262e8cc75a698747b5bdafe1cfa0c8690cacd"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6748a83fec4837283b233037c94f750274600754","unresolved":false,"context_lines":[{"line_number":593,"context_line":"        self._post_server()"},{"line_number":594,"context_line":""},{"line_number":595,"context_line":"    def test_servers_post_with_host_and_node(self):"},{"line_number":596,"context_line":"        self.useFixture(nova_fixtures.DefaultComputeNodesFixture())"},{"line_number":597,"context_line":"        self.common_req_names \u003d ["},{"line_number":598,"context_line":"            (\u00272.74\u0027, None, \u0027server-create-req-v274-host-and-node\u0027)]"},{"line_number":599,"context_line":"        self._post_server()"}],"source_content_type":"text/x-python","patch_set":30,"id":"7faddb67_5f4cb3c6","line":596,"range":{"start_line":596,"start_character":38,"end_line":596,"end_character":64},"updated":"2019-07-05 19:53:43.000000000","message":"We shouldn\u0027t really need this if you override _setup_compute_service like I mentioned above.","commit_id":"592262e8cc75a698747b5bdafe1cfa0c8690cacd"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7d65a044feddf9283f739c08273f07d4fd6aa68a","unresolved":false,"context_lines":[{"line_number":590,"context_line":""},{"line_number":591,"context_line":"    def test_servers_post_with_only_host(self):"},{"line_number":592,"context_line":"        self._post_server(use_common_server_api_samples\u003dFalse,"},{"line_number":593,"context_line":"                          sample_name\u003d\u0027server-create-req-with-only-host\u0027)"},{"line_number":594,"context_line":""},{"line_number":595,"context_line":"    def test_servers_post_with_only_node(self):"},{"line_number":596,"context_line":"        self._post_server(use_common_server_api_samples\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":31,"id":"7faddb67_b8f60c8f","line":593,"updated":"2019-07-08 16:29:58.000000000","message":"The only thing I\u0027m not sure about this is if the GENERATE_SAMPLES run will still work, i.e. if you run \"tox -e api-samples\". I\u0027ll try that.","commit_id":"dd61ba7c63efc22716a6fbd63d720f448e01a670"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"93a01853832259a9fafc301ac27a67ba8f37c007","unresolved":false,"context_lines":[{"line_number":590,"context_line":""},{"line_number":591,"context_line":"    def test_servers_post_with_only_host(self):"},{"line_number":592,"context_line":"        self._post_server(use_common_server_api_samples\u003dFalse,"},{"line_number":593,"context_line":"                          sample_name\u003d\u0027server-create-req-with-only-host\u0027)"},{"line_number":594,"context_line":""},{"line_number":595,"context_line":"    def test_servers_post_with_only_node(self):"},{"line_number":596,"context_line":"        self._post_server(use_common_server_api_samples\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":31,"id":"7faddb67_ee0d9a37","line":593,"in_reply_to":"7faddb67_b8f60c8f","updated":"2019-07-08 17:19:00.000000000","message":"Done","commit_id":"dd61ba7c63efc22716a6fbd63d720f448e01a670"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0156087112ada7addaa8578ab18ace4f3a815b5f","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        # If the template is requesting an explicit availability zone and"},{"line_number":78,"context_line":"        # the test is setup to have AZs, use the first one in the list which"},{"line_number":79,"context_line":"        # should default to \"us-west\"."},{"line_number":80,"context_line":"        if self.availability_zones:"},{"line_number":81,"context_line":"            subs[\u0027availability_zone\u0027] \u003d self.availability_zones[0]"},{"line_number":82,"context_line":"        if extra_subs:"},{"line_number":83,"context_line":"            subs.update(extra_subs)"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"7faddb67_8eae66e5","line":81,"range":{"start_line":80,"start_character":8,"end_line":81,"end_character":66},"updated":"2019-07-08 17:25:25.000000000","message":"This is what\u0027s putting the availability_zone into the samples. Maybe we should have the 2.74 test class override this so the AZ isn\u0027t in the sample request.","commit_id":"f5e46424f524e74cc2942148eb995c11d476d3d0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6202e6ed3450e33b227eb14c6cb5326a6196707c","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        # If the template is requesting an explicit availability zone and"},{"line_number":78,"context_line":"        # the test is setup to have AZs, use the first one in the list which"},{"line_number":79,"context_line":"        # should default to \"us-west\"."},{"line_number":80,"context_line":"        if self.availability_zones:"},{"line_number":81,"context_line":"            subs[\u0027availability_zone\u0027] \u003d self.availability_zones[0]"},{"line_number":82,"context_line":"        if extra_subs:"},{"line_number":83,"context_line":"            subs.update(extra_subs)"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"7faddb67_c90e98e4","line":81,"range":{"start_line":80,"start_character":8,"end_line":81,"end_character":66},"in_reply_to":"7faddb67_8eae66e5","updated":"2019-07-08 18:24:47.000000000","message":"Done","commit_id":"f5e46424f524e74cc2942148eb995c11d476d3d0"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"17cbdd6f46ee9db2ed5f1027116b84c73d671da9","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        (\u00272.57\u0027, None, \u0027server-create-req-v257\u0027)"},{"line_number":44,"context_line":"    ]"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def _get_request_name(self, use_common, sample_name\u003dNone):"},{"line_number":47,"context_line":"        if not use_common:"},{"line_number":48,"context_line":"            return sample_name or \u0027server-create-req\u0027"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        api_version \u003d self.microversion or \u00272.1\u0027"},{"line_number":51,"context_line":"        for min, max, name in self.common_req_names:"},{"line_number":52,"context_line":"            if avr.APIVersionRequest(api_version).matches("},{"line_number":53,"context_line":"                    avr.APIVersionRequest(min), avr.APIVersionRequest(max)):"},{"line_number":54,"context_line":"                return name"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def _post_server(self, use_common_server_api_samples\u003dTrue, name\u003dNone,"},{"line_number":57,"context_line":"                     extra_subs\u003dNone, sample_name\u003dNone):"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_5d222a54","line":54,"range":{"start_line":46,"start_character":0,"end_line":54,"end_character":27},"updated":"2019-07-11 15:21:07.000000000","message":"We could have just overridden this in the subclass but okay","commit_id":"564290ab145d2710d3e82b5c4871e647e4d516c4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"736aaf7f8cded74f690d8d4cee3df9982ff7f234","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        (\u00272.57\u0027, None, \u0027server-create-req-v257\u0027)"},{"line_number":44,"context_line":"    ]"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def _get_request_name(self, use_common, sample_name\u003dNone):"},{"line_number":47,"context_line":"        if not use_common:"},{"line_number":48,"context_line":"            return sample_name or \u0027server-create-req\u0027"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        api_version \u003d self.microversion or \u00272.1\u0027"},{"line_number":51,"context_line":"        for min, max, name in self.common_req_names:"},{"line_number":52,"context_line":"            if avr.APIVersionRequest(api_version).matches("},{"line_number":53,"context_line":"                    avr.APIVersionRequest(min), avr.APIVersionRequest(max)):"},{"line_number":54,"context_line":"                return name"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def _post_server(self, use_common_server_api_samples\u003dTrue, name\u003dNone,"},{"line_number":57,"context_line":"                     extra_subs\u003dNone, sample_name\u003dNone):"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_bdaebe95","line":54,"range":{"start_line":46,"start_character":0,"end_line":54,"end_character":27},"in_reply_to":"7faddb67_5d222a54","updated":"2019-07-11 15:25:19.000000000","message":"That would result in an error if _post_server tries passing sample_name to _get_request_name and the parameter isn\u0027t defined.","commit_id":"564290ab145d2710d3e82b5c4871e647e4d516c4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d01e2e50283b5a7347f2962750ec4191525d1e4f","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        (\u00272.57\u0027, None, \u0027server-create-req-v257\u0027)"},{"line_number":44,"context_line":"    ]"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def _get_request_name(self, use_common, sample_name\u003dNone):"},{"line_number":47,"context_line":"        if not use_common:"},{"line_number":48,"context_line":"            return sample_name or \u0027server-create-req\u0027"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        api_version \u003d self.microversion or \u00272.1\u0027"},{"line_number":51,"context_line":"        for min, max, name in self.common_req_names:"},{"line_number":52,"context_line":"            if avr.APIVersionRequest(api_version).matches("},{"line_number":53,"context_line":"                    avr.APIVersionRequest(min), avr.APIVersionRequest(max)):"},{"line_number":54,"context_line":"                return name"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def _post_server(self, use_common_server_api_samples\u003dTrue, name\u003dNone,"},{"line_number":57,"context_line":"                     extra_subs\u003dNone, sample_name\u003dNone):"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_40179dee","line":54,"range":{"start_line":46,"start_character":0,"end_line":54,"end_character":27},"in_reply_to":"7faddb67_5dd1cafa","updated":"2019-07-11 16:03:59.000000000","message":"\u003e I was thinking you wouldn\u0027t need to do that - just set\n \u003e \u0027self.sample_name\u0027 or something on a per-test basis.\n\nYeah that would be easy. Class variables in these tests get a bit much to handle at times - knowing where they are all defined and used and such, e.g. the availability_zones one.","commit_id":"564290ab145d2710d3e82b5c4871e647e4d516c4"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"867924a20de170138450e5abff34414b899d6251","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        (\u00272.57\u0027, None, \u0027server-create-req-v257\u0027)"},{"line_number":44,"context_line":"    ]"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def _get_request_name(self, use_common, sample_name\u003dNone):"},{"line_number":47,"context_line":"        if not use_common:"},{"line_number":48,"context_line":"            return sample_name or \u0027server-create-req\u0027"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        api_version \u003d self.microversion or \u00272.1\u0027"},{"line_number":51,"context_line":"        for min, max, name in self.common_req_names:"},{"line_number":52,"context_line":"            if avr.APIVersionRequest(api_version).matches("},{"line_number":53,"context_line":"                    avr.APIVersionRequest(min), avr.APIVersionRequest(max)):"},{"line_number":54,"context_line":"                return name"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def _post_server(self, use_common_server_api_samples\u003dTrue, name\u003dNone,"},{"line_number":57,"context_line":"                     extra_subs\u003dNone, sample_name\u003dNone):"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_5dd1cafa","line":54,"range":{"start_line":46,"start_character":0,"end_line":54,"end_character":27},"in_reply_to":"7faddb67_bdaebe95","updated":"2019-07-11 15:31:24.000000000","message":"I was thinking you wouldn\u0027t need to do that - just set \u0027self.sample_name\u0027 or something on a per-test basis.","commit_id":"564290ab145d2710d3e82b5c4871e647e4d516c4"}],"nova/tests/functional/test_servers.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1d785b8c283cfbf420e9af38c5f214b52bc1595b","unresolved":false,"context_lines":[{"line_number":3802,"context_line":"        post \u003d {"},{"line_number":3803,"context_line":"            \u0027evacuate\u0027: {"},{"line_number":3804,"context_line":"                \u0027host\u0027: dest_hostname,"},{"line_number":3805,"context_line":"                \u0027force\u0027: True"},{"line_number":3806,"context_line":"            }"},{"line_number":3807,"context_line":"        }"},{"line_number":3808,"context_line":"        self.api.post_server_action(server[\u0027id\u0027], post)"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_69a14146","line":3805,"range":{"start_line":3805,"start_character":16,"end_line":3805,"end_character":29},"updated":"2019-05-13 18:52:38.000000000","message":"microversion 2.68 removed support for \u0027force\u0027 in evacuate","commit_id":"a8e895c35efbd5c5496060d99c062a474ce00a86"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"45215ccd665f35d6e31a394b18328817b6a19c1c","unresolved":false,"context_lines":[{"line_number":3802,"context_line":"        post \u003d {"},{"line_number":3803,"context_line":"            \u0027evacuate\u0027: {"},{"line_number":3804,"context_line":"                \u0027host\u0027: dest_hostname,"},{"line_number":3805,"context_line":"                \u0027force\u0027: True"},{"line_number":3806,"context_line":"            }"},{"line_number":3807,"context_line":"        }"},{"line_number":3808,"context_line":"        self.api.post_server_action(server[\u0027id\u0027], post)"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_a3bc2d06","line":3805,"range":{"start_line":3805,"start_character":16,"end_line":3805,"end_character":29},"in_reply_to":"dfbec78f_69a14146","updated":"2019-05-14 09:21:02.000000000","message":"Done","commit_id":"a8e895c35efbd5c5496060d99c062a474ce00a86"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"bb34f396110781a02c4bf0b633de341200308431","unresolved":false,"context_lines":[{"line_number":3823,"context_line":""},{"line_number":3824,"context_line":"        post \u003d {"},{"line_number":3825,"context_line":"            \u0027os-migrateLive\u0027: {"},{"line_number":3826,"context_line":"                \u0027host\u0027: dest_hostname,"},{"line_number":3827,"context_line":"                \u0027block_migration\u0027: True,"},{"line_number":3828,"context_line":"            }"},{"line_number":3829,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":17,"id":"dfbec78f_679dce64","line":3826,"range":{"start_line":3826,"start_character":17,"end_line":3826,"end_character":38},"updated":"2019-05-15 08:19:01.000000000","message":"if we specify the destination host in the API, that isn\u0027t the case we are trying to test.","commit_id":"522c2064bb63ce499c540d28786f5e775a0ac85e"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"7daac8bba1d6fc3733bc3876b03405db6e955a70","unresolved":false,"context_lines":[{"line_number":3823,"context_line":""},{"line_number":3824,"context_line":"        post \u003d {"},{"line_number":3825,"context_line":"            \u0027os-migrateLive\u0027: {"},{"line_number":3826,"context_line":"                \u0027host\u0027: dest_hostname,"},{"line_number":3827,"context_line":"                \u0027block_migration\u0027: True,"},{"line_number":3828,"context_line":"            }"},{"line_number":3829,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":17,"id":"bfb3d3c7_24769608","line":3826,"range":{"start_line":3826,"start_character":17,"end_line":3826,"end_character":38},"in_reply_to":"dfbec78f_679dce64","updated":"2019-05-20 06:42:22.000000000","message":"Done","commit_id":"522c2064bb63ce499c540d28786f5e775a0ac85e"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"bb34f396110781a02c4bf0b633de341200308431","unresolved":false,"context_lines":[{"line_number":3834,"context_line":""},{"line_number":3835,"context_line":"        self.assertEqual(dest_hostname, inst_dest_host)"},{"line_number":3836,"context_line":""},{"line_number":3837,"context_line":"    def test_evacuate_after_server_create_with_requested_host(self):"},{"line_number":3838,"context_line":"        \"\"\"Test after creating server with requested host, and then"},{"line_number":3839,"context_line":"        live migrate the server to another host. The requested host"},{"line_number":3840,"context_line":"        will not effect the new moving operation like evacuate."}],"source_content_type":"text/x-python","patch_set":17,"id":"dfbec78f_4790ca4a","line":3837,"range":{"start_line":3837,"start_character":13,"end_line":3837,"end_character":21},"updated":"2019-05-15 08:19:01.000000000","message":"is it worth to test resize?","commit_id":"522c2064bb63ce499c540d28786f5e775a0ac85e"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"7daac8bba1d6fc3733bc3876b03405db6e955a70","unresolved":false,"context_lines":[{"line_number":3834,"context_line":""},{"line_number":3835,"context_line":"        self.assertEqual(dest_hostname, inst_dest_host)"},{"line_number":3836,"context_line":""},{"line_number":3837,"context_line":"    def test_evacuate_after_server_create_with_requested_host(self):"},{"line_number":3838,"context_line":"        \"\"\"Test after creating server with requested host, and then"},{"line_number":3839,"context_line":"        live migrate the server to another host. The requested host"},{"line_number":3840,"context_line":"        will not effect the new moving operation like evacuate."}],"source_content_type":"text/x-python","patch_set":17,"id":"bfb3d3c7_e7c64017","line":3837,"range":{"start_line":3837,"start_character":13,"end_line":3837,"end_character":21},"in_reply_to":"dfbec78f_4790ca4a","updated":"2019-05-20 06:42:22.000000000","message":"\u003e is it worth to test resize?\n\nYeah, as describe in spec. We need to test for live-migartion, evacuation, resize and unshelve.\nSo add four test case here.","commit_id":"522c2064bb63ce499c540d28786f5e775a0ac85e"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"bb34f396110781a02c4bf0b633de341200308431","unresolved":false,"context_lines":[{"line_number":3862,"context_line":""},{"line_number":3863,"context_line":"        post \u003d {"},{"line_number":3864,"context_line":"            \u0027evacuate\u0027: {"},{"line_number":3865,"context_line":"                \u0027host\u0027: dest_hostname"},{"line_number":3866,"context_line":"            }"},{"line_number":3867,"context_line":"        }"},{"line_number":3868,"context_line":"        self.api.post_server_action(server[\u0027id\u0027], post)"}],"source_content_type":"text/x-python","patch_set":17,"id":"dfbec78f_87980275","line":3865,"range":{"start_line":3865,"start_character":16,"end_line":3865,"end_character":37},"updated":"2019-05-15 08:19:01.000000000","message":"ditto","commit_id":"522c2064bb63ce499c540d28786f5e775a0ac85e"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"7daac8bba1d6fc3733bc3876b03405db6e955a70","unresolved":false,"context_lines":[{"line_number":3862,"context_line":""},{"line_number":3863,"context_line":"        post \u003d {"},{"line_number":3864,"context_line":"            \u0027evacuate\u0027: {"},{"line_number":3865,"context_line":"                \u0027host\u0027: dest_hostname"},{"line_number":3866,"context_line":"            }"},{"line_number":3867,"context_line":"        }"},{"line_number":3868,"context_line":"        self.api.post_server_action(server[\u0027id\u0027], post)"}],"source_content_type":"text/x-python","patch_set":17,"id":"bfb3d3c7_44738a16","line":3865,"range":{"start_line":3865,"start_character":16,"end_line":3865,"end_character":37},"in_reply_to":"dfbec78f_87980275","updated":"2019-05-20 06:42:22.000000000","message":"Done","commit_id":"522c2064bb63ce499c540d28786f5e775a0ac85e"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"02cbd336453e14b6542b30281f53f80b4fe3cb55","unresolved":false,"context_lines":[{"line_number":3105,"context_line":""},{"line_number":3106,"context_line":"        self.assertEqual(dest_hostname, inst_dest_host)"},{"line_number":3107,"context_line":""},{"line_number":3108,"context_line":"    def test_shelve_unshelve_after_server_created_with_host(self):"},{"line_number":3109,"context_line":"        \"\"\"Test after creating server with requested host, and then"},{"line_number":3110,"context_line":"        do shelve and unshelve for the server. The requested host"},{"line_number":3111,"context_line":"        will not effect the new moving operation."}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_dda13aab","line":3108,"updated":"2019-07-11 15:25:34.000000000","message":"++","commit_id":"564290ab145d2710d3e82b5c4871e647e4d516c4"}],"nova/tests/unit/api/openstack/compute/test_serversV21.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"360c09077a02d7244ad1a6c7d957b92f53b2acbe","unresolved":false,"context_lines":[{"line_number":6811,"context_line":"        # The fact that the action doesn\u0027t raise is enough validation"},{"line_number":6812,"context_line":"        self.controller.create(self.req, body\u003dself.body).obj"},{"line_number":6813,"context_line":""},{"line_number":6814,"context_line":"    @mock.patch(\u0027nova.objects.ComputeNode.get_by_nodename\u0027)"},{"line_number":6815,"context_line":"    def test_create_instance_with_invalid_hypervisor_hostname("},{"line_number":6816,"context_line":"            self, mock_by_hypervisor_hostname):"},{"line_number":6817,"context_line":"        self.body[\u0027server\u0027][\u0027hypervisor_hostname\u0027] \u003d \u0027openstack\u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"9fb8cfa7_597dc16c","line":6814,"range":{"start_line":6814,"start_character":4,"end_line":6814,"end_character":59},"updated":"2019-06-03 07:20:31.000000000","message":"for api layer test, we can fake the \u0027self.controller.create\u0027 directly.","commit_id":"90afb34266698c20b46666a8956d3a9d18bdf8a6"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"1323906720b7a503ca29494a9fa9a7777c6b2022","unresolved":false,"context_lines":[{"line_number":6811,"context_line":"        # The fact that the action doesn\u0027t raise is enough validation"},{"line_number":6812,"context_line":"        self.controller.create(self.req, body\u003dself.body).obj"},{"line_number":6813,"context_line":""},{"line_number":6814,"context_line":"    @mock.patch(\u0027nova.objects.ComputeNode.get_by_nodename\u0027)"},{"line_number":6815,"context_line":"    def test_create_instance_with_invalid_hypervisor_hostname("},{"line_number":6816,"context_line":"            self, mock_by_hypervisor_hostname):"},{"line_number":6817,"context_line":"        self.body[\u0027server\u0027][\u0027hypervisor_hostname\u0027] \u003d \u0027openstack\u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"9fb8cfa7_4f41450b","line":6814,"range":{"start_line":6814,"start_character":4,"end_line":6814,"end_character":59},"in_reply_to":"9fb8cfa7_597dc16c","updated":"2019-06-05 08:24:56.000000000","message":"Done. Remove the mock here.","commit_id":"90afb34266698c20b46666a8956d3a9d18bdf8a6"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"360c09077a02d7244ad1a6c7d957b92f53b2acbe","unresolved":false,"context_lines":[{"line_number":6842,"context_line":"        # The fact that the action doesn\u0027t raise is enough validation"},{"line_number":6843,"context_line":"        self.controller.create(self.req, body\u003dself.body).obj"},{"line_number":6844,"context_line":""},{"line_number":6845,"context_line":"    @mock.patch(\u0027nova.objects.ComputeNode.get_by_host_and_nodename\u0027)"},{"line_number":6846,"context_line":"    def test_create_instance_with_invalid_host_and_hypervisor_hostname("},{"line_number":6847,"context_line":"            self, mock_by_host_and_hypervisor_hostname):"},{"line_number":6848,"context_line":"        self.body[\u0027server\u0027][\u0027hypervisor_hostname\u0027] \u003d \u0027openstack\u0027"},{"line_number":6849,"context_line":"        self.body[\u0027server\u0027][\u0027host\u0027] \u003d \u0027openstack\u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"9fb8cfa7_795be52d","line":6846,"range":{"start_line":6845,"start_character":4,"end_line":6846,"end_character":71},"updated":"2019-06-03 07:20:31.000000000","message":"looks duplicated with the line 6815 and the line 6787.\n\nyou can test invalid char in the host or hypervisor_hostname","commit_id":"90afb34266698c20b46666a8956d3a9d18bdf8a6"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"1323906720b7a503ca29494a9fa9a7777c6b2022","unresolved":false,"context_lines":[{"line_number":6842,"context_line":"        # The fact that the action doesn\u0027t raise is enough validation"},{"line_number":6843,"context_line":"        self.controller.create(self.req, body\u003dself.body).obj"},{"line_number":6844,"context_line":""},{"line_number":6845,"context_line":"    @mock.patch(\u0027nova.objects.ComputeNode.get_by_host_and_nodename\u0027)"},{"line_number":6846,"context_line":"    def test_create_instance_with_invalid_host_and_hypervisor_hostname("},{"line_number":6847,"context_line":"            self, mock_by_host_and_hypervisor_hostname):"},{"line_number":6848,"context_line":"        self.body[\u0027server\u0027][\u0027hypervisor_hostname\u0027] \u003d \u0027openstack\u0027"},{"line_number":6849,"context_line":"        self.body[\u0027server\u0027][\u0027host\u0027] \u003d \u0027openstack\u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"9fb8cfa7_2f465123","line":6846,"range":{"start_line":6845,"start_character":4,"end_line":6846,"end_character":71},"in_reply_to":"9fb8cfa7_795be52d","updated":"2019-06-05 08:24:56.000000000","message":"Done","commit_id":"90afb34266698c20b46666a8956d3a9d18bdf8a6"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"2cc7ecc2c17eb7c8af0b808d5778e7862b2e3d3b","unresolved":false,"context_lines":[{"line_number":6797,"context_line":"                               self.req, body\u003dself.body)"},{"line_number":6798,"context_line":"        self.assertIn(\u0027Can not find requested compute host\u0027,"},{"line_number":6799,"context_line":"                      six.text_type(ex))"},{"line_number":6800,"context_line":""},{"line_number":6801,"context_line":"    def test_create_instance_with_hypervisor_hostname(self):"},{"line_number":6802,"context_line":"        get_resp \u003d mock.Mock()"},{"line_number":6803,"context_line":"        get_resp.status_code \u003d 200"}],"source_content_type":"text/x-python","patch_set":25,"id":"9fb8cfa7_de7b8abb","line":6800,"range":{"start_line":6800,"start_character":0,"end_line":6800,"end_character":0},"updated":"2019-06-06 12:54:00.000000000","message":"can you add tests for non-string value of \u0027host\u0027 and \u0027hypervisor_hostname\u0027 and check JSON schema raise 400 for that.","commit_id":"671beddcdc247aaa84c09040e2f0de1b64df3f6e"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":6797,"context_line":"                               self.req, body\u003dself.body)"},{"line_number":6798,"context_line":"        self.assertIn(\u0027Can not find requested compute host\u0027,"},{"line_number":6799,"context_line":"                      six.text_type(ex))"},{"line_number":6800,"context_line":""},{"line_number":6801,"context_line":"    def test_create_instance_with_hypervisor_hostname(self):"},{"line_number":6802,"context_line":"        get_resp \u003d mock.Mock()"},{"line_number":6803,"context_line":"        get_resp.status_code \u003d 200"}],"source_content_type":"text/x-python","patch_set":25,"id":"9fb8cfa7_0d40a806","line":6800,"range":{"start_line":6800,"start_character":0,"end_line":6800,"end_character":0},"in_reply_to":"9fb8cfa7_de7b8abb","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"671beddcdc247aaa84c09040e2f0de1b64df3f6e"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"2cc7ecc2c17eb7c8af0b808d5778e7862b2e3d3b","unresolved":false,"context_lines":[{"line_number":6853,"context_line":"        self.assertIn(\u0027Can not find requested compute host\u0027,"},{"line_number":6854,"context_line":"                      six.text_type(ex))"},{"line_number":6855,"context_line":""},{"line_number":6856,"context_line":""},{"line_number":6857,"context_line":"class ServersControllerCreateTestWithMock(test.TestCase):"},{"line_number":6858,"context_line":"    image_uuid \u003d \u002776fa36fc-c930-4bf3-8c8a-ea2a2420deb6\u0027"},{"line_number":6859,"context_line":"    flavor_ref \u003d \u0027http://localhost/123/flavors/3\u0027"}],"source_content_type":"text/x-python","patch_set":25,"id":"9fb8cfa7_9e98b21b","line":6856,"range":{"start_line":6856,"start_character":0,"end_line":6856,"end_character":0},"updated":"2019-06-06 12:54:00.000000000","message":"can you add test for mutual exclusion of \u0027host\u0027 and \u0027hypervisor_hostname\u0027 with \u0027az:host:node\u0027","commit_id":"671beddcdc247aaa84c09040e2f0de1b64df3f6e"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":6853,"context_line":"        self.assertIn(\u0027Can not find requested compute host\u0027,"},{"line_number":6854,"context_line":"                      six.text_type(ex))"},{"line_number":6855,"context_line":""},{"line_number":6856,"context_line":""},{"line_number":6857,"context_line":"class ServersControllerCreateTestWithMock(test.TestCase):"},{"line_number":6858,"context_line":"    image_uuid \u003d \u002776fa36fc-c930-4bf3-8c8a-ea2a2420deb6\u0027"},{"line_number":6859,"context_line":"    flavor_ref \u003d \u0027http://localhost/123/flavors/3\u0027"}],"source_content_type":"text/x-python","patch_set":25,"id":"9fb8cfa7_0db188e1","line":6856,"range":{"start_line":6856,"start_character":0,"end_line":6856,"end_character":0},"in_reply_to":"9fb8cfa7_9e98b21b","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"671beddcdc247aaa84c09040e2f0de1b64df3f6e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":6770,"context_line":"class ServersControllerCreateTestV274(ServersControllerCreateTest):"},{"line_number":6771,"context_line":"    def setUp(self):"},{"line_number":6772,"context_line":"        super(ServersControllerCreateTestV274, self).setUp()"},{"line_number":6773,"context_line":"        self.start_service(\u0027compute\u0027, \u0027openstack-node-01\u0027)"},{"line_number":6774,"context_line":"        self.mock_get \u003d self.useFixture("},{"line_number":6775,"context_line":"            fixtures.MockPatch(\u0027nova.scheduler.client.report.\u0027"},{"line_number":6776,"context_line":"                               \u0027SchedulerReportClient.get\u0027)).mock"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_964e60bf","line":6773,"updated":"2019-06-20 20:54:09.000000000","message":"Do we really need this for a unit test? IMO the unit tests should just validate negative scenarios (errors) and the functional tests should cover the positive happy path scenarios. For the failure scenarios where the host/node don\u0027t exist we can just mock out the compute API right?","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":6770,"context_line":"class ServersControllerCreateTestV274(ServersControllerCreateTest):"},{"line_number":6771,"context_line":"    def setUp(self):"},{"line_number":6772,"context_line":"        super(ServersControllerCreateTestV274, self).setUp()"},{"line_number":6773,"context_line":"        self.start_service(\u0027compute\u0027, \u0027openstack-node-01\u0027)"},{"line_number":6774,"context_line":"        self.mock_get \u003d self.useFixture("},{"line_number":6775,"context_line":"            fixtures.MockPatch(\u0027nova.scheduler.client.report.\u0027"},{"line_number":6776,"context_line":"                               \u0027SchedulerReportClient.get\u0027)).mock"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_946dc533","line":6773,"in_reply_to":"9fb8cfa7_964e60bf","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":6775,"context_line":"            fixtures.MockPatch(\u0027nova.scheduler.client.report.\u0027"},{"line_number":6776,"context_line":"                               \u0027SchedulerReportClient.get\u0027)).mock"},{"line_number":6777,"context_line":""},{"line_number":6778,"context_line":"    def test_create_instance_with_host(self):"},{"line_number":6779,"context_line":"        self.body[\u0027server\u0027][\u0027host\u0027] \u003d \u0027openstack-node-01\u0027"},{"line_number":6780,"context_line":"        self.req.body \u003d jsonutils.dump_as_bytes(self.body)"},{"line_number":6781,"context_line":"        self.req.api_version_request \u003d \\"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_b64924b8","line":6778,"updated":"2019-06-20 20:54:09.000000000","message":"This is redundant with the API sample functional test so I don\u0027t think we really need it.","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":6775,"context_line":"            fixtures.MockPatch(\u0027nova.scheduler.client.report.\u0027"},{"line_number":6776,"context_line":"                               \u0027SchedulerReportClient.get\u0027)).mock"},{"line_number":6777,"context_line":""},{"line_number":6778,"context_line":"    def test_create_instance_with_host(self):"},{"line_number":6779,"context_line":"        self.body[\u0027server\u0027][\u0027host\u0027] \u003d \u0027openstack-node-01\u0027"},{"line_number":6780,"context_line":"        self.req.body \u003d jsonutils.dump_as_bytes(self.body)"},{"line_number":6781,"context_line":"        self.req.api_version_request \u003d \\"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_f48441d5","line":6778,"in_reply_to":"9fb8cfa7_b64924b8","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":6785,"context_line":""},{"line_number":6786,"context_line":"    def test_create_instance_with_invalid_host(self):"},{"line_number":6787,"context_line":"        self.body[\u0027server\u0027][\u0027host\u0027] \u003d \u0027node-invalid\u0027"},{"line_number":6788,"context_line":"        self.req.body \u003d jsonutils.dump_as_bytes(self.body)"},{"line_number":6789,"context_line":"        self.req.api_version_request \u003d \\"},{"line_number":6790,"context_line":"            api_version_request.APIVersionRequest(\u00272.74\u0027)"},{"line_number":6791,"context_line":""},{"line_number":6792,"context_line":"        ex \u003d self.assertRaises(webob.exc.HTTPBadRequest,"},{"line_number":6793,"context_line":"                               self.controller.create,"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_b6de04d8","line":6790,"range":{"start_line":6788,"start_character":8,"end_line":6790,"end_character":57},"updated":"2019-06-20 20:54:09.000000000","message":"This is duplicated across the tests - can we put it into a private method so we don\u0027t need to copy/paste this around?","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":6785,"context_line":""},{"line_number":6786,"context_line":"    def test_create_instance_with_invalid_host(self):"},{"line_number":6787,"context_line":"        self.body[\u0027server\u0027][\u0027host\u0027] \u003d \u0027node-invalid\u0027"},{"line_number":6788,"context_line":"        self.req.body \u003d jsonutils.dump_as_bytes(self.body)"},{"line_number":6789,"context_line":"        self.req.api_version_request \u003d \\"},{"line_number":6790,"context_line":"            api_version_request.APIVersionRequest(\u00272.74\u0027)"},{"line_number":6791,"context_line":""},{"line_number":6792,"context_line":"        ex \u003d self.assertRaises(webob.exc.HTTPBadRequest,"},{"line_number":6793,"context_line":"                               self.controller.create,"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_d4101d5c","line":6790,"range":{"start_line":6788,"start_character":8,"end_line":6790,"end_character":57},"in_reply_to":"9fb8cfa7_b6de04d8","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":6807,"context_line":"        self.assertIn(\"Invalid input for field/attribute host.\","},{"line_number":6808,"context_line":"                      six.text_type(ex))"},{"line_number":6809,"context_line":""},{"line_number":6810,"context_line":"    def test_create_instance_with_hypervisor_hostname(self):"},{"line_number":6811,"context_line":"        get_resp \u003d mock.Mock()"},{"line_number":6812,"context_line":"        get_resp.status_code \u003d 200"},{"line_number":6813,"context_line":"        get_resp.json.return_value \u003d {"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_16d030c9","line":6810,"updated":"2019-06-20 20:54:09.000000000","message":"If you add a functional test for just hypervisor_hostname like I asked then this would be redundant and we don\u0027t need it.","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":6807,"context_line":"        self.assertIn(\"Invalid input for field/attribute host.\","},{"line_number":6808,"context_line":"                      six.text_type(ex))"},{"line_number":6809,"context_line":""},{"line_number":6810,"context_line":"    def test_create_instance_with_hypervisor_hostname(self):"},{"line_number":6811,"context_line":"        get_resp \u003d mock.Mock()"},{"line_number":6812,"context_line":"        get_resp.status_code \u003d 200"},{"line_number":6813,"context_line":"        get_resp.json.return_value \u003d {"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_347f39e1","line":6810,"in_reply_to":"9fb8cfa7_16d030c9","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":6856,"context_line":"        self.assertIn(\"Invalid input for field/attribute hypervisor_hostname.\","},{"line_number":6857,"context_line":"                      six.text_type(ex))"},{"line_number":6858,"context_line":""},{"line_number":6859,"context_line":"    def test_create_instance_with_host_and_hypervisor_hostname(self):"},{"line_number":6860,"context_line":"        self.body[\u0027server\u0027][\u0027hypervisor_hostname\u0027] \u003d \u0027openstack-node-01\u0027"},{"line_number":6861,"context_line":"        self.body[\u0027server\u0027][\u0027host\u0027] \u003d \u0027openstack-node-01\u0027"},{"line_number":6862,"context_line":"        self.req.body \u003d jsonutils.dump_as_bytes(self.body)"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_d602983e","line":6859,"updated":"2019-06-20 20:54:09.000000000","message":"If we have a functional API samples test for this the unit test becomes redundant and we don\u0027t need it.","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":6856,"context_line":"        self.assertIn(\"Invalid input for field/attribute hypervisor_hostname.\","},{"line_number":6857,"context_line":"                      six.text_type(ex))"},{"line_number":6858,"context_line":""},{"line_number":6859,"context_line":"    def test_create_instance_with_host_and_hypervisor_hostname(self):"},{"line_number":6860,"context_line":"        self.body[\u0027server\u0027][\u0027hypervisor_hostname\u0027] \u003d \u0027openstack-node-01\u0027"},{"line_number":6861,"context_line":"        self.body[\u0027server\u0027][\u0027host\u0027] \u003d \u0027openstack-node-01\u0027"},{"line_number":6862,"context_line":"        self.req.body \u003d jsonutils.dump_as_bytes(self.body)"}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_d47fbddc","line":6859,"in_reply_to":"9fb8cfa7_d602983e","updated":"2019-06-25 10:11:48.000000000","message":"Done","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"323b65934c5cea1ba36b8982bf76b268b89d5e54","unresolved":false,"context_lines":[{"line_number":6881,"context_line":"        ex \u003d self.assertRaises(exception.PolicyNotAuthorized,"},{"line_number":6882,"context_line":"                               self.controller.create,"},{"line_number":6883,"context_line":"                               self.req, body\u003dself.body)"},{"line_number":6884,"context_line":"        self.assertIn(\"Policy doesn\u0027t allow os_compute_api:servers:create:\""},{"line_number":6885,"context_line":"                      \"requested_destination to be performed.\","},{"line_number":6886,"context_line":"                      six.text_type(ex))"},{"line_number":6887,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"7faddb67_9f876410","line":6884,"range":{"start_line":6884,"start_character":44,"end_line":6884,"end_character":58},"updated":"2019-07-09 14:44:38.000000000","message":"This will likely fail.","commit_id":"8fa4d95d4393cdee23f01ca15349c2152da2dc13"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"4761efd7e752ea3a2bf7c18d1b38cfdf1a0cc4a8","unresolved":false,"context_lines":[{"line_number":6881,"context_line":"        ex \u003d self.assertRaises(exception.PolicyNotAuthorized,"},{"line_number":6882,"context_line":"                               self.controller.create,"},{"line_number":6883,"context_line":"                               self.req, body\u003dself.body)"},{"line_number":6884,"context_line":"        self.assertIn(\"Policy doesn\u0027t allow os_compute_api:servers:create:\""},{"line_number":6885,"context_line":"                      \"requested_destination to be performed.\","},{"line_number":6886,"context_line":"                      six.text_type(ex))"},{"line_number":6887,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"7faddb67_ff21b8fc","line":6884,"range":{"start_line":6884,"start_character":44,"end_line":6884,"end_character":58},"in_reply_to":"7faddb67_9f876410","updated":"2019-07-09 14:58:07.000000000","message":"Done","commit_id":"8fa4d95d4393cdee23f01ca15349c2152da2dc13"}],"nova/tests/unit/compute/test_compute_api.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"360c09077a02d7244ad1a6c7d957b92f53b2acbe","unresolved":false,"context_lines":[{"line_number":6476,"context_line":"                                                   mock_by_nodename,"},{"line_number":6477,"context_line":"                                                   mock_by_host_and_nodename):"},{"line_number":6478,"context_line":"        host \u003d \u0027fake-host\u0027"},{"line_number":6479,"context_line":"        mock_by_host.return_value \u003d [fake_compute_node.fake_compute_node_obj("},{"line_number":6480,"context_line":"            self.context, **{\"host\": host})]"},{"line_number":6481,"context_line":"        destination \u003d self.compute_api._retrieve_destination_object("},{"line_number":6482,"context_line":"            self.context, host\u003dhost)"},{"line_number":6483,"context_line":"        self.assertEqual(host, destination.host)"}],"source_content_type":"text/x-python","patch_set":22,"id":"9fb8cfa7_39948d8b","line":6480,"range":{"start_line":6479,"start_character":1,"end_line":6480,"end_character":43},"updated":"2019-06-03 07:20:31.000000000","message":"you can fake \u0027_validate_host_or_node\u0027 directly, since you already test the \u0027_validate_host_or_node\u0027 in the previous patch.","commit_id":"90afb34266698c20b46666a8956d3a9d18bdf8a6"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"1323906720b7a503ca29494a9fa9a7777c6b2022","unresolved":false,"context_lines":[{"line_number":6476,"context_line":"                                                   mock_by_nodename,"},{"line_number":6477,"context_line":"                                                   mock_by_host_and_nodename):"},{"line_number":6478,"context_line":"        host \u003d \u0027fake-host\u0027"},{"line_number":6479,"context_line":"        mock_by_host.return_value \u003d [fake_compute_node.fake_compute_node_obj("},{"line_number":6480,"context_line":"            self.context, **{\"host\": host})]"},{"line_number":6481,"context_line":"        destination \u003d self.compute_api._retrieve_destination_object("},{"line_number":6482,"context_line":"            self.context, host\u003dhost)"},{"line_number":6483,"context_line":"        self.assertEqual(host, destination.host)"}],"source_content_type":"text/x-python","patch_set":22,"id":"9fb8cfa7_0f74ad67","line":6480,"range":{"start_line":6479,"start_character":1,"end_line":6480,"end_character":43},"in_reply_to":"9fb8cfa7_39948d8b","updated":"2019-06-05 08:24:56.000000000","message":"I have removed it now.","commit_id":"90afb34266698c20b46666a8956d3a9d18bdf8a6"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"360c09077a02d7244ad1a6c7d957b92f53b2acbe","unresolved":false,"context_lines":[{"line_number":6546,"context_line":"        mock_by_host_and_nodename.assert_called_once_with(self.context, host,"},{"line_number":6547,"context_line":"                                                          hypervisor_hostname)"},{"line_number":6548,"context_line":""},{"line_number":6549,"context_line":"    @mock.patch.object(objects.ComputeNode, \u0027get_by_host_and_nodename\u0027)"},{"line_number":6550,"context_line":"    @mock.patch.object(objects.ComputeNode, \u0027get_by_nodename\u0027)"},{"line_number":6551,"context_line":"    @mock.patch.object(objects.ComputeNodeList, \u0027get_all_by_host\u0027)"},{"line_number":6552,"context_line":"    def test_retrieve_destination_object_with_invalid_host_and_node("},{"line_number":6553,"context_line":"            self, mock_by_host, mock_by_nodename, mock_by_host_and_nodename):"},{"line_number":6554,"context_line":"        host \u003d hypervisor_hostname \u003d \u0027fake-host\u0027"},{"line_number":6555,"context_line":"        mock_by_host_and_nodename.side_effect \u003d exception.ComputeHostNotFound("},{"line_number":6556,"context_line":"            host\u003dhypervisor_hostname)"},{"line_number":6557,"context_line":"        self.assertRaises(exception.ComputeHostNotFound,"},{"line_number":6558,"context_line":"                          self.compute_api._retrieve_destination_object,"},{"line_number":6559,"context_line":"                          self.context, host\u003dhost,"},{"line_number":6560,"context_line":"                          hypervisor_hostname\u003dhypervisor_hostname)"},{"line_number":6561,"context_line":""},{"line_number":6562,"context_line":"    @mock.patch(\u0027nova.objects.HostMapping.get_by_host\u0027)"},{"line_number":6563,"context_line":"    @mock.patch(\u0027nova.objects.ComputeNode.get_by_nodename\u0027)"}],"source_content_type":"text/x-python","patch_set":22,"id":"9fb8cfa7_f9b4b537","line":6560,"range":{"start_line":6549,"start_character":4,"end_line":6560,"end_character":66},"updated":"2019-06-03 07:20:31.000000000","message":"I don\u0027t think this test and line 6520 and line 6491 useful. We can test the case the same host but multiple nodes case.","commit_id":"90afb34266698c20b46666a8956d3a9d18bdf8a6"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"1323906720b7a503ca29494a9fa9a7777c6b2022","unresolved":false,"context_lines":[{"line_number":6546,"context_line":"        mock_by_host_and_nodename.assert_called_once_with(self.context, host,"},{"line_number":6547,"context_line":"                                                          hypervisor_hostname)"},{"line_number":6548,"context_line":""},{"line_number":6549,"context_line":"    @mock.patch.object(objects.ComputeNode, \u0027get_by_host_and_nodename\u0027)"},{"line_number":6550,"context_line":"    @mock.patch.object(objects.ComputeNode, \u0027get_by_nodename\u0027)"},{"line_number":6551,"context_line":"    @mock.patch.object(objects.ComputeNodeList, \u0027get_all_by_host\u0027)"},{"line_number":6552,"context_line":"    def test_retrieve_destination_object_with_invalid_host_and_node("},{"line_number":6553,"context_line":"            self, mock_by_host, mock_by_nodename, mock_by_host_and_nodename):"},{"line_number":6554,"context_line":"        host \u003d hypervisor_hostname \u003d \u0027fake-host\u0027"},{"line_number":6555,"context_line":"        mock_by_host_and_nodename.side_effect \u003d exception.ComputeHostNotFound("},{"line_number":6556,"context_line":"            host\u003dhypervisor_hostname)"},{"line_number":6557,"context_line":"        self.assertRaises(exception.ComputeHostNotFound,"},{"line_number":6558,"context_line":"                          self.compute_api._retrieve_destination_object,"},{"line_number":6559,"context_line":"                          self.context, host\u003dhost,"},{"line_number":6560,"context_line":"                          hypervisor_hostname\u003dhypervisor_hostname)"},{"line_number":6561,"context_line":""},{"line_number":6562,"context_line":"    @mock.patch(\u0027nova.objects.HostMapping.get_by_host\u0027)"},{"line_number":6563,"context_line":"    @mock.patch(\u0027nova.objects.ComputeNode.get_by_nodename\u0027)"}],"source_content_type":"text/x-python","patch_set":22,"id":"9fb8cfa7_6f5d29e8","line":6560,"range":{"start_line":6549,"start_character":4,"end_line":6560,"end_character":66},"in_reply_to":"9fb8cfa7_f9b4b537","updated":"2019-06-05 08:24:56.000000000","message":"I have remove the retrieve_destination_object function now.","commit_id":"90afb34266698c20b46666a8956d3a9d18bdf8a6"}],"nova/tests/unit/fake_policy.py":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"2cc7ecc2c17eb7c8af0b808d5778e7862b2e3d3b","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"    \"os_compute_api:servers:show:host_status\": \"\","},{"line_number":21,"context_line":"    \"os_compute_api:servers:allow_all_filters\": \"\","},{"line_number":22,"context_line":"    \"os_compute_api:servers:create:requested_destination\": \"\","},{"line_number":23,"context_line":"    \"os_compute_api:servers:migrations:force_complete\": \"\","},{"line_number":24,"context_line":"    \"os_compute_api:os-admin-actions:inject_network_info\": \"\","},{"line_number":25,"context_line":"    \"os_compute_api:os-admin-actions:reset_network\": \"\","}],"source_content_type":"text/x-python","patch_set":25,"id":"9fb8cfa7_3e46667e","line":22,"range":{"start_line":22,"start_character":4,"end_line":22,"end_character":56},"updated":"2019-06-06 12:54:00.000000000","message":"ditto as policy name change suggestion.","commit_id":"671beddcdc247aaa84c09040e2f0de1b64df3f6e"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"    \"os_compute_api:servers:show:host_status\": \"\","},{"line_number":21,"context_line":"    \"os_compute_api:servers:allow_all_filters\": \"\","},{"line_number":22,"context_line":"    \"os_compute_api:servers:create:requested_destination\": \"\","},{"line_number":23,"context_line":"    \"os_compute_api:servers:migrations:force_complete\": \"\","},{"line_number":24,"context_line":"    \"os_compute_api:os-admin-actions:inject_network_info\": \"\","},{"line_number":25,"context_line":"    \"os_compute_api:os-admin-actions:reset_network\": \"\","}],"source_content_type":"text/x-python","patch_set":25,"id":"9fb8cfa7_7963981b","line":22,"range":{"start_line":22,"start_character":4,"end_line":22,"end_character":56},"in_reply_to":"9fb8cfa7_3e46667e","updated":"2019-06-25 10:11:48.000000000","message":"Same reason as described before.","commit_id":"671beddcdc247aaa84c09040e2f0de1b64df3f6e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    \"os_compute_api:servers:show:host_status\": \"\","},{"line_number":21,"context_line":"    \"os_compute_api:servers:allow_all_filters\": \"\","},{"line_number":22,"context_line":"    \"os_compute_api:servers:create:requested_destination\": \"\","},{"line_number":23,"context_line":"    \"os_compute_api:servers:create:forced_host\": \"\","},{"line_number":24,"context_line":"    \"os_compute_api:servers:migrations:force_complete\": \"\","},{"line_number":25,"context_line":"    \"os_compute_api:os-admin-actions:inject_network_info\": \"\","},{"line_number":26,"context_line":"    \"os_compute_api:os-admin-actions:reset_network\": \"\","}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_169ef006","line":23,"updated":"2019-06-20 20:54:09.000000000","message":"Huh I\u0027m surprised this wasn\u0027t already in here.","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"fb34238406a876316c5b696db034ba1a4c02d2eb","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    \"os_compute_api:servers:show:host_status\": \"\","},{"line_number":21,"context_line":"    \"os_compute_api:servers:allow_all_filters\": \"\","},{"line_number":22,"context_line":"    \"os_compute_api:servers:create:requested_destination\": \"\","},{"line_number":23,"context_line":"    \"os_compute_api:servers:create:forced_host\": \"\","},{"line_number":24,"context_line":"    \"os_compute_api:servers:migrations:force_complete\": \"\","},{"line_number":25,"context_line":"    \"os_compute_api:os-admin-actions:inject_network_info\": \"\","},{"line_number":26,"context_line":"    \"os_compute_api:os-admin-actions:reset_network\": \"\","}],"source_content_type":"text/x-python","patch_set":29,"id":"9fb8cfa7_7974ca68","line":23,"in_reply_to":"9fb8cfa7_169ef006","updated":"2019-06-25 10:11:48.000000000","message":"Done.\nRemoved.","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"}],"nova/tests/unit/test_policy.py":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"f35443b9b969e0a7826161cf436ab571e198b193","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        self.admin_only_rules \u003d ("},{"line_number":287,"context_line":"\"network:attach_external_network\","},{"line_number":288,"context_line":"\"os_compute_api:servers:create:forced_host\","},{"line_number":289,"context_line":"\"os_compute_api:servers:create:requested_destination\","},{"line_number":290,"context_line":"\"os_compute_api:servers:detail:get_all_tenants\","},{"line_number":291,"context_line":"\"os_compute_api:servers:index:get_all_tenants\","},{"line_number":292,"context_line":"\"os_compute_api:servers:allow_all_filters\","}],"source_content_type":"text/x-python","patch_set":33,"id":"7faddb67_8212b208","line":289,"range":{"start_line":289,"start_character":52,"end_line":289,"end_character":54},"updated":"2019-07-09 02:56:09.000000000","message":"FYI. Actually we are not covering the policy actual tests till now. I started the testing for existing policy[1] and need to make the process of having mandatory unit tests for any new policy.\n\nBut as the initial framework patch is not yet merged, we can cover this new policy later. \n\n[1] https://review.opendev.org/#/c/669181/","commit_id":"2445ab285d6def04fc0d57ead668da0ef8ea3236"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e23b724685e21775c1508ace52d26ee1a58fe0c5","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        self.admin_only_rules \u003d ("},{"line_number":287,"context_line":"\"network:attach_external_network\","},{"line_number":288,"context_line":"\"os_compute_api:servers:create:forced_host\","},{"line_number":289,"context_line":"\"os_compute_api:servers:create:requested_destination\","},{"line_number":290,"context_line":"\"os_compute_api:servers:detail:get_all_tenants\","},{"line_number":291,"context_line":"\"os_compute_api:servers:index:get_all_tenants\","},{"line_number":292,"context_line":"\"os_compute_api:servers:allow_all_filters\","}],"source_content_type":"text/x-python","patch_set":33,"id":"7faddb67_a9e0eefb","line":289,"range":{"start_line":289,"start_character":52,"end_line":289,"end_character":54},"in_reply_to":"7faddb67_8212b208","updated":"2019-07-09 13:28:51.000000000","message":"Maybe it\u0027s not what you mean but there is a unit test for the policy check here:\n\nhttps://review.opendev.org/#/c/645520/33/nova/tests/unit/api/openstack/compute/test_serversV21.py@6873","commit_id":"2445ab285d6def04fc0d57ead668da0ef8ea3236"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"720e523dd6247a2d7f02dda609dcec163f7aa0e9","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        self.admin_only_rules \u003d ("},{"line_number":287,"context_line":"\"network:attach_external_network\","},{"line_number":288,"context_line":"\"os_compute_api:servers:create:forced_host\","},{"line_number":289,"context_line":"\"os_compute_api:servers:create:requested_destination\","},{"line_number":290,"context_line":"\"os_compute_api:servers:detail:get_all_tenants\","},{"line_number":291,"context_line":"\"os_compute_api:servers:index:get_all_tenants\","},{"line_number":292,"context_line":"\"os_compute_api:servers:allow_all_filters\","}],"source_content_type":"text/x-python","patch_set":33,"id":"7faddb67_89009269","line":289,"range":{"start_line":289,"start_character":52,"end_line":289,"end_character":54},"in_reply_to":"7faddb67_a9e0eefb","updated":"2019-07-09 13:38:41.000000000","message":"in addition to those tests, it should be all combination of tests for each possible credential and check_str.\n\nThe tests you mentioned is good to check non admin does not have access to this new policy.","commit_id":"2445ab285d6def04fc0d57ead668da0ef8ea3236"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"8d83b07d591af2a11aa98f4e5c7e1692ff8bf44d","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        self.admin_only_rules \u003d ("},{"line_number":287,"context_line":"\"network:attach_external_network\","},{"line_number":288,"context_line":"\"os_compute_api:servers:create:forced_host\","},{"line_number":289,"context_line":"\"compute:servers:create:requested_destination\","},{"line_number":290,"context_line":"\"os_compute_api:servers:detail:get_all_tenants\","},{"line_number":291,"context_line":"\"os_compute_api:servers:index:get_all_tenants\","},{"line_number":292,"context_line":"\"os_compute_api:servers:allow_all_filters\","}],"source_content_type":"text/x-python","patch_set":34,"id":"7faddb67_443fdf24","line":289,"range":{"start_line":289,"start_character":1,"end_line":289,"end_character":45},"updated":"2019-07-09 14:15:26.000000000","message":"With new policy name.","commit_id":"8fa4d95d4393cdee23f01ca15349c2152da2dc13"}],"releasenotes/notes/add-host-and-hypervisor-hostname-flag-to-create-server-847ba43abd6be02c.yaml":[{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"592fccaee86e9fa22833fe31f6c05ef06cb7141d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"upgrade:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    There will be two new params for creating servers to a specific destination"},{"line_number":5,"context_line":"    host starting with API microversion 2.73. Even you supply the two new params"}],"source_content_type":"text/x-yaml","patch_set":6,"id":"3fce034c_6872b84b","line":2,"range":{"start_line":2,"start_character":0,"end_line":2,"end_character":7},"updated":"2019-04-18 12:24:07.000000000","message":"Why is this upgrade? I thought this was a new feature.","commit_id":"31b795544fd0ce59ac59df6668b6b50c15a8fdb7"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"9d452c00bc80bf87e8e4b72250046a3df840f87b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"upgrade:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    There will be two new params for creating servers to a specific destination"},{"line_number":5,"context_line":"    host starting with API microversion 2.73. Even you supply the two new params"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"3fce034c_24128d0a","line":2,"range":{"start_line":2,"start_character":0,"end_line":2,"end_character":7},"updated":"2019-04-19 02:36:30.000000000","message":"features","commit_id":"3aea8b1abf244caa7956ceeb846d9a4010ab462c"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"4ac404fbdf44efe1fa503751c900d7ee91ba0bc9","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"upgrade:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    There will be two new params for creating servers to a specific destination"},{"line_number":5,"context_line":"    host starting with API microversion 2.73. Even you supply the two new params"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"3fce034c_6937094f","line":2,"range":{"start_line":2,"start_character":0,"end_line":2,"end_character":7},"in_reply_to":"3fce034c_24128d0a","updated":"2019-04-19 09:55:05.000000000","message":"Done","commit_id":"3aea8b1abf244caa7956ceeb846d9a4010ab462c"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"9d452c00bc80bf87e8e4b72250046a3df840f87b","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    There will be two new params for creating servers to a specific destination"},{"line_number":5,"context_line":"    host starting with API microversion 2.73. Even you supply the two new params"},{"line_number":6,"context_line":"    ``host`` and/or ``hypervisor_hostname``, it will also be validated by the"},{"line_number":7,"context_line":"    scheduler."}],"source_content_type":"text/x-yaml","patch_set":7,"id":"3fce034c_c4238955","line":7,"updated":"2019-04-19 02:36:30.000000000","message":"Adding \"os_compute_api:servers:create:requested_destination\" should be described.","commit_id":"3aea8b1abf244caa7956ceeb846d9a4010ab462c"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"4ac404fbdf44efe1fa503751c900d7ee91ba0bc9","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    There will be two new params for creating servers to a specific destination"},{"line_number":5,"context_line":"    host starting with API microversion 2.73. Even you supply the two new params"},{"line_number":6,"context_line":"    ``host`` and/or ``hypervisor_hostname``, it will also be validated by the"},{"line_number":7,"context_line":"    scheduler."}],"source_content_type":"text/x-yaml","patch_set":7,"id":"3fce034c_09dc45e2","line":7,"in_reply_to":"3fce034c_c4238955","updated":"2019-04-19 09:55:05.000000000","message":"Done","commit_id":"3aea8b1abf244caa7956ceeb846d9a4010ab462c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1d785b8c283cfbf420e9af38c5f214b52bc1595b","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    There will be two new params for creating servers to a specific destination"},{"line_number":5,"context_line":"    host starting with API microversion 2.74. Even you supply the two new params"},{"line_number":6,"context_line":"    ``host`` and/or ``hypervisor_hostname``, it will also be validated by the"},{"line_number":7,"context_line":"    scheduler."},{"line_number":8,"context_line":"    There will be also a new policy named"},{"line_number":9,"context_line":"    ``os_compute_api:servers:create:requested_destination``. By default, it can"},{"line_number":10,"context_line":"    be specified by administrators only."}],"source_content_type":"text/x-yaml","patch_set":15,"id":"dfbec78f_04750c64","line":7,"range":{"start_line":5,"start_character":46,"end_line":7,"end_character":14},"updated":"2019-05-13 18:52:38.000000000","message":"Specifying ``host`` and/or ``hypervisor_hostname`` will still cause scheduler validation to be performed.","commit_id":"a8e895c35efbd5c5496060d99c062a474ce00a86"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"45215ccd665f35d6e31a394b18328817b6a19c1c","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    There will be two new params for creating servers to a specific destination"},{"line_number":5,"context_line":"    host starting with API microversion 2.74. Even you supply the two new params"},{"line_number":6,"context_line":"    ``host`` and/or ``hypervisor_hostname``, it will also be validated by the"},{"line_number":7,"context_line":"    scheduler."},{"line_number":8,"context_line":"    There will be also a new policy named"},{"line_number":9,"context_line":"    ``os_compute_api:servers:create:requested_destination``. By default, it can"},{"line_number":10,"context_line":"    be specified by administrators only."}],"source_content_type":"text/x-yaml","patch_set":15,"id":"dfbec78f_e34b0528","line":7,"range":{"start_line":5,"start_character":46,"end_line":7,"end_character":14},"in_reply_to":"dfbec78f_04750c64","updated":"2019-05-14 09:21:02.000000000","message":"Done","commit_id":"a8e895c35efbd5c5496060d99c062a474ce00a86"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4820c8599f835a19e24e3fec3b5cdd7cda336346","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    API microversion 2.74 adds support for specifying optional ``host`` and/or"}],"source_content_type":"text/x-yaml","patch_set":29,"id":"9fb8cfa7_f6ab1c1b","line":1,"updated":"2019-06-20 20:54:09.000000000","message":"Looks like this is copied from the REST API version history doc - as such my comments there apply here as well.","commit_id":"45b8095680e1e1902f1b64a22a0ed4f56d1ec854"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"be0234542b19ef6cc2eea8465955a16be07d7ab3","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    API microversion 2.74 adds support for specifying optional ``host`` and/or"}],"source_content_type":"text/x-yaml","patch_set":30,"id":"7faddb67_9f00eb36","line":1,"updated":"2019-07-05 19:54:43.000000000","message":"Looks like you missed some of the edits from here:\n\nhttps://review.opendev.org/#/c/645520/30/nova/api/openstack/compute/rest_api_version_history.rst","commit_id":"592262e8cc75a698747b5bdafe1cfa0c8690cacd"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7d65a044feddf9283f739c08273f07d4fd6aa68a","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    and/or ``hypervisor_hostname`` parameters in the request body of"},{"line_number":6,"context_line":"    ``POST /servers``. These request a specific destination host/node"},{"line_number":7,"context_line":"    to boot the requested server. These parameters are mutually exclusive"},{"line_number":8,"context_line":"    with the special ``availability_zone`` format of``zone:host:node``."},{"line_number":9,"context_line":"    Unlike ``zone:host:node``, the ``host`` and/or ``hypervisor_hostname``"},{"line_number":10,"context_line":"    parameters still allow scheduler filters to be run. If the requested"},{"line_number":11,"context_line":"    host/node is unavailable or otherwise unsuitable, earlier failure will"}],"source_content_type":"text/x-yaml","patch_set":31,"id":"7faddb67_18b880c6","line":8,"range":{"start_line":8,"start_character":50,"end_line":8,"end_character":52},"updated":"2019-07-08 16:29:58.000000000","message":"Need a space between words here.","commit_id":"dd61ba7c63efc22716a6fbd63d720f448e01a670"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"93a01853832259a9fafc301ac27a67ba8f37c007","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    and/or ``hypervisor_hostname`` parameters in the request body of"},{"line_number":6,"context_line":"    ``POST /servers``. These request a specific destination host/node"},{"line_number":7,"context_line":"    to boot the requested server. These parameters are mutually exclusive"},{"line_number":8,"context_line":"    with the special ``availability_zone`` format of``zone:host:node``."},{"line_number":9,"context_line":"    Unlike ``zone:host:node``, the ``host`` and/or ``hypervisor_hostname``"},{"line_number":10,"context_line":"    parameters still allow scheduler filters to be run. If the requested"},{"line_number":11,"context_line":"    host/node is unavailable or otherwise unsuitable, earlier failure will"}],"source_content_type":"text/x-yaml","patch_set":31,"id":"7faddb67_8e12e657","line":8,"range":{"start_line":8,"start_character":50,"end_line":8,"end_character":52},"in_reply_to":"7faddb67_18b880c6","updated":"2019-07-08 17:19:00.000000000","message":"Done","commit_id":"dd61ba7c63efc22716a6fbd63d720f448e01a670"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"323b65934c5cea1ba36b8982bf76b268b89d5e54","unresolved":false,"context_lines":[{"line_number":11,"context_line":"    host/node is unavailable or otherwise unsuitable, earlier failure will"},{"line_number":12,"context_line":"    be raised."},{"line_number":13,"context_line":"    There will be also a new policy named"},{"line_number":14,"context_line":"    ``os_compute_api:servers:create:requested_destination``. By default,"},{"line_number":15,"context_line":"    it can be specified by administrators only."}],"source_content_type":"text/x-yaml","patch_set":34,"id":"7faddb67_3f951041","line":14,"range":{"start_line":14,"start_character":6,"end_line":14,"end_character":20},"updated":"2019-07-09 14:44:38.000000000","message":"This is old.","commit_id":"8fa4d95d4393cdee23f01ca15349c2152da2dc13"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"4761efd7e752ea3a2bf7c18d1b38cfdf1a0cc4a8","unresolved":false,"context_lines":[{"line_number":11,"context_line":"    host/node is unavailable or otherwise unsuitable, earlier failure will"},{"line_number":12,"context_line":"    be raised."},{"line_number":13,"context_line":"    There will be also a new policy named"},{"line_number":14,"context_line":"    ``os_compute_api:servers:create:requested_destination``. By default,"},{"line_number":15,"context_line":"    it can be specified by administrators only."}],"source_content_type":"text/x-yaml","patch_set":34,"id":"7faddb67_7f8388cd","line":14,"range":{"start_line":14,"start_character":6,"end_line":14,"end_character":20},"in_reply_to":"7faddb67_3f951041","updated":"2019-07-09 14:58:07.000000000","message":"Done","commit_id":"8fa4d95d4393cdee23f01ca15349c2152da2dc13"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"26421cb7cf5dcf2a883236be82be27e74b94f3ab","unresolved":false,"context_lines":[{"line_number":10,"context_line":"    parameters still allow scheduler filters to be run. If the requested"},{"line_number":11,"context_line":"    host/node is unavailable or otherwise unsuitable, earlier failure will"},{"line_number":12,"context_line":"    be raised."},{"line_number":13,"context_line":"    There will be also a new policy named"},{"line_number":14,"context_line":"    ``compute:servers:create:requested_destination``. By default,"},{"line_number":15,"context_line":"    it can be specified by administrators only."}],"source_content_type":"text/x-yaml","patch_set":35,"id":"7faddb67_c6b2d0e6","line":13,"range":{"start_line":13,"start_character":10,"end_line":13,"end_character":17},"updated":"2019-07-11 07:33:29.000000000","message":"is?","commit_id":"564290ab145d2710d3e82b5c4871e647e4d516c4"}]}
