)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"3201d55745f66a1df112ad4ebfd91781f56197d3","unresolved":false,"context_lines":[{"line_number":7,"context_line":"xenapi: Add parse function to get gpu group  uuid and vgpu type uuid"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"We are going to apply vgpu support in xenapi. Add function to get gpu"},{"line_number":10,"context_line":"group uuid and vgpu type uuid. According to the previouse patch:"},{"line_number":11,"context_line":"https://review.openstack.org/#/c/520313/9/nova/virt/xenapi/driver.py"},{"line_number":12,"context_line":"The resource provider name will include gpu group uuid and vgpu type"},{"line_number":13,"context_line":"uuid. So we can parse the uuids from resource provider name."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ff82abbf_58912199","line":11,"range":{"start_line":10,"start_character":31,"end_line":11,"end_character":68},"updated":"2017-11-21 09:15:05.000000000","message":"I don\u0027t think we should say this - the next sentence covers this just fine","commit_id":"7f8718664c612a6c7ca22a14180047236d78ef1f"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"5ca2210df116aef9aeae705ac9992ac6cae15204","unresolved":false,"context_lines":[{"line_number":7,"context_line":"xenapi: Add parse function to get gpu group  uuid and vgpu type uuid"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"We are going to apply vgpu support in xenapi. Add function to get gpu"},{"line_number":10,"context_line":"group uuid and vgpu type uuid. According to the previouse patch:"},{"line_number":11,"context_line":"https://review.openstack.org/#/c/520313/9/nova/virt/xenapi/driver.py"},{"line_number":12,"context_line":"The resource provider name will include gpu group uuid and vgpu type"},{"line_number":13,"context_line":"uuid. So we can parse the uuids from resource provider name."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ff82abbf_482b8c93","line":11,"range":{"start_line":10,"start_character":31,"end_line":11,"end_character":68},"in_reply_to":"ff82abbf_58912199","updated":"2017-11-21 11:12:32.000000000","message":"Got it. Thank you, Bob.","commit_id":"7f8718664c612a6c7ca22a14180047236d78ef1f"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"b70cd6dcb7486a528de6725cce1e556d1bb1c422","unresolved":false,"context_lines":[{"line_number":12,"context_line":"The resource provider name will include gpu group uuid and vgpu type"},{"line_number":13,"context_line":"uuid. So we can parse the uuids from resource provider name."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Depends-On: I039c6490a18213b0b4e640b6ee3c58270314c8a5"},{"line_number":16,"context_line":"Change-Id: I1d9a106ba9470d36c3206d4ad3f9d49aacd6655e"},{"line_number":17,"context_line":"blueprint: add-support-for-vgpu"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ff82abbf_dde427af","line":15,"range":{"start_line":15,"start_character":0,"end_line":15,"end_character":53},"updated":"2017-11-22 03:04:39.000000000","message":"this is not needed as both are in the same PS stack.","commit_id":"7f8718664c612a6c7ca22a14180047236d78ef1f"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"ce2f10146612c5588cbc2ef0fa78c4379cd192e1","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     naichuans \u003cnaichuan.sun@citrix.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-11-29 01:24:00 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"xenapi:(WIP:need ut) Get vgpu info from `allocations`"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"We are going to apply vgpu support in xenapi. Add function to get gpu"},{"line_number":10,"context_line":"group uuid and vgpu type uuid."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"ff82abbf_f5df290a","line":7,"range":{"start_line":7,"start_character":7,"end_line":7,"end_character":20},"updated":"2017-11-29 03:19:33.000000000","message":"remove? as this contains UT already?","commit_id":"6b530ce45ee37cfb0ab9854a53d78af22a725de0"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"ce2f10146612c5588cbc2ef0fa78c4379cd192e1","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"xenapi:(WIP:need ut) Get vgpu info from `allocations`"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"We are going to apply vgpu support in xenapi. Add function to get gpu"},{"line_number":10,"context_line":"group uuid and vgpu type uuid."},{"line_number":11,"context_line":"The resource provider uuid will be same with corresponding gpu group."},{"line_number":12,"context_line":"So we can use resource provider uuid to get related gpu group uuid"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"ff82abbf_35f2719b","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":44},"updated":"2017-11-29 03:19:33.000000000","message":"Suggest clarify this is for nested-RP.","commit_id":"6b530ce45ee37cfb0ab9854a53d78af22a725de0"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"ce2f10146612c5588cbc2ef0fa78c4379cd192e1","unresolved":false,"context_lines":[{"line_number":10,"context_line":"group uuid and vgpu type uuid."},{"line_number":11,"context_line":"The resource provider uuid will be same with corresponding gpu group."},{"line_number":12,"context_line":"So we can use resource provider uuid to get related gpu group uuid"},{"line_number":13,"context_line":"and vgpu type uuid."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Depends-On: I039c6490a18213b0b4e640b6ee3c58270314c8a5"},{"line_number":16,"context_line":"Change-Id: I1d9a106ba9470d36c3206d4ad3f9d49aacd6655e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"ff82abbf_b50c4194","line":13,"range":{"start_line":13,"start_character":4,"end_line":13,"end_character":18},"updated":"2017-11-29 03:19:33.000000000","message":"Explain how we get vGPU type uuid: As we only expose single vGPU type in each GPU group. We can get vGPU type\u0027s uuid from the GPU gorup\u0027s uuid.","commit_id":"6b530ce45ee37cfb0ab9854a53d78af22a725de0"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"33685edd444bc762d48095a906d2d0e0e2096145","unresolved":false,"context_lines":[{"line_number":9,"context_line":"We are going to apply vgpu support in xenapi using nested resource"},{"line_number":10,"context_line":"provider. Add function to get gpu group uuid and vgpu type uuid."},{"line_number":11,"context_line":"We set resource provider id same with the corresponding gpu group"},{"line_number":12,"context_line":"uuid as it create. So we can use resource provider uuid to get"},{"line_number":13,"context_line":"related gpu group uuid and vgpu type uuid."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Depends-On: I039c6490a18213b0b4e640b6ee3c58270314c8a5"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"ff82abbf_49b2fc4a","line":12,"range":{"start_line":12,"start_character":5,"end_line":12,"end_character":16},"updated":"2017-11-29 06:35:48.000000000","message":"when it\u0027s created?","commit_id":"196c93827ab82458cdf2a2ee9a5443aad4c53442"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"476cb433aed360bb29fc015411801a988efa06a5","unresolved":false,"context_lines":[{"line_number":9,"context_line":"We are going to apply vgpu support in xenapi using nested resource"},{"line_number":10,"context_line":"provider. Add function to get gpu group uuid and vgpu type uuid."},{"line_number":11,"context_line":"We set resource provider id same with the corresponding gpu group"},{"line_number":12,"context_line":"uuid as it create. So we can use resource provider uuid to get"},{"line_number":13,"context_line":"related gpu group uuid and vgpu type uuid."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Depends-On: I039c6490a18213b0b4e640b6ee3c58270314c8a5"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"ff82abbf_44d421e9","line":12,"range":{"start_line":12,"start_character":5,"end_line":12,"end_character":16},"in_reply_to":"ff82abbf_49b2fc4a","updated":"2017-11-29 08:13:09.000000000","message":"Will add it","commit_id":"196c93827ab82458cdf2a2ee9a5443aad4c53442"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"30d45e6d8ea56054139c6eacc54415c5e8a72d1d","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"xenapi(N-R-P):Get vgpu info from `allocations`"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"We are going to apply vgpu support in xenapi using nested resource"},{"line_number":10,"context_line":"provider. Add function to get gpu group uuid and vgpu type uuid."},{"line_number":11,"context_line":"When nova compute requires to update resource provider tree, we"},{"line_number":12,"context_line":"will create vgpu resource provider if it is not exists. We set"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"ff82abbf_d4b3e796","line":9,"range":{"start_line":9,"start_character":16,"end_line":9,"end_character":50},"updated":"2017-11-30 05:13:52.000000000","message":"support vGPU in XenAPI by using","commit_id":"a5c89a48d01c876a8821dae939f6d4b1c08215fd"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"bdcb98b04d7f977f36e33874e31d5fa31fa10842","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"xenapi(N-R-P):Get vgpu info from `allocations`"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"We are going to apply vgpu support in xenapi using nested resource"},{"line_number":10,"context_line":"provider. Add function to get gpu group uuid and vgpu type uuid."},{"line_number":11,"context_line":"When nova compute requires to update resource provider tree, we"},{"line_number":12,"context_line":"will create vgpu resource provider if it is not exists. We set"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"ff82abbf_af2e0c89","line":9,"range":{"start_line":9,"start_character":16,"end_line":9,"end_character":50},"in_reply_to":"ff82abbf_d4b3e796","updated":"2017-11-30 05:23:56.000000000","message":"Done","commit_id":"a5c89a48d01c876a8821dae939f6d4b1c08215fd"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"30d45e6d8ea56054139c6eacc54415c5e8a72d1d","unresolved":false,"context_lines":[{"line_number":9,"context_line":"We are going to apply vgpu support in xenapi using nested resource"},{"line_number":10,"context_line":"provider. Add function to get gpu group uuid and vgpu type uuid."},{"line_number":11,"context_line":"When nova compute requires to update resource provider tree, we"},{"line_number":12,"context_line":"will create vgpu resource provider if it is not exists. We set"},{"line_number":13,"context_line":"resource provider id same with the corresponding gpu group uuid."},{"line_number":14,"context_line":"So we can use resource provider uuid to get related gpu group uuid"},{"line_number":15,"context_line":"and vgpu type uuid."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"ff82abbf_74c3fbed","line":12,"range":{"start_line":12,"start_character":41,"end_line":12,"end_character":54},"updated":"2017-11-30 05:13:52.000000000","message":"doesn\u0027t exist.","commit_id":"a5c89a48d01c876a8821dae939f6d4b1c08215fd"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"bdcb98b04d7f977f36e33874e31d5fa31fa10842","unresolved":false,"context_lines":[{"line_number":9,"context_line":"We are going to apply vgpu support in xenapi using nested resource"},{"line_number":10,"context_line":"provider. Add function to get gpu group uuid and vgpu type uuid."},{"line_number":11,"context_line":"When nova compute requires to update resource provider tree, we"},{"line_number":12,"context_line":"will create vgpu resource provider if it is not exists. We set"},{"line_number":13,"context_line":"resource provider id same with the corresponding gpu group uuid."},{"line_number":14,"context_line":"So we can use resource provider uuid to get related gpu group uuid"},{"line_number":15,"context_line":"and vgpu type uuid."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"ff82abbf_4f4f406a","line":12,"range":{"start_line":12,"start_character":41,"end_line":12,"end_character":54},"in_reply_to":"ff82abbf_74c3fbed","updated":"2017-11-30 05:23:56.000000000","message":"Done","commit_id":"a5c89a48d01c876a8821dae939f6d4b1c08215fd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"50641e4050379bba7b26551a7f192d9409d21967","unresolved":false,"context_lines":[{"line_number":7,"context_line":"xenapi(N-R-P):Get vgpu info from `allocations`"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"We are going to support vGPU in XenAPI by using nested resource"},{"line_number":10,"context_line":"provider. Add function to get gpu group uuid and vgpu type uuid."},{"line_number":11,"context_line":"When nova compute requires to update resource provider tree, we"},{"line_number":12,"context_line":"will create vgpu resource provider if it doesn\u0027t exist. We set"},{"line_number":13,"context_line":"resource provider id same with the corresponding gpu group uuid."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":33,"id":"bf659307_28c05e7c","line":10,"range":{"start_line":10,"start_character":0,"end_line":10,"end_character":8},"updated":"2018-04-09 19:16:32.000000000","message":"providers","commit_id":"ae7a9f402a53805f8d79cd158b2a429addb646ed"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"0ca4dd06236b4ceb8e5c6eedac6055a9004fc80b","unresolved":false,"context_lines":[{"line_number":7,"context_line":"xenapi(N-R-P):Get vgpu info from `allocations`"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"We are going to support vGPU in XenAPI by using nested resource"},{"line_number":10,"context_line":"provider. Add function to get gpu group uuid and vgpu type uuid."},{"line_number":11,"context_line":"When nova compute requires to update resource provider tree, we"},{"line_number":12,"context_line":"will create vgpu resource provider if it doesn\u0027t exist. We set"},{"line_number":13,"context_line":"resource provider id same with the corresponding gpu group uuid."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":33,"id":"bf659307_b93b54c6","line":10,"range":{"start_line":10,"start_character":0,"end_line":10,"end_character":8},"in_reply_to":"bf659307_28c05e7c","updated":"2018-04-10 08:07:21.000000000","message":"thanks.","commit_id":"ae7a9f402a53805f8d79cd158b2a429addb646ed"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"50641e4050379bba7b26551a7f192d9409d21967","unresolved":false,"context_lines":[{"line_number":9,"context_line":"We are going to support vGPU in XenAPI by using nested resource"},{"line_number":10,"context_line":"provider. Add function to get gpu group uuid and vgpu type uuid."},{"line_number":11,"context_line":"When nova compute requires to update resource provider tree, we"},{"line_number":12,"context_line":"will create vgpu resource provider if it doesn\u0027t exist. We set"},{"line_number":13,"context_line":"resource provider id same with the corresponding gpu group uuid."},{"line_number":14,"context_line":"So we can use resource provider uuid to get related gpu group uuid"},{"line_number":15,"context_line":"and vgpu type uuid."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":33,"id":"bf659307_084a3a26","line":12,"range":{"start_line":12,"start_character":12,"end_line":12,"end_character":16},"updated":"2018-04-09 19:16:32.000000000","message":"not a VGPU resource provider. The VGPU is an item in the inventory of a resource provider representing a PGPU or a PGPU group.","commit_id":"ae7a9f402a53805f8d79cd158b2a429addb646ed"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"0ca4dd06236b4ceb8e5c6eedac6055a9004fc80b","unresolved":false,"context_lines":[{"line_number":9,"context_line":"We are going to support vGPU in XenAPI by using nested resource"},{"line_number":10,"context_line":"provider. Add function to get gpu group uuid and vgpu type uuid."},{"line_number":11,"context_line":"When nova compute requires to update resource provider tree, we"},{"line_number":12,"context_line":"will create vgpu resource provider if it doesn\u0027t exist. We set"},{"line_number":13,"context_line":"resource provider id same with the corresponding gpu group uuid."},{"line_number":14,"context_line":"So we can use resource provider uuid to get related gpu group uuid"},{"line_number":15,"context_line":"and vgpu type uuid."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":33,"id":"bf659307_7945bc42","line":12,"range":{"start_line":12,"start_character":12,"end_line":12,"end_character":16},"in_reply_to":"bf659307_084a3a26","updated":"2018-04-10 08:07:21.000000000","message":"Got it, thanks","commit_id":"ae7a9f402a53805f8d79cd158b2a429addb646ed"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e425dbe6d7a3f6f6d99b4fa589e3dd1ffcbffdde","unresolved":false,"context_lines":[{"line_number":10,"context_line":"providers. Add function to get gpu group uuid and vgpu type uuid."},{"line_number":11,"context_line":"When nova compute requires to update resource provider tree, we"},{"line_number":12,"context_line":"will create gpu resource provider if it doesn\u0027t exist. We set"},{"line_number":13,"context_line":"resource provider id same with the corresponding gpu group uuid."},{"line_number":14,"context_line":"So we can use resource provider uuid to get related gpu group uuid"},{"line_number":15,"context_line":"and vgpu type uuid."},{"line_number":16,"context_line":"Currently, XenServer only supports one vGPU per instance, so only"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":50,"id":"3f79a3b5_354fea6a","line":13,"range":{"start_line":13,"start_character":21,"end_line":13,"end_character":25},"updated":"2018-10-02 13:37:27.000000000","message":"name?","commit_id":"434e0192f9882fd3735b0f45bee9d42c2159c133"}],"nova/exception.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c0e90ea70ee29b86dd1cef38daae6ecf4a922a77","unresolved":false,"context_lines":[{"line_number":2178,"context_line":"                \"resource provider \u0027%(resource_provider)s\u0027 invalid.\")"},{"line_number":2179,"context_line":""},{"line_number":2180,"context_line":""},{"line_number":2181,"context_line":"class MultipleGpuGpuRpInAllocations(Invalid):"},{"line_number":2182,"context_line":"    msg_fmt \u003d _(\"Multiple gpu resource provider are found in allocations: \""},{"line_number":2183,"context_line":"                \"\u0027%(allocations)s\u0027\")"},{"line_number":2184,"context_line":""}],"source_content_type":"text/x-python","patch_set":42,"id":"5f7c97a3_682239a5","line":2181,"range":{"start_line":2181,"start_character":14,"end_line":2181,"end_character":20},"updated":"2018-06-01 18:46:29.000000000","message":"Did you mean to double this?","commit_id":"4ebf82e2c822fa968ce607e5b6fbcb811f080b8e"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"d6f4e89796ac60311a3d918e7827331eeae5beca","unresolved":false,"context_lines":[{"line_number":2178,"context_line":"                \"resource provider \u0027%(resource_provider)s\u0027 invalid.\")"},{"line_number":2179,"context_line":""},{"line_number":2180,"context_line":""},{"line_number":2181,"context_line":"class MultipleGpuGpuRpInAllocations(Invalid):"},{"line_number":2182,"context_line":"    msg_fmt \u003d _(\"Multiple gpu resource provider are found in allocations: \""},{"line_number":2183,"context_line":"                \"\u0027%(allocations)s\u0027\")"},{"line_number":2184,"context_line":""}],"source_content_type":"text/x-python","patch_set":42,"id":"5f7c97a3_dec6a29a","line":2181,"range":{"start_line":2181,"start_character":14,"end_line":2181,"end_character":20},"in_reply_to":"5f7c97a3_682239a5","updated":"2018-06-06 07:40:35.000000000","message":"Sorry, it\u0027s a mistake. Thank you for the reminder, Eric.","commit_id":"4ebf82e2c822fa968ce607e5b6fbcb811f080b8e"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e425dbe6d7a3f6f6d99b4fa589e3dd1ffcbffdde","unresolved":false,"context_lines":[{"line_number":2204,"context_line":"                \"resource provider \u0027%(resource_provider)s\u0027 invalid.\")"},{"line_number":2205,"context_line":""},{"line_number":2206,"context_line":""},{"line_number":2207,"context_line":"class MultipleGpuGpuRpInAllocations(Invalid):"},{"line_number":2208,"context_line":"    msg_fmt \u003d _(\"Multiple gpu resource provider are found in allocations: \""},{"line_number":2209,"context_line":"                \"\u0027%(allocations)s\u0027\")"},{"line_number":2210,"context_line":""}],"source_content_type":"text/x-python","patch_set":50,"id":"3f79a3b5_953fdeb3","line":2207,"range":{"start_line":2207,"start_character":14,"end_line":2207,"end_character":20},"updated":"2018-10-02 13:37:27.000000000","message":"s/GpuGpu/GPU/","commit_id":"434e0192f9882fd3735b0f45bee9d42c2159c133"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e425dbe6d7a3f6f6d99b4fa589e3dd1ffcbffdde","unresolved":false,"context_lines":[{"line_number":2204,"context_line":"                \"resource provider \u0027%(resource_provider)s\u0027 invalid.\")"},{"line_number":2205,"context_line":""},{"line_number":2206,"context_line":""},{"line_number":2207,"context_line":"class MultipleGpuGpuRpInAllocations(Invalid):"},{"line_number":2208,"context_line":"    msg_fmt \u003d _(\"Multiple gpu resource provider are found in allocations: \""},{"line_number":2209,"context_line":"                \"\u0027%(allocations)s\u0027\")"},{"line_number":2210,"context_line":""}],"source_content_type":"text/x-python","patch_set":50,"id":"3f79a3b5_15750e98","line":2207,"range":{"start_line":2207,"start_character":20,"end_line":2207,"end_character":22},"updated":"2018-10-02 13:37:27.000000000","message":"s/Rp/ResourceProviders/","commit_id":"434e0192f9882fd3735b0f45bee9d42c2159c133"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e425dbe6d7a3f6f6d99b4fa589e3dd1ffcbffdde","unresolved":false,"context_lines":[{"line_number":2205,"context_line":""},{"line_number":2206,"context_line":""},{"line_number":2207,"context_line":"class MultipleGpuGpuRpInAllocations(Invalid):"},{"line_number":2208,"context_line":"    msg_fmt \u003d _(\"Multiple gpu resource provider are found in allocations: \""},{"line_number":2209,"context_line":"                \"\u0027%(allocations)s\u0027\")"},{"line_number":2210,"context_line":""},{"line_number":2211,"context_line":""}],"source_content_type":"text/x-python","patch_set":50,"id":"3f79a3b5_b53a1ac1","line":2208,"range":{"start_line":2208,"start_character":26,"end_line":2208,"end_character":29},"updated":"2018-10-02 13:37:27.000000000","message":"GPU","commit_id":"434e0192f9882fd3735b0f45bee9d42c2159c133"}],"nova/tests/unit/virt/xenapi/test_driver.py":[{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"540293df2304a69a115a7abc7c618b0b1acc18e5","unresolved":false,"context_lines":[{"line_number":366,"context_line":"                }"},{"line_number":367,"context_line":"            }"},{"line_number":368,"context_line":"        }"},{"line_number":369,"context_line":"        # If one GPU group has no remaining available vGPUs;"},{"line_number":370,"context_line":"        # the 2nd GPU group still has remainig available vGPUs."},{"line_number":371,"context_line":"        # it should return the uuid from the 2nd GPU group."},{"line_number":372,"context_line":"        vgpu_stats \u003d {"},{"line_number":373,"context_line":"            \u0027grp_uuid_1\u0027: {"},{"line_number":374,"context_line":"                \u0027uuid\u0027: \u0027type_uuid_1\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"ff82abbf_eaf57b84","line":371,"range":{"start_line":369,"start_character":10,"end_line":371,"end_character":59},"updated":"2017-11-23 03:48:00.000000000","message":"the logic in source code has been changed. Directly using the gpu group uuid now instead of looping the group list. so this is wrong.","commit_id":"894169f2379f32912717c5c93059088aa8ba03ed"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"25dc69fc3386e8fc2dcd510b173af74d1a490340","unresolved":false,"context_lines":[{"line_number":366,"context_line":"                }"},{"line_number":367,"context_line":"            }"},{"line_number":368,"context_line":"        }"},{"line_number":369,"context_line":"        # If one GPU group has no remaining available vGPUs;"},{"line_number":370,"context_line":"        # the 2nd GPU group still has remainig available vGPUs."},{"line_number":371,"context_line":"        # it should return the uuid from the 2nd GPU group."},{"line_number":372,"context_line":"        vgpu_stats \u003d {"},{"line_number":373,"context_line":"            \u0027grp_uuid_1\u0027: {"},{"line_number":374,"context_line":"                \u0027uuid\u0027: \u0027type_uuid_1\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"ff82abbf_4ac82721","line":371,"range":{"start_line":369,"start_character":10,"end_line":371,"end_character":59},"in_reply_to":"ff82abbf_eaf57b84","updated":"2017-11-23 03:52:10.000000000","message":"Will modify it","commit_id":"894169f2379f32912717c5c93059088aa8ba03ed"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"9fe47098f468dd0079fb3ea1e2bec1ecbf86d1e1","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                \u0027total\u0027: 7,"},{"line_number":378,"context_line":"                \u0027remaining\u0027: 0,"},{"line_number":379,"context_line":"            },"},{"line_number":380,"context_line":"            \u0027fake_vgpu_rp_uuid\u0027: {"},{"line_number":381,"context_line":"                \u0027uuid\u0027: \u0027type_uuid_2\u0027,"},{"line_number":382,"context_line":"                \u0027type_name\u0027: \u0027GRID K180Q\u0027,"},{"line_number":383,"context_line":"                \u0027max_heads\u0027: 4,"}],"source_content_type":"text/x-python","patch_set":7,"id":"ff82abbf_31468c7e","line":380,"range":{"start_line":380,"start_character":13,"end_line":380,"end_character":30},"updated":"2017-11-22 15:15:27.000000000","message":"I don\u0027t understand why this change was needed?","commit_id":"894169f2379f32912717c5c93059088aa8ba03ed"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"d7f1b4d8e1af3dbdcd939c19be617d116eec9f4a","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                \u0027total\u0027: 7,"},{"line_number":378,"context_line":"                \u0027remaining\u0027: 0,"},{"line_number":379,"context_line":"            },"},{"line_number":380,"context_line":"            \u0027fake_vgpu_rp_uuid\u0027: {"},{"line_number":381,"context_line":"                \u0027uuid\u0027: \u0027type_uuid_2\u0027,"},{"line_number":382,"context_line":"                \u0027type_name\u0027: \u0027GRID K180Q\u0027,"},{"line_number":383,"context_line":"                \u0027max_heads\u0027: 4,"}],"source_content_type":"text/x-python","patch_set":7,"id":"ff82abbf_ca98b7c1","line":380,"range":{"start_line":380,"start_character":13,"end_line":380,"end_character":30},"in_reply_to":"ff82abbf_31468c7e","updated":"2017-11-23 03:24:19.000000000","message":"It is difficult to make a name which could represent gpu group and resource provide together...","commit_id":"894169f2379f32912717c5c93059088aa8ba03ed"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"d0aea3eb59e10da4010d5b7779837f97b5fcd4c5","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                \u0027total\u0027: 7,"},{"line_number":378,"context_line":"                \u0027remaining\u0027: 0,"},{"line_number":379,"context_line":"            },"},{"line_number":380,"context_line":"            \u0027fake_vgpu_rp_uuid\u0027: {"},{"line_number":381,"context_line":"                \u0027uuid\u0027: \u0027type_uuid_2\u0027,"},{"line_number":382,"context_line":"                \u0027type_name\u0027: \u0027GRID K180Q\u0027,"},{"line_number":383,"context_line":"                \u0027max_heads\u0027: 4,"}],"source_content_type":"text/x-python","patch_set":7,"id":"ff82abbf_fc09cd2b","line":380,"range":{"start_line":380,"start_character":13,"end_line":380,"end_character":30},"in_reply_to":"ff82abbf_31468c7e","updated":"2017-11-23 03:17:58.000000000","message":"The uuid here should be same with resource provider uuid in line 363, so I changed it.","commit_id":"894169f2379f32912717c5c93059088aa8ba03ed"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"ed293e4571e81b8c07141a43ed4e63fa485e4c7d","unresolved":false,"context_lines":[{"line_number":367,"context_line":"                }"},{"line_number":368,"context_line":"            }"},{"line_number":369,"context_line":"        }"},{"line_number":370,"context_line":"        # Locate the specified gpu group using resource provider uuid"},{"line_number":371,"context_line":"        vgpu_stats \u003d {"},{"line_number":372,"context_line":"            \u0027grp_uuid_1\u0027: {"},{"line_number":373,"context_line":"                \u0027uuid\u0027: \u0027type_uuid_1\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff82abbf_be0ec78a","line":370,"range":{"start_line":370,"start_character":10,"end_line":370,"end_character":69},"updated":"2017-11-23 17:29:15.000000000","message":"remove this line and add some explanation on the test purpose in line 354.","commit_id":"e73698502b622cefd45d50a3c84b5afb3741f179"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"5924c1a91242837f66b5e50923e03ae85764f868","unresolved":false,"context_lines":[{"line_number":367,"context_line":"                }"},{"line_number":368,"context_line":"            }"},{"line_number":369,"context_line":"        }"},{"line_number":370,"context_line":"        # Locate the specified gpu group using resource provider uuid"},{"line_number":371,"context_line":"        vgpu_stats \u003d {"},{"line_number":372,"context_line":"            \u0027grp_uuid_1\u0027: {"},{"line_number":373,"context_line":"                \u0027uuid\u0027: \u0027type_uuid_1\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff82abbf_86b04a8c","line":370,"range":{"start_line":370,"start_character":10,"end_line":370,"end_character":69},"in_reply_to":"ff82abbf_be0ec78a","updated":"2017-11-24 09:08:50.000000000","message":"Done","commit_id":"e73698502b622cefd45d50a3c84b5afb3741f179"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"9041f7375ed783834ab54908674b89234e230009","unresolved":false,"context_lines":[{"line_number":367,"context_line":"                }"},{"line_number":368,"context_line":"            }"},{"line_number":369,"context_line":"        }"},{"line_number":370,"context_line":"        # Locate the specified gpu group using resource provider uuid"},{"line_number":371,"context_line":"        vgpu_stats \u003d {"},{"line_number":372,"context_line":"            \u0027grp_uuid_1\u0027: {"},{"line_number":373,"context_line":"                \u0027uuid\u0027: \u0027type_uuid_1\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff82abbf_989c2d0f","line":370,"range":{"start_line":370,"start_character":10,"end_line":370,"end_character":69},"in_reply_to":"ff82abbf_be0ec78a","updated":"2017-11-24 07:31:02.000000000","message":"will fix it","commit_id":"e73698502b622cefd45d50a3c84b5afb3741f179"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"ed293e4571e81b8c07141a43ed4e63fa485e4c7d","unresolved":false,"context_lines":[{"line_number":502,"context_line":"        result \u003d driver._update_vgpu_rp(fake_rp_tree, host_stats,"},{"line_number":503,"context_line":"                                        \u0027fake_compute_uuid\u0027)"},{"line_number":504,"context_line":"        self.assertTrue(result)"},{"line_number":505,"context_line":"        fake_rp_tree.update_inventory.assert_has_calls("},{"line_number":506,"context_line":"            [mock.call(fake_rp_name1, fake_inv1),"},{"line_number":507,"context_line":"             mock.call(fake_rp_name2, fake_inv2)],"},{"line_number":508,"context_line":"            any_order\u003dTrue"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff82abbf_5ef9bb4a","line":505,"updated":"2017-11-23 17:29:15.000000000","message":"why is this change for update vgpu_rp included in this patch? It should belong to another patch. right?","commit_id":"e73698502b622cefd45d50a3c84b5afb3741f179"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"5924c1a91242837f66b5e50923e03ae85764f868","unresolved":false,"context_lines":[{"line_number":502,"context_line":"        result \u003d driver._update_vgpu_rp(fake_rp_tree, host_stats,"},{"line_number":503,"context_line":"                                        \u0027fake_compute_uuid\u0027)"},{"line_number":504,"context_line":"        self.assertTrue(result)"},{"line_number":505,"context_line":"        fake_rp_tree.update_inventory.assert_has_calls("},{"line_number":506,"context_line":"            [mock.call(fake_rp_name1, fake_inv1),"},{"line_number":507,"context_line":"             mock.call(fake_rp_name2, fake_inv2)],"},{"line_number":508,"context_line":"            any_order\u003dTrue"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff82abbf_c6bad26c","line":505,"in_reply_to":"ff82abbf_5ef9bb4a","updated":"2017-11-24 09:08:50.000000000","message":"It is in the same stream, based on the vgpu update","commit_id":"e73698502b622cefd45d50a3c84b5afb3741f179"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e425dbe6d7a3f6f6d99b4fa589e3dd1ffcbffdde","unresolved":false,"context_lines":[{"line_number":346,"context_line":"        self.assertIsNone(vgpu_info)"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"    def test_get_allocated_gpu_grp_multi_gpu_rp_exc(self):"},{"line_number":349,"context_line":"        # Have vgpu in allocation. For nested-resource-provider, each gpu group"},{"line_number":350,"context_line":"        # will have a corresponding resource provider. The rp uuid is same with"},{"line_number":351,"context_line":"        # the gpu group uuid. Drivers need to locate the specified gpu group"},{"line_number":352,"context_line":"        # using the resource provider uuid in argument `allocations`"},{"line_number":353,"context_line":"        RC_VGPU \u003d rc_fields.ResourceClass.VGPU"},{"line_number":354,"context_line":"        alloc \u003d {"},{"line_number":355,"context_line":"            \u0027rp1\u0027: {"}],"source_content_type":"text/x-python","patch_set":50,"id":"3f79a3b5_e02f72f2","line":352,"range":{"start_line":349,"start_character":1,"end_line":352,"end_character":68},"updated":"2018-10-02 13:37:27.000000000","message":"this code comment was copied from below but is not relevant to this test. A better approach would be a docstring like so:\n\n \"\"\"Ensure only a single pGPU group is allocated against\"\"\"","commit_id":"434e0192f9882fd3735b0f45bee9d42c2159c133"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"92bf4a40527d57602620064decc40684a6546128","unresolved":false,"context_lines":[{"line_number":346,"context_line":"        self.assertIsNone(vgpu_info)"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"    def test_get_allocated_gpu_grp_multi_gpu_rp_exc(self):"},{"line_number":349,"context_line":"        # Have vgpu in allocation. For nested-resource-provider, each gpu group"},{"line_number":350,"context_line":"        # will have a corresponding resource provider. The rp uuid is same with"},{"line_number":351,"context_line":"        # the gpu group uuid. Drivers need to locate the specified gpu group"},{"line_number":352,"context_line":"        # using the resource provider uuid in argument `allocations`"},{"line_number":353,"context_line":"        RC_VGPU \u003d rc_fields.ResourceClass.VGPU"},{"line_number":354,"context_line":"        alloc \u003d {"},{"line_number":355,"context_line":"            \u0027rp1\u0027: {"}],"source_content_type":"text/x-python","patch_set":50,"id":"3f79a3b5_374687a9","line":352,"range":{"start_line":349,"start_character":1,"end_line":352,"end_character":68},"in_reply_to":"3f79a3b5_e02f72f2","updated":"2018-10-09 05:35:04.000000000","message":"Will modify it","commit_id":"434e0192f9882fd3735b0f45bee9d42c2159c133"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e425dbe6d7a3f6f6d99b4fa589e3dd1ffcbffdde","unresolved":false,"context_lines":[{"line_number":375,"context_line":"        # will have a corresponding resource provider. The rp uuid is same with"},{"line_number":376,"context_line":"        # the gpu group uuid. Drivers need to locate the specified gpu group"},{"line_number":377,"context_line":"        # using the resource provider uuid in argument `allocations`"},{"line_number":378,"context_line":"        fake_rp_uuid \u003d \u0027fake_uuid\u0027"},{"line_number":379,"context_line":"        RC_VGPU \u003d rc_fields.ResourceClass.VGPU"},{"line_number":380,"context_line":"        alloc \u003d {"},{"line_number":381,"context_line":"            \u0027rp1\u0027: {"}],"source_content_type":"text/x-python","patch_set":50,"id":"3f79a3b5_803ebe23","line":378,"updated":"2018-10-02 13:37:27.000000000","message":"consider using the nova.tests.uuidsentinel module:\n\n from nova.tests import uuidsentinel as uuids\n ...\n\n rp1_uuid \u003d uuids.rp1\n rp2_uuid \u003d uuids.rp2\n alloc \u003d {\n     rp1_uuid: {...},\n     rp2_uuid: {...},\n }","commit_id":"434e0192f9882fd3735b0f45bee9d42c2159c133"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"92bf4a40527d57602620064decc40684a6546128","unresolved":false,"context_lines":[{"line_number":375,"context_line":"        # will have a corresponding resource provider. The rp uuid is same with"},{"line_number":376,"context_line":"        # the gpu group uuid. Drivers need to locate the specified gpu group"},{"line_number":377,"context_line":"        # using the resource provider uuid in argument `allocations`"},{"line_number":378,"context_line":"        fake_rp_uuid \u003d \u0027fake_uuid\u0027"},{"line_number":379,"context_line":"        RC_VGPU \u003d rc_fields.ResourceClass.VGPU"},{"line_number":380,"context_line":"        alloc \u003d {"},{"line_number":381,"context_line":"            \u0027rp1\u0027: {"}],"source_content_type":"text/x-python","patch_set":50,"id":"3f79a3b5_f7c56f0a","line":378,"in_reply_to":"3f79a3b5_803ebe23","updated":"2018-10-09 05:35:04.000000000","message":"Will do","commit_id":"434e0192f9882fd3735b0f45bee9d42c2159c133"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e425dbe6d7a3f6f6d99b4fa589e3dd1ffcbffdde","unresolved":false,"context_lines":[{"line_number":393,"context_line":"        }"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"        fake_type_info \u003d {"},{"line_number":396,"context_line":"            \u0027vgpu_type_uuid\u0027: \u0027type_uuid_2\u0027,"},{"line_number":397,"context_line":"            \u0027type_name\u0027: \u0027GRID K180Q\u0027,"},{"line_number":398,"context_line":"        }"},{"line_number":399,"context_line":""}],"source_content_type":"text/x-python","patch_set":50,"id":"3f79a3b5_601cc2c1","line":396,"range":{"start_line":396,"start_character":30,"end_line":396,"end_character":43},"updated":"2018-10-02 13:37:27.000000000","message":"I\u0027m not sure why you changed this from the uuids.vgpu_type that was previously being used?","commit_id":"434e0192f9882fd3735b0f45bee9d42c2159c133"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"92bf4a40527d57602620064decc40684a6546128","unresolved":false,"context_lines":[{"line_number":393,"context_line":"        }"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"        fake_type_info \u003d {"},{"line_number":396,"context_line":"            \u0027vgpu_type_uuid\u0027: \u0027type_uuid_2\u0027,"},{"line_number":397,"context_line":"            \u0027type_name\u0027: \u0027GRID K180Q\u0027,"},{"line_number":398,"context_line":"        }"},{"line_number":399,"context_line":""}],"source_content_type":"text/x-python","patch_set":50,"id":"3f79a3b5_17e02b97","line":396,"range":{"start_line":396,"start_character":30,"end_line":396,"end_character":43},"in_reply_to":"3f79a3b5_601cc2c1","updated":"2018-10-09 05:35:04.000000000","message":"Sorry, I made a mistake while I tried to split the function","commit_id":"434e0192f9882fd3735b0f45bee9d42c2159c133"}],"nova/tests/unit/virt/xenapi/test_vgpu.py":[{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"33685edd444bc762d48095a906d2d0e0e2096145","unresolved":false,"context_lines":[{"line_number":208,"context_line":"                   group\u003d\u0027devices\u0027)"},{"line_number":209,"context_line":"        session \u003d mock.Mock()"},{"line_number":210,"context_line":"        fake_enabled_vgpu_refs \u003d [\u0027fake_ref_1\u0027, \u0027fake_ref_2\u0027]"},{"line_number":211,"context_line":"        session.call_xenapi.side_effect \u003d [fake_enabled_vgpu_refs,"},{"line_number":212,"context_line":"                                           \u0027Intel GVT-g\u0027, \u0027GRID K100\u0027,"},{"line_number":213,"context_line":"                                           \u0027fake_vgpu_type_uuid\u0027]"},{"line_number":214,"context_line":"        expected_type_info \u003d (\u0027fake_ref_1\u0027, \u0027Intel GVT-g\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"ff82abbf_c9a60c10","line":211,"updated":"2017-11-29 06:35:48.000000000","message":"similar as line 161, please also add comments in each line to indicate which xenapi function the fake data is for.","commit_id":"196c93827ab82458cdf2a2ee9a5443aad4c53442"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"476cb433aed360bb29fc015411801a988efa06a5","unresolved":false,"context_lines":[{"line_number":208,"context_line":"                   group\u003d\u0027devices\u0027)"},{"line_number":209,"context_line":"        session \u003d mock.Mock()"},{"line_number":210,"context_line":"        fake_enabled_vgpu_refs \u003d [\u0027fake_ref_1\u0027, \u0027fake_ref_2\u0027]"},{"line_number":211,"context_line":"        session.call_xenapi.side_effect \u003d [fake_enabled_vgpu_refs,"},{"line_number":212,"context_line":"                                           \u0027Intel GVT-g\u0027, \u0027GRID K100\u0027,"},{"line_number":213,"context_line":"                                           \u0027fake_vgpu_type_uuid\u0027]"},{"line_number":214,"context_line":"        expected_type_info \u003d (\u0027fake_ref_1\u0027, \u0027Intel GVT-g\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"ff82abbf_24d9dd20","line":211,"in_reply_to":"ff82abbf_c9a60c10","updated":"2017-11-29 08:13:09.000000000","message":"will fix it","commit_id":"196c93827ab82458cdf2a2ee9a5443aad4c53442"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e425dbe6d7a3f6f6d99b4fa589e3dd1ffcbffdde","unresolved":false,"context_lines":[{"line_number":214,"context_line":"            \u0027fake_gpu_grp_ref\u0027,"},{"line_number":215,"context_line":"            fake_enabled_vgpu_refs,  # GPU_group.get_enabled_VGPU_types"},{"line_number":216,"context_line":"            \u0027Intel GVT-g\u0027, \u0027GRID K100\u0027,  # VGPU_type.get_model_name"},{"line_number":217,"context_line":"            \u0027fake_vgpu_type_uuid\u0027  # VGPU_type.get_uuid"},{"line_number":218,"context_line":"        ]"},{"line_number":219,"context_line":"        expected_type_info \u003d dict(vgpu_type_ref\u003d\u0027fake_ref_2\u0027,"},{"line_number":220,"context_line":"                                  vgpu_type_uuid\u003d\u0027fake_vgpu_type_uuid\u0027,"}],"source_content_type":"text/x-python","patch_set":50,"id":"3f79a3b5_806c7e33","line":217,"range":{"start_line":217,"start_character":12,"end_line":217,"end_character":34},"updated":"2018-10-02 13:37:27.000000000","message":"again, consider using uuids.vgpu_type","commit_id":"434e0192f9882fd3735b0f45bee9d42c2159c133"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"92bf4a40527d57602620064decc40684a6546128","unresolved":false,"context_lines":[{"line_number":214,"context_line":"            \u0027fake_gpu_grp_ref\u0027,"},{"line_number":215,"context_line":"            fake_enabled_vgpu_refs,  # GPU_group.get_enabled_VGPU_types"},{"line_number":216,"context_line":"            \u0027Intel GVT-g\u0027, \u0027GRID K100\u0027,  # VGPU_type.get_model_name"},{"line_number":217,"context_line":"            \u0027fake_vgpu_type_uuid\u0027  # VGPU_type.get_uuid"},{"line_number":218,"context_line":"        ]"},{"line_number":219,"context_line":"        expected_type_info \u003d dict(vgpu_type_ref\u003d\u0027fake_ref_2\u0027,"},{"line_number":220,"context_line":"                                  vgpu_type_uuid\u003d\u0027fake_vgpu_type_uuid\u0027,"}],"source_content_type":"text/x-python","patch_set":50,"id":"3f79a3b5_b78137c5","line":217,"range":{"start_line":217,"start_character":12,"end_line":217,"end_character":34},"in_reply_to":"3f79a3b5_806c7e33","updated":"2018-10-09 05:35:04.000000000","message":"Will modify it","commit_id":"434e0192f9882fd3735b0f45bee9d42c2159c133"}],"nova/virt/xenapi/driver.py":[{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"e4f3ce8a72414dabfb0b3e8188c60af7211865b9","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        \"\"\""},{"line_number":218,"context_line":"        We are going to apply vgpu support in xenapi. This function is used to"},{"line_number":219,"context_line":"        get gpu group uuid and vgpu type uuid. The resource provider name which"},{"line_number":220,"context_line":"        could be send in allocations will include gpu group uuid and vgpu type"},{"line_number":221,"context_line":"        uuid."},{"line_number":222,"context_line":"        \"\"\""},{"line_number":223,"context_line":"        vgpu_header \u003d \"VGPU_\""}],"source_content_type":"text/x-python","patch_set":5,"id":"ff82abbf_7d5f1b72","line":220,"range":{"start_line":220,"start_character":50,"end_line":220,"end_character":78},"updated":"2017-11-22 03:03:07.000000000","message":"As we discussed, let\u0027s use group uuid as the RP\u0027s uuid. So we can use RP\u0027s uuid from allocation directly. That will make things much easier.","commit_id":"7f8718664c612a6c7ca22a14180047236d78ef1f"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"e4f3ce8a72414dabfb0b3e8188c60af7211865b9","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        could be send in allocations will include gpu group uuid and vgpu type"},{"line_number":221,"context_line":"        uuid."},{"line_number":222,"context_line":"        \"\"\""},{"line_number":223,"context_line":"        vgpu_header \u003d \"VGPU_\""},{"line_number":224,"context_line":"        if vgpu_header !\u003d rp_name[:len(vgpu_header)]:"},{"line_number":225,"context_line":"            raise exception.NovaException(_(\"Invalid resource provider name\""},{"line_number":226,"context_line":"                                            \" %s\") % rp_name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ff82abbf_1d3fef25","line":223,"updated":"2017-11-22 03:03:07.000000000","message":"Should we put this prefix string as a global const variable so we can re-use it from where making the name and here which parsing it?","commit_id":"7f8718664c612a6c7ca22a14180047236d78ef1f"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"e4f3ce8a72414dabfb0b3e8188c60af7211865b9","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        if vgpu_header !\u003d rp_name[:len(vgpu_header)]:"},{"line_number":225,"context_line":"            raise exception.NovaException(_(\"Invalid resource provider name\""},{"line_number":226,"context_line":"                                            \" %s\") % rp_name)"},{"line_number":227,"context_line":"        no_header \u003d rp_name[len(\u0027VGPU_\u0027):]"},{"line_number":228,"context_line":"        ids \u003d no_header.split(\u0027_\u0027)"},{"line_number":229,"context_line":"        return dict(gpu_grp_uuid\u003dids[0],"},{"line_number":230,"context_line":"                    vgpu_type_uuid\u003dids[1])"}],"source_content_type":"text/x-python","patch_set":5,"id":"ff82abbf_bd7cc3eb","line":227,"range":{"start_line":227,"start_character":33,"end_line":227,"end_character":38},"updated":"2017-11-22 03:03:07.000000000","message":"this const string display twice. I\u0027d suggest re-use the const variable.","commit_id":"7f8718664c612a6c7ca22a14180047236d78ef1f"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"9fe47098f468dd0079fb3ea1e2bec1ecbf86d1e1","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        \"\"\""},{"line_number":169,"context_line":"        return self._vmops.list_instance_uuids()"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def _is_vgpu_allocated(self, allocations):"},{"line_number":172,"context_line":"        # check if allocated vGPUs"},{"line_number":173,"context_line":"        if not allocations:"},{"line_number":174,"context_line":"            # If no allocations, there is no vGPU request."}],"source_content_type":"text/x-python","patch_set":7,"id":"ff82abbf_d1a64054","line":171,"range":{"start_line":171,"start_character":8,"end_line":171,"end_character":26},"updated":"2017-11-22 15:15:27.000000000","message":"This is no longer a binary; now should be \"_get_allocated_vgpu\"?","commit_id":"894169f2379f32912717c5c93059088aa8ba03ed"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"d0aea3eb59e10da4010d5b7779837f97b5fcd4c5","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        \"\"\""},{"line_number":169,"context_line":"        return self._vmops.list_instance_uuids()"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def _is_vgpu_allocated(self, allocations):"},{"line_number":172,"context_line":"        # check if allocated vGPUs"},{"line_number":173,"context_line":"        if not allocations:"},{"line_number":174,"context_line":"            # If no allocations, there is no vGPU request."}],"source_content_type":"text/x-python","patch_set":7,"id":"ff82abbf_7faccf33","line":171,"range":{"start_line":171,"start_character":8,"end_line":171,"end_character":26},"in_reply_to":"ff82abbf_d1a64054","updated":"2017-11-23 03:17:58.000000000","message":"Will modify it.","commit_id":"894169f2379f32912717c5c93059088aa8ba03ed"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"9fe47098f468dd0079fb3ea1e2bec1ecbf86d1e1","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        return self._vmops.list_instance_uuids()"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def _is_vgpu_allocated(self, allocations):"},{"line_number":172,"context_line":"        # check if allocated vGPUs"},{"line_number":173,"context_line":"        if not allocations:"},{"line_number":174,"context_line":"            # If no allocations, there is no vGPU request."},{"line_number":175,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":7,"id":"ff82abbf_11ffc834","line":172,"updated":"2017-11-22 15:15:27.000000000","message":"Comment should make it clear that this is the *first* allocation only.\nPerhaps we should fail if there is more than one allocation?","commit_id":"894169f2379f32912717c5c93059088aa8ba03ed"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"d0aea3eb59e10da4010d5b7779837f97b5fcd4c5","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        return self._vmops.list_instance_uuids()"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def _is_vgpu_allocated(self, allocations):"},{"line_number":172,"context_line":"        # check if allocated vGPUs"},{"line_number":173,"context_line":"        if not allocations:"},{"line_number":174,"context_line":"            # If no allocations, there is no vGPU request."},{"line_number":175,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":7,"id":"ff82abbf_ea0edb30","line":172,"in_reply_to":"ff82abbf_11ffc834","updated":"2017-11-23 03:17:58.000000000","message":"It looks an input validation. Do a complete input validation may be good, but not so natural(If we validate `allocation`, should we also validate all the other inputs?).\nMaybe use the first allocation and make it clear in comments is better?","commit_id":"894169f2379f32912717c5c93059088aa8ba03ed"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"540293df2304a69a115a7abc7c618b0b1acc18e5","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        # check if allocated vGPUs"},{"line_number":173,"context_line":"        if not allocations:"},{"line_number":174,"context_line":"            # If no allocations, there is no vGPU request."},{"line_number":175,"context_line":"            return False"},{"line_number":176,"context_line":"        for rp_uuid in allocations:"},{"line_number":177,"context_line":"            if \u0027VGPU\u0027 in allocations[rp_uuid][\u0027resources\u0027]:"},{"line_number":178,"context_line":"                return rp_uuid"}],"source_content_type":"text/x-python","patch_set":7,"id":"ff82abbf_ea3a5b32","line":175,"range":{"start_line":175,"start_character":12,"end_line":175,"end_character":24},"updated":"2017-11-23 03:48:00.000000000","message":"return None.","commit_id":"894169f2379f32912717c5c93059088aa8ba03ed"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"25dc69fc3386e8fc2dcd510b173af74d1a490340","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        # check if allocated vGPUs"},{"line_number":173,"context_line":"        if not allocations:"},{"line_number":174,"context_line":"            # If no allocations, there is no vGPU request."},{"line_number":175,"context_line":"            return False"},{"line_number":176,"context_line":"        for rp_uuid in allocations:"},{"line_number":177,"context_line":"            if \u0027VGPU\u0027 in allocations[rp_uuid][\u0027resources\u0027]:"},{"line_number":178,"context_line":"                return rp_uuid"}],"source_content_type":"text/x-python","patch_set":7,"id":"ff82abbf_0ad21fd3","line":175,"range":{"start_line":175,"start_character":12,"end_line":175,"end_character":24},"in_reply_to":"ff82abbf_ea3a5b32","updated":"2017-11-23 03:52:10.000000000","message":"will modify it","commit_id":"894169f2379f32912717c5c93059088aa8ba03ed"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"9fe47098f468dd0079fb3ea1e2bec1ecbf86d1e1","unresolved":false,"context_lines":[{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def _get_vgpu_info(self, allocations):"},{"line_number":182,"context_line":"        \"\"\"Get vGPU info if any vGPU is allocated.\"\"\""},{"line_number":183,"context_line":"        vgpu_rp_uuid \u003d self._is_vgpu_allocated(allocations)"},{"line_number":184,"context_line":"        if not vgpu_rp_uuid:"},{"line_number":185,"context_line":"            return None"},{"line_number":186,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"ff82abbf_11ad8830","line":183,"range":{"start_line":183,"start_character":8,"end_line":183,"end_character":20},"updated":"2017-11-22 15:15:27.000000000","message":"At this point it should be gpu_grp_uuid - make it clear that \"is_vgpu_allocated\" will return the GPU Group UUID (even though these are the same as the RP UUID - might be worth having a comment in is_vgpu_allocated)","commit_id":"894169f2379f32912717c5c93059088aa8ba03ed"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"d0aea3eb59e10da4010d5b7779837f97b5fcd4c5","unresolved":false,"context_lines":[{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def _get_vgpu_info(self, allocations):"},{"line_number":182,"context_line":"        \"\"\"Get vGPU info if any vGPU is allocated.\"\"\""},{"line_number":183,"context_line":"        vgpu_rp_uuid \u003d self._is_vgpu_allocated(allocations)"},{"line_number":184,"context_line":"        if not vgpu_rp_uuid:"},{"line_number":185,"context_line":"            return None"},{"line_number":186,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"ff82abbf_6a2c0b99","line":183,"range":{"start_line":183,"start_character":8,"end_line":183,"end_character":20},"in_reply_to":"ff82abbf_11ad8830","updated":"2017-11-23 03:17:58.000000000","message":"Will modify it and add comments","commit_id":"894169f2379f32912717c5c93059088aa8ba03ed"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"ed293e4571e81b8c07141a43ed4e63fa485e4c7d","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        \"\"\""},{"line_number":169,"context_line":"        return self._vmops.list_instance_uuids()"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def _get_allocated_vgpu(self, allocations):"},{"line_number":172,"context_line":"        # Get the first vgpu allocation"},{"line_number":173,"context_line":"        if not allocations:"},{"line_number":174,"context_line":"            # If no allocations, there is no vGPU request."}],"source_content_type":"text/x-python","patch_set":8,"id":"ff82abbf_deeaabaa","line":171,"range":{"start_line":171,"start_character":8,"end_line":171,"end_character":27},"updated":"2017-11-23 17:29:15.000000000","message":"How about renaming it as _get_allocated_vgpu_grp?","commit_id":"e73698502b622cefd45d50a3c84b5afb3741f179"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"5924c1a91242837f66b5e50923e03ae85764f868","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        \"\"\""},{"line_number":169,"context_line":"        return self._vmops.list_instance_uuids()"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def _get_allocated_vgpu(self, allocations):"},{"line_number":172,"context_line":"        # Get the first vgpu allocation"},{"line_number":173,"context_line":"        if not allocations:"},{"line_number":174,"context_line":"            # If no allocations, there is no vGPU request."}],"source_content_type":"text/x-python","patch_set":8,"id":"ff82abbf_e664b624","line":171,"range":{"start_line":171,"start_character":8,"end_line":171,"end_character":27},"in_reply_to":"ff82abbf_deeaabaa","updated":"2017-11-24 09:08:50.000000000","message":"Done","commit_id":"e73698502b622cefd45d50a3c84b5afb3741f179"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"9041f7375ed783834ab54908674b89234e230009","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        \"\"\""},{"line_number":169,"context_line":"        return self._vmops.list_instance_uuids()"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def _get_allocated_vgpu(self, allocations):"},{"line_number":172,"context_line":"        # Get the first vgpu allocation"},{"line_number":173,"context_line":"        if not allocations:"},{"line_number":174,"context_line":"            # If no allocations, there is no vGPU request."}],"source_content_type":"text/x-python","patch_set":8,"id":"ff82abbf_b8ec918f","line":171,"range":{"start_line":171,"start_character":8,"end_line":171,"end_character":27},"in_reply_to":"ff82abbf_deeaabaa","updated":"2017-11-24 07:31:02.000000000","message":"OK for me.","commit_id":"e73698502b622cefd45d50a3c84b5afb3741f179"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"ed293e4571e81b8c07141a43ed4e63fa485e4c7d","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        if not gpu_grp_uuid:"},{"line_number":186,"context_line":"            return None"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        # NOTE(jianghuaw): At the moment, we associate all vGPUs resource to"},{"line_number":189,"context_line":"        # the compute node regardless which GPU group the vGPUs belong to, so"},{"line_number":190,"context_line":"        # we need search all GPU groups until we got one group which has"},{"line_number":191,"context_line":"        # remaining capacity to supply one vGPU. Once we switched to the"},{"line_number":192,"context_line":"        # nested resource providers, the allocations will contain the resource"},{"line_number":193,"context_line":"        # provider which represents a particular GPU group. It\u0027s able to get"},{"line_number":194,"context_line":"        # the GPU group and vGPU type directly by using the resource provider\u0027s"},{"line_number":195,"context_line":"        # uuid. Then we can consider moving this function to vmops, as there is"},{"line_number":196,"context_line":"        # no need to querying host stats to get all GPU groups."},{"line_number":197,"context_line":"        host_stats \u003d self.host_state.get_host_stats(refresh\u003dTrue)"},{"line_number":198,"context_line":"        vgpu_stats \u003d host_stats[\u0027vgpu_stats\u0027]"},{"line_number":199,"context_line":"        if (gpu_grp_uuid in vgpu_stats and"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff82abbf_7ea35f9f","line":196,"range":{"start_line":188,"start_character":8,"end_line":196,"end_character":63},"updated":"2017-11-23 17:29:15.000000000","message":"this NOTE is not true anymore once use the nested resource providers.","commit_id":"e73698502b622cefd45d50a3c84b5afb3741f179"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"5924c1a91242837f66b5e50923e03ae85764f868","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        if not gpu_grp_uuid:"},{"line_number":186,"context_line":"            return None"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        # NOTE(jianghuaw): At the moment, we associate all vGPUs resource to"},{"line_number":189,"context_line":"        # the compute node regardless which GPU group the vGPUs belong to, so"},{"line_number":190,"context_line":"        # we need search all GPU groups until we got one group which has"},{"line_number":191,"context_line":"        # remaining capacity to supply one vGPU. Once we switched to the"},{"line_number":192,"context_line":"        # nested resource providers, the allocations will contain the resource"},{"line_number":193,"context_line":"        # provider which represents a particular GPU group. It\u0027s able to get"},{"line_number":194,"context_line":"        # the GPU group and vGPU type directly by using the resource provider\u0027s"},{"line_number":195,"context_line":"        # uuid. Then we can consider moving this function to vmops, as there is"},{"line_number":196,"context_line":"        # no need to querying host stats to get all GPU groups."},{"line_number":197,"context_line":"        host_stats \u003d self.host_state.get_host_stats(refresh\u003dTrue)"},{"line_number":198,"context_line":"        vgpu_stats \u003d host_stats[\u0027vgpu_stats\u0027]"},{"line_number":199,"context_line":"        if (gpu_grp_uuid in vgpu_stats and"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff82abbf_066afaec","line":196,"range":{"start_line":188,"start_character":8,"end_line":196,"end_character":63},"in_reply_to":"ff82abbf_7ea35f9f","updated":"2017-11-24 09:08:50.000000000","message":"Done","commit_id":"e73698502b622cefd45d50a3c84b5afb3741f179"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"9041f7375ed783834ab54908674b89234e230009","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        if not gpu_grp_uuid:"},{"line_number":186,"context_line":"            return None"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        # NOTE(jianghuaw): At the moment, we associate all vGPUs resource to"},{"line_number":189,"context_line":"        # the compute node regardless which GPU group the vGPUs belong to, so"},{"line_number":190,"context_line":"        # we need search all GPU groups until we got one group which has"},{"line_number":191,"context_line":"        # remaining capacity to supply one vGPU. Once we switched to the"},{"line_number":192,"context_line":"        # nested resource providers, the allocations will contain the resource"},{"line_number":193,"context_line":"        # provider which represents a particular GPU group. It\u0027s able to get"},{"line_number":194,"context_line":"        # the GPU group and vGPU type directly by using the resource provider\u0027s"},{"line_number":195,"context_line":"        # uuid. Then we can consider moving this function to vmops, as there is"},{"line_number":196,"context_line":"        # no need to querying host stats to get all GPU groups."},{"line_number":197,"context_line":"        host_stats \u003d self.host_state.get_host_stats(refresh\u003dTrue)"},{"line_number":198,"context_line":"        vgpu_stats \u003d host_stats[\u0027vgpu_stats\u0027]"},{"line_number":199,"context_line":"        if (gpu_grp_uuid in vgpu_stats and"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff82abbf_d89635f1","line":196,"range":{"start_line":188,"start_character":8,"end_line":196,"end_character":63},"in_reply_to":"ff82abbf_7ea35f9f","updated":"2017-11-24 07:31:02.000000000","message":"Will modify it.","commit_id":"e73698502b622cefd45d50a3c84b5afb3741f179"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"33115b9c742d697f70be6285bca056ede412dbaa","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            return None"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        # Get vgpu information by gpu group uuid."},{"line_number":190,"context_line":"        host_stats \u003d self.host_state.get_host_stats(refresh\u003dTrue)"},{"line_number":191,"context_line":"        vgpu_stats \u003d host_stats[\u0027vgpu_stats\u0027]"},{"line_number":192,"context_line":"        if (gpu_grp_uuid in vgpu_stats and"},{"line_number":193,"context_line":"                vgpu_stats[gpu_grp_uuid][\u0027remaining\u0027] \u003e 0):"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff82abbf_2dcef62d","line":190,"range":{"start_line":190,"start_character":8,"end_line":190,"end_character":65},"updated":"2017-11-24 15:29:02.000000000","message":"As we\u0027ve got grp uuid, can we just pass it down and get vGPU with the grp-uuid and enabled vGPU type in vmops? (in the deleted NOTE, it also mentioned to move functions to vmops)\n\nI think that can avoid a whole host_stat refresh. Your thoughts?","commit_id":"cc6d79ee5ac4d1d447d1c8de32f9852e0560de14"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"393bc00df313ad3d32274f0e98ae021ca1529362","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            return None"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        # Get vgpu information by gpu group uuid."},{"line_number":190,"context_line":"        host_stats \u003d self.host_state.get_host_stats(refresh\u003dTrue)"},{"line_number":191,"context_line":"        vgpu_stats \u003d host_stats[\u0027vgpu_stats\u0027]"},{"line_number":192,"context_line":"        if (gpu_grp_uuid in vgpu_stats and"},{"line_number":193,"context_line":"                vgpu_stats[gpu_grp_uuid][\u0027remaining\u0027] \u003e 0):"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff82abbf_ece47ee2","line":190,"range":{"start_line":190,"start_character":8,"end_line":190,"end_character":65},"in_reply_to":"ff82abbf_2dcef62d","updated":"2017-11-27 06:38:16.000000000","message":"Will check it.","commit_id":"cc6d79ee5ac4d1d447d1c8de32f9852e0560de14"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"67baf4e7fb0e05ebf06d0033894bd4ec55ef5866","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            return None"},{"line_number":188,"context_line":"        # Get vgpu information by gpu group uuid."},{"line_number":189,"context_line":"        vgpu_type_ref, vgpu_type_uuid, chosen_type \u003d \\"},{"line_number":190,"context_line":"            host.get_vgpu_type_by_group_uuid(gpu_grp_uuid)"},{"line_number":191,"context_line":"        if vgpu_type_uuid:"},{"line_number":192,"context_line":"            return dict(gpu_grp_uuid\u003dgpu_grp_uuid,"},{"line_number":193,"context_line":"                        vgpu_type_uuid\u003dvgpu_type_uuid)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ff82abbf_106f2d2b","line":190,"range":{"start_line":190,"start_character":12,"end_line":190,"end_character":16},"updated":"2017-11-29 14:53:33.000000000","message":"I didn\u0027t find any functions called \"get_vgpu_type_by_group_uuid()\" in https://review.openstack.org/#/c/521717/17/nova/virt/xenapi/host.py ?","commit_id":"5ebfc8e3f868a5000638b69e316137d019450a83"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"6122b2147dc3c606c34cd89cfa7dcfe91b926163","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            return None"},{"line_number":188,"context_line":"        # Get vgpu information by gpu group uuid."},{"line_number":189,"context_line":"        vgpu_type_ref, vgpu_type_uuid, chosen_type \u003d \\"},{"line_number":190,"context_line":"            host.get_vgpu_type_by_group_uuid(gpu_grp_uuid)"},{"line_number":191,"context_line":"        if vgpu_type_uuid:"},{"line_number":192,"context_line":"            return dict(gpu_grp_uuid\u003dgpu_grp_uuid,"},{"line_number":193,"context_line":"                        vgpu_type_uuid\u003dvgpu_type_uuid)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ff82abbf_3b36c652","line":190,"range":{"start_line":190,"start_character":12,"end_line":190,"end_character":16},"in_reply_to":"ff82abbf_106f2d2b","updated":"2017-11-30 01:44:50.000000000","message":"Done","commit_id":"5ebfc8e3f868a5000638b69e316137d019450a83"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"5aa28bb2ceeacd50eab69f95c0b474debbaacb78","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            return None"},{"line_number":188,"context_line":"        # Get vgpu information by gpu group uuid."},{"line_number":189,"context_line":"        vgpu_type_ref, vgpu_type_uuid, chosen_type \u003d \\"},{"line_number":190,"context_line":"            host.get_vgpu_type_by_group_uuid(gpu_grp_uuid)"},{"line_number":191,"context_line":"        if vgpu_type_uuid:"},{"line_number":192,"context_line":"            return dict(gpu_grp_uuid\u003dgpu_grp_uuid,"},{"line_number":193,"context_line":"                        vgpu_type_uuid\u003dvgpu_type_uuid)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ff82abbf_9bf11298","line":190,"range":{"start_line":190,"start_character":12,"end_line":190,"end_character":16},"in_reply_to":"ff82abbf_106f2d2b","updated":"2017-11-30 01:44:26.000000000","message":"should be get_vgpu_type_by_group_uuid, fixed it.","commit_id":"5ebfc8e3f868a5000638b69e316137d019450a83"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"3d936e55db7ccf77722fb001f66f59eed8accb29","unresolved":false,"context_lines":[{"line_number":186,"context_line":"        if not gpu_grp_uuid:"},{"line_number":187,"context_line":"            return None"},{"line_number":188,"context_line":"        # Get vgpu information by gpu group uuid."},{"line_number":189,"context_line":"        vgpu_type_info \u003d host.find_an_enabled_vgpu_in_group(gpu_grp_uuid)"},{"line_number":190,"context_line":"        if vgpu_type_info:"},{"line_number":191,"context_line":"            return dict(gpu_grp_uuid\u003dgpu_grp_uuid,"},{"line_number":192,"context_line":"                        vgpu_type_uuid\u003dvgpu_type_info[\u0027vgpu_type_uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":18,"id":"ff82abbf_7b9a0e14","line":189,"range":{"start_line":189,"start_character":25,"end_line":189,"end_character":30},"updated":"2017-11-30 01:55:02.000000000","message":"host here is https://review.openstack.org/#/c/521717/18/nova/virt/xenapi/driver.py@41, but if you check https://review.openstack.org/#/c/521717/18/nova/virt/xenapi/host.py@288, it seems you should not use host.find_an_enabled_vgpu_in_group(), but host.HostState()","commit_id":"0a12c691e8ab117306e6a8ce775afe9086597743"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"9616131a7935f2d2b3343b5dc4706a5fe2c9be7b","unresolved":false,"context_lines":[{"line_number":186,"context_line":"        if not gpu_grp_uuid:"},{"line_number":187,"context_line":"            return None"},{"line_number":188,"context_line":"        # Get vgpu information by gpu group uuid."},{"line_number":189,"context_line":"        vgpu_type_info \u003d host.find_an_enabled_vgpu_in_group(gpu_grp_uuid)"},{"line_number":190,"context_line":"        if vgpu_type_info:"},{"line_number":191,"context_line":"            return dict(gpu_grp_uuid\u003dgpu_grp_uuid,"},{"line_number":192,"context_line":"                        vgpu_type_uuid\u003dvgpu_type_info[\u0027vgpu_type_uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":18,"id":"ff82abbf_b1b19546","line":189,"range":{"start_line":189,"start_character":25,"end_line":189,"end_character":30},"in_reply_to":"ff82abbf_7b9a0e14","updated":"2017-11-30 03:16:02.000000000","message":"Done","commit_id":"0a12c691e8ab117306e6a8ce775afe9086597743"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b6148c0a0c0bf7e64e46238598dbd0eb22d0d638","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        return self._vmops.list_instance_uuids()"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def _get_allocated_gpu_grp(self, allocations):"},{"line_number":173,"context_line":"        # Get the first vgpu allocation. Resource provider uuid in allocations"},{"line_number":174,"context_line":"        # is same with the corresponding gpu group uuid"},{"line_number":175,"context_line":"        if not allocations:"},{"line_number":176,"context_line":"            # If no allocations, there is no vGPU request."}],"source_content_type":"text/x-python","patch_set":25,"id":"bf659307_273e088b","line":173,"range":{"start_line":173,"start_character":10,"end_line":173,"end_character":40},"updated":"2018-03-29 22:04:25.000000000","message":"eh?  Why only the first one?  Are we restricting to only one VGPU per instance?","commit_id":"ad5b5419b0963978fbd516da3bcee0595317714a"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"2b1dfa0cc01ec8d3859ebe34a3aa881abba44e1d","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        return self._vmops.list_instance_uuids()"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def _get_allocated_gpu_grp(self, allocations):"},{"line_number":173,"context_line":"        # Get the first vgpu allocation. Resource provider uuid in allocations"},{"line_number":174,"context_line":"        # is same with the corresponding gpu group uuid"},{"line_number":175,"context_line":"        if not allocations:"},{"line_number":176,"context_line":"            # If no allocations, there is no vGPU request."}],"source_content_type":"text/x-python","patch_set":25,"id":"bf659307_d3158ae6","line":173,"range":{"start_line":173,"start_character":10,"end_line":173,"end_character":40},"in_reply_to":"bf659307_273e088b","updated":"2018-03-30 01:43:50.000000000","message":"Just confirmed, Currently, we only support one vgpu per instance. XenServer doesn\u0027t support multiple vgpu on one VM.\nThe discussion with Sylvain and Jay is about placement abilities.\nSorry about the misleading, Eric.","commit_id":"ad5b5419b0963978fbd516da3bcee0595317714a"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"06ea6a9c4512231d2a2257c509f4f1631ee2ef0a","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        return self._vmops.list_instance_uuids()"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def _get_allocated_gpu_grp(self, allocations):"},{"line_number":173,"context_line":"        # Get the first vgpu allocation. Resource provider uuid in allocations"},{"line_number":174,"context_line":"        # is same with the corresponding gpu group uuid"},{"line_number":175,"context_line":"        if not allocations:"},{"line_number":176,"context_line":"            # If no allocations, there is no vGPU request."}],"source_content_type":"text/x-python","patch_set":25,"id":"bf659307_9305d213","line":173,"range":{"start_line":173,"start_character":10,"end_line":173,"end_character":40},"in_reply_to":"bf659307_273e088b","updated":"2018-03-30 01:24:58.000000000","message":"You are right, Eric. According to the discussion with \t\nSylvain and Jay, we may support multiple vgpu on one host but they can only be provided by one resource provider. \nI will change the logic. Thank you for the reminder.","commit_id":"ad5b5419b0963978fbd516da3bcee0595317714a"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"153a36fc723ff851843716b0c133f95a59a5c377","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        return self._vmops.list_instance_uuids()"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def _get_allocated_gpu_grp(self, allocations):"},{"line_number":173,"context_line":"        # Get the first vgpu allocation. Resource provider uuid in allocations"},{"line_number":174,"context_line":"        # is same with the corresponding gpu group uuid"},{"line_number":175,"context_line":"        if not allocations:"},{"line_number":176,"context_line":"            # If no allocations, there is no vGPU request."}],"source_content_type":"text/x-python","patch_set":25,"id":"bf659307_d307ae17","line":173,"range":{"start_line":173,"start_character":10,"end_line":173,"end_character":40},"in_reply_to":"bf659307_673dc3db","updated":"2018-04-02 01:11:34.000000000","message":"Will add more description","commit_id":"ad5b5419b0963978fbd516da3bcee0595317714a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"69c58991d51cd2b7f12bbbf0d06ba4907edaee2b","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        return self._vmops.list_instance_uuids()"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def _get_allocated_gpu_grp(self, allocations):"},{"line_number":173,"context_line":"        # Get the first vgpu allocation. Resource provider uuid in allocations"},{"line_number":174,"context_line":"        # is same with the corresponding gpu group uuid"},{"line_number":175,"context_line":"        if not allocations:"},{"line_number":176,"context_line":"            # If no allocations, there is no vGPU request."}],"source_content_type":"text/x-python","patch_set":25,"id":"bf659307_673dc3db","line":173,"range":{"start_line":173,"start_character":10,"end_line":173,"end_character":40},"in_reply_to":"bf659307_d3158ae6","updated":"2018-04-01 13:00:07.000000000","message":"Okay; the comment should explain in more detail why it\u0027s being done that way.","commit_id":"ad5b5419b0963978fbd516da3bcee0595317714a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b6148c0a0c0bf7e64e46238598dbd0eb22d0d638","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        if not gpu_grp_uuid:"},{"line_number":189,"context_line":"            return None"},{"line_number":190,"context_line":"        # Get vgpu information by gpu group uuid."},{"line_number":191,"context_line":"        vgpu_type_info \u003d \\"},{"line_number":192,"context_line":"            self.host_state.find_an_enabled_vgpu_in_group(gpu_grp_uuid)"},{"line_number":193,"context_line":"        if vgpu_type_info:"},{"line_number":194,"context_line":"            return dict(gpu_grp_uuid\u003dgpu_grp_uuid,"}],"source_content_type":"text/x-python","patch_set":25,"id":"bf659307_8766f4c0","line":191,"range":{"start_line":191,"start_character":25,"end_line":191,"end_character":26},"updated":"2018-03-29 22:04:25.000000000","message":"ew backslash","commit_id":"ad5b5419b0963978fbd516da3bcee0595317714a"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"06ea6a9c4512231d2a2257c509f4f1631ee2ef0a","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        if not gpu_grp_uuid:"},{"line_number":189,"context_line":"            return None"},{"line_number":190,"context_line":"        # Get vgpu information by gpu group uuid."},{"line_number":191,"context_line":"        vgpu_type_info \u003d \\"},{"line_number":192,"context_line":"            self.host_state.find_an_enabled_vgpu_in_group(gpu_grp_uuid)"},{"line_number":193,"context_line":"        if vgpu_type_info:"},{"line_number":194,"context_line":"            return dict(gpu_grp_uuid\u003dgpu_grp_uuid,"}],"source_content_type":"text/x-python","patch_set":25,"id":"bf659307_1311c252","line":191,"range":{"start_line":191,"start_character":25,"end_line":191,"end_character":26},"in_reply_to":"bf659307_8766f4c0","updated":"2018-03-30 01:24:58.000000000","message":"will change the format","commit_id":"ad5b5419b0963978fbd516da3bcee0595317714a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"8e3c076a6d08add9e8405456ef6087a8a1cc3c38","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        return self._vmops.list_instance_uuids()"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def _get_allocated_gpu_grp(self, allocations):"},{"line_number":173,"context_line":"        # Currently, XenServer only supports one vGPU per instance, so only"},{"line_number":174,"context_line":"        # the first vgpu allocation will be picked up. Resource provider uuid"},{"line_number":175,"context_line":"        # in allocations is same with the corresponding gpu group uuid"},{"line_number":176,"context_line":"        if not allocations:"}],"source_content_type":"text/x-python","patch_set":27,"id":"bf659307_0b408606","line":173,"updated":"2018-04-02 17:30:11.000000000","message":"Yup, cool.","commit_id":"05d6bfcdec6db0f6024f806dd9706ba792cabc0e"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"905e32aaf339a6406c5002c6c9e80362b9bc78b1","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        return self._vmops.list_instance_uuids()"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def _get_allocated_gpu_grp(self, allocations):"},{"line_number":173,"context_line":"        # Currently, XenServer only supports one vGPU per instance, so only"},{"line_number":174,"context_line":"        # the first vgpu allocation will be picked up. Resource provider uuid"},{"line_number":175,"context_line":"        # in allocations is same with the corresponding gpu group uuid"},{"line_number":176,"context_line":"        if not allocations:"}],"source_content_type":"text/x-python","patch_set":27,"id":"bf659307_c85b6df3","line":173,"in_reply_to":"bf659307_0b408606","updated":"2018-04-03 01:05:03.000000000","message":":)","commit_id":"05d6bfcdec6db0f6024f806dd9706ba792cabc0e"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"50641e4050379bba7b26551a7f192d9409d21967","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        return False"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def _get_vgpu_info(self, allocations):"},{"line_number":185,"context_line":"        \"\"\"Get vGPU info basing on the allocations."},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        :param allocations: Information about resources allocated to the"},{"line_number":188,"context_line":"                            instance via placement, of the form returned by"},{"line_number":189,"context_line":"                            SchedulerReportClient.get_allocations_for_consumer."},{"line_number":190,"context_line":"        :returns: Dictionary describing vGPU info if any vGPU allocated;"},{"line_number":191,"context_line":"                  None otherwise."},{"line_number":192,"context_line":"        :raises: exception.ComputeResourcesUnavailable if there is no"},{"line_number":193,"context_line":"                 available vGPUs."},{"line_number":194,"context_line":"        \"\"\""},{"line_number":195,"context_line":"        if not self._is_vgpu_allocated(allocations):"},{"line_number":196,"context_line":"            return None"},{"line_number":197,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"bf659307_a8a30eb1","side":"PARENT","line":194,"range":{"start_line":185,"start_character":0,"end_line":194,"end_character":11},"updated":"2018-04-09 19:16:32.000000000","message":"why did you delete this great docstring?","commit_id":"0beb5ed0bbe72a7dc755118bb6a11c7c047c0687"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"0ca4dd06236b4ceb8e5c6eedac6055a9004fc80b","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        return False"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def _get_vgpu_info(self, allocations):"},{"line_number":185,"context_line":"        \"\"\"Get vGPU info basing on the allocations."},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        :param allocations: Information about resources allocated to the"},{"line_number":188,"context_line":"                            instance via placement, of the form returned by"},{"line_number":189,"context_line":"                            SchedulerReportClient.get_allocations_for_consumer."},{"line_number":190,"context_line":"        :returns: Dictionary describing vGPU info if any vGPU allocated;"},{"line_number":191,"context_line":"                  None otherwise."},{"line_number":192,"context_line":"        :raises: exception.ComputeResourcesUnavailable if there is no"},{"line_number":193,"context_line":"                 available vGPUs."},{"line_number":194,"context_line":"        \"\"\""},{"line_number":195,"context_line":"        if not self._is_vgpu_allocated(allocations):"},{"line_number":196,"context_line":"            return None"},{"line_number":197,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"bf659307_5976b808","side":"PARENT","line":194,"range":{"start_line":185,"start_character":0,"end_line":194,"end_character":11},"in_reply_to":"bf659307_a8a30eb1","updated":"2018-04-10 08:07:21.000000000","message":"I think it should be a stupid mistake...\nwill recover it.","commit_id":"0beb5ed0bbe72a7dc755118bb6a11c7c047c0687"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"50641e4050379bba7b26551a7f192d9409d21967","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    def _get_allocated_gpu_grp(self, allocations):"},{"line_number":173,"context_line":"        # Currently, XenServer only supports one vGPU per instance, so only"},{"line_number":174,"context_line":"        # the first vgpu allocation will be picked up. Resource provider uuid"},{"line_number":175,"context_line":"        # in allocations is same with the corresponding gpu group uuid"},{"line_number":176,"context_line":"        if not allocations:"},{"line_number":177,"context_line":"            # If no allocations, there is no vGPU request."},{"line_number":178,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":33,"id":"bf659307_28ca9e6d","line":175,"range":{"start_line":175,"start_character":25,"end_line":175,"end_character":42},"updated":"2018-04-09 19:16:32.000000000","message":"is the same as the","commit_id":"ae7a9f402a53805f8d79cd158b2a429addb646ed"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"0ca4dd06236b4ceb8e5c6eedac6055a9004fc80b","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    def _get_allocated_gpu_grp(self, allocations):"},{"line_number":173,"context_line":"        # Currently, XenServer only supports one vGPU per instance, so only"},{"line_number":174,"context_line":"        # the first vgpu allocation will be picked up. Resource provider uuid"},{"line_number":175,"context_line":"        # in allocations is same with the corresponding gpu group uuid"},{"line_number":176,"context_line":"        if not allocations:"},{"line_number":177,"context_line":"            # If no allocations, there is no vGPU request."},{"line_number":178,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":33,"id":"bf659307_39798492","line":175,"range":{"start_line":175,"start_character":25,"end_line":175,"end_character":42},"in_reply_to":"bf659307_28ca9e6d","updated":"2018-04-10 08:07:21.000000000","message":"Thank you for the reminder :)","commit_id":"ae7a9f402a53805f8d79cd158b2a429addb646ed"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"50641e4050379bba7b26551a7f192d9409d21967","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        if not gpu_grp_uuid:"},{"line_number":190,"context_line":"            return None"},{"line_number":191,"context_line":"        # Get vgpu information by gpu group uuid."},{"line_number":192,"context_line":"        vgpu_type_info \u003d self.host_state.find_an_enabled_vgpu_in_group("},{"line_number":193,"context_line":"            gpu_grp_uuid)"},{"line_number":194,"context_line":"        if vgpu_type_info:"},{"line_number":195,"context_line":"            return dict(gpu_grp_uuid\u003dgpu_grp_uuid,"},{"line_number":196,"context_line":"                        vgpu_type_uuid\u003dvgpu_type_info[\u0027vgpu_type_uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":33,"id":"bf659307_086c7a34","line":193,"range":{"start_line":192,"start_character":8,"end_line":193,"end_character":25},"updated":"2018-04-09 19:16:32.000000000","message":"there is a mismatch here between the name of the function \"find_an_enabled_vgpu_in_group()\" and what the function actually returns, which is not actually a VGPU but rather a dict of information about a vGPU **type**.\n\nMay I ask why this is necessary? If the allocation already includes the UUID of the GPU group, why do we need to do anything other than grab a vGPU context from that GPU group?","commit_id":"ae7a9f402a53805f8d79cd158b2a429addb646ed"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"0ca4dd06236b4ceb8e5c6eedac6055a9004fc80b","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        if not gpu_grp_uuid:"},{"line_number":190,"context_line":"            return None"},{"line_number":191,"context_line":"        # Get vgpu information by gpu group uuid."},{"line_number":192,"context_line":"        vgpu_type_info \u003d self.host_state.find_an_enabled_vgpu_in_group("},{"line_number":193,"context_line":"            gpu_grp_uuid)"},{"line_number":194,"context_line":"        if vgpu_type_info:"},{"line_number":195,"context_line":"            return dict(gpu_grp_uuid\u003dgpu_grp_uuid,"},{"line_number":196,"context_line":"                        vgpu_type_uuid\u003dvgpu_type_info[\u0027vgpu_type_uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":33,"id":"bf659307_fca77a0a","line":193,"range":{"start_line":192,"start_character":8,"end_line":193,"end_character":25},"in_reply_to":"bf659307_086c7a34","updated":"2018-04-10 08:07:21.000000000","message":"Hi, Jay. The variable name is not suitable, will change it.\nOn xenserver, we need vgpu type and gpu group id to create vgpu. vgpu type can\u0027t be get from allocation and need to use both enabled vgpu types in nova.conf and enabled vgpu types on xenserver host to determine it.So I add this function.","commit_id":"ae7a9f402a53805f8d79cd158b2a429addb646ed"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"8b3ee06e3102daf368655f6daed861e42137b663","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        return self._vmops.list_instance_uuids()"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def _get_allocated_gpu_grp(self, allocations):"},{"line_number":175,"context_line":"        # Currently, XenServer only supports one vGPU per instance, so only"},{"line_number":176,"context_line":"        # the first vgpu allocation will be picked up. Resource provider uuid"},{"line_number":177,"context_line":"        # in allocations is same as the corresponding gpu group uuid"},{"line_number":178,"context_line":"        if not allocations:"},{"line_number":179,"context_line":"            # If no allocations, there is no vGPU request."},{"line_number":180,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":38,"id":"5f7c97a3_bcd9d7f3","line":177,"range":{"start_line":175,"start_character":8,"end_line":177,"end_character":68},"updated":"2018-05-10 20:53:34.000000000","message":"Well, okay, so it would seem more correct for you to go through all the allocations, and raise an exception if more than one VGPU is found.  I assume this isn\u0027t disallowed somewhere else (like in the scheduler).","commit_id":"87519a1f3c6ef36b9042b90f8708c8a4eda5eeac"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"1d79f4f70327ffe17d13240bad45efb6ec94632f","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        return self._vmops.list_instance_uuids()"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def _get_allocated_gpu_grp(self, allocations):"},{"line_number":175,"context_line":"        # Currently, XenServer only supports one vGPU per instance, so only"},{"line_number":176,"context_line":"        # the first vgpu allocation will be picked up. Resource provider uuid"},{"line_number":177,"context_line":"        # in allocations is same as the corresponding gpu group uuid"},{"line_number":178,"context_line":"        if not allocations:"},{"line_number":179,"context_line":"            # If no allocations, there is no vGPU request."},{"line_number":180,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":38,"id":"5f7c97a3_75aa6d71","line":177,"range":{"start_line":175,"start_character":8,"end_line":177,"end_character":68},"in_reply_to":"5f7c97a3_bcd9d7f3","updated":"2018-05-11 08:13:59.000000000","message":"Will add the check.","commit_id":"87519a1f3c6ef36b9042b90f8708c8a4eda5eeac"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"8b3ee06e3102daf368655f6daed861e42137b663","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            # If no allocations, there is no vGPU request."},{"line_number":180,"context_line":"            return None"},{"line_number":181,"context_line":"        RC_VGPU \u003d fields.ResourceClass.VGPU"},{"line_number":182,"context_line":"        for rp in allocations:"},{"line_number":183,"context_line":"            res \u003d allocations[rp][\u0027resources\u0027]"},{"line_number":184,"context_line":"            if res and RC_VGPU in res and res[RC_VGPU] \u003e 0:"},{"line_number":185,"context_line":"                return rp"},{"line_number":186,"context_line":"        return None"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def _get_vgpu_info(self, allocations):"}],"source_content_type":"text/x-python","patch_set":38,"id":"5f7c97a3_9c297be7","line":185,"range":{"start_line":182,"start_character":0,"end_line":185,"end_character":25},"updated":"2018-05-10 20:53:34.000000000","message":"or\n\n for rp, alloc in allocations.items():\n     if alloc.get(\u0027resources\u0027, {}).get(RC_VGPU, 0):\n         return rp","commit_id":"87519a1f3c6ef36b9042b90f8708c8a4eda5eeac"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"1d79f4f70327ffe17d13240bad45efb6ec94632f","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            # If no allocations, there is no vGPU request."},{"line_number":180,"context_line":"            return None"},{"line_number":181,"context_line":"        RC_VGPU \u003d fields.ResourceClass.VGPU"},{"line_number":182,"context_line":"        for rp in allocations:"},{"line_number":183,"context_line":"            res \u003d allocations[rp][\u0027resources\u0027]"},{"line_number":184,"context_line":"            if res and RC_VGPU in res and res[RC_VGPU] \u003e 0:"},{"line_number":185,"context_line":"                return rp"},{"line_number":186,"context_line":"        return None"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def _get_vgpu_info(self, allocations):"}],"source_content_type":"text/x-python","patch_set":38,"id":"5f7c97a3_d5cee180","line":185,"range":{"start_line":182,"start_character":0,"end_line":185,"end_character":25},"in_reply_to":"5f7c97a3_9c297be7","updated":"2018-05-11 08:13:59.000000000","message":"Skillful suggestion, will modify it.","commit_id":"87519a1f3c6ef36b9042b90f8708c8a4eda5eeac"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"8b3ee06e3102daf368655f6daed861e42137b663","unresolved":false,"context_lines":[{"line_number":200,"context_line":"        if not gpu_grp_uuid:"},{"line_number":201,"context_line":"            return None"},{"line_number":202,"context_line":"        # Get vgpu information by gpu group uuid."},{"line_number":203,"context_line":"        gpu_info \u003d self.host_state.find_gpu_in_group("},{"line_number":204,"context_line":"            gpu_grp_uuid)"},{"line_number":205,"context_line":"        if gpu_info:"},{"line_number":206,"context_line":"            return dict(gpu_grp_uuid\u003dgpu_grp_uuid,"},{"line_number":207,"context_line":"                        vgpu_type_uuid\u003dgpu_info[\u0027vgpu_type_uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":38,"id":"5f7c97a3_9c6e5b2d","line":204,"range":{"start_line":203,"start_character":52,"end_line":204,"end_character":25},"updated":"2018-05-10 20:53:34.000000000","message":"nit: this could be one line.","commit_id":"87519a1f3c6ef36b9042b90f8708c8a4eda5eeac"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"1d79f4f70327ffe17d13240bad45efb6ec94632f","unresolved":false,"context_lines":[{"line_number":200,"context_line":"        if not gpu_grp_uuid:"},{"line_number":201,"context_line":"            return None"},{"line_number":202,"context_line":"        # Get vgpu information by gpu group uuid."},{"line_number":203,"context_line":"        gpu_info \u003d self.host_state.find_gpu_in_group("},{"line_number":204,"context_line":"            gpu_grp_uuid)"},{"line_number":205,"context_line":"        if gpu_info:"},{"line_number":206,"context_line":"            return dict(gpu_grp_uuid\u003dgpu_grp_uuid,"},{"line_number":207,"context_line":"                        vgpu_type_uuid\u003dgpu_info[\u0027vgpu_type_uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":38,"id":"5f7c97a3_95a709a8","line":204,"range":{"start_line":203,"start_character":52,"end_line":204,"end_character":25},"in_reply_to":"5f7c97a3_9c6e5b2d","updated":"2018-05-11 08:13:59.000000000","message":"thanks","commit_id":"87519a1f3c6ef36b9042b90f8708c8a4eda5eeac"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e425dbe6d7a3f6f6d99b4fa589e3dd1ffcbffdde","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        host_stats \u003d self.host_state.get_host_stats(refresh\u003dTrue)"},{"line_number":211,"context_line":"        vgpu_stats \u003d host_stats[\u0027vgpu_stats\u0027]"},{"line_number":212,"context_line":"        for grp_uuid in vgpu_stats:"},{"line_number":213,"context_line":"            if vgpu_stats[grp_uuid][\u0027remaining\u0027] \u003e 0:"},{"line_number":214,"context_line":"                # NOTE(jianghuaw): As XenServer only supports single vGPU per"},{"line_number":215,"context_line":"                # VM, we\u0027ve restricted the inventory data having `max_unit` as"},{"line_number":216,"context_line":"                # 1. If it reached here, surely only one GPU is allocated."}],"source_content_type":"text/x-python","patch_set":50,"id":"3f79a3b5_bb0c4b39","side":"PARENT","line":213,"range":{"start_line":213,"start_character":12,"end_line":213,"end_character":53},"updated":"2018-10-02 13:37:27.000000000","message":"no longer doing this check?","commit_id":"a55f3b9c2348435879f9e66a3152a10527c89f18"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"92bf4a40527d57602620064decc40684a6546128","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        host_stats \u003d self.host_state.get_host_stats(refresh\u003dTrue)"},{"line_number":211,"context_line":"        vgpu_stats \u003d host_stats[\u0027vgpu_stats\u0027]"},{"line_number":212,"context_line":"        for grp_uuid in vgpu_stats:"},{"line_number":213,"context_line":"            if vgpu_stats[grp_uuid][\u0027remaining\u0027] \u003e 0:"},{"line_number":214,"context_line":"                # NOTE(jianghuaw): As XenServer only supports single vGPU per"},{"line_number":215,"context_line":"                # VM, we\u0027ve restricted the inventory data having `max_unit` as"},{"line_number":216,"context_line":"                # 1. If it reached here, surely only one GPU is allocated."}],"source_content_type":"text/x-python","patch_set":50,"id":"3f79a3b5_b75a977f","side":"PARENT","line":213,"range":{"start_line":213,"start_character":12,"end_line":213,"end_character":53},"in_reply_to":"3f79a3b5_bb0c4b39","updated":"2018-10-09 05:35:04.000000000","message":"Looks I made a mistake, will check it.","commit_id":"a55f3b9c2348435879f9e66a3152a10527c89f18"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e425dbe6d7a3f6f6d99b4fa589e3dd1ffcbffdde","unresolved":false,"context_lines":[{"line_number":180,"context_line":"            # If no allocations, there is no vGPU request."},{"line_number":181,"context_line":"            return None"},{"line_number":182,"context_line":"        RC_VGPU \u003d fields.ResourceClass.VGPU"},{"line_number":183,"context_line":"        gpu_rp \u003d None"},{"line_number":184,"context_line":"        for rp, alloc in allocations.items():"},{"line_number":185,"context_line":"            if alloc.get(\u0027resources\u0027, {}).get(RC_VGPU, 0):"},{"line_number":186,"context_line":"                if not gpu_rp:"}],"source_content_type":"text/x-python","patch_set":50,"id":"3f79a3b5_20c6ca17","line":183,"range":{"start_line":183,"start_character":7,"end_line":183,"end_character":21},"updated":"2018-10-02 13:37:27.000000000","message":"this variable isn\u0027t needed.","commit_id":"434e0192f9882fd3735b0f45bee9d42c2159c133"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"92bf4a40527d57602620064decc40684a6546128","unresolved":false,"context_lines":[{"line_number":180,"context_line":"            # If no allocations, there is no vGPU request."},{"line_number":181,"context_line":"            return None"},{"line_number":182,"context_line":"        RC_VGPU \u003d fields.ResourceClass.VGPU"},{"line_number":183,"context_line":"        gpu_rp \u003d None"},{"line_number":184,"context_line":"        for rp, alloc in allocations.items():"},{"line_number":185,"context_line":"            if alloc.get(\u0027resources\u0027, {}).get(RC_VGPU, 0):"},{"line_number":186,"context_line":"                if not gpu_rp:"}],"source_content_type":"text/x-python","patch_set":50,"id":"3f79a3b5_376d272f","line":183,"range":{"start_line":183,"start_character":7,"end_line":183,"end_character":21},"in_reply_to":"3f79a3b5_20c6ca17","updated":"2018-10-09 05:35:04.000000000","message":"Will modify it.","commit_id":"434e0192f9882fd3735b0f45bee9d42c2159c133"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e425dbe6d7a3f6f6d99b4fa589e3dd1ffcbffdde","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        gpu_rp \u003d None"},{"line_number":184,"context_line":"        for rp, alloc in allocations.items():"},{"line_number":185,"context_line":"            if alloc.get(\u0027resources\u0027, {}).get(RC_VGPU, 0):"},{"line_number":186,"context_line":"                if not gpu_rp:"},{"line_number":187,"context_line":"                    gpu_rp \u003d rp"},{"line_number":188,"context_line":"                else:"},{"line_number":189,"context_line":"                    raise exception.MultipleGpuGpuRpInAllocations("},{"line_number":190,"context_line":"                        allocations\u003dallocations)"}],"source_content_type":"text/x-python","patch_set":50,"id":"3f79a3b5_401c2676","line":187,"range":{"start_line":186,"start_character":0,"end_line":187,"end_character":31},"updated":"2018-10-02 13:37:27.000000000","message":"just do:\n\n return rp","commit_id":"434e0192f9882fd3735b0f45bee9d42c2159c133"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e425dbe6d7a3f6f6d99b4fa589e3dd1ffcbffdde","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                if not gpu_rp:"},{"line_number":187,"context_line":"                    gpu_rp \u003d rp"},{"line_number":188,"context_line":"                else:"},{"line_number":189,"context_line":"                    raise exception.MultipleGpuGpuRpInAllocations("},{"line_number":190,"context_line":"                        allocations\u003dallocations)"},{"line_number":191,"context_line":"        return gpu_rp"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def _get_vgpu_info(self, allocations):"}],"source_content_type":"text/x-python","patch_set":50,"id":"3f79a3b5_a0873ab6","line":190,"range":{"start_line":189,"start_character":0,"end_line":190,"end_character":48},"updated":"2018-10-02 13:37:27.000000000","message":"Recommend separating out the check for multiple resource providers of VGPU from a function that is supposed to get the provider UUID of VGPU resources.\n\nYou should have a different method like so:\n\n def _raise_if_more_than_one_gpu_provider(self, allocations):\n     gpu_providers \u003d set([\n         rp for rp, alloc in allocations.items()\n         if alloc.get(\u0027resources\u0027, {}).get(fields.ResourceClass.VGPU, 0)\n     ])\n     if len(gpu_providers) \u003e 1:\n         raise exception.MultipleGPUResourceProvidersInAllocations(\n              allocations\u003dallocations)","commit_id":"434e0192f9882fd3735b0f45bee9d42c2159c133"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"92bf4a40527d57602620064decc40684a6546128","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                if not gpu_rp:"},{"line_number":187,"context_line":"                    gpu_rp \u003d rp"},{"line_number":188,"context_line":"                else:"},{"line_number":189,"context_line":"                    raise exception.MultipleGpuGpuRpInAllocations("},{"line_number":190,"context_line":"                        allocations\u003dallocations)"},{"line_number":191,"context_line":"        return gpu_rp"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def _get_vgpu_info(self, allocations):"}],"source_content_type":"text/x-python","patch_set":50,"id":"3f79a3b5_77639f46","line":190,"range":{"start_line":189,"start_character":0,"end_line":190,"end_character":48},"in_reply_to":"3f79a3b5_a0873ab6","updated":"2018-10-09 05:35:04.000000000","message":"Will check it.","commit_id":"434e0192f9882fd3735b0f45bee9d42c2159c133"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e425dbe6d7a3f6f6d99b4fa589e3dd1ffcbffdde","unresolved":false,"context_lines":[{"line_number":188,"context_line":"                else:"},{"line_number":189,"context_line":"                    raise exception.MultipleGpuGpuRpInAllocations("},{"line_number":190,"context_line":"                        allocations\u003dallocations)"},{"line_number":191,"context_line":"        return gpu_rp"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def _get_vgpu_info(self, allocations):"},{"line_number":194,"context_line":"        \"\"\"Get vGPU info basing on the allocations."}],"source_content_type":"text/x-python","patch_set":50,"id":"3f79a3b5_604a82ad","line":191,"range":{"start_line":191,"start_character":15,"end_line":191,"end_character":21},"updated":"2018-10-02 13:37:27.000000000","message":"return None","commit_id":"434e0192f9882fd3735b0f45bee9d42c2159c133"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e425dbe6d7a3f6f6d99b4fa589e3dd1ffcbffdde","unresolved":false,"context_lines":[{"line_number":200,"context_line":"                  None otherwise."},{"line_number":201,"context_line":"        :raises: exception.ComputeResourcesUnavailable if there is no"},{"line_number":202,"context_line":"                 available vGPUs."},{"line_number":203,"context_line":"        \"\"\""},{"line_number":204,"context_line":"        gpu_grp_uuid \u003d self._get_allocated_gpu_grp(allocations)"},{"line_number":205,"context_line":"        if not gpu_grp_uuid:"},{"line_number":206,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":50,"id":"3f79a3b5_80247ec4","line":203,"updated":"2018-10-02 13:37:27.000000000","message":"and call the check function here:\n\n self._raise_if_more_than_one_gpu_provider(allocations)","commit_id":"434e0192f9882fd3735b0f45bee9d42c2159c133"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"92bf4a40527d57602620064decc40684a6546128","unresolved":false,"context_lines":[{"line_number":200,"context_line":"                  None otherwise."},{"line_number":201,"context_line":"        :raises: exception.ComputeResourcesUnavailable if there is no"},{"line_number":202,"context_line":"                 available vGPUs."},{"line_number":203,"context_line":"        \"\"\""},{"line_number":204,"context_line":"        gpu_grp_uuid \u003d self._get_allocated_gpu_grp(allocations)"},{"line_number":205,"context_line":"        if not gpu_grp_uuid:"},{"line_number":206,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":50,"id":"3f79a3b5_5751c362","line":203,"in_reply_to":"3f79a3b5_80247ec4","updated":"2018-10-09 05:35:04.000000000","message":"Will do","commit_id":"434e0192f9882fd3735b0f45bee9d42c2159c133"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9d3942ce4e76ed97efb8f87b8d43c11d1aa4f44f","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        :returns: Dictionary describing vGPU info if any vGPU allocated;"},{"line_number":195,"context_line":"                  None otherwise."},{"line_number":196,"context_line":"        :raises: exception.ComputeResourcesUnavailable if there is no"},{"line_number":197,"context_line":"                 available vGPUs."},{"line_number":198,"context_line":"        \"\"\""},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        def _raise_if_more_than_one_gpu_provider(self, allocations):"}],"source_content_type":"text/x-python","patch_set":56,"id":"3f79a3b5_5eaab0cf","line":197,"updated":"2018-11-27 14:50:58.000000000","message":"Please update the docstring to indicate you raise MultipleGPUResourceProvidersInAllocation now","commit_id":"a50bf17985587f6a3b38c6868b93f4b4100c2ec4"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"6facc7de04b9ef546b11dd13362a56eee664a369","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        :returns: Dictionary describing vGPU info if any vGPU allocated;"},{"line_number":195,"context_line":"                  None otherwise."},{"line_number":196,"context_line":"        :raises: exception.ComputeResourcesUnavailable if there is no"},{"line_number":197,"context_line":"                 available vGPUs."},{"line_number":198,"context_line":"        \"\"\""},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        def _raise_if_more_than_one_gpu_provider(self, allocations):"}],"source_content_type":"text/x-python","patch_set":56,"id":"3f79a3b5_a1cdd592","line":197,"in_reply_to":"3f79a3b5_5eaab0cf","updated":"2018-11-28 09:24:17.000000000","message":"Will do, thanks.","commit_id":"a50bf17985587f6a3b38c6868b93f4b4100c2ec4"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9d3942ce4e76ed97efb8f87b8d43c11d1aa4f44f","unresolved":false,"context_lines":[{"line_number":206,"context_line":"                raise exception.MultipleGPUResourceProvidersInAllocations("},{"line_number":207,"context_line":"                    allocations\u003dallocations)"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        _raise_if_more_than_one_gpu_provider(self, allocations)"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        gpu_grp_uuid \u003d self._get_allocated_gpu_grp(allocations)"},{"line_number":212,"context_line":"        if not gpu_grp_uuid:"}],"source_content_type":"text/x-python","patch_set":56,"id":"3f79a3b5_de9ec0b4","line":209,"updated":"2018-11-27 14:50:58.000000000","message":"not sure you needed to create a function inside a function here. Instead, you could just de-indent the contents of _raise_if_more_than_one_gpu_provider() and get rid of the sub-function entirely...","commit_id":"a50bf17985587f6a3b38c6868b93f4b4100c2ec4"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"6facc7de04b9ef546b11dd13362a56eee664a369","unresolved":false,"context_lines":[{"line_number":206,"context_line":"                raise exception.MultipleGPUResourceProvidersInAllocations("},{"line_number":207,"context_line":"                    allocations\u003dallocations)"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        _raise_if_more_than_one_gpu_provider(self, allocations)"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        gpu_grp_uuid \u003d self._get_allocated_gpu_grp(allocations)"},{"line_number":212,"context_line":"        if not gpu_grp_uuid:"}],"source_content_type":"text/x-python","patch_set":56,"id":"3f79a3b5_21e1c5fd","line":209,"in_reply_to":"3f79a3b5_de9ec0b4","updated":"2018-11-28 09:24:17.000000000","message":"Will check it.","commit_id":"a50bf17985587f6a3b38c6868b93f4b4100c2ec4"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9d3942ce4e76ed97efb8f87b8d43c11d1aa4f44f","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        gpu_info \u003d self.host_state.find_gpu_in_group(gpu_grp_uuid)"},{"line_number":216,"context_line":"        if gpu_info and gpu_info[\u0027vgpu_state_remaining\u0027] \u003e 0:"},{"line_number":217,"context_line":"            return dict(gpu_grp_uuid\u003dgpu_grp_uuid,"},{"line_number":218,"context_line":"                        vgpu_type_uuid\u003dgpu_info[\u0027vgpu_type_uuid\u0027])"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"        # No remaining vGPU available: e.g. the vGPU resource has been used by"},{"line_number":221,"context_line":"        # other instance or the vGPU has been changed to be disabled."}],"source_content_type":"text/x-python","patch_set":56,"id":"3f79a3b5_7ed76c51","line":218,"updated":"2018-11-27 14:50:58.000000000","message":"If gpu_grp_uuid is not None, and gpu_info is None, that means the allocation was made against a PGPU group resource provider that doesn\u0027t exist on the host system. Probably should at a minimum do a LOG.warning() in that case and explain the discrepancy.","commit_id":"a50bf17985587f6a3b38c6868b93f4b4100c2ec4"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"6facc7de04b9ef546b11dd13362a56eee664a369","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        gpu_info \u003d self.host_state.find_gpu_in_group(gpu_grp_uuid)"},{"line_number":216,"context_line":"        if gpu_info and gpu_info[\u0027vgpu_state_remaining\u0027] \u003e 0:"},{"line_number":217,"context_line":"            return dict(gpu_grp_uuid\u003dgpu_grp_uuid,"},{"line_number":218,"context_line":"                        vgpu_type_uuid\u003dgpu_info[\u0027vgpu_type_uuid\u0027])"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"        # No remaining vGPU available: e.g. the vGPU resource has been used by"},{"line_number":221,"context_line":"        # other instance or the vGPU has been changed to be disabled."}],"source_content_type":"text/x-python","patch_set":56,"id":"3f79a3b5_01e289ff","line":218,"in_reply_to":"3f79a3b5_7ed76c51","updated":"2018-11-28 09:24:17.000000000","message":"Will do.","commit_id":"a50bf17985587f6a3b38c6868b93f4b4100c2ec4"}],"nova/virt/xenapi/host.py":[{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"ce2f10146612c5588cbc2ef0fa78c4379cd192e1","unresolved":false,"context_lines":[{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        vgpu_stats \u003d {}"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"        # NOTE(jianghuaw): If there are multiple vGPU types enabled in"},{"line_number":242,"context_line":"        # the configure option, we only choose the first one so that"},{"line_number":243,"context_line":"        # we support only one vGPU type per compute node at the moment."},{"line_number":244,"context_line":"        # Once we switch to use the nested resource providers, we will"},{"line_number":245,"context_line":"        # remove these lines to allow multiple vGPU types within multiple"},{"line_number":246,"context_line":"        # GPU groups (each group has a different vGPU type enabled)."},{"line_number":247,"context_line":"        if len(CONF.devices.enabled_vgpu_types) \u003e 1:"},{"line_number":248,"context_line":"            LOG.warning(\u0027XenAPI only supports one GPU type per compute node,\u0027"},{"line_number":249,"context_line":"                        \u0027 only first type will be used.\u0027)"},{"line_number":250,"context_line":"        vgpu_grp_refs \u003d self._session.call_xenapi(\u0027GPU_group.get_all\u0027)"},{"line_number":251,"context_line":"        for ref in vgpu_grp_refs:"},{"line_number":252,"context_line":"            grp_uuid \u003d self._session.call_xenapi(\u0027GPU_group.get_uuid\u0027, ref)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ff82abbf_95257d0b","line":249,"range":{"start_line":241,"start_character":1,"end_line":249,"end_character":57},"updated":"2017-11-29 03:19:33.000000000","message":"should remove these lines.","commit_id":"6b530ce45ee37cfb0ab9854a53d78af22a725de0"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"ce2f10146612c5588cbc2ef0fa78c4379cd192e1","unresolved":false,"context_lines":[{"line_number":294,"context_line":"        return stat"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"    def get_vgpu_type_by_group_uuid(self, gpu_group_uuid):"},{"line_number":297,"context_line":"        \"\"\"Set the pci key of other-config parameter to params.\"\"\""},{"line_number":298,"context_line":"        gpu_grp_ref \u003d self._session.call_xenapi(\"GPU_group.get_by_uuid\","},{"line_number":299,"context_line":"                                                gpu_group_uuid)"},{"line_number":300,"context_line":"        return self._get_vgpu_type_by_group_uuid(gpu_grp_ref)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ff82abbf_157f2de0","line":297,"range":{"start_line":297,"start_character":8,"end_line":297,"end_character":66},"updated":"2017-11-29 03:19:33.000000000","message":"copy \u0026 paste but it\u0027s wrong at here.","commit_id":"6b530ce45ee37cfb0ab9854a53d78af22a725de0"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"ce2f10146612c5588cbc2ef0fa78c4379cd192e1","unresolved":false,"context_lines":[{"line_number":299,"context_line":"                                                gpu_group_uuid)"},{"line_number":300,"context_line":"        return self._get_vgpu_type_by_group_uuid(gpu_grp_ref)"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"    def _get_vgpu_type_by_group_uuid(self, gpu_group_ref):"},{"line_number":303,"context_line":"        vgpu_type_ref \u003d None"},{"line_number":304,"context_line":"        vgpu_type_uuid \u003d None"},{"line_number":305,"context_line":"        chosen_type \u003d None"}],"source_content_type":"text/x-python","patch_set":15,"id":"ff82abbf_f82ac07c","line":302,"range":{"start_line":302,"start_character":25,"end_line":302,"end_character":36},"updated":"2017-11-29 03:19:33.000000000","message":"by group_uuid?","commit_id":"6b530ce45ee37cfb0ab9854a53d78af22a725de0"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"ce2f10146612c5588cbc2ef0fa78c4379cd192e1","unresolved":false,"context_lines":[{"line_number":311,"context_line":"            \u0027VGPU_type.get_model_name\u0027,"},{"line_number":312,"context_line":"            type_ref): type_ref"},{"line_number":313,"context_line":"            for type_ref in vgpu_type_refs}"},{"line_number":314,"context_line":"        enabled_types \u003d set(cfg_enabled_types) \u0026 set(type_names_in_grp)"},{"line_number":315,"context_line":"        # Get the sorted enabled types, so that we can always choose the same"},{"line_number":316,"context_line":"        # type when there are multiple enabled vGPU types."},{"line_number":317,"context_line":"        if enabled_types:"}],"source_content_type":"text/x-python","patch_set":15,"id":"ff82abbf_38e58838","line":314,"updated":"2017-11-29 03:19:33.000000000","message":"In order to keep configure behavior is same as the existing \"single VGPU per compute node\", please help ensure choose the first vgpu type from the configure option.\ne.g.:\nfor cfg_type in cfg_enabled_types:\n  if cfg_type in type_names_in_grp:\n     chosen_type \u003d cfg_type\n     break","commit_id":"6b530ce45ee37cfb0ab9854a53d78af22a725de0"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"33685edd444bc762d48095a906d2d0e0e2096145","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        \"\"\""},{"line_number":270,"context_line":"        vgpu_type_info \u003d self._find_an_enabled_vgpu_in_group(grp_ref)"},{"line_number":271,"context_line":"        if not vgpu_type_info:"},{"line_number":272,"context_line":"            return None"},{"line_number":273,"context_line":"        stat \u003d {}"},{"line_number":274,"context_line":"        stat[\u0027uuid\u0027] \u003d vgpu_type_info[\u0027vgpu_type_uuid\u0027]"},{"line_number":275,"context_line":"        stat[\u0027type_name\u0027] \u003d vgpu_type_info[\u0027vgpu_type_name\u0027]"}],"source_content_type":"text/x-python","patch_set":16,"id":"ff82abbf_693ee0c1","line":272,"updated":"2017-11-29 06:35:48.000000000","message":"return {} instead of None?\nsuggest move line 273 to 270. So always return stat.","commit_id":"196c93827ab82458cdf2a2ee9a5443aad4c53442"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"476cb433aed360bb29fc015411801a988efa06a5","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        \"\"\""},{"line_number":270,"context_line":"        vgpu_type_info \u003d self._find_an_enabled_vgpu_in_group(grp_ref)"},{"line_number":271,"context_line":"        if not vgpu_type_info:"},{"line_number":272,"context_line":"            return None"},{"line_number":273,"context_line":"        stat \u003d {}"},{"line_number":274,"context_line":"        stat[\u0027uuid\u0027] \u003d vgpu_type_info[\u0027vgpu_type_uuid\u0027]"},{"line_number":275,"context_line":"        stat[\u0027type_name\u0027] \u003d vgpu_type_info[\u0027vgpu_type_name\u0027]"}],"source_content_type":"text/x-python","patch_set":16,"id":"ff82abbf_8425490b","line":272,"in_reply_to":"ff82abbf_693ee0c1","updated":"2017-11-29 08:13:09.000000000","message":"I think None is better. Like the previous code line292, it just called a `return`. Also, check the previous code line256, the code which called this function would also check if the return is `None` or not.\nSo I think we\u0027d better keep current implement.","commit_id":"196c93827ab82458cdf2a2ee9a5443aad4c53442"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"33685edd444bc762d48095a906d2d0e0e2096145","unresolved":false,"context_lines":[{"line_number":301,"context_line":"            type_ref): type_ref"},{"line_number":302,"context_line":"            for type_ref in vgpu_type_refs}"},{"line_number":303,"context_line":"        # Select the first vgpu type name in configure file which also enabled"},{"line_number":304,"context_line":"        # on the current host"},{"line_number":305,"context_line":"        for vgpu_type_name in cfg_enabled_types:"},{"line_number":306,"context_line":"            if vgpu_type_name in type_names_in_grp:"},{"line_number":307,"context_line":"                vgpu_type_ref \u003d type_names_in_grp[vgpu_type_name]"}],"source_content_type":"text/x-python","patch_set":16,"id":"ff82abbf_8e224ab8","line":304,"range":{"start_line":304,"start_character":10,"end_line":304,"end_character":29},"updated":"2017-11-29 06:35:48.000000000","message":"on this GPU group.","commit_id":"196c93827ab82458cdf2a2ee9a5443aad4c53442"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"476cb433aed360bb29fc015411801a988efa06a5","unresolved":false,"context_lines":[{"line_number":301,"context_line":"            type_ref): type_ref"},{"line_number":302,"context_line":"            for type_ref in vgpu_type_refs}"},{"line_number":303,"context_line":"        # Select the first vgpu type name in configure file which also enabled"},{"line_number":304,"context_line":"        # on the current host"},{"line_number":305,"context_line":"        for vgpu_type_name in cfg_enabled_types:"},{"line_number":306,"context_line":"            if vgpu_type_name in type_names_in_grp:"},{"line_number":307,"context_line":"                vgpu_type_ref \u003d type_names_in_grp[vgpu_type_name]"}],"source_content_type":"text/x-python","patch_set":16,"id":"ff82abbf_441bc1c8","line":304,"range":{"start_line":304,"start_character":10,"end_line":304,"end_character":29},"in_reply_to":"ff82abbf_8e224ab8","updated":"2017-11-29 08:13:09.000000000","message":"Will modify it.","commit_id":"196c93827ab82458cdf2a2ee9a5443aad4c53442"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"820db7723e7660ce372587ab76bdeb1e9e342815","unresolved":false,"context_lines":[{"line_number":301,"context_line":"            type_ref): type_ref"},{"line_number":302,"context_line":"            for type_ref in vgpu_type_refs}"},{"line_number":303,"context_line":"        # Select the first vgpu type name in configure file which also enabled"},{"line_number":304,"context_line":"        # on the current host"},{"line_number":305,"context_line":"        for vgpu_type_name in cfg_enabled_types:"},{"line_number":306,"context_line":"            if vgpu_type_name in type_names_in_grp:"},{"line_number":307,"context_line":"                vgpu_type_ref \u003d type_names_in_grp[vgpu_type_name]"}],"source_content_type":"text/x-python","patch_set":20,"id":"ff82abbf_00a34501","line":304,"range":{"start_line":304,"start_character":25,"end_line":304,"end_character":29},"updated":"2017-11-30 08:20:17.000000000","message":"GPU group.","commit_id":"378ad1bf8195cad358ecac3e3fda4c23542f0790"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"7e3c92b12d0f7c3bed57c1a9949eacdf4db93c72","unresolved":false,"context_lines":[{"line_number":301,"context_line":"            type_ref): type_ref"},{"line_number":302,"context_line":"            for type_ref in vgpu_type_refs}"},{"line_number":303,"context_line":"        # Select the first vgpu type name in configure file which also enabled"},{"line_number":304,"context_line":"        # on the current host"},{"line_number":305,"context_line":"        for vgpu_type_name in cfg_enabled_types:"},{"line_number":306,"context_line":"            if vgpu_type_name in type_names_in_grp:"},{"line_number":307,"context_line":"                vgpu_type_ref \u003d type_names_in_grp[vgpu_type_name]"}],"source_content_type":"text/x-python","patch_set":20,"id":"ff82abbf_a82cbfac","line":304,"range":{"start_line":304,"start_character":25,"end_line":304,"end_character":29},"in_reply_to":"ff82abbf_00a34501","updated":"2017-11-30 11:32:48.000000000","message":"Done","commit_id":"378ad1bf8195cad358ecac3e3fda4c23542f0790"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"fafb20d1ebfe0d6d460d1b4c4cf43df64f533a9e","unresolved":false,"context_lines":[{"line_number":301,"context_line":"            type_ref): type_ref"},{"line_number":302,"context_line":"            for type_ref in vgpu_type_refs}"},{"line_number":303,"context_line":"        # Select the first vgpu type name in configure file which also enabled"},{"line_number":304,"context_line":"        # on the current host"},{"line_number":305,"context_line":"        for vgpu_type_name in cfg_enabled_types:"},{"line_number":306,"context_line":"            if vgpu_type_name in type_names_in_grp:"},{"line_number":307,"context_line":"                vgpu_type_ref \u003d type_names_in_grp[vgpu_type_name]"}],"source_content_type":"text/x-python","patch_set":20,"id":"ff82abbf_a87effac","line":304,"range":{"start_line":304,"start_character":25,"end_line":304,"end_character":29},"in_reply_to":"ff82abbf_00a34501","updated":"2017-11-30 11:31:12.000000000","message":"will modify it, thanks, jianghua","commit_id":"378ad1bf8195cad358ecac3e3fda4c23542f0790"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b6148c0a0c0bf7e64e46238598dbd0eb22d0d638","unresolved":false,"context_lines":[{"line_number":305,"context_line":"        for vgpu_type_name in cfg_enabled_types:"},{"line_number":306,"context_line":"            if vgpu_type_name in type_names_in_grp:"},{"line_number":307,"context_line":"                vgpu_type_ref \u003d type_names_in_grp[vgpu_type_name]"},{"line_number":308,"context_line":"                vgpu_type_uuid \u003d \\"},{"line_number":309,"context_line":"                    self._session.call_xenapi(\"VGPU_type.get_uuid\","},{"line_number":310,"context_line":"                                              vgpu_type_ref)"},{"line_number":311,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"bf659307_270cc8ea","line":308,"range":{"start_line":308,"start_character":33,"end_line":308,"end_character":34},"updated":"2018-03-29 22:04:25.000000000","message":"ick backslash","commit_id":"ad5b5419b0963978fbd516da3bcee0595317714a"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"06ea6a9c4512231d2a2257c509f4f1631ee2ef0a","unresolved":false,"context_lines":[{"line_number":305,"context_line":"        for vgpu_type_name in cfg_enabled_types:"},{"line_number":306,"context_line":"            if vgpu_type_name in type_names_in_grp:"},{"line_number":307,"context_line":"                vgpu_type_ref \u003d type_names_in_grp[vgpu_type_name]"},{"line_number":308,"context_line":"                vgpu_type_uuid \u003d \\"},{"line_number":309,"context_line":"                    self._session.call_xenapi(\"VGPU_type.get_uuid\","},{"line_number":310,"context_line":"                                              vgpu_type_ref)"},{"line_number":311,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"bf659307_133a22cb","line":308,"range":{"start_line":308,"start_character":33,"end_line":308,"end_character":34},"in_reply_to":"bf659307_270cc8ea","updated":"2018-03-30 01:24:58.000000000","message":"Will change it","commit_id":"ad5b5419b0963978fbd516da3bcee0595317714a"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"288f850b47cab166cc0aac270d281e3132b358bf","unresolved":false,"context_lines":[{"line_number":233,"context_line":"        vGPU stats in GPU group x. For details, please refer to"},{"line_number":234,"context_line":"        the return value of the function of _get_vgpu_stats_in_group()."},{"line_number":235,"context_line":"        \"\"\""},{"line_number":236,"context_line":"        if not CONF.devices.enabled_vgpu_types:"},{"line_number":237,"context_line":"            return {}"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        vgpu_stats \u003d {}"}],"source_content_type":"text/x-python","patch_set":27,"id":"bf659307_233e5c29","line":236,"range":{"start_line":236,"start_character":28,"end_line":236,"end_character":46},"updated":"2018-04-08 07:27:06.000000000","message":"Is it enough by just checking this option is configured? Where is value used?","commit_id":"05d6bfcdec6db0f6024f806dd9706ba792cabc0e"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"fe83512af7ece5e319fdee41b4934898d2f6493d","unresolved":false,"context_lines":[{"line_number":233,"context_line":"        vGPU stats in GPU group x. For details, please refer to"},{"line_number":234,"context_line":"        the return value of the function of _get_vgpu_stats_in_group()."},{"line_number":235,"context_line":"        \"\"\""},{"line_number":236,"context_line":"        if not CONF.devices.enabled_vgpu_types:"},{"line_number":237,"context_line":"            return {}"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        vgpu_stats \u003d {}"}],"source_content_type":"text/x-python","patch_set":31,"id":"bf659307_034318b1","line":236,"range":{"start_line":236,"start_character":28,"end_line":236,"end_character":46},"updated":"2018-04-08 07:34:38.000000000","message":"I think this value should be used to restrict only the enabled vGPU types are exposed.","commit_id":"997b8474e7a2f73d56b106719d6efed4f1c5a327"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"6889a9701d0cdbabab5388309b7e098feb7ce3bb","unresolved":false,"context_lines":[{"line_number":233,"context_line":"        vGPU stats in GPU group x. For details, please refer to"},{"line_number":234,"context_line":"        the return value of the function of _get_vgpu_stats_in_group()."},{"line_number":235,"context_line":"        \"\"\""},{"line_number":236,"context_line":"        if not CONF.devices.enabled_vgpu_types:"},{"line_number":237,"context_line":"            return {}"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        vgpu_stats \u003d {}"}],"source_content_type":"text/x-python","patch_set":31,"id":"bf659307_e69152f3","line":236,"range":{"start_line":236,"start_character":28,"end_line":236,"end_character":46},"in_reply_to":"bf659307_034318b1","updated":"2018-04-08 09:50:26.000000000","message":"just for quick exit","commit_id":"997b8474e7a2f73d56b106719d6efed4f1c5a327"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"50641e4050379bba7b26551a7f192d9409d21967","unresolved":false,"context_lines":[{"line_number":285,"context_line":"            vgpu_type_info[\u0027vgpu_type_ref\u0027]))"},{"line_number":286,"context_line":"        return stat"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    def find_an_enabled_vgpu_in_group(self, gpu_group_uuid):"},{"line_number":289,"context_line":"        \"\"\"Find an enabled vgpu type in a gpu group.\"\"\""},{"line_number":290,"context_line":"        gpu_grp_ref \u003d self._session.call_xenapi(\"GPU_group.get_by_uuid\","},{"line_number":291,"context_line":"                                                gpu_group_uuid)"}],"source_content_type":"text/x-python","patch_set":33,"id":"bf659307_28c61e4b","line":288,"range":{"start_line":288,"start_character":8,"end_line":288,"end_character":37},"updated":"2018-04-09 19:16:32.000000000","message":"I think find_vgpu_in_group() is a better, shorter function name. :)","commit_id":"ae7a9f402a53805f8d79cd158b2a429addb646ed"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"0ca4dd06236b4ceb8e5c6eedac6055a9004fc80b","unresolved":false,"context_lines":[{"line_number":285,"context_line":"            vgpu_type_info[\u0027vgpu_type_ref\u0027]))"},{"line_number":286,"context_line":"        return stat"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    def find_an_enabled_vgpu_in_group(self, gpu_group_uuid):"},{"line_number":289,"context_line":"        \"\"\"Find an enabled vgpu type in a gpu group.\"\"\""},{"line_number":290,"context_line":"        gpu_grp_ref \u003d self._session.call_xenapi(\"GPU_group.get_by_uuid\","},{"line_number":291,"context_line":"                                                gpu_group_uuid)"}],"source_content_type":"text/x-python","patch_set":33,"id":"bf659307_4666d72b","line":288,"range":{"start_line":288,"start_character":8,"end_line":288,"end_character":37},"in_reply_to":"bf659307_28c61e4b","updated":"2018-04-10 08:07:21.000000000","message":"OK, will modify it.","commit_id":"ae7a9f402a53805f8d79cd158b2a429addb646ed"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"50641e4050379bba7b26551a7f192d9409d21967","unresolved":false,"context_lines":[{"line_number":296,"context_line":"            \"GPU_group.get_enabled_VGPU_types\","},{"line_number":297,"context_line":"            gpu_group_ref)"},{"line_number":298,"context_line":"        type_names_in_grp \u003d {self._session.call_xenapi("},{"line_number":299,"context_line":"            \u0027VGPU_type.get_model_name\u0027,"},{"line_number":300,"context_line":"            type_ref): type_ref"},{"line_number":301,"context_line":"            for type_ref in vgpu_type_refs}"},{"line_number":302,"context_line":"        # Get the type set with types which included both in nove enabled type"}],"source_content_type":"text/x-python","patch_set":33,"id":"bf659307_6802d671","line":299,"range":{"start_line":299,"start_character":12,"end_line":299,"end_character":39},"updated":"2018-04-09 19:16:32.000000000","message":"this is what originally disturbed me about the discussion about VGPU \"types\" in the original spec from Jianghua. I had said at the time that I was uncomfortable with the idea of just having vendor model names passed through as traits for VGPUs, and that is precisely what I see here is happening. :(","commit_id":"ae7a9f402a53805f8d79cd158b2a429addb646ed"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"0ca4dd06236b4ceb8e5c6eedac6055a9004fc80b","unresolved":false,"context_lines":[{"line_number":296,"context_line":"            \"GPU_group.get_enabled_VGPU_types\","},{"line_number":297,"context_line":"            gpu_group_ref)"},{"line_number":298,"context_line":"        type_names_in_grp \u003d {self._session.call_xenapi("},{"line_number":299,"context_line":"            \u0027VGPU_type.get_model_name\u0027,"},{"line_number":300,"context_line":"            type_ref): type_ref"},{"line_number":301,"context_line":"            for type_ref in vgpu_type_refs}"},{"line_number":302,"context_line":"        # Get the type set with types which included both in nove enabled type"}],"source_content_type":"text/x-python","patch_set":33,"id":"bf659307_3950a40a","line":299,"range":{"start_line":299,"start_character":12,"end_line":299,"end_character":39},"in_reply_to":"bf659307_6802d671","updated":"2018-04-10 08:07:21.000000000","message":"Got it, will check if we could send some other information.","commit_id":"ae7a9f402a53805f8d79cd158b2a429addb646ed"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"b80079b0c2bde0fe11bbdc99c9bbbc17655ba50c","unresolved":false,"context_lines":[{"line_number":296,"context_line":"            \"GPU_group.get_enabled_VGPU_types\","},{"line_number":297,"context_line":"            gpu_group_ref)"},{"line_number":298,"context_line":"        type_names_in_grp \u003d {self._session.call_xenapi("},{"line_number":299,"context_line":"            \u0027VGPU_type.get_model_name\u0027,"},{"line_number":300,"context_line":"            type_ref): type_ref"},{"line_number":301,"context_line":"            for type_ref in vgpu_type_refs}"},{"line_number":302,"context_line":"        # Get the type set with types which included both in nove enabled type"}],"source_content_type":"text/x-python","patch_set":33,"id":"bf659307_2df05e67","line":299,"range":{"start_line":299,"start_character":12,"end_line":299,"end_character":39},"in_reply_to":"bf659307_6802d671","updated":"2018-04-19 13:03:13.000000000","message":"Hi, Jay, the problem is xapi api need it...\nBecause the whole scenario is in xenapi driver level, so I think it does not conflict original intention design of the design :)","commit_id":"ae7a9f402a53805f8d79cd158b2a429addb646ed"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"50641e4050379bba7b26551a7f192d9409d21967","unresolved":false,"context_lines":[{"line_number":299,"context_line":"            \u0027VGPU_type.get_model_name\u0027,"},{"line_number":300,"context_line":"            type_ref): type_ref"},{"line_number":301,"context_line":"            for type_ref in vgpu_type_refs}"},{"line_number":302,"context_line":"        # Get the type set with types which included both in nove enabled type"},{"line_number":303,"context_line":"        # list and XenServer enabled type list"},{"line_number":304,"context_line":"        available_types \u003d set(CONF.devices.enabled_vgpu_types) \\"},{"line_number":305,"context_line":"            \u0026 set(type_names_in_grp)"}],"source_content_type":"text/x-python","patch_set":33,"id":"bf659307_88dc0a19","line":302,"range":{"start_line":302,"start_character":61,"end_line":302,"end_character":65},"updated":"2018-04-09 19:16:32.000000000","message":"nova.conf","commit_id":"ae7a9f402a53805f8d79cd158b2a429addb646ed"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"0ca4dd06236b4ceb8e5c6eedac6055a9004fc80b","unresolved":false,"context_lines":[{"line_number":299,"context_line":"            \u0027VGPU_type.get_model_name\u0027,"},{"line_number":300,"context_line":"            type_ref): type_ref"},{"line_number":301,"context_line":"            for type_ref in vgpu_type_refs}"},{"line_number":302,"context_line":"        # Get the type set with types which included both in nove enabled type"},{"line_number":303,"context_line":"        # list and XenServer enabled type list"},{"line_number":304,"context_line":"        available_types \u003d set(CONF.devices.enabled_vgpu_types) \\"},{"line_number":305,"context_line":"            \u0026 set(type_names_in_grp)"}],"source_content_type":"text/x-python","patch_set":33,"id":"bf659307_9940d037","line":302,"range":{"start_line":302,"start_character":61,"end_line":302,"end_character":65},"in_reply_to":"bf659307_88dc0a19","updated":"2018-04-10 08:07:21.000000000","message":"will modify it.","commit_id":"ae7a9f402a53805f8d79cd158b2a429addb646ed"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"50641e4050379bba7b26551a7f192d9409d21967","unresolved":false,"context_lines":[{"line_number":306,"context_line":"        if not available_types:"},{"line_number":307,"context_line":"            return None"},{"line_number":308,"context_line":"        # Select the first vgpu type name in sorted set to ensure we will get"},{"line_number":309,"context_line":"        # the same type everytime"},{"line_number":310,"context_line":"        sorted_types \u003d sorted(available_types)"},{"line_number":311,"context_line":"        vgpu_type_name \u003d sorted_types[0]"},{"line_number":312,"context_line":"        vgpu_type_ref \u003d type_names_in_grp[vgpu_type_name]"}],"source_content_type":"text/x-python","patch_set":33,"id":"bf659307_c8d9a222","line":309,"range":{"start_line":309,"start_character":24,"end_line":309,"end_character":33},"updated":"2018-04-09 19:16:32.000000000","message":"every time","commit_id":"ae7a9f402a53805f8d79cd158b2a429addb646ed"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"0ca4dd06236b4ceb8e5c6eedac6055a9004fc80b","unresolved":false,"context_lines":[{"line_number":306,"context_line":"        if not available_types:"},{"line_number":307,"context_line":"            return None"},{"line_number":308,"context_line":"        # Select the first vgpu type name in sorted set to ensure we will get"},{"line_number":309,"context_line":"        # the same type everytime"},{"line_number":310,"context_line":"        sorted_types \u003d sorted(available_types)"},{"line_number":311,"context_line":"        vgpu_type_name \u003d sorted_types[0]"},{"line_number":312,"context_line":"        vgpu_type_ref \u003d type_names_in_grp[vgpu_type_name]"}],"source_content_type":"text/x-python","patch_set":33,"id":"bf659307_f9246cb1","line":309,"range":{"start_line":309,"start_character":24,"end_line":309,"end_character":33},"in_reply_to":"bf659307_c8d9a222","updated":"2018-04-10 08:07:21.000000000","message":"Thanks, will modify it.","commit_id":"ae7a9f402a53805f8d79cd158b2a429addb646ed"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"7e850e9f53e4859eeb26482d09f81505a8a5c4b3","unresolved":false,"context_lines":[{"line_number":307,"context_line":"            return None"},{"line_number":308,"context_line":"        # Select the first vgpu type name in sorted set to ensure we will get"},{"line_number":309,"context_line":"        # the same type everytime"},{"line_number":310,"context_line":"        sorted_types \u003d sorted(available_types)"},{"line_number":311,"context_line":"        vgpu_type_name \u003d sorted_types[0]"},{"line_number":312,"context_line":"        vgpu_type_ref \u003d type_names_in_grp[vgpu_type_name]"},{"line_number":313,"context_line":"        vgpu_type_uuid \u003d self._session.call_xenapi("}],"source_content_type":"text/x-python","patch_set":33,"id":"bf659307_86d5cfe7","line":310,"updated":"2018-04-10 07:04:41.000000000","message":"The existing code may mis-lead you. sorry. But I think your implementation in 31th PS looks better. I can ensure the the first available vGPU type from the configuration item be chosen. Also it can ensure we get the same type every time.","commit_id":"ae7a9f402a53805f8d79cd158b2a429addb646ed"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"0ca4dd06236b4ceb8e5c6eedac6055a9004fc80b","unresolved":false,"context_lines":[{"line_number":307,"context_line":"            return None"},{"line_number":308,"context_line":"        # Select the first vgpu type name in sorted set to ensure we will get"},{"line_number":309,"context_line":"        # the same type everytime"},{"line_number":310,"context_line":"        sorted_types \u003d sorted(available_types)"},{"line_number":311,"context_line":"        vgpu_type_name \u003d sorted_types[0]"},{"line_number":312,"context_line":"        vgpu_type_ref \u003d type_names_in_grp[vgpu_type_name]"},{"line_number":313,"context_line":"        vgpu_type_uuid \u003d self._session.call_xenapi("}],"source_content_type":"text/x-python","patch_set":33,"id":"bf659307_19284084","line":310,"in_reply_to":"bf659307_86d5cfe7","updated":"2018-04-10 08:07:21.000000000","message":"I see. In truth I think using sorted() could avoid some unexpected issues like server return types in different order, which beyond our control.","commit_id":"ae7a9f402a53805f8d79cd158b2a429addb646ed"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"8b3ee06e3102daf368655f6daed861e42137b663","unresolved":false,"context_lines":[{"line_number":254,"context_line":""},{"line_number":255,"context_line":"        NOTE(Jianghuaw): In XenAPI, a GPU group is the minimal unit"},{"line_number":256,"context_line":"        from where to create a vGPU for an instance. So here, we"},{"line_number":257,"context_line":"        report vGPU resources for a particular GPU group. When we use"},{"line_number":258,"context_line":"        nested resource providers to represent the vGPU resources,"},{"line_number":259,"context_line":"        each GPU group will be a child resource provider under the"},{"line_number":260,"context_line":"        compute node."},{"line_number":261,"context_line":""}],"source_content_type":"text/x-python","patch_set":38,"id":"5f7c97a3_392159b1","line":258,"range":{"start_line":257,"start_character":57,"end_line":258,"end_character":65},"updated":"2018-05-10 20:53:34.000000000","message":"This is the case since the prior patch, right?  So this part of the sentence can be removed.","commit_id":"87519a1f3c6ef36b9042b90f8708c8a4eda5eeac"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"1d79f4f70327ffe17d13240bad45efb6ec94632f","unresolved":false,"context_lines":[{"line_number":254,"context_line":""},{"line_number":255,"context_line":"        NOTE(Jianghuaw): In XenAPI, a GPU group is the minimal unit"},{"line_number":256,"context_line":"        from where to create a vGPU for an instance. So here, we"},{"line_number":257,"context_line":"        report vGPU resources for a particular GPU group. When we use"},{"line_number":258,"context_line":"        nested resource providers to represent the vGPU resources,"},{"line_number":259,"context_line":"        each GPU group will be a child resource provider under the"},{"line_number":260,"context_line":"        compute node."},{"line_number":261,"context_line":""}],"source_content_type":"text/x-python","patch_set":38,"id":"5f7c97a3_95c0692c","line":258,"range":{"start_line":257,"start_character":57,"end_line":258,"end_character":65},"in_reply_to":"5f7c97a3_392159b1","updated":"2018-05-11 08:13:59.000000000","message":"Will remove it. thanks","commit_id":"87519a1f3c6ef36b9042b90f8708c8a4eda5eeac"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"8b3ee06e3102daf368655f6daed861e42137b663","unresolved":false,"context_lines":[{"line_number":260,"context_line":"        compute node."},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        The return value is a dict. For example:"},{"line_number":263,"context_line":"        {\u0027uuid\u0027: \u00276444c6ee-3a49-42f5-bebb-606b52175e67\u0027,"},{"line_number":264,"context_line":"         \u0027type_name\u0027: \u0027Intel GVT-g\u0027,"},{"line_number":265,"context_line":"         \u0027max_heads\u0027: 1,"},{"line_number":266,"context_line":"         \u0027total\u0027: 7,"},{"line_number":267,"context_line":"         \u0027remaining\u0027: 7,"},{"line_number":268,"context_line":"         }"},{"line_number":269,"context_line":"        \"\"\""},{"line_number":270,"context_line":"        vgpu_type_info \u003d self._find_gpu_in_group(grp_ref)"},{"line_number":271,"context_line":"        if not vgpu_type_info:"}],"source_content_type":"text/x-python","patch_set":38,"id":"5f7c97a3_9cd17b26","line":268,"range":{"start_line":263,"start_character":8,"end_line":268,"end_character":10},"updated":"2018-05-10 20:53:34.000000000","message":"I question the need for an intermediate dict between vgpu_type_info and the provider tree inventory.  I guess it\u0027s an okay way to isolate this logic, but I wonder if it would be more effective to define this as a class with @property methods for the fields.  In addition to being easier to follow \u0026 use, some of the properties would be lazy-loading, which could save you some processing in cases where you don\u0027t wind up needing all of them.\n\n class GPUGroup(object):\n     def __init__(self, grp_ref):\n         self.info \u003d self._find_gpu_in_group(grp_ref)\n         # Cache values that aren\u0027t directly in self.info\n         self._total \u003d None\n         self._max_heads \u003d None\n         ...\n\n     @property\n     def uuid(self):\n         return self.info[\u0027vgpu_type_uuid\u0027]\n\n     @property\n     def max_heads(self):\n         if self._max_heads is None:\n             self._max_heads \u003d int(self._session.call_xenapi(\n                \u0027VGPU_type.get_max_heads\u0027,\n                vgpu_type_info[\u0027vgpu_type_ref\u0027]))\n         return self._max_heads\n\n     ...","commit_id":"87519a1f3c6ef36b9042b90f8708c8a4eda5eeac"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"864c79b441ada1cde44a3b0992c6721cf6021e1c","unresolved":false,"context_lines":[{"line_number":260,"context_line":"        compute node."},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        The return value is a dict. For example:"},{"line_number":263,"context_line":"        {\u0027uuid\u0027: \u00276444c6ee-3a49-42f5-bebb-606b52175e67\u0027,"},{"line_number":264,"context_line":"         \u0027type_name\u0027: \u0027Intel GVT-g\u0027,"},{"line_number":265,"context_line":"         \u0027max_heads\u0027: 1,"},{"line_number":266,"context_line":"         \u0027total\u0027: 7,"},{"line_number":267,"context_line":"         \u0027remaining\u0027: 7,"},{"line_number":268,"context_line":"         }"},{"line_number":269,"context_line":"        \"\"\""},{"line_number":270,"context_line":"        vgpu_type_info \u003d self._find_gpu_in_group(grp_ref)"},{"line_number":271,"context_line":"        if not vgpu_type_info:"}],"source_content_type":"text/x-python","patch_set":38,"id":"5f7c97a3_959d8e0b","line":268,"range":{"start_line":263,"start_character":8,"end_line":268,"end_character":10},"in_reply_to":"5f7c97a3_9cd17b26","updated":"2018-05-15 07:10:50.000000000","message":"Hi, Eric, most of the vgpu information is got real time. lazy loading or cache looks not suitable.\n_find_gpu_in_group will return vgpu types, and using types to get other information by xapi call. This is a new data structure, simple and clean, so I think it is OK to use it.","commit_id":"87519a1f3c6ef36b9042b90f8708c8a4eda5eeac"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"1d79f4f70327ffe17d13240bad45efb6ec94632f","unresolved":false,"context_lines":[{"line_number":260,"context_line":"        compute node."},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        The return value is a dict. For example:"},{"line_number":263,"context_line":"        {\u0027uuid\u0027: \u00276444c6ee-3a49-42f5-bebb-606b52175e67\u0027,"},{"line_number":264,"context_line":"         \u0027type_name\u0027: \u0027Intel GVT-g\u0027,"},{"line_number":265,"context_line":"         \u0027max_heads\u0027: 1,"},{"line_number":266,"context_line":"         \u0027total\u0027: 7,"},{"line_number":267,"context_line":"         \u0027remaining\u0027: 7,"},{"line_number":268,"context_line":"         }"},{"line_number":269,"context_line":"        \"\"\""},{"line_number":270,"context_line":"        vgpu_type_info \u003d self._find_gpu_in_group(grp_ref)"},{"line_number":271,"context_line":"        if not vgpu_type_info:"}],"source_content_type":"text/x-python","patch_set":38,"id":"5f7c97a3_5532d160","line":268,"range":{"start_line":263,"start_character":8,"end_line":268,"end_character":10},"in_reply_to":"5f7c97a3_9cd17b26","updated":"2018-05-11 08:13:59.000000000","message":"Will check it.","commit_id":"87519a1f3c6ef36b9042b90f8708c8a4eda5eeac"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"8b3ee06e3102daf368655f6daed861e42137b663","unresolved":false,"context_lines":[{"line_number":315,"context_line":"            vgpu_type_ref)"},{"line_number":316,"context_line":"        return dict(vgpu_type_ref\u003dvgpu_type_ref,"},{"line_number":317,"context_line":"                    vgpu_type_uuid\u003dvgpu_type_uuid,"},{"line_number":318,"context_line":"                    vgpu_type_name\u003dvgpu_type_name)"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"    def _get_total_vgpu_in_grp(self, grp_ref, type_ref):"},{"line_number":321,"context_line":"        \"\"\"Get the total capacity of vGPUs in the group.\"\"\""}],"source_content_type":"text/x-python","patch_set":38,"id":"5f7c97a3_dc96133f","line":318,"updated":"2018-05-10 20:53:34.000000000","message":"I can only take it on faith that the rest of this is doing what it\u0027s supposed to.","commit_id":"87519a1f3c6ef36b9042b90f8708c8a4eda5eeac"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"529678cd1a85ab058f440d579a4d60bdd0121fec","unresolved":false,"context_lines":[{"line_number":315,"context_line":"            vgpu_type_ref)"},{"line_number":316,"context_line":"        return dict(vgpu_type_ref\u003dvgpu_type_ref,"},{"line_number":317,"context_line":"                    vgpu_type_uuid\u003dvgpu_type_uuid,"},{"line_number":318,"context_line":"                    vgpu_type_name\u003dvgpu_type_name)"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"    def _get_total_vgpu_in_grp(self, grp_ref, type_ref):"},{"line_number":321,"context_line":"        \"\"\"Get the total capacity of vGPUs in the group.\"\"\""}],"source_content_type":"text/x-python","patch_set":38,"id":"5f7c97a3_4ce9e3b4","line":318,"in_reply_to":"5f7c97a3_75f10d95","updated":"2018-05-11 14:06:15.000000000","message":"No changes necessary.  Again, I was just remarking that I don\u0027t have any knowledge of the xen internals, so I can\u0027t really verify that all of this code is doing what it\u0027s supposed to; I\u0027m just assuming that it does.","commit_id":"87519a1f3c6ef36b9042b90f8708c8a4eda5eeac"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"1d79f4f70327ffe17d13240bad45efb6ec94632f","unresolved":false,"context_lines":[{"line_number":315,"context_line":"            vgpu_type_ref)"},{"line_number":316,"context_line":"        return dict(vgpu_type_ref\u003dvgpu_type_ref,"},{"line_number":317,"context_line":"                    vgpu_type_uuid\u003dvgpu_type_uuid,"},{"line_number":318,"context_line":"                    vgpu_type_name\u003dvgpu_type_name)"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"    def _get_total_vgpu_in_grp(self, grp_ref, type_ref):"},{"line_number":321,"context_line":"        \"\"\"Get the total capacity of vGPUs in the group.\"\"\""}],"source_content_type":"text/x-python","patch_set":38,"id":"5f7c97a3_75f10d95","line":318,"in_reply_to":"5f7c97a3_dc96133f","updated":"2018-05-11 08:13:59.000000000","message":"Any suggestion? It works well on my openstack environment, but just let me know if you want me to add/modify something.","commit_id":"87519a1f3c6ef36b9042b90f8708c8a4eda5eeac"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e425dbe6d7a3f6f6d99b4fa589e3dd1ffcbffdde","unresolved":false,"context_lines":[{"line_number":296,"context_line":"        # type when there are multiple enabled vGPU types."},{"line_number":297,"context_line":"        sorted_types \u003d sorted(enabled_types)"},{"line_number":298,"context_line":"        chosen_type \u003d sorted_types[0]"},{"line_number":299,"context_line":"        if len(sorted_types) \u003e 1:"},{"line_number":300,"context_line":"            LOG.warning(\u0027XenAPI only supports one vGPU type per GPU group,\u0027"},{"line_number":301,"context_line":"                        \u0027 but enabled multiple vGPU types: %(available)s.\u0027"},{"line_number":302,"context_line":"                        \u0027 Choosing the first one: %(chosen)s.\u0027,"},{"line_number":303,"context_line":"                       dict(available\u003dsorted_types,"},{"line_number":304,"context_line":"                            chosen\u003dchosen_type))"},{"line_number":305,"context_line":"        type_ref \u003d type_names_in_grp[chosen_type]"},{"line_number":306,"context_line":"        type_uuid \u003d self._session.call_xenapi(\u0027VGPU_type.get_uuid\u0027, type_ref)"},{"line_number":307,"context_line":"        stat[\u0027uuid\u0027] \u003d type_uuid"}],"source_content_type":"text/x-python","patch_set":50,"id":"3f79a3b5_7bdc7370","side":"PARENT","line":304,"range":{"start_line":299,"start_character":0,"end_line":304,"end_character":48},"updated":"2018-10-02 13:37:27.000000000","message":"You removed this check and warning. Did you mean to remove it?","commit_id":"a55f3b9c2348435879f9e66a3152a10527c89f18"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"da96d87471b0a3032cf194a1e6365a136d8836d6","unresolved":false,"context_lines":[{"line_number":296,"context_line":"        # type when there are multiple enabled vGPU types."},{"line_number":297,"context_line":"        sorted_types \u003d sorted(enabled_types)"},{"line_number":298,"context_line":"        chosen_type \u003d sorted_types[0]"},{"line_number":299,"context_line":"        if len(sorted_types) \u003e 1:"},{"line_number":300,"context_line":"            LOG.warning(\u0027XenAPI only supports one vGPU type per GPU group,\u0027"},{"line_number":301,"context_line":"                        \u0027 but enabled multiple vGPU types: %(available)s.\u0027"},{"line_number":302,"context_line":"                        \u0027 Choosing the first one: %(chosen)s.\u0027,"},{"line_number":303,"context_line":"                       dict(available\u003dsorted_types,"},{"line_number":304,"context_line":"                            chosen\u003dchosen_type))"},{"line_number":305,"context_line":"        type_ref \u003d type_names_in_grp[chosen_type]"},{"line_number":306,"context_line":"        type_uuid \u003d self._session.call_xenapi(\u0027VGPU_type.get_uuid\u0027, type_ref)"},{"line_number":307,"context_line":"        stat[\u0027uuid\u0027] \u003d type_uuid"}],"source_content_type":"text/x-python","patch_set":50,"id":"3f79a3b5_1217d9f0","side":"PARENT","line":304,"range":{"start_line":299,"start_character":0,"end_line":304,"end_character":48},"in_reply_to":"3f79a3b5_7bdc7370","updated":"2018-10-09 06:17:48.000000000","message":"Because multiple type support is delayed, will recover this warning.","commit_id":"a55f3b9c2348435879f9e66a3152a10527c89f18"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e425dbe6d7a3f6f6d99b4fa589e3dd1ffcbffdde","unresolved":false,"context_lines":[{"line_number":250,"context_line":"        return vgpu_stats"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    def _get_vgpu_stats_in_group(self, grp_ref):"},{"line_number":253,"context_line":"        \"\"\"Get stats for the specified vGPU types in a GPU group."},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"        NOTE(Jianghuaw): In XenAPI, a GPU group is the minimal unit"},{"line_number":256,"context_line":"        from where to create a vGPU for an instance. So here, we"}],"source_content_type":"text/x-python","patch_set":50,"id":"3f79a3b5_1b9a1fc4","line":253,"range":{"start_line":253,"start_character":10,"end_line":253,"end_character":65},"updated":"2018-10-02 13:37:27.000000000","message":"no longer accurate (you\u0027re no longer passing the vGPU type)","commit_id":"434e0192f9882fd3735b0f45bee9d42c2159c133"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e425dbe6d7a3f6f6d99b4fa589e3dd1ffcbffdde","unresolved":false,"context_lines":[{"line_number":266,"context_line":"         \u0027remaining\u0027: 7,"},{"line_number":267,"context_line":"         }"},{"line_number":268,"context_line":"        \"\"\""},{"line_number":269,"context_line":"        vgpu_type_info \u003d self._find_gpu_in_group(grp_ref)"},{"line_number":270,"context_line":"        if not vgpu_type_info:"},{"line_number":271,"context_line":"            return None"},{"line_number":272,"context_line":"        stat \u003d {}"}],"source_content_type":"text/x-python","patch_set":50,"id":"3f79a3b5_9b494f33","line":269,"range":{"start_line":269,"start_character":30,"end_line":269,"end_character":48},"updated":"2018-10-02 13:37:27.000000000","message":"this is a poorly-named function because what you the function is doing is not \"finding GPU in group\" but rather \"getting vGPU type information for a GPU group\". Recommend renaming _find_gpu_in_group() to _get_vgpu_type_for_group()","commit_id":"434e0192f9882fd3735b0f45bee9d42c2159c133"}]}
