)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a03b085468e58a7570112da6594c1a953b99a0a3","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2018-04-26 05:38:18 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Validating video ram against the max video ram allowed"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I944d7e9235790cb2a4a21318c029d51012d157b0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9f6a8fd7_2081b0c4","line":8,"updated":"2018-04-26 12:52:41.000000000","message":"This looks like a new extra spec and hence a new feature right? Should probably at least explain this in the commit message and provide a release note, but should probably also ask melwitt if a simple specless blueprint is needed (might not be necessary in this case).","commit_id":"dab61a887fc5ef1b8d3de11129442da6421ec63b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"604c41a97c449900d22ef8f6a42230959857b62b","unresolved":false,"context_lines":[{"line_number":7,"context_line":"vmware:Validation video ram against the max video ram allowed."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Added create of a video card config spec and validation check"},{"line_number":10,"context_line":"if the image meta video ram(\"hw_video_ram\") is bigger than the"},{"line_number":11,"context_line":"maximum allowed \"hw_video:ram_max_mb\" from the flavor."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I944d7e9235790cb2a4a21318c029d51012d157b0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"5f7c97a3_e3f8434a","line":10,"range":{"start_line":10,"start_character":29,"end_line":10,"end_character":41},"updated":"2018-05-08 21:08:26.000000000","message":"I do see this here:\n\nhttps://docs.openstack.org/glance/latest/admin/useful-image-properties.html\n\nAnd it mentions its only used by the libvirt driver.","commit_id":"c0af9e4ee8eb6d9817b75b4c543d634a77ac8602"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"604c41a97c449900d22ef8f6a42230959857b62b","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Added create of a video card config spec and validation check"},{"line_number":10,"context_line":"if the image meta video ram(\"hw_video_ram\") is bigger than the"},{"line_number":11,"context_line":"maximum allowed \"hw_video:ram_max_mb\" from the flavor."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I944d7e9235790cb2a4a21318c029d51012d157b0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"5f7c97a3_43ea5775","line":11,"range":{"start_line":11,"start_character":17,"end_line":11,"end_character":25},"updated":"2018-05-08 21:08:26.000000000","message":"I don\u0027t see this documented for existing flavor extra specs:\n\nhttps://docs.openstack.org/nova/latest/user/flavors.html#extra-specs","commit_id":"c0af9e4ee8eb6d9817b75b4c543d634a77ac8602"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c3e744cca1d7b0a67e9a9795ce593a4cc20989fa","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     mmidolesov \u003cmmidolesov@vmware.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-05-10 11:27:46 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"vmware:Validation video ram against the max video ram allowed."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Added create of a video card config spec and validation check"},{"line_number":10,"context_line":"if the image meta video ram(\"hw_video_ram\") is bigger than the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"5f7c97a3_9e95dd35","line":7,"range":{"start_line":7,"start_character":7,"end_line":7,"end_character":17},"updated":"2018-05-11 18:30:05.000000000","message":"This is emphasizing the wrong part of this change. As noted in the release note, the validation is implied with the new feature support. Just do a title like this:\n\nvmware: add support for the hw_video_ram image property","commit_id":"23f8a97fb7034e0abb41a3e05173c39e1541abaf"}],"doc/source/user/flavors.rst":[{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"43b70b15c03497f4995fbb97787a14bef9db4c03","unresolved":false,"context_lines":[{"line_number":300,"context_line":"  image. Used in conjunction with the ``hw_video_ram`` image property."},{"line_number":301,"context_line":"  ``hw_video_ram`` must be less than or equal to ``hw_video:ram_max_mb``."},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"  This is currently only supported by the libvirt driver."},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"  See https://libvirt.org/formatdomain.html#elementsVideo for more information"},{"line_number":306,"context_line":"  on how this is used to set the ``vram`` attribute with the libvirt driver."}],"source_content_type":"text/x-rst","patch_set":7,"id":"5f7c97a3_5f3d23c2","line":303,"updated":"2018-05-10 10:03:57.000000000","message":"delete this line","commit_id":"290f56b11b20c2d7a07f373d61cf02412b324e91"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3ee99a116e0c81913b88a428ded4cb68ba13fad9","unresolved":false,"context_lines":[{"line_number":300,"context_line":"  image. Used in conjunction with the ``hw_video_ram`` image property."},{"line_number":301,"context_line":"  ``hw_video_ram`` must be less than or equal to ``hw_video:ram_max_mb``."},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"  This is currently supported by the libvirt and the vmware driver."},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"  See https://libvirt.org/formatdomain.html#elementsVideo for more information"},{"line_number":306,"context_line":"  on how this is used to set the ``vram`` attribute with the libvirt driver."}],"source_content_type":"text/x-rst","patch_set":9,"id":"5f7c97a3_deb27549","line":303,"range":{"start_line":303,"start_character":60,"end_line":303,"end_character":66},"updated":"2018-05-11 18:26:05.000000000","message":"drivers","commit_id":"23f8a97fb7034e0abb41a3e05173c39e1541abaf"}],"nova/exception.py":[{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"43b70b15c03497f4995fbb97787a14bef9db4c03","unresolved":false,"context_lines":[{"line_number":1800,"context_line":"                \"than the maximum allowed by flavor %(max_vram)d.\")"},{"line_number":1801,"context_line":""},{"line_number":1802,"context_line":""},{"line_number":1803,"context_line":"class NegativeVRamNotAllowed(NovaException):"},{"line_number":1804,"context_line":"    msg_fmt \u003d _(\"The requested amount of video ram %(req_vram)d is less \""},{"line_number":1805,"context_line":"                \"than zero.\")"},{"line_number":1806,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_ff53cf15","line":1803,"updated":"2018-05-10 10:03:57.000000000","message":"this exception doesn\u0027t seem to be used anymore","commit_id":"290f56b11b20c2d7a07f373d61cf02412b324e91"}],"nova/tests/unit/virt/vmwareapi/test_vmops.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"82a945083fb14ac657df04afb6cd9baea995dbac","unresolved":false,"context_lines":[{"line_number":2063,"context_line":"        self._validate_extra_specs(expected, flavor_extra_specs)"},{"line_number":2064,"context_line":""},{"line_number":2065,"context_line":"    def test_video_ram(self):"},{"line_number":2066,"context_line":"        meta_dict \u003d {\u0027id\u0027: self._image_id, \u0027properties\u0027: {\u0027hw_video_ram\u0027: 120}}"},{"line_number":2067,"context_line":"        self._image_meta \u003d objects.ImageMeta.from_dict(meta_dict)"},{"line_number":2068,"context_line":"        flavor_extra_specs \u003d {\u0027quota:cpu_limit\u0027: 7,"},{"line_number":2069,"context_line":"                              \u0027quota:cpu_reservation\u0027: 6,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_c894b239","line":2066,"range":{"start_line":2066,"start_character":74,"end_line":2066,"end_character":77},"updated":"2018-04-25 15:16:04.000000000","message":"Is this valid?  I would have expected it to be a string.","commit_id":"9759638ae0ac7fed0ab51b25410e57d1cbe49dbf"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"82a945083fb14ac657df04afb6cd9baea995dbac","unresolved":false,"context_lines":[{"line_number":2067,"context_line":"        self._image_meta \u003d objects.ImageMeta.from_dict(meta_dict)"},{"line_number":2068,"context_line":"        flavor_extra_specs \u003d {\u0027quota:cpu_limit\u0027: 7,"},{"line_number":2069,"context_line":"                              \u0027quota:cpu_reservation\u0027: 6,"},{"line_number":2070,"context_line":"                              \u0027hw_video:ram_max_mb\u0027: 100}"},{"line_number":2071,"context_line":"        flavor \u003d objects.Flavor(name\u003d\u0027my-flavor\u0027,"},{"line_number":2072,"context_line":"                                memory_mb\u003d6,"},{"line_number":2073,"context_line":"                                vcpus\u003d28,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_e8aad66e","line":2070,"range":{"start_line":2070,"start_character":53,"end_line":2070,"end_character":56},"updated":"2018-04-25 15:16:04.000000000","message":"ditto","commit_id":"9759638ae0ac7fed0ab51b25410e57d1cbe49dbf"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"aecab05f48f0fce7fa782ad1866dc8bf818f9d30","unresolved":false,"context_lines":[{"line_number":2111,"context_line":""},{"line_number":2112,"context_line":"        extra_specs \u003d self._vmops._get_extra_specs(flavor, self._image_meta)"},{"line_number":2113,"context_line":"        self.assertEqual(self._calculte_expected_fake_video_ram"},{"line_number":2114,"context_line":"                         (expected_video_ram), extra_specs.hw_video_ram)"},{"line_number":2115,"context_line":""},{"line_number":2116,"context_line":"    def test_zero_video_ram(self):"},{"line_number":2117,"context_line":"        meta_dict \u003d {\u0027id\u0027: self._image_id, \u0027properties\u0027: {\u0027hw_video_ram\u0027: 0}}"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_380d6537","line":2114,"range":{"start_line":2114,"start_character":25,"end_line":2114,"end_character":45},"updated":"2018-05-02 22:48:26.000000000","message":"parens unnecessary","commit_id":"c0af9e4ee8eb6d9817b75b4c543d634a77ac8602"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"06b142bd94a5e348ce9bd7cc61ebe8c780f24504","unresolved":false,"context_lines":[{"line_number":2103,"context_line":"        flavor \u003d self._get_fake_flavor_for_test_video(meta_dict)"},{"line_number":2104,"context_line":""},{"line_number":2105,"context_line":"        extra_specs \u003d self._vmops._get_extra_specs(flavor, self._image_meta)"},{"line_number":2106,"context_line":"        self.assertEqual(self._calculte_expected_fake_video_ram"},{"line_number":2107,"context_line":"                         (expected_video_ram), extra_specs.hw_video_ram)"},{"line_number":2108,"context_line":""},{"line_number":2109,"context_line":"    def test_zero_video_ram(self):"},{"line_number":2110,"context_line":"        meta_dict \u003d {\u0027id\u0027: self._image_id, \u0027properties\u0027: {\u0027hw_video_ram\u0027: 0}}"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_f361c3aa","line":2107,"range":{"start_line":2106,"start_character":60,"end_line":2107,"end_character":45},"updated":"2018-05-10 17:16:24.000000000","message":"This is a weird line break.  Leave the opening paren with the method name.  (Me, I would probably newline after assertEqual( and put the method call all on the next line with a single indent.)","commit_id":"44cba362801562f4e1438b603a753e01eb8aa693"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"06b142bd94a5e348ce9bd7cc61ebe8c780f24504","unresolved":false,"context_lines":[{"line_number":2113,"context_line":"        extra_specs \u003d self._vmops._get_extra_specs(flavor, self._image_meta)"},{"line_number":2114,"context_line":"        self.assertIsNone(extra_specs.hw_video_ram)"},{"line_number":2115,"context_line":""},{"line_number":2116,"context_line":"    def _calculte_expected_fake_video_ram(self, amount):"},{"line_number":2117,"context_line":"        return amount * units.Mi / units.Ki"},{"line_number":2118,"context_line":""},{"line_number":2119,"context_line":"    def _get_fake_flavor_for_test_video(self, meta_dict):"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_b33eeb88","line":2116,"range":{"start_line":2116,"start_character":9,"end_line":2116,"end_character":18},"updated":"2018-05-10 17:16:24.000000000","message":"calculate","commit_id":"44cba362801562f4e1438b603a753e01eb8aa693"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3ee99a116e0c81913b88a428ded4cb68ba13fad9","unresolved":false,"context_lines":[{"line_number":2062,"context_line":"        flavor_extra_specs \u003d self._vmops._get_extra_specs(flavor, None)"},{"line_number":2063,"context_line":"        self._validate_extra_specs(expected, flavor_extra_specs)"},{"line_number":2064,"context_line":""},{"line_number":2065,"context_line":"    def test_video_ram(self):"},{"line_number":2066,"context_line":"        meta_dict \u003d {\u0027id\u0027: self._image_id, \u0027properties\u0027: {\u0027hw_video_ram\u0027: 120}}"},{"line_number":2067,"context_line":"        flavor \u003d self._get_fake_flavor_for_test_video(meta_dict)"},{"line_number":2068,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_de1595e6","line":2065,"range":{"start_line":2065,"start_character":8,"end_line":2065,"end_character":22},"updated":"2018-05-11 18:26:05.000000000","message":"Here and below, comments / docstrings with the tests to say what they do would be nice. For example, this test case name doesn\u0027t mention at all that it\u0027s testing a negative failure scenario where the image video ram is greater than the flavor max.","commit_id":"23f8a97fb7034e0abb41a3e05173c39e1541abaf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3ee99a116e0c81913b88a428ded4cb68ba13fad9","unresolved":false,"context_lines":[{"line_number":2091,"context_line":"                                swap\u003d33550336,"},{"line_number":2092,"context_line":"                                extra_specs\u003dflavor_extra_specs)"},{"line_number":2093,"context_line":""},{"line_number":2094,"context_line":"        self.assertRaises(exception.RequestedVRamTooHigh,"},{"line_number":2095,"context_line":"                          self._vmops._get_extra_specs,"},{"line_number":2096,"context_line":"                          flavor,"},{"line_number":2097,"context_line":"                          self._image_meta)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_3eda894a","line":2094,"updated":"2018-05-11 18:26:05.000000000","message":"Why would this fail? If the flavor extra specs don\u0027t have the max value, we\u0027re supposed to ignore the image property.","commit_id":"23f8a97fb7034e0abb41a3e05173c39e1541abaf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2db651a30ca964484e671171838e5ceef301b63a","unresolved":false,"context_lines":[{"line_number":2091,"context_line":"                                swap\u003d33550336,"},{"line_number":2092,"context_line":"                                extra_specs\u003dflavor_extra_specs)"},{"line_number":2093,"context_line":""},{"line_number":2094,"context_line":"        self.assertRaises(exception.RequestedVRamTooHigh,"},{"line_number":2095,"context_line":"                          self._vmops._get_extra_specs,"},{"line_number":2096,"context_line":"                          flavor,"},{"line_number":2097,"context_line":"                          self._image_meta)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_b958d287","line":2094,"in_reply_to":"5f7c97a3_05616305","updated":"2018-05-14 18:05:55.000000000","message":"\u003e or simply skip the set of this property and continue with the building of the machine?\n\nThat. That is what the libvirt driver does today and that is what the documentation on the hw_video_ram and flavor extra spec says - that if the max ram isn\u0027t set in the flavor, the image property is ignored.\n\nhttps://docs.openstack.org/glance/latest/admin/useful-image-properties.html\n\n\"Maximum RAM for the video image. Used only if a hw_video:ram_max_mb value has been set in the flavor’s extra_specs and that value is higher than the value set in hw_video_ram.\"","commit_id":"23f8a97fb7034e0abb41a3e05173c39e1541abaf"},{"author":{"_account_id":28100,"name":"Martin Midolesov","email":"mmidolesov@vmware.com","username":"martinmidolesov"},"change_message_id":"4a5a21bc14b384c0a9e1a98d13e4a0a5d92f3967","unresolved":false,"context_lines":[{"line_number":2091,"context_line":"                                swap\u003d33550336,"},{"line_number":2092,"context_line":"                                extra_specs\u003dflavor_extra_specs)"},{"line_number":2093,"context_line":""},{"line_number":2094,"context_line":"        self.assertRaises(exception.RequestedVRamTooHigh,"},{"line_number":2095,"context_line":"                          self._vmops._get_extra_specs,"},{"line_number":2096,"context_line":"                          flavor,"},{"line_number":2097,"context_line":"                          self._image_meta)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_6a026471","line":2094,"in_reply_to":"5f7c97a3_3eda894a","updated":"2018-05-14 10:37:39.000000000","message":"Because the way the code is written in libvirt - the first check is if hw_video_ram is bigger than the max one and then the check for is max ram and hw ram not None - which is not correct because if the hw_video_ram has  a value of 100 and the max ram is None(not specified) then it would get a default value of 0 and would result in a RequestVRamTooHigh. What I can do now is to change the check and if the max ram is not specified the hw_video_ram property will simply not be set, I\u0027ll change the unit test logic also.","commit_id":"23f8a97fb7034e0abb41a3e05173c39e1541abaf"},{"author":{"_account_id":28100,"name":"Martin Midolesov","email":"mmidolesov@vmware.com","username":"martinmidolesov"},"change_message_id":"1a64cd00e0f0708ecab4d20cb5ce1eec06dad586","unresolved":false,"context_lines":[{"line_number":2091,"context_line":"                                swap\u003d33550336,"},{"line_number":2092,"context_line":"                                extra_specs\u003dflavor_extra_specs)"},{"line_number":2093,"context_line":""},{"line_number":2094,"context_line":"        self.assertRaises(exception.RequestedVRamTooHigh,"},{"line_number":2095,"context_line":"                          self._vmops._get_extra_specs,"},{"line_number":2096,"context_line":"                          flavor,"},{"line_number":2097,"context_line":"                          self._image_meta)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_05616305","line":2094,"in_reply_to":"5f7c97a3_3eda894a","updated":"2018-05-14 11:39:10.000000000","message":"Your idea is that if max ram is not set to ignore it and set hw_video_ram in the extra_spec or simply skip the set of this property and continue with the building of the machine?","commit_id":"23f8a97fb7034e0abb41a3e05173c39e1541abaf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3ee99a116e0c81913b88a428ded4cb68ba13fad9","unresolved":false,"context_lines":[{"line_number":2117,"context_line":"        return amount * units.Mi / units.Ki"},{"line_number":2118,"context_line":""},{"line_number":2119,"context_line":"    def _get_fake_flavor_for_test_video(self, meta_dict):"},{"line_number":2120,"context_line":"        self._image_meta \u003d objects.ImageMeta.from_dict(meta_dict)"},{"line_number":2121,"context_line":"        flavor_extra_specs \u003d {\u0027quota:cpu_limit\u0027: 7,"},{"line_number":2122,"context_line":"                              \u0027quota:cpu_reservation\u0027: 6,"},{"line_number":2123,"context_line":"                              \u0027hw_video:ram_max_mb\u0027: 100}"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_fe22d151","line":2120,"range":{"start_line":2120,"start_character":8,"end_line":2120,"end_character":24},"updated":"2018-05-11 18:26:05.000000000","message":"Setting class variables in a helper function like this is confusing, I\u0027d just return the image and flavor and rename the method to something like, \"_get_flavor_and_image_for_test_video\" and return the image_meta,flavor tuple.","commit_id":"23f8a97fb7034e0abb41a3e05173c39e1541abaf"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"4f1337e0af1fd24eba0edfb88c6481a8b53132a3","unresolved":false,"context_lines":[{"line_number":2238,"context_line":"                                swap\u003d33550336,"},{"line_number":2239,"context_line":"                                extra_specs\u003dflavor_extra_specs)"},{"line_number":2240,"context_line":""},{"line_number":2241,"context_line":"        extra_specs \u003d self._vmops._get_extra_specs(flavor, self._image_meta)"},{"line_number":2242,"context_line":"        self.assertRaises(exception.RequestedVRamTooHigh,"},{"line_number":2243,"context_line":"                          self._vmops._get_extra_specs,"},{"line_number":2244,"context_line":"                          flavor,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_512dfaf8","line":2241,"updated":"2018-12-19 18:31:11.000000000","message":"need to remove this line for passing pep8 check.","commit_id":"51983f9d84dff69135f1b51787455067512e884d"},{"author":{"_account_id":28100,"name":"Martin Midolesov","email":"mmidolesov@vmware.com","username":"martinmidolesov"},"change_message_id":"510d900aa4ce98e9b4bdd087e9b3cf372af941ed","unresolved":false,"context_lines":[{"line_number":2238,"context_line":"                                swap\u003d33550336,"},{"line_number":2239,"context_line":"                                extra_specs\u003dflavor_extra_specs)"},{"line_number":2240,"context_line":""},{"line_number":2241,"context_line":"        extra_specs \u003d self._vmops._get_extra_specs(flavor, self._image_meta)"},{"line_number":2242,"context_line":"        self.assertRaises(exception.RequestedVRamTooHigh,"},{"line_number":2243,"context_line":"                          self._vmops._get_extra_specs,"},{"line_number":2244,"context_line":"                          flavor,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_7927b41e","line":2241,"in_reply_to":"3f79a3b5_512dfaf8","updated":"2018-12-20 07:40:51.000000000","message":"Yeah I saw it thanks. It\u0027s fixed and reposted.","commit_id":"51983f9d84dff69135f1b51787455067512e884d"}],"nova/virt/vmwareapi/vm_util.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"82a945083fb14ac657df04afb6cd9baea995dbac","unresolved":false,"context_lines":[{"line_number":258,"context_line":"    if serial_port_spec:"},{"line_number":259,"context_line":"        devices.append(serial_port_spec)"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"    virtual_device_config_spec \u003d create_video_card_spec(client_factory, extra_specs)"},{"line_number":262,"context_line":"    if virtual_device_config_spec:"},{"line_number":263,"context_line":"        devices.append(virtual_device_config_spec)"},{"line_number":264,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_0815cae4","line":261,"range":{"start_line":261,"start_character":72,"end_line":261,"end_character":84},"updated":"2018-04-25 15:16:04.000000000","message":"pep","commit_id":"9759638ae0ac7fed0ab51b25410e57d1cbe49dbf"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"82a945083fb14ac657df04afb6cd9baea995dbac","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        video_card \u003d client_factory.create(\u0027ns0:VirtualMachineVideoCard\u0027)"},{"line_number":308,"context_line":"        video_card.videoRamSizeInKB \u003d extra_specs.hw_video_ram"},{"line_number":309,"context_line":"        video_card.key \u003d -1"},{"line_number":310,"context_line":"        virtual_device_config_spec \u003d client_factory.create(\u0027ns0:VirtualDeviceConfigSpec\u0027)"},{"line_number":311,"context_line":"        virtual_device_config_spec.operation \u003d \"add\""},{"line_number":312,"context_line":"        virtual_device_config_spec.device \u003d video_card"},{"line_number":313,"context_line":"        return virtual_device_config_spec"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_88deba3b","line":310,"range":{"start_line":310,"start_character":79,"end_line":310,"end_character":89},"updated":"2018-04-25 15:16:04.000000000","message":"pep","commit_id":"9759638ae0ac7fed0ab51b25410e57d1cbe49dbf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0f89e7b7d58a35dbbaa518f30259f3416e1a765a","unresolved":false,"context_lines":[{"line_number":307,"context_line":"def create_video_card_spec(client_factory, extra_specs):"},{"line_number":308,"context_line":"    if extra_specs.hw_video_ram:"},{"line_number":309,"context_line":"        video_card \u003d client_factory.create(\u0027ns0:VirtualMachineVideoCard\u0027)"},{"line_number":310,"context_line":"        video_card.videoRamSizeInKB \u003d extra_specs.hw_video_ram"},{"line_number":311,"context_line":"        video_card.key \u003d -1"},{"line_number":312,"context_line":"        virtual_device_config_spec \u003d client_factory.create("},{"line_number":313,"context_line":"            \u0027ns0:VirtualDeviceConfigSpec\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_d95e5811","line":310,"range":{"start_line":310,"start_character":8,"end_line":310,"end_character":62},"updated":"2018-05-08 22:19:10.000000000","message":"According to the docs, hw_video_ram is in MB:\n\nhttps://docs.openstack.org/glance/latest/admin/useful-image-properties.html\n\nBut you\u0027re assigning it to something in KB. So you\u0027ll need to do some unit conversion here.","commit_id":"7fb191ad3e7b819f840622efe9148d9a535b9767"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3ee99a116e0c81913b88a428ded4cb68ba13fad9","unresolved":false,"context_lines":[{"line_number":307,"context_line":"def create_video_card_spec(client_factory, extra_specs):"},{"line_number":308,"context_line":"    if extra_specs.hw_video_ram:"},{"line_number":309,"context_line":"        video_card \u003d client_factory.create(\u0027ns0:VirtualMachineVideoCard\u0027)"},{"line_number":310,"context_line":"        video_card.videoRamSizeInKB \u003d extra_specs.hw_video_ram * units.Ki"},{"line_number":311,"context_line":"        video_card.key \u003d -1"},{"line_number":312,"context_line":"        virtual_device_config_spec \u003d client_factory.create("},{"line_number":313,"context_line":"            \u0027ns0:VirtualDeviceConfigSpec\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_fed09121","line":310,"range":{"start_line":310,"start_character":63,"end_line":310,"end_character":73},"updated":"2018-05-11 18:26:05.000000000","message":"Is this still needed since you did:\n\nextra_specs.hw_video_ram \u003d video_ram * units.Mi / units.Ki","commit_id":"23f8a97fb7034e0abb41a3e05173c39e1541abaf"}],"nova/virt/vmwareapi/vmops.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"82a945083fb14ac657df04afb6cd9baea995dbac","unresolved":false,"context_lines":[{"line_number":326,"context_line":"            extra_specs.firmware \u003d \u0027bios\u0027"},{"line_number":327,"context_line":"        hw_version \u003d flavor.extra_specs.get(\u0027vmware:hw_version\u0027)"},{"line_number":328,"context_line":"        extra_specs.hw_version \u003d hw_version"},{"line_number":329,"context_line":"        video_ram \u003d image_meta.properties.get(\u0027hw_video_ram\u0027, 0)"},{"line_number":330,"context_line":"        max_vram \u003d int(flavor.extra_specs.get(\u0027hw_video:ram_max_mb\u0027, 0))"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        if video_ram and video_ram:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_e8c3b636","line":329,"range":{"start_line":329,"start_character":20,"end_line":329,"end_character":64},"updated":"2018-04-25 15:16:04.000000000","message":"Why don\u0027t you have to int() this?","commit_id":"9759638ae0ac7fed0ab51b25410e57d1cbe49dbf"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"82a945083fb14ac657df04afb6cd9baea995dbac","unresolved":false,"context_lines":[{"line_number":329,"context_line":"        video_ram \u003d image_meta.properties.get(\u0027hw_video_ram\u0027, 0)"},{"line_number":330,"context_line":"        max_vram \u003d int(flavor.extra_specs.get(\u0027hw_video:ram_max_mb\u0027, 0))"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        if video_ram and video_ram:"},{"line_number":333,"context_line":"            if video_ram \u003e max_vram:"},{"line_number":334,"context_line":"                raise exception.RequestedVRamTooHigh(req_vram\u003dvideo_ram,"},{"line_number":335,"context_line":"                                                     max_vram\u003dmax_vram)"},{"line_number":336,"context_line":"            extra_specs.hw_video_ram \u003d video_ram * units.Mi / units.Ki"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_483c222e","line":333,"range":{"start_line":332,"start_character":0,"end_line":333,"end_character":36},"updated":"2018-04-25 15:16:04.000000000","message":"You could `and` these","commit_id":"9759638ae0ac7fed0ab51b25410e57d1cbe49dbf"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"82a945083fb14ac657df04afb6cd9baea995dbac","unresolved":false,"context_lines":[{"line_number":333,"context_line":"            if video_ram \u003e max_vram:"},{"line_number":334,"context_line":"                raise exception.RequestedVRamTooHigh(req_vram\u003dvideo_ram,"},{"line_number":335,"context_line":"                                                     max_vram\u003dmax_vram)"},{"line_number":336,"context_line":"            extra_specs.hw_video_ram \u003d video_ram * units.Mi / units.Ki"},{"line_number":337,"context_line":"        if CONF.vmware.pbm_enabled:"},{"line_number":338,"context_line":"            storage_policy \u003d flavor.extra_specs.get(\u0027vmware:storage_policy\u0027,"},{"line_number":339,"context_line":"                    CONF.vmware.pbm_default_policy)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_680c8693","line":336,"range":{"start_line":336,"start_character":49,"end_line":336,"end_character":70},"updated":"2018-04-25 15:16:04.000000000","message":"This is the same as\n\n * units.Ki\n\nIs there a logical/readability reason you\u0027re two-stepping it?","commit_id":"9759638ae0ac7fed0ab51b25410e57d1cbe49dbf"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"88357961870e86506bea6e003c67028e7b425d52","unresolved":false,"context_lines":[{"line_number":327,"context_line":"        hw_version \u003d flavor.extra_specs.get(\u0027vmware:hw_version\u0027)"},{"line_number":328,"context_line":"        extra_specs.hw_version \u003d hw_version"},{"line_number":329,"context_line":"        video_ram \u003d image_meta.properties.get(\u0027hw_video_ram\u0027, 0)"},{"line_number":330,"context_line":"        max_vram \u003d int(flavor.extra_specs.get(\u0027hw_video:ram_max_mb\u0027, 0))"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        if video_ram \u003e max_vram:"},{"line_number":333,"context_line":"            raise exception.RequestedVRamTooHigh(req_vram\u003dvideo_ram,"},{"line_number":334,"context_line":"                                                 max_vram\u003dmax_vram)"},{"line_number":335,"context_line":"        extra_specs.hw_video_ram \u003d video_ram * units.Mi / units.Ki"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_46eabcac","line":332,"range":{"start_line":330,"start_character":0,"end_line":332,"end_character":32},"updated":"2018-04-26 13:59:20.000000000","message":"Now if max is unspecified, it\u0027s treated as zero, which means any nonzero ram amount will fail.  To me, not specifying a max means \"there is no max\", or \"unlimited\".","commit_id":"dab61a887fc5ef1b8d3de11129442da6421ec63b"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"01ef980f9e223ef0e60b8276403d1f542ecc9bf7","unresolved":false,"context_lines":[{"line_number":327,"context_line":"        hw_version \u003d flavor.extra_specs.get(\u0027vmware:hw_version\u0027)"},{"line_number":328,"context_line":"        extra_specs.hw_version \u003d hw_version"},{"line_number":329,"context_line":"        video_ram \u003d image_meta.properties.get(\u0027hw_video_ram\u0027, 0)"},{"line_number":330,"context_line":"        max_vram \u003d int(flavor.extra_specs.get(\u0027hw_video:ram_max_mb\u0027, 0))"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        if video_ram \u003e max_vram:"},{"line_number":333,"context_line":"            raise exception.RequestedVRamTooHigh(req_vram\u003dvideo_ram,"},{"line_number":334,"context_line":"                                                 max_vram\u003dmax_vram)"},{"line_number":335,"context_line":"        extra_specs.hw_video_ram \u003d video_ram * units.Mi / units.Ki"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_a3d05855","line":332,"range":{"start_line":330,"start_character":0,"end_line":332,"end_character":32},"in_reply_to":"9f6a8fd7_46eabcac","updated":"2018-04-27 06:45:37.000000000","message":"mostly we use -1 as unlimited\nso maybe set to -1 if not specified and bypass check will be ok?","commit_id":"dab61a887fc5ef1b8d3de11129442da6421ec63b"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"abb013761d2f8be4253eccbf08003a80072fabad","unresolved":false,"context_lines":[{"line_number":326,"context_line":"            extra_specs.firmware \u003d \u0027bios\u0027"},{"line_number":327,"context_line":"        hw_version \u003d flavor.extra_specs.get(\u0027vmware:hw_version\u0027)"},{"line_number":328,"context_line":"        extra_specs.hw_version \u003d hw_version"},{"line_number":329,"context_line":"        video_ram \u003d image_meta.properties.get(\u0027hw_video_ram\u0027, -1)"},{"line_number":330,"context_line":"        max_vram \u003d int(flavor.extra_specs.get(\u0027hw_video:ram_max_mb\u0027, 0))"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        if video_ram \u003e max_vram:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_3c11be54","line":329,"updated":"2018-04-27 13:38:23.000000000","message":"Sorry, I still don\u0027t think this is right.  Some additional test cases would be helpful to demonstrate the behavior.  Not having background/precedent in this area, my expectation would be the following:\n\n hw_video_ram | hw_video:ram_max_mb | result\n -------------+---------------------+-----------------------\n unspecified  | *                   | success\n \u003c0           | *                   | error\n 0            | *                   | ? (is it valid to request 0 video ram?)\n \u003e0           | unspecified         | success (\"no max\")\n \u003e0           | \u003e\u003dhw_video_ram      | success\n \u003e0           | \u003chw_video_ram       | error","commit_id":"bd24da31db6dcceba8bda6f40aecfa7835ae078e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"aecab05f48f0fce7fa782ad1866dc8bf818f9d30","unresolved":false,"context_lines":[{"line_number":327,"context_line":"        hw_version \u003d flavor.extra_specs.get(\u0027vmware:hw_version\u0027)"},{"line_number":328,"context_line":"        extra_specs.hw_version \u003d hw_version"},{"line_number":329,"context_line":"        video_ram \u003d image_meta.properties.get(\u0027hw_video_ram\u0027)"},{"line_number":330,"context_line":"        max_vram \u003d int(flavor.extra_specs.get(\u0027hw_video:ram_max_mb\u0027, -1))"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        if video_ram is not None:"},{"line_number":333,"context_line":"            if max_vram \u003e\u003d 0 and video_ram \u003e max_vram:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_582701b8","line":330,"range":{"start_line":330,"start_character":67,"end_line":330,"end_character":71},"updated":"2018-05-02 22:48:26.000000000","message":"You could have left this off...","commit_id":"c0af9e4ee8eb6d9817b75b4c543d634a77ac8602"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"705042257334176598f6fdb098e4b8f59758ee2d","unresolved":false,"context_lines":[{"line_number":327,"context_line":"        hw_version \u003d flavor.extra_specs.get(\u0027vmware:hw_version\u0027)"},{"line_number":328,"context_line":"        extra_specs.hw_version \u003d hw_version"},{"line_number":329,"context_line":"        video_ram \u003d image_meta.properties.get(\u0027hw_video_ram\u0027)"},{"line_number":330,"context_line":"        max_vram \u003d int(flavor.extra_specs.get(\u0027hw_video:ram_max_mb\u0027, -1))"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        if video_ram is not None:"},{"line_number":333,"context_line":"            if max_vram \u003e\u003d 0 and video_ram \u003e max_vram:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_592568aa","line":330,"range":{"start_line":330,"start_character":67,"end_line":330,"end_character":71},"in_reply_to":"5f7c97a3_582701b8","updated":"2018-05-08 22:16:42.000000000","message":"Just copy the exact same logic from the libvirt driver:\n\nhttps://github.com/openstack/nova/blob/81c23c047e8e0fc03b54164921f49fdb4103202c/nova/virt/libvirt/driver.py#L4608","commit_id":"c0af9e4ee8eb6d9817b75b4c543d634a77ac8602"},{"author":{"_account_id":28100,"name":"Martin Midolesov","email":"mmidolesov@vmware.com","username":"martinmidolesov"},"change_message_id":"de18f40955d6d17508b420b851dfcd236fc5c0dd","unresolved":false,"context_lines":[{"line_number":327,"context_line":"        hw_version \u003d flavor.extra_specs.get(\u0027vmware:hw_version\u0027)"},{"line_number":328,"context_line":"        extra_specs.hw_version \u003d hw_version"},{"line_number":329,"context_line":"        video_ram \u003d image_meta.properties.get(\u0027hw_video_ram\u0027)"},{"line_number":330,"context_line":"        max_vram \u003d int(flavor.extra_specs.get(\u0027hw_video:ram_max_mb\u0027, -1))"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        if video_ram is not None:"},{"line_number":333,"context_line":"            if max_vram \u003e\u003d 0 and video_ram \u003e max_vram:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_8003770f","line":330,"range":{"start_line":330,"start_character":67,"end_line":330,"end_character":71},"in_reply_to":"5f7c97a3_592568aa","updated":"2018-05-09 11:33:24.000000000","message":"I did exactly that in patch set 1, but than we started discussion with Eric Fried on some changes that need to be adjusted. So your suggest is setting default values to 0 and reuse the whole validation logic from the libvirt driver?","commit_id":"c0af9e4ee8eb6d9817b75b4c543d634a77ac8602"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ad9efcdfba8399beeb7b7aa20d378ae0de2e8b74","unresolved":false,"context_lines":[{"line_number":327,"context_line":"        hw_version \u003d flavor.extra_specs.get(\u0027vmware:hw_version\u0027)"},{"line_number":328,"context_line":"        extra_specs.hw_version \u003d hw_version"},{"line_number":329,"context_line":"        video_ram \u003d image_meta.properties.get(\u0027hw_video_ram\u0027)"},{"line_number":330,"context_line":"        max_vram \u003d int(flavor.extra_specs.get(\u0027hw_video:ram_max_mb\u0027, -1))"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        if video_ram is not None:"},{"line_number":333,"context_line":"            if max_vram \u003e\u003d 0 and video_ram \u003e max_vram:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_0300c800","line":330,"range":{"start_line":330,"start_character":67,"end_line":330,"end_character":71},"in_reply_to":"5f7c97a3_74fe1d38","updated":"2018-05-09 16:53:25.000000000","message":"Yes we should match the libvirt driver validation logic which is also reflected in the docs for the image property and extra specs, which is that the image property is ignored if the flavor extra spec isn\u0027t specified and the image property value must be \u003c\u003d the flavor extra spec value (if specified).","commit_id":"c0af9e4ee8eb6d9817b75b4c543d634a77ac8602"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"998d66813e313f66de59abd0e210d9df49e11137","unresolved":false,"context_lines":[{"line_number":327,"context_line":"        hw_version \u003d flavor.extra_specs.get(\u0027vmware:hw_version\u0027)"},{"line_number":328,"context_line":"        extra_specs.hw_version \u003d hw_version"},{"line_number":329,"context_line":"        video_ram \u003d image_meta.properties.get(\u0027hw_video_ram\u0027)"},{"line_number":330,"context_line":"        max_vram \u003d int(flavor.extra_specs.get(\u0027hw_video:ram_max_mb\u0027, -1))"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        if video_ram is not None:"},{"line_number":333,"context_line":"            if max_vram \u003e\u003d 0 and video_ram \u003e max_vram:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_74fe1d38","line":330,"range":{"start_line":330,"start_character":67,"end_line":330,"end_character":71},"in_reply_to":"5f7c97a3_8003770f","updated":"2018-05-09 14:03:18.000000000","message":"For my part, I wasn\u0027t using the context of the libvirt driver at all (didn\u0027t know about it), was just looking at this in isolation.","commit_id":"c0af9e4ee8eb6d9817b75b4c543d634a77ac8602"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"aecab05f48f0fce7fa782ad1866dc8bf818f9d30","unresolved":false,"context_lines":[{"line_number":330,"context_line":"        max_vram \u003d int(flavor.extra_specs.get(\u0027hw_video:ram_max_mb\u0027, -1))"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        if video_ram is not None:"},{"line_number":333,"context_line":"            if max_vram \u003e\u003d 0 and video_ram \u003e max_vram:"},{"line_number":334,"context_line":"                raise exception.RequestedVRamTooHigh(req_vram\u003dvideo_ram,"},{"line_number":335,"context_line":"                                                     max_vram\u003dmax_vram)"},{"line_number":336,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_182189a0","line":333,"range":{"start_line":333,"start_character":15,"end_line":333,"end_character":28},"updated":"2018-05-02 22:48:26.000000000","message":"...and said\n\n max_vram is not None\n\nhere","commit_id":"c0af9e4ee8eb6d9817b75b4c543d634a77ac8602"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"705042257334176598f6fdb098e4b8f59758ee2d","unresolved":false,"context_lines":[{"line_number":334,"context_line":"                raise exception.RequestedVRamTooHigh(req_vram\u003dvideo_ram,"},{"line_number":335,"context_line":"                                                     max_vram\u003dmax_vram)"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"            if video_ram \u003c 0:"},{"line_number":338,"context_line":"                raise exception.NegativeVRamNotAllowed(req_vram\u003dvideo_ram)"},{"line_number":339,"context_line":"            else:"},{"line_number":340,"context_line":"                extra_specs.hw_video_ram \u003d video_ram * units.Mi / units.Ki"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_3922eca5","line":337,"updated":"2018-05-08 22:16:42.000000000","message":"According to the docs, we don\u0027t care about hw_video_ram if hw_video:ram_max_mb is not set. So again, just copy the libvirt driver validation logic.","commit_id":"c0af9e4ee8eb6d9817b75b4c543d634a77ac8602"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"aecab05f48f0fce7fa782ad1866dc8bf818f9d30","unresolved":false,"context_lines":[{"line_number":336,"context_line":""},{"line_number":337,"context_line":"            if video_ram \u003c 0:"},{"line_number":338,"context_line":"                raise exception.NegativeVRamNotAllowed(req_vram\u003dvideo_ram)"},{"line_number":339,"context_line":"            else:"},{"line_number":340,"context_line":"                extra_specs.hw_video_ram \u003d video_ram * units.Mi / units.Ki"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"        if CONF.vmware.pbm_enabled:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_981b5972","line":339,"range":{"start_line":339,"start_character":12,"end_line":339,"end_character":16},"updated":"2018-05-02 22:48:26.000000000","message":"unnecessary.","commit_id":"c0af9e4ee8eb6d9817b75b4c543d634a77ac8602"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"06b142bd94a5e348ce9bd7cc61ebe8c780f24504","unresolved":false,"context_lines":[{"line_number":335,"context_line":"                                                 max_vram\u003dmax_vram)"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"        if video_ram and max_vram:"},{"line_number":338,"context_line":"            extra_specs.hw_video_ram \u003d video_ram * units.Mi / units.Ki"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        if CONF.vmware.pbm_enabled:"},{"line_number":341,"context_line":"            storage_policy \u003d flavor.extra_specs.get(\u0027vmware:storage_policy\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_b30cabec","line":338,"range":{"start_line":338,"start_character":49,"end_line":338,"end_character":70},"updated":"2018-05-10 17:16:24.000000000","message":"I (now) know this is just copied from the libvirt code, but I\u0027m (still) wondering why it\u0027s not just \n\n * units.Ki","commit_id":"44cba362801562f4e1438b603a753e01eb8aa693"},{"author":{"_account_id":28100,"name":"Martin Midolesov","email":"mmidolesov@vmware.com","username":"martinmidolesov"},"change_message_id":"cc847aa3e22601b7202d07a94e07044ece41c8fa","unresolved":false,"context_lines":[{"line_number":335,"context_line":"                                                 max_vram\u003dmax_vram)"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"        if video_ram and max_vram:"},{"line_number":338,"context_line":"            extra_specs.hw_video_ram \u003d video_ram * units.Mi / units.Ki"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        if CONF.vmware.pbm_enabled:"},{"line_number":341,"context_line":"            storage_policy \u003d flavor.extra_specs.get(\u0027vmware:storage_policy\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_d26b571b","line":338,"range":{"start_line":338,"start_character":49,"end_line":338,"end_character":70},"in_reply_to":"5f7c97a3_b30cabec","updated":"2018-05-11 07:26:33.000000000","message":"https://review.openstack.org/#/c/131869/\nIn the comments you can check why they did it that way.","commit_id":"44cba362801562f4e1438b603a753e01eb8aa693"},{"author":{"_account_id":28100,"name":"Martin Midolesov","email":"mmidolesov@vmware.com","username":"martinmidolesov"},"change_message_id":"88a663a27db47c4a812047c84d886e326d7db2a3","unresolved":false,"context_lines":[{"line_number":335,"context_line":"                                                 max_vram\u003dmax_vram)"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"        if video_ram and max_vram:"},{"line_number":338,"context_line":"            extra_specs.hw_video_ram \u003d video_ram * units.Mi / units.Ki"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        if CONF.vmware.pbm_enabled:"},{"line_number":341,"context_line":"            storage_policy \u003d flavor.extra_specs.get(\u0027vmware:storage_policy\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_e92541c3","line":338,"range":{"start_line":338,"start_character":49,"end_line":338,"end_character":70},"in_reply_to":"5f7c97a3_c9f72559","updated":"2018-05-11 13:47:56.000000000","message":"I agree with you - I just send it to you, so to see the origin of this and why was done this way.","commit_id":"44cba362801562f4e1438b603a753e01eb8aa693"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d6782ef7fdb7967e74cbea0f650cdada3ba340dd","unresolved":false,"context_lines":[{"line_number":335,"context_line":"                                                 max_vram\u003dmax_vram)"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"        if video_ram and max_vram:"},{"line_number":338,"context_line":"            extra_specs.hw_video_ram \u003d video_ram * units.Mi / units.Ki"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        if CONF.vmware.pbm_enabled:"},{"line_number":341,"context_line":"            storage_policy \u003d flavor.extra_specs.get(\u0027vmware:storage_policy\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_c9f72559","line":338,"range":{"start_line":338,"start_character":49,"end_line":338,"end_character":70},"in_reply_to":"5f7c97a3_d26b571b","updated":"2018-05-11 13:42:53.000000000","message":"You mean this?\n\n \u003e The usual way to scale would be\n \u003e \n \u003e video_ram * units.Mi / units.Ki\n \u003e \n \u003e Multiplying by units.Ki only works by luck because  units.Mi /\n \u003e units.Ki happens to equal units.Ki.\n\nSorry, but that\u0027s not luck; it\u0027s math.\n\nAnyway, I\u0027m not hung up on it.  Just seems like an unnecessary operation.","commit_id":"44cba362801562f4e1438b603a753e01eb8aa693"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"d8e00620d4c45ea23330db1adaed1be37f1d8447","unresolved":false,"context_lines":[{"line_number":330,"context_line":"        video_ram \u003d image_meta.properties.get(\u0027hw_video_ram\u0027, 0)"},{"line_number":331,"context_line":"        max_vram \u003d int(flavor.extra_specs.get(\u0027hw_video:ram_max_mb\u0027, 0))"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"        if video_ram and max_vram:"},{"line_number":334,"context_line":"            if video_ram \u003e max_vram:"},{"line_number":335,"context_line":"                raise exception.RequestedVRamTooHigh(req_vram\u003dvideo_ram,"},{"line_number":336,"context_line":"                                                     max_vram\u003dmax_vram)"},{"line_number":337,"context_line":"            extra_specs.hw_video_ram \u003d video_ram * units.Mi / units.Ki"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        if CONF.vmware.pbm_enabled:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_6e6e3000","line":336,"range":{"start_line":333,"start_character":0,"end_line":336,"end_character":71},"updated":"2018-12-18 19:22:49.000000000","message":"libvirt driver raises the exception if hw_video_ram is set but the flavor\u0027s one is not set like:\n\n 4667         # Set video memory, only if the flavor\u0027s limit is set\n 4668         video_ram \u003d image_meta.properties.get(\u0027hw_video_ram\u0027, 0)\n 4669         max_vram \u003d int(flavor.extra_specs.get(\u0027hw_video:ram_max_mb\u0027, 0))\n 4670         if video_ram \u003e max_vram:\n 4671             raise exception.RequestedVRamTooHigh(req_vram\u003dvideo_ram,\n 4672                                                  max_vram\u003dmax_vram)\n\nBut this driver just ignores hw_video_ram.\nIt is better to make the behavior consistent between drivers.","commit_id":"ffa642c6c3bc0f727baeb264f39d616952a43b9e"},{"author":{"_account_id":28100,"name":"Martin Midolesov","email":"mmidolesov@vmware.com","username":"martinmidolesov"},"change_message_id":"61091a2fa1e234997fcc90b2f4ad1d1de853382f","unresolved":false,"context_lines":[{"line_number":330,"context_line":"        video_ram \u003d image_meta.properties.get(\u0027hw_video_ram\u0027, 0)"},{"line_number":331,"context_line":"        max_vram \u003d int(flavor.extra_specs.get(\u0027hw_video:ram_max_mb\u0027, 0))"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"        if video_ram and max_vram:"},{"line_number":334,"context_line":"            if video_ram \u003e max_vram:"},{"line_number":335,"context_line":"                raise exception.RequestedVRamTooHigh(req_vram\u003dvideo_ram,"},{"line_number":336,"context_line":"                                                     max_vram\u003dmax_vram)"},{"line_number":337,"context_line":"            extra_specs.hw_video_ram \u003d video_ram * units.Mi / units.Ki"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        if CONF.vmware.pbm_enabled:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_07342bf8","line":336,"range":{"start_line":333,"start_character":0,"end_line":336,"end_character":71},"in_reply_to":"3f79a3b5_6e6e3000","updated":"2018-12-19 15:49:54.000000000","message":"Change is applied in patch 12.","commit_id":"ffa642c6c3bc0f727baeb264f39d616952a43b9e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0af594854329f9b2eaca136692c9445c262c00f1","unresolved":false,"context_lines":[{"line_number":329,"context_line":"        extra_specs.hw_version \u003d hw_version"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"        video_ram \u003d image_meta.properties.get(\u0027hw_video_ram\u0027, 0)"},{"line_number":332,"context_line":"        max_vram \u003d int(flavor.extra_specs.get(\u0027hw_video:ram_max_mb\u0027, 0))"},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"        if video_ram \u003e max_vram:"},{"line_number":335,"context_line":"            raise exception.RequestedVRamTooHigh(req_vram\u003dvideo_ram,"}],"source_content_type":"text/x-python","patch_set":13,"id":"dfd5e7cf_46af3094","line":332,"updated":"2019-01-06 10:58:40.000000000","message":"what if the flavor does not have this value? why not set the default as video_ram?","commit_id":"38aa83b7fc53b76f7cef92573da235838629b499"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8cc3f8a6c0dad07eb16c0620e9ff49f3e3627443","unresolved":false,"context_lines":[{"line_number":333,"context_line":""},{"line_number":334,"context_line":"        if video_ram \u003e max_vram:"},{"line_number":335,"context_line":"            raise exception.RequestedVRamTooHigh(req_vram\u003dvideo_ram,"},{"line_number":336,"context_line":"                                                 max_vram\u003dmax_vram)"},{"line_number":337,"context_line":"        if video_ram and max_vram:"},{"line_number":338,"context_line":"            extra_specs.hw_video_ram \u003d video_ram * units.Mi / units.Ki"},{"line_number":339,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"dfd5e7cf_c293024f","line":336,"updated":"2019-01-07 11:16:36.000000000","message":"if you repsin then please add the comment:\n# Set video memory, only if the flavor\u0027s limit is set","commit_id":"38aa83b7fc53b76f7cef92573da235838629b499"}],"releasenotes/notes/vmware-add-max-ram-validation-f27f94d4a04aef3a.yaml":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"06b142bd94a5e348ce9bd7cc61ebe8c780f24504","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Added validation for the selected video ram \u0027hw_video_ram\u0027 from the image,"},{"line_number":5,"context_line":"    which will be checked against the maximum allowed video ram \u0027hw_video:ram_max_mb\u0027"},{"line_number":6,"context_line":"    from the flavor."},{"line_number":7,"context_line":"    If the selected video ram from the image is less than or equal to the maximum allowed ram,"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"5f7c97a3_93208f4a","line":4,"range":{"start_line":4,"start_character":48,"end_line":4,"end_character":62},"updated":"2018-05-10 17:16:24.000000000","message":"Use double backticks for these throughout.","commit_id":"44cba362801562f4e1438b603a753e01eb8aa693"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"06b142bd94a5e348ce9bd7cc61ebe8c780f24504","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    which will be checked against the maximum allowed video ram \u0027hw_video:ram_max_mb\u0027"},{"line_number":6,"context_line":"    from the flavor."},{"line_number":7,"context_line":"    If the selected video ram from the image is less than or equal to the maximum allowed ram,"},{"line_number":8,"context_line":"    the \u0027hw_video_ram\u0027 will be set."},{"line_number":9,"context_line":"    if the selected ram is more than the maximum allowed one then \u0027RequestedVRamTooHigh\u0027"},{"line_number":10,"context_line":"    exception is thrown."},{"line_number":11,"context_line":"    If the maximum allowed video ram is not set we do not set \u0027hw_video_ram\u0027."}],"source_content_type":"text/x-yaml","patch_set":8,"id":"5f7c97a3_b3b34b0a","line":8,"range":{"start_line":8,"start_character":9,"end_line":8,"end_character":21},"updated":"2018-05-10 17:16:24.000000000","message":"should this (and the one on L11) refer to videoRamSizeInKB instead?","commit_id":"44cba362801562f4e1438b603a753e01eb8aa693"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"06b142bd94a5e348ce9bd7cc61ebe8c780f24504","unresolved":false,"context_lines":[{"line_number":6,"context_line":"    from the flavor."},{"line_number":7,"context_line":"    If the selected video ram from the image is less than or equal to the maximum allowed ram,"},{"line_number":8,"context_line":"    the \u0027hw_video_ram\u0027 will be set."},{"line_number":9,"context_line":"    if the selected ram is more than the maximum allowed one then \u0027RequestedVRamTooHigh\u0027"},{"line_number":10,"context_line":"    exception is thrown."},{"line_number":11,"context_line":"    If the maximum allowed video ram is not set we do not set \u0027hw_video_ram\u0027."}],"source_content_type":"text/x-yaml","patch_set":8,"id":"5f7c97a3_f3d46322","line":9,"range":{"start_line":9,"start_character":4,"end_line":9,"end_character":5},"updated":"2018-05-10 17:16:24.000000000","message":"I","commit_id":"44cba362801562f4e1438b603a753e01eb8aa693"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"354fc861c533659dd3fbd28cf9c055749c02ef94","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Added validation for the selected video ram ``hw_video_ram`` from the image,"},{"line_number":5,"context_line":"    which will be checked against the maximum allowed video ram ``hw_video:ram_max_mb``"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"5f7c97a3_3e6da9cb","line":2,"updated":"2018-05-11 18:08:25.000000000","message":"This doesn\u0027t mention anything about this being new for the vmware driver, which is confusing. Release notes are read in batch, e.g.:\n\nhttps://docs.openstack.org/releasenotes/nova/unreleased.html\n\nSo the person reading this will need context on what was added.\n\nYou could simply preface this with, \"For the VMware vCenter driver, added...\".","commit_id":"23f8a97fb7034e0abb41a3e05173c39e1541abaf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"354fc861c533659dd3fbd28cf9c055749c02ef94","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Added validation for the selected video ram ``hw_video_ram`` from the image,"},{"line_number":5,"context_line":"    which will be checked against the maximum allowed video ram ``hw_video:ram_max_mb``"},{"line_number":6,"context_line":"    from the flavor."},{"line_number":7,"context_line":"    If the selected video ram from the image is less than or equal to the maximum allowed ram,"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"5f7c97a3_1e68edb6","line":4,"range":{"start_line":4,"start_character":10,"end_line":4,"end_character":37},"updated":"2018-05-11 18:08:25.000000000","message":"The validation is implied when you add new support for something, so just say, \"Added support for the configured video ram ``hw_video_ram`` from the image..\"","commit_id":"23f8a97fb7034e0abb41a3e05173c39e1541abaf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"354fc861c533659dd3fbd28cf9c055749c02ef94","unresolved":false,"context_lines":[{"line_number":6,"context_line":"    from the flavor."},{"line_number":7,"context_line":"    If the selected video ram from the image is less than or equal to the maximum allowed ram,"},{"line_number":8,"context_line":"    the ``videoRamSizeInKB`` will be set."},{"line_number":9,"context_line":"    If the selected ram is more than the maximum allowed one then \u0027RequestedVRamTooHigh\u0027"},{"line_number":10,"context_line":"    exception is thrown."},{"line_number":11,"context_line":"    If the maximum allowed video ram is not set we do not set ``videoRamSizeInKB``."}],"source_content_type":"text/x-yaml","patch_set":9,"id":"5f7c97a3_9ea15dfb","line":10,"range":{"start_line":9,"start_character":61,"end_line":10,"end_character":24},"updated":"2018-05-11 18:08:25.000000000","message":"This doesn\u0027t really mean anything to an operator/user, it\u0027s code-speak. What does this mean to a user? Server creation will fail for the given image and flavor? If so, just say that.","commit_id":"23f8a97fb7034e0abb41a3e05173c39e1541abaf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"354fc861c533659dd3fbd28cf9c055749c02ef94","unresolved":false,"context_lines":[{"line_number":8,"context_line":"    the ``videoRamSizeInKB`` will be set."},{"line_number":9,"context_line":"    If the selected ram is more than the maximum allowed one then \u0027RequestedVRamTooHigh\u0027"},{"line_number":10,"context_line":"    exception is thrown."},{"line_number":11,"context_line":"    If the maximum allowed video ram is not set we do not set ``videoRamSizeInKB``."}],"source_content_type":"text/x-yaml","patch_set":9,"id":"5f7c97a3_1ead4de8","line":11,"range":{"start_line":11,"start_character":82,"end_line":11,"end_character":83},"updated":"2018-05-11 18:08:25.000000000","message":"in the VM.","commit_id":"23f8a97fb7034e0abb41a3e05173c39e1541abaf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"354fc861c533659dd3fbd28cf9c055749c02ef94","unresolved":false,"context_lines":[{"line_number":8,"context_line":"    the ``videoRamSizeInKB`` will be set."},{"line_number":9,"context_line":"    If the selected ram is more than the maximum allowed one then \u0027RequestedVRamTooHigh\u0027"},{"line_number":10,"context_line":"    exception is thrown."},{"line_number":11,"context_line":"    If the maximum allowed video ram is not set we do not set ``videoRamSizeInKB``."}],"source_content_type":"text/x-yaml","patch_set":9,"id":"5f7c97a3_5ea7450c","line":11,"range":{"start_line":11,"start_character":44,"end_line":11,"end_character":47},"updated":"2018-05-11 18:08:25.000000000","message":"set in the flavor","commit_id":"23f8a97fb7034e0abb41a3e05173c39e1541abaf"}]}
