)]}'
{"nova/tests/virt/vmwareapi/test_vmwareapi.py":[{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"6d92861c8ffe5c89376b1317e9508b009461a76b","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        self.assertEquals(info[\"mem\"], mem_kib)"},{"line_number":209,"context_line":"        self.assertEquals(info[\"num_cpu\"], self.type_data[\u0027vcpus\u0027])"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def test_host_state(self):"},{"line_number":212,"context_line":"        stats \u003d self.conn.get_host_stats()"},{"line_number":213,"context_line":"        self.assertEquals(stats[\u0027vcpus\u0027], 16)"},{"line_number":214,"context_line":"        self.assertEquals(stats[\u0027disk_total\u0027], 1024)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPn%2F%2Fqcs%3D","line":211,"updated":"2013-06-25 18:18:12.000000000","message":"I assume these are correct values, but I have no way of knowing without going on an expedition through the code.","commit_id":"0dbe9b4e1786b37b6306976adb0ac1ef3789dcdb"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"cf558f43538f74e4e38133f637f85ae8734a9955","unresolved":false,"context_lines":[{"line_number":921,"context_line":"        self.assertEquals(stats[\u0027cpu_info\u0027], jsonutils.dumps(cpu_info))"},{"line_number":922,"context_line":"        self.assertEquals(stats[\u0027supported_instances\u0027],"},{"line_number":923,"context_line":"                \u0027[[\"i686\", \"vmware\", \"hvm\"], [\"x86_64\", \"vmware\", \"hvm\"]]\u0027)"},{"line_number":924,"context_line":""},{"line_number":925,"context_line":"    def test_invalid_datastore_regex(self):"},{"line_number":926,"context_line":"        # Tests if we raise an exception for Invalid Regular Expression in"},{"line_number":927,"context_line":"        # vmware_datastore_regex"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAS3%2F%2Ftr4%3D","line":924,"updated":"2013-09-20 17:58:51.000000000","message":"What is actually testing that the states are an aggregate of the stats from multiple nodes?","commit_id":"3e34b5cfa48af657e8e06662506c69e674fe966c"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"bba39b06e522ec091dffec28680cbbd912470e1f","unresolved":false,"context_lines":[{"line_number":921,"context_line":"        self.assertEquals(stats[\u0027cpu_info\u0027], jsonutils.dumps(cpu_info))"},{"line_number":922,"context_line":"        self.assertEquals(stats[\u0027supported_instances\u0027],"},{"line_number":923,"context_line":"                \u0027[[\"i686\", \"vmware\", \"hvm\"], [\"x86_64\", \"vmware\", \"hvm\"]]\u0027)"},{"line_number":924,"context_line":""},{"line_number":925,"context_line":"    def test_invalid_datastore_regex(self):"},{"line_number":926,"context_line":"        # Tests if we raise an exception for Invalid Regular Expression in"},{"line_number":927,"context_line":"        # vmware_datastore_regex"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAS3%2F%2Ftlw%3D","line":924,"in_reply_to":"AAAAS3%2F%2Ftr4%3D","updated":"2013-09-20 18:29:58.000000000","message":"Hi Russell,\n\nI have added an additional host to the fake setup. This should aggregate the cpu related stats in the test.\n\nFor memory related stats, we just retrieve the information from a Resource Pool object. Resource Pool is an object within the cluster containing the hosts. It has a property that has the rollup of the cluster\u0027s memory related stats. The same is mocked with the fake Resource Pool object. \n\nKindly take a look the new revision.\n\nThanks","commit_id":"3e34b5cfa48af657e8e06662506c69e674fe966c"}],"nova/virt/vmwareapi/driver.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5416b82594020dd9d07e8f4bd0fb4b9706c5087c","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        :returns: dictionary describing resources"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"        \"\"\""},{"line_number":280,"context_line":"        host_stats \u003d self.get_host_stats(refresh\u003dTrue)"},{"line_number":281,"context_line":"        # Updating host information"},{"line_number":282,"context_line":"        dic \u003d {\u0027vcpus\u0027: host_stats[\"vcpus\"],"},{"line_number":283,"context_line":"               \u0027memory_mb\u0027: host_stats[\u0027host_memory_total\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAP3%2F%2F6yw%3D","line":280,"updated":"2013-07-09 07:50:32.000000000","message":"why the whitespace change?","commit_id":"7cbbd9657408ae90907a21df7abc04e3c89b31a8"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"bfe1e0afe56ffbb591a68b5fdbe4c59fb7f2d371","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        super(VMwareVCDriver, self).__init__(virtapi)"},{"line_number":341,"context_line":"        self._cluster_name \u003d CONF.vmwareapi_cluster_name"},{"line_number":342,"context_line":"        if not self._cluster_name:"},{"line_number":343,"context_line":"            raise exception.NotFound(_(\"VMware Cluster not defined\"))"},{"line_number":344,"context_line":"        else:"},{"line_number":345,"context_line":"            self._cluster \u003d vm_util.get_cluster_ref_from_name("},{"line_number":346,"context_line":"                            self._session, self._cluster_name)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAP3%2F%2F4l4%3D","line":343,"updated":"2013-07-09 20:08:17.000000000","message":"I think I would like to see a special class here named VMwareClusterNotFound and then have it include the name of the cluster that was not found (as garyk suggests). This introduces a new exception, but it will make testing and diagnostics in the field much easier.","commit_id":"7cbbd9657408ae90907a21df7abc04e3c89b31a8"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5416b82594020dd9d07e8f4bd0fb4b9706c5087c","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        super(VMwareVCDriver, self).__init__(virtapi)"},{"line_number":341,"context_line":"        self._cluster_name \u003d CONF.vmwareapi_cluster_name"},{"line_number":342,"context_line":"        if not self._cluster_name:"},{"line_number":343,"context_line":"            raise exception.NotFound(_(\"VMware Cluster not defined\"))"},{"line_number":344,"context_line":"        else:"},{"line_number":345,"context_line":"            self._cluster \u003d vm_util.get_cluster_ref_from_name("},{"line_number":346,"context_line":"                            self._session, self._cluster_name)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAP3%2F%2F6yY%3D","line":343,"updated":"2013-07-09 07:50:32.000000000","message":"It may be useful to have the self._cluster_name as part of the message. This would help with debugging","commit_id":"7cbbd9657408ae90907a21df7abc04e3c89b31a8"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"48130e336b204540ab97f075446736361ffaab45","unresolved":false,"context_lines":[{"line_number":385,"context_line":"            if self._cluster is None:"},{"line_number":386,"context_line":"                raise exception.NotFound(_(\"VMware Cluster %s is not found\")"},{"line_number":387,"context_line":"                                           % self._cluster_name)"},{"line_number":388,"context_line":"        self._volumeops \u003d volumeops.VMwareVolumeOps(self._session,"},{"line_number":389,"context_line":"                                                    self._cluster)"},{"line_number":390,"context_line":"        self._vmops \u003d vmops.VMwareVMOps(self._session, self.virtapi,"},{"line_number":391,"context_line":"                                        self._volumeops, self._cluster)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAQn%2F%2Fl04%3D","side":"PARENT","line":388,"updated":"2013-07-27 00:14:00.000000000","message":"\"is not found\" --- should it be \"was not found\"?","commit_id":"b14f9cd142a34ee3ed29d03c2e2c32dc8099a06e"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"185759e06cb7d5826f2465dcae8113348cae6ba0","unresolved":false,"context_lines":[{"line_number":385,"context_line":"            if self._cluster is None:"},{"line_number":386,"context_line":"                raise exception.NotFound(_(\"VMware Cluster %s is not found\")"},{"line_number":387,"context_line":"                                           % self._cluster_name)"},{"line_number":388,"context_line":"        self._volumeops \u003d volumeops.VMwareVolumeOps(self._session,"},{"line_number":389,"context_line":"                                                    self._cluster)"},{"line_number":390,"context_line":"        self._vmops \u003d vmops.VMwareVMOps(self._session, self.virtapi,"},{"line_number":391,"context_line":"                                        self._volumeops, self._cluster)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAQn%2F%2FkZ4%3D","side":"PARENT","line":388,"in_reply_to":"AAAAQn%2F%2FkrM%3D","updated":"2013-07-28 18:59:22.000000000","message":"I agree with sabari.  It is very hard to get Nova core cycles, and this patch has been in review for a month and updating this line that is unrelated to the goal of the change would void all of the +1 and +2 reviews on the patch.  \n\ndims, please consider removing your -1 as it causes other core reviewers to ignore this patch as they assume something is wrong with the change itself.","commit_id":"b14f9cd142a34ee3ed29d03c2e2c32dc8099a06e"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"2c2a377b78a59ca91222a32a38dab777566128ba","unresolved":false,"context_lines":[{"line_number":385,"context_line":"            if self._cluster is None:"},{"line_number":386,"context_line":"                raise exception.NotFound(_(\"VMware Cluster %s is not found\")"},{"line_number":387,"context_line":"                                           % self._cluster_name)"},{"line_number":388,"context_line":"        self._volumeops \u003d volumeops.VMwareVolumeOps(self._session,"},{"line_number":389,"context_line":"                                                    self._cluster)"},{"line_number":390,"context_line":"        self._vmops \u003d vmops.VMwareVMOps(self._session, self.virtapi,"},{"line_number":391,"context_line":"                                        self._volumeops, self._cluster)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAQn%2F%2FkrM%3D","side":"PARENT","line":388,"in_reply_to":"AAAAQn%2F%2Fl04%3D","updated":"2013-07-28 08:10:12.000000000","message":"Hi,\nI am not introducing/modifying that error message. I see that as something that\u0027s outside the scope of this patch.","commit_id":"b14f9cd142a34ee3ed29d03c2e2c32dc8099a06e"},{"author":{"_account_id":7400,"name":"Tracy Jones","email":"tjones@vmware.com","username":"tracyajones"},"change_message_id":"b2a8802d82b46fe96c10ffd635d33514dc3a3d40","unresolved":false,"context_lines":[{"line_number":378,"context_line":"        super(VMwareVCDriver, self).__init__(virtapi)"},{"line_number":379,"context_line":"        self._cluster_name \u003d CONF.vmwareapi_cluster_name"},{"line_number":380,"context_line":"        if not self._cluster_name:"},{"line_number":381,"context_line":"            raise Exception(_(\"Must specify vmware_cluster_name when \""},{"line_number":382,"context_line":"                              \"compute_driver is vmwareapi.VMwareVCDriver\"))"},{"line_number":383,"context_line":"        self._cluster \u003d vm_util.get_cluster_ref_from_name(self._session,"},{"line_number":384,"context_line":"                                                          self._cluster_name)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAP3%2F%2FjIw%3D","line":381,"updated":"2013-07-16 18:04:46.000000000","message":"just curious why you didn\u0027t say if self._cluster_name is None: here for consistency?","commit_id":"3b59668263318f40e2e4cf020b603ce4b5ad4c27"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"6334944232ee97903cfe8139df60fcc858ae6416","unresolved":false,"context_lines":[{"line_number":399,"context_line":"        super(VMwareVCDriver, self).__init__(virtapi)"},{"line_number":400,"context_line":"        self._cluster_name \u003d CONF.vmware.cluster_name"},{"line_number":401,"context_line":"        if not self._cluster_name:"},{"line_number":402,"context_line":"            raise Exception(_(\"Must specify vmware_cluster_name when \""},{"line_number":403,"context_line":"                              \"compute_driver is vmwareapi.VMwareVCDriver\"))"},{"line_number":404,"context_line":"        self._cluster \u003d vm_util.get_cluster_ref_from_name(self._session,"},{"line_number":405,"context_line":"                                                          self._cluster_name)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAQn%2F%2FbpI%3D","line":402,"updated":"2013-07-31 09:51:02.000000000","message":"Minor nit - vmware_cluster_name \u003d\u003e cluster_name","commit_id":"cb2de59e460f98814143566f77cba926ad9056e3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"a9fcb6ceaa529d0860e1563a52bd61a384317f11","unresolved":false,"context_lines":[{"line_number":399,"context_line":"        super(VMwareVCDriver, self).__init__(virtapi)"},{"line_number":400,"context_line":"        self._cluster_name \u003d CONF.vmware.cluster_name"},{"line_number":401,"context_line":"        if not self._cluster_name:"},{"line_number":402,"context_line":"            raise Exception(_(\"Must specify cluster_name when compute_driver \""},{"line_number":403,"context_line":"                              \"is vmwareapi.VMwareVCDriver\"))"},{"line_number":404,"context_line":"        self._cluster \u003d vm_util.get_cluster_ref_from_name(self._session,"},{"line_number":405,"context_line":"                                                          self._cluster_name)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAQn%2F%2FGWU%3D","line":402,"updated":"2013-08-07 07:59:48.000000000","message":"Consider using  exception.NotFound here.","commit_id":"a901d564141a5553b98d544b01a1ed3947f6a36f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"35586883569735acbda589517ff8b72e82ca995a","unresolved":false,"context_lines":[{"line_number":399,"context_line":"        super(VMwareVCDriver, self).__init__(virtapi)"},{"line_number":400,"context_line":"        self._cluster_name \u003d CONF.vmware.cluster_name"},{"line_number":401,"context_line":"        if not self._cluster_name:"},{"line_number":402,"context_line":"            raise Exception(_(\"Must specify cluster_name when compute_driver \""},{"line_number":403,"context_line":"                              \"is vmwareapi.VMwareVCDriver\"))"},{"line_number":404,"context_line":"        self._cluster \u003d vm_util.get_cluster_ref_from_name(self._session,"},{"line_number":405,"context_line":"                                                          self._cluster_name)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAQn%2F%2B5uo%3D","line":402,"in_reply_to":"AAAAQn%2F%2B6S0%3D","updated":"2013-08-10 16:57:53.000000000","message":"I think that you can use exception.Invalid.","commit_id":"a901d564141a5553b98d544b01a1ed3947f6a36f"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"b4cd0f1655e47f45f06a7b630de0b79c320639a8","unresolved":false,"context_lines":[{"line_number":399,"context_line":"        super(VMwareVCDriver, self).__init__(virtapi)"},{"line_number":400,"context_line":"        self._cluster_name \u003d CONF.vmware.cluster_name"},{"line_number":401,"context_line":"        if not self._cluster_name:"},{"line_number":402,"context_line":"            raise Exception(_(\"Must specify cluster_name when compute_driver \""},{"line_number":403,"context_line":"                              \"is vmwareapi.VMwareVCDriver\"))"},{"line_number":404,"context_line":"        self._cluster \u003d vm_util.get_cluster_ref_from_name(self._session,"},{"line_number":405,"context_line":"                                                          self._cluster_name)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAQn%2F%2B6S0%3D","line":402,"in_reply_to":"AAAAQn%2F%2B75U%3D","updated":"2013-08-10 01:51:06.000000000","message":"This feels like we need to introduce a VMwareDriverConfiguration exception. We will use this in other cases in the future.","commit_id":"a901d564141a5553b98d544b01a1ed3947f6a36f"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"6b320addce8694c855ba4a25b91a531778833068","unresolved":false,"context_lines":[{"line_number":399,"context_line":"        super(VMwareVCDriver, self).__init__(virtapi)"},{"line_number":400,"context_line":"        self._cluster_name \u003d CONF.vmware.cluster_name"},{"line_number":401,"context_line":"        if not self._cluster_name:"},{"line_number":402,"context_line":"            raise Exception(_(\"Must specify cluster_name when compute_driver \""},{"line_number":403,"context_line":"                              \"is vmwareapi.VMwareVCDriver\"))"},{"line_number":404,"context_line":"        self._cluster \u003d vm_util.get_cluster_ref_from_name(self._session,"},{"line_number":405,"context_line":"                                                          self._cluster_name)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAQn%2F%2B75U%3D","line":402,"in_reply_to":"AAAAQn%2F%2FGWU%3D","updated":"2013-08-09 17:54:19.000000000","message":"The exception is because the user failed to provide a cluster_name property while using VCDriver. Would it be still valid to throw a NotFound exception ? Because the other NotFound (Line 407) is thrown when the user does provide the cluster_name but the object is not found with vCenter.","commit_id":"a901d564141a5553b98d544b01a1ed3947f6a36f"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"e211a894849b33c17c1864e41e784c060a09ae01","unresolved":false,"context_lines":[{"line_number":399,"context_line":"        super(VMwareVCDriver, self).__init__(virtapi)"},{"line_number":400,"context_line":"        self._cluster_name \u003d CONF.vmware.cluster_name"},{"line_number":401,"context_line":"        if not self._cluster_name:"},{"line_number":402,"context_line":"            raise exception.Invalid(_(\"Must specify cluster_name when \""},{"line_number":403,"context_line":"                \"compute_driver is vmwareapi.VMwareVCDriver\"))"},{"line_number":404,"context_line":"        self._cluster \u003d vm_util.get_cluster_ref_from_name(self._session,"},{"line_number":405,"context_line":"                                                          self._cluster_name)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAQ3%2F%2F4PE%3D","line":402,"updated":"2013-08-13 15:57:44.000000000","message":"I\u0027ve thought hard about this. I think it is better to accept this patch now completely disabling \"host inventory\" support. Then we\u0027ll need to add in some code in Icehouse to do non-cluster based inventory. We can then deprecate this line here and substitute in something that \"plugs in\" another object so that we change operating modes.","commit_id":"fddcde6a063d59596f687f0651af94f498f7d9b7"}],"nova/virt/vmwareapi/fake.py":[{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"6d92861c8ffe5c89376b1317e9508b009461a76b","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    _db_content[table][table_obj.obj] \u003d table_obj"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"def disconnect_cluster():"},{"line_number":92,"context_line":"    \"\"\"Simulate a cluster with disconnected hosts.\"\"\""},{"line_number":93,"context_line":"    lst_objs \u003d _get_objects(\"ClusterComputeResource\")"},{"line_number":94,"context_line":"    cluster \u003d lst_objs[0]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPn%2F%2FqcY%3D","line":91,"updated":"2013-06-25 18:18:12.000000000","message":"nice idea","commit_id":"0dbe9b4e1786b37b6306976adb0ac1ef3789dcdb"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"6d92861c8ffe5c89376b1317e9508b009461a76b","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        \"\"\"Sets the obj property which acts as a reference to the object.\"\"\""},{"line_number":112,"context_line":"        super(ManagedObject, self).__setattr__(\u0027objName\u0027, name)"},{"line_number":113,"context_line":"        if obj_ref is None:"},{"line_number":114,"context_line":"            obj_ref \u003d ManagedObjectReference(uuid.uuid4(), name)"},{"line_number":115,"context_line":"        object.__setattr__(self, \u0027obj\u0027, obj_ref)"},{"line_number":116,"context_line":"        object.__setattr__(self, \u0027propSet\u0027, [])"},{"line_number":117,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPn%2F%2FqcI%3D","line":114,"updated":"2013-06-25 18:18:12.000000000","message":"I have a patch doing this. This is still *wrong* since moref ID are not OpenStack constructs. The ManagedObjectReference has a \"value\" that is actually the object short-name + id counter. So obj-123 is a good default here. But, what if you want to write a test that performs calculations on the moref id? Your test would fail with this default.","commit_id":"0dbe9b4e1786b37b6306976adb0ac1ef3789dcdb"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"6d92861c8ffe5c89376b1317e9508b009461a76b","unresolved":false,"context_lines":[{"line_number":267,"context_line":"    \"\"\"Datastore class.\"\"\""},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    def __init__(self, obj_ref\u003dNone):"},{"line_number":270,"context_line":"        super(Datastore, self).__init__(\"Datastore\", obj_ref)"},{"line_number":271,"context_line":"        self.set(\"summary.type\", \"VMFS\")"},{"line_number":272,"context_line":"        self.set(\"summary.name\", \"fake-ds\")"},{"line_number":273,"context_line":"        self.set(\"summary.capacity\", 1024 * 1024 * 1024)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPn%2F%2FqcE%3D","line":270,"updated":"2013-06-25 18:18:12.000000000","message":"good.","commit_id":"0dbe9b4e1786b37b6306976adb0ac1ef3789dcdb"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"6d92861c8ffe5c89376b1317e9508b009461a76b","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        summary.numEffectiveHosts \u003d 1 if connected else 0"},{"line_number":315,"context_line":"        summary.totalMemory \u003d 1024 * 1024 * 1024"},{"line_number":316,"context_line":"        summary.effectiveMemory \u003d 1024 - 600 if connected else 0"},{"line_number":317,"context_line":"        self.set(\"summary\", summary)"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"        array_of_managed_object_reference \u003d DataObject()"},{"line_number":320,"context_line":"        array_of_managed_object_reference.ManagedObjectReference \u003d ["}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPn%2F%2FqaY%3D","line":317,"updated":"2013-06-25 18:18:12.000000000","message":"See:\nhttp://pubs.vmware.com/vsphere-51/index.jsp#com.vmware.wssdk.apiref.doc/vim.cluster.ConfigInfo.html\n\n ... and ...\n\nhttp://pubs.vmware.com/vsphere-51/index.jsp#com.vmware.wssdk.apiref.doc/vim.cluster.DrsConfigInfo.html\n\n... notice ...\n\nhttp://pubs.vmware.com/vsphere-51/index.jsp#com.vmware.wssdk.apiref.doc/vim.cluster.DrsConfigInfo.DrsBehavior.html\n\n\n... many driver assumptions here assume a cluster with DRS enabled and fully automated placement.\n\nIf you can include these data structures in your tests/code you will be able to give a warn/error when a cluster is improperly configured. This will make the life of administrators and field engineers much easier.","commit_id":"0dbe9b4e1786b37b6306976adb0ac1ef3789dcdb"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"6d92861c8ffe5c89376b1317e9508b009461a76b","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        array_of_managed_object_reference \u003d DataObject()"},{"line_number":320,"context_line":"        array_of_managed_object_reference.ManagedObjectReference \u003d ["},{"line_number":321,"context_line":"            _get_objects(\"Datastore\")[0].obj]"},{"line_number":322,"context_line":"        self.set(\"datastore\", array_of_managed_object_reference)"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"        array_of_managed_object_reference \u003d DataObject()"},{"line_number":325,"context_line":"        array_of_managed_object_reference.ManagedObjectReference \u003d ["}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPn%2F%2Fqbg%3D","line":322,"updated":"2013-06-25 18:18:12.000000000","message":"One of the things I don\u0027t like about how we do business here... here we have a single Datastore. Reality is likely to never be that simple. Also ... what about different classes of clusters with different numbers of datastores and hosts? Can we find a way to accomodate different types of clusters in our tests?","commit_id":"0dbe9b4e1786b37b6306976adb0ac1ef3789dcdb"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5416b82594020dd9d07e8f4bd0fb4b9706c5087c","unresolved":false,"context_lines":[{"line_number":177,"context_line":""},{"line_number":178,"context_line":"class DataObject(object):"},{"line_number":179,"context_line":"    \"\"\"Data object base class.\"\"\""},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def __init__(self, obj_name\u003dNone):"},{"line_number":182,"context_line":"        self.obj_name \u003d obj_name"},{"line_number":183,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAP3%2F%2F6yM%3D","line":180,"updated":"2013-07-09 07:50:32.000000000","message":"whitespace change","commit_id":"7cbbd9657408ae90907a21df7abc04e3c89b31a8"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e94d21f77d2d576dbf90ee40a4318dc30fad5be5","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"def _get_object(obj_ref):"},{"line_number":80,"context_line":"    \"\"\"Get object for the give reference.\"\"\""},{"line_number":81,"context_line":"    return _db_content[obj_ref._type][obj_ref]"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQ3%2F%2F%2BlI%3D","line":80,"updated":"2013-08-12 07:32:39.000000000","message":"give \u003d\u003e given","commit_id":"02dadd7f3efdd8d7243cf236c256d57025c87287"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"98a6f7957d1e14c54febf9ee5c0945101b0e234a","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"def _get_object(obj_ref):"},{"line_number":80,"context_line":"    \"\"\"Get object for the give reference.\"\"\""},{"line_number":81,"context_line":"    return _db_content[obj_ref._type][obj_ref]"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQ3%2F%2F%2Bes%3D","line":80,"in_reply_to":"AAAAQ3%2F%2F%2BlI%3D","updated":"2013-08-12 08:06:59.000000000","message":"Done","commit_id":"02dadd7f3efdd8d7243cf236c256d57025c87287"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"cd17865f4b02ab40d7869babf9396330e08f2896","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    \"\"\"Get object References of the type.\"\"\""},{"line_number":94,"context_line":"    lst_objs \u003d []"},{"line_number":95,"context_line":"    for key in _db_content[obj_type]:"},{"line_number":96,"context_line":"        lst_objs.append(key)"},{"line_number":97,"context_line":"    return lst_objs"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAARn%2F%2Fypc%3D","line":96,"updated":"2013-08-21 22:10:25.000000000","message":"return [key for key in _db_content[obj_type]]","commit_id":"fddcde6a063d59596f687f0651af94f498f7d9b7"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"cd17865f4b02ab40d7869babf9396330e08f2896","unresolved":false,"context_lines":[{"line_number":396,"context_line":""},{"line_number":397,"context_line":"    # Method to update summary of a cluster upon host addition"},{"line_number":398,"context_line":"    def _update_summary(self):"},{"line_number":399,"context_line":"        summary \u003d self.get(\"summary\")"},{"line_number":400,"context_line":"        summary.numHosts \u003d 0"},{"line_number":401,"context_line":"        summary.numCpuCores \u003d 0"},{"line_number":402,"context_line":"        summary.numCpuThreads \u003d 0"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAARn%2F%2Fyo8%3D","line":399,"updated":"2013-08-21 22:10:25.000000000","message":"These get/set methods that we are using in ManagedObject seem kind of wonkie to me.  It looks better doing self.summary.\u003cblah\u003e\u003d0. Since everyhing in this file is already using those methods feel free to ignore this.","commit_id":"fddcde6a063d59596f687f0651af94f498f7d9b7"}],"nova/virt/vmwareapi/host.py":[{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"6d92861c8ffe5c89376b1317e9508b009461a76b","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        data[\"host_memory_total\"] \u003d summary.totalMemory / (1024 * 1024)"},{"line_number":198,"context_line":"        data[\"host_memory_free\"] \u003d summary.effectiveMemory"},{"line_number":199,"context_line":"        data[\"hypervisor_type\"] \u003d \"NA\""},{"line_number":200,"context_line":"        data[\"hypervisor_version\"] \u003d \"NA\""},{"line_number":201,"context_line":"        data[\"hypervisor_hostname\"] \u003d self._host_name"},{"line_number":202,"context_line":"        data[\"supported_instances\"] \u003d [(\u0027i686\u0027, \u0027vmware\u0027, \u0027hvm\u0027),"},{"line_number":203,"context_line":"                                       (\u0027x86_64\u0027, \u0027vmware\u0027, \u0027hvm\u0027)]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPn%2F%2FqaI%3D","line":200,"updated":"2013-06-25 18:18:12.000000000","message":"Why NA? did I miss a memo?","commit_id":"0dbe9b4e1786b37b6306976adb0ac1ef3789dcdb"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"51f6d52e1dffb884cb2e9e3b08a96aa10d99b9c6","unresolved":false,"context_lines":[{"line_number":186,"context_line":"        about_info \u003d self._session._call_method(vim_util, \"get_about_info\")"},{"line_number":187,"context_line":"        data \u003d {}"},{"line_number":188,"context_line":"        data[\"vcpus\"] \u003d summary.numCpuThreads"},{"line_number":189,"context_line":"        data[\"cpu_info\"] \u003d\\"},{"line_number":190,"context_line":"        {\"vendor\": cpu_info[\"vendor\"],"},{"line_number":191,"context_line":"         \"model\": cpu_info[\"model\"],"},{"line_number":192,"context_line":"         \"topology\": {\"cores\": summary.numCpuCores,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAP3%2F%2FyIk%3D","line":189,"updated":"2013-07-11 14:53:00.000000000","message":"minor nit - can we do away with the \\\ndata[\"cpu_info\"] \u003d {\u0027vendor\u0027: cpu_info[\u0027vendor\u0027],\n                             \u0027model\u0027: cpu_info[\u0027model\u0027],\netc.","commit_id":"1b3d7be119ce5f817e20fb69be8b91f7605f70b6"},{"author":{"_account_id":6498,"name":"Divakar Padiyar Nandavar","email":"divakar.padiyar-nandavar@hpe.com","username":"divakar-padiyar-nandavar"},"change_message_id":"afe4be8c8d82386856303ad7c2213d929450f3b6","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                                                     self._cluster)"},{"line_number":187,"context_line":"        about_info \u003d self._session._call_method(vim_util, \"get_about_info\")"},{"line_number":188,"context_line":"        data \u003d {}"},{"line_number":189,"context_line":"        data[\"vcpus\"] \u003d summary.numCpuThreads"},{"line_number":190,"context_line":"        data[\"cpu_info\"] \u003d {\"vendor\": cpu_info[\"vendor\"],"},{"line_number":191,"context_line":"                            \"model\": cpu_info[\"model\"],"},{"line_number":192,"context_line":"                            \"topology\": {\"cores\": summary.numCpuCores,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAQn%2F%2Ffsk%3D","line":189,"updated":"2013-07-30 09:19:17.000000000","message":"For a Cluster with two hosts with 16 CPUThreads,  summar.numCpuThreads will have the value 32.  However while scheduling if one asks for  32 vcpus for an instance,  power-on operation would fail as there are no hosts which can satisfy this requirement.   From a Cluster capacity perspective this value is good however is not good from a scheduling perspective.","commit_id":"3b59668263318f40e2e4cf020b603ce4b5ad4c27"},{"author":{"_account_id":6498,"name":"Divakar Padiyar Nandavar","email":"divakar.padiyar-nandavar@hpe.com","username":"divakar-padiyar-nandavar"},"change_message_id":"b131b576b2c02db74e8b350217d14de77e4c03b0","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                                                     self._cluster)"},{"line_number":187,"context_line":"        about_info \u003d self._session._call_method(vim_util, \"get_about_info\")"},{"line_number":188,"context_line":"        data \u003d {}"},{"line_number":189,"context_line":"        data[\"vcpus\"] \u003d summary.numCpuThreads"},{"line_number":190,"context_line":"        data[\"cpu_info\"] \u003d {\"vendor\": cpu_info[\"vendor\"],"},{"line_number":191,"context_line":"                            \"model\": cpu_info[\"model\"],"},{"line_number":192,"context_line":"                            \"topology\": {\"cores\": summary.numCpuCores,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAQn%2F%2FecA%3D","line":189,"in_reply_to":"AAAAQn%2F%2FekI%3D","updated":"2013-07-30 15:52:42.000000000","message":"One can use the same flavor with multiple clusters with different configurations in which case nova boot would go through only when scheduler chooses the cluster which can support the desired configuration.  In case if it lands in a cluster where it cannot support desired number of cores requested, nova boot would fail.","commit_id":"3b59668263318f40e2e4cf020b603ce4b5ad4c27"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"6c0f5b3b55a2b99fed191c8a32519c6907630d37","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                                                     self._cluster)"},{"line_number":187,"context_line":"        about_info \u003d self._session._call_method(vim_util, \"get_about_info\")"},{"line_number":188,"context_line":"        data \u003d {}"},{"line_number":189,"context_line":"        data[\"vcpus\"] \u003d summary.numCpuThreads"},{"line_number":190,"context_line":"        data[\"cpu_info\"] \u003d {\"vendor\": cpu_info[\"vendor\"],"},{"line_number":191,"context_line":"                            \"model\": cpu_info[\"model\"],"},{"line_number":192,"context_line":"                            \"topology\": {\"cores\": summary.numCpuCores,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAQn%2F%2FekI%3D","line":189,"in_reply_to":"AAAAQn%2F%2Ffsk%3D","updated":"2013-07-30 15:24:50.000000000","message":"I think that you have a very good point here. I think that we can address the problem by taking the flavor configurations into account (and making sure that we document well). That is, a flavor should not have resource configurations that exceed the underlying hypervisor. Can you please consider your score.","commit_id":"3b59668263318f40e2e4cf020b603ce4b5ad4c27"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"6334944232ee97903cfe8139df60fcc858ae6416","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        return self._stats"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def update_status(self):"},{"line_number":166,"context_line":"        \"\"\"Update the current state of the cluster."},{"line_number":167,"context_line":"        \"\"\""},{"line_number":168,"context_line":"        summary \u003d self._session._call_method(vim_util,"},{"line_number":169,"context_line":"                                             \"get_dynamic_property\","}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAQn%2F%2Fbo8%3D","line":166,"updated":"2013-07-31 09:51:02.000000000","message":"The \"\"\"can be on this line","commit_id":"cb2de59e460f98814143566f77cba926ad9056e3"},{"author":{"_account_id":6498,"name":"Divakar Padiyar Nandavar","email":"divakar.padiyar-nandavar@hpe.com","username":"divakar-padiyar-nandavar"},"change_message_id":"dbd54145b7a1d4a7d72c4b6416d7f8943081e1ca","unresolved":false,"context_lines":[{"line_number":184,"context_line":"                                                     self._cluster)"},{"line_number":185,"context_line":"        about_info \u003d self._session._call_method(vim_util, \"get_about_info\")"},{"line_number":186,"context_line":"        data \u003d {}"},{"line_number":187,"context_line":"        data[\"vcpus\"] \u003d cpu_info[\"vcpus\"]"},{"line_number":188,"context_line":"        data[\"cpu_info\"] \u003d {\"vendor\": cpu_info[\"vendor\"],"},{"line_number":189,"context_line":"                            \"model\": cpu_info[\"model\"],"},{"line_number":190,"context_line":"                            \"topology\": {\"cores\": summary.numCpuCores,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAQn%2F%2Favc%3D","line":187,"updated":"2013-07-31 14:33:36.000000000","message":"Dont we need to populate vcpus_used also to handle the scheduling core_filter to choose the appropriate compute?\nI think this will require a discussion offline as mulitple points needs to be considered for core_filter to work properly.","commit_id":"cb2de59e460f98814143566f77cba926ad9056e3"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"21a26a1313d48d3a8e4d294d750a8f838d66ee59","unresolved":false,"context_lines":[{"line_number":184,"context_line":"                                                     self._cluster)"},{"line_number":185,"context_line":"        about_info \u003d self._session._call_method(vim_util, \"get_about_info\")"},{"line_number":186,"context_line":"        data \u003d {}"},{"line_number":187,"context_line":"        data[\"vcpus\"] \u003d cpu_info[\"vcpus\"]"},{"line_number":188,"context_line":"        data[\"cpu_info\"] \u003d {\"vendor\": cpu_info[\"vendor\"],"},{"line_number":189,"context_line":"                            \"model\": cpu_info[\"model\"],"},{"line_number":190,"context_line":"                            \"topology\": {\"cores\": summary.numCpuCores,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAQn%2F%2FOKY%3D","line":187,"in_reply_to":"AAAAQn%2F%2FVeQ%3D","updated":"2013-08-05 09:20:53.000000000","message":"Viu, thanks for the suggestion. Please re-evaluate the same in the light of my latest comment above. Should we definitely address vcpus_used in this patch ?","commit_id":"cb2de59e460f98814143566f77cba926ad9056e3"},{"author":{"_account_id":8027,"name":"Vui Lam","email":"vui@vmware.com","username":"vui"},"change_message_id":"2cb341ff07cbfe6af2e7c0f5d4063a73cf8e1d95","unresolved":false,"context_lines":[{"line_number":184,"context_line":"                                                     self._cluster)"},{"line_number":185,"context_line":"        about_info \u003d self._session._call_method(vim_util, \"get_about_info\")"},{"line_number":186,"context_line":"        data \u003d {}"},{"line_number":187,"context_line":"        data[\"vcpus\"] \u003d cpu_info[\"vcpus\"]"},{"line_number":188,"context_line":"        data[\"cpu_info\"] \u003d {\"vendor\": cpu_info[\"vendor\"],"},{"line_number":189,"context_line":"                            \"model\": cpu_info[\"model\"],"},{"line_number":190,"context_line":"                            \"topology\": {\"cores\": summary.numCpuCores,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAQn%2F%2FVeQ%3D","line":187,"in_reply_to":"AAAAQn%2F%2Favc%3D","updated":"2013-08-01 20:05:32.000000000","message":"Agreed. Not incrementing vcpus_used would be equivalent to claiming unlimited amount of CPU overcommit. How to increment this will depend on what the value of vcpus we are going to present. Ideally vcpus should be an aggregate of all of the cluster\u0027s cpu capacity, and the core_filter should take into account a new concept like \"max_supported_vcpus_per_instance\" so as not to schedule the placement on a cluster node of a vm with more vcpus than any of the cluster\u0027s hosts can allow. Given that this is not the case today, a more conservative vcpus number to report would be as what is currently implemented, in which case the value for vcpus_used should be normalized to be more like:\n(sum of all vcpus of vms running in cluster) * (the_vcpus_value_reported / aggregate_of_all_vcpus), rounded up. In the ESX hypervisor, the \"max_suported_vcpus_per_instance\" would be the topology.threads value.","commit_id":"cb2de59e460f98814143566f77cba926ad9056e3"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"21a26a1313d48d3a8e4d294d750a8f838d66ee59","unresolved":false,"context_lines":[{"line_number":184,"context_line":"                                                     self._cluster)"},{"line_number":185,"context_line":"        about_info \u003d self._session._call_method(vim_util, \"get_about_info\")"},{"line_number":186,"context_line":"        data \u003d {}"},{"line_number":187,"context_line":"        data[\"vcpus\"] \u003d cpu_info[\"vcpus\"]"},{"line_number":188,"context_line":"        data[\"cpu_info\"] \u003d {\"vendor\": cpu_info[\"vendor\"],"},{"line_number":189,"context_line":"                            \"model\": cpu_info[\"model\"],"},{"line_number":190,"context_line":"                            \"topology\": {\"cores\": summary.numCpuCores,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAQn%2F%2FOLM%3D","line":187,"in_reply_to":"AAAAQn%2F%2Favc%3D","updated":"2013-08-05 09:20:53.000000000","message":"Hi Divakar\nvcpus_used reported by the compute driver is not used by the scheduler in making decisions. The vcpus_used that you see in the filters, are computed from the instances directly. Currently, the resource tracker just logs the hypervisor reported usage stats. \n\nFor your reference, please take a look at the following lines of code :-\n\n1. Resource Tracker receives the driver stats :- https://github.com/openstack/nova/blob/master/nova/compute/resource_tracker.py#L259\n\n2. Verifies if the driver has reported the required stats :- https://github.com/openstack/nova/blob/master/nova/compute/resource_tracker.py#L268\n\n3. Logs the reported stats :- https://github.com/openstack/nova/blob/master/nova/compute/resource_tracker.py#L270\n\n4. Updates usage from instance. https://github.com/openstack/nova/blob/master/nova/compute/resource_tracker.py#L277\n     Notice how the vcpus_used is reset to 0 \n     Notice how the memory_mb_used is overwritten by a default value (512 MB) \n\n5. The calculated free memory \u0026 cpu is Audited.  https://github.com/openstack/nova/blob/master/nova/compute/resource_tracker.py#L291\n\n6. Finally, the db record is updated. https://github.com/openstack/nova/blob/master/nova/compute/resource_tracker.py#L293\n\nLet me know if you have any concerns.","commit_id":"cb2de59e460f98814143566f77cba926ad9056e3"},{"author":{"_account_id":6498,"name":"Divakar Padiyar Nandavar","email":"divakar.padiyar-nandavar@hpe.com","username":"divakar-padiyar-nandavar"},"change_message_id":"dbd54145b7a1d4a7d72c4b6416d7f8943081e1ca","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        data[\"disk_available\"] \u003d ds[3] / (1024 * 1024 * 1024)"},{"line_number":194,"context_line":"        data[\"disk_used\"] \u003d data[\"disk_total\"] - data[\"disk_available\"]"},{"line_number":195,"context_line":"        data[\"host_memory_total\"] \u003d summary.totalMemory / (1024 * 1024)"},{"line_number":196,"context_line":"        data[\"host_memory_free\"] \u003d summary.effectiveMemory"},{"line_number":197,"context_line":"        data[\"hypervisor_type\"] \u003d about_info.name"},{"line_number":198,"context_line":"        data[\"hypervisor_version\"] \u003d about_info.version"},{"line_number":199,"context_line":"        data[\"hypervisor_hostname\"] \u003d self._host_name"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAQn%2F%2Fau0%3D","line":196,"updated":"2013-07-31 14:33:36.000000000","message":"summary.effectiveMemory is the Total amount of machine memory of all hosts in the cluster that is available for use for virtual machine memory (physical memory for use by the Guest OS) and virtual machine overhead memory. Effective Memory \u003d Aggregate host machine memory - (VMkernel memory + Service Console memory + other service memory)\n\nSo this doesn\u0027t consider the memory already being consumed\nby existing instances in which case ram_filter will not be select the compute optimally.","commit_id":"cb2de59e460f98814143566f77cba926ad9056e3"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"21a26a1313d48d3a8e4d294d750a8f838d66ee59","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        data[\"disk_available\"] \u003d ds[3] / (1024 * 1024 * 1024)"},{"line_number":194,"context_line":"        data[\"disk_used\"] \u003d data[\"disk_total\"] - data[\"disk_available\"]"},{"line_number":195,"context_line":"        data[\"host_memory_total\"] \u003d summary.totalMemory / (1024 * 1024)"},{"line_number":196,"context_line":"        data[\"host_memory_free\"] \u003d summary.effectiveMemory"},{"line_number":197,"context_line":"        data[\"hypervisor_type\"] \u003d about_info.name"},{"line_number":198,"context_line":"        data[\"hypervisor_version\"] \u003d about_info.version"},{"line_number":199,"context_line":"        data[\"hypervisor_hostname\"] \u003d self._host_name"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAQn%2F%2FOJg%3D","line":196,"in_reply_to":"AAAAQn%2F%2Fau0%3D","updated":"2013-08-05 09:20:53.000000000","message":"Agreed. I will update the patch set with the following :  \n[Psuedo Code]\n\ntotal_memory \u003d cluster.root_resource_pool.summary.runtime.memory.maxUsage # Also, same as cluster.summary.effectiveMemory for root-resource-pool\n\nconsumed_memory \u003d cluster.root_resource_pool.summary.runtime.memory.overallUsage\n\nRef:- http://pubs.vmware.com/vsphere-51/index.jsp#com.vmware.wssdk.apiref.doc/vim.ResourcePool.RuntimeInfo.html","commit_id":"cb2de59e460f98814143566f77cba926ad9056e3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"18fdf16264ac4e7723d9e3a00b91caf36e996fed","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        return self._stats"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def update_status(self):"},{"line_number":166,"context_line":"        \"\"\"Update the current state of the cluster.\"\"\""},{"line_number":167,"context_line":"        # Get the datastore in the cluster"},{"line_number":168,"context_line":"        try:"},{"line_number":169,"context_line":"            ds \u003d vm_util.get_datastore_ref_and_name(self._session,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAQn%2F%2B9lg%3D","line":166,"updated":"2013-08-09 08:50:08.000000000","message":"what if the driver is the esx driver?","commit_id":"a901d564141a5553b98d544b01a1ed3947f6a36f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"35586883569735acbda589517ff8b72e82ca995a","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        return self._stats"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def update_status(self):"},{"line_number":166,"context_line":"        \"\"\"Update the current state of the cluster.\"\"\""},{"line_number":167,"context_line":"        # Get the datastore in the cluster"},{"line_number":168,"context_line":"        try:"},{"line_number":169,"context_line":"            ds \u003d vm_util.get_datastore_ref_and_name(self._session,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAQn%2F%2B5uk%3D","line":166,"in_reply_to":"AAAAQn%2F%2B74I%3D","updated":"2013-08-10 16:57:53.000000000","message":"correct. i missed this. thanks","commit_id":"a901d564141a5553b98d544b01a1ed3947f6a36f"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"6b320addce8694c855ba4a25b91a531778833068","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        return self._stats"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def update_status(self):"},{"line_number":166,"context_line":"        \"\"\"Update the current state of the cluster.\"\"\""},{"line_number":167,"context_line":"        # Get the datastore in the cluster"},{"line_number":168,"context_line":"        try:"},{"line_number":169,"context_line":"            ds \u003d vm_util.get_datastore_ref_and_name(self._session,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAQn%2F%2B74I%3D","line":166,"in_reply_to":"AAAAQn%2F%2B9lg%3D","updated":"2013-08-09 17:54:19.000000000","message":"update_status in HostState (L102) will be invoked with ESX Driver. VCState is the corresponding implementation for VCDriver.","commit_id":"a901d564141a5553b98d544b01a1ed3947f6a36f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"a9fcb6ceaa529d0860e1563a52bd61a384317f11","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        stats \u003d vm_util.get_stats_from_cluster(self._session, self._cluster)"},{"line_number":176,"context_line":"        about_info \u003d self._session._call_method(vim_util, \"get_about_info\")"},{"line_number":177,"context_line":"        data \u003d {}"},{"line_number":178,"context_line":"        data[\"vcpus\"] \u003d stats[\"cpu\"][\"vcpus\"]"},{"line_number":179,"context_line":"        data[\"cpu_info\"] \u003d {\"vendor\": stats[\"cpu\"][\"vendor\"],"},{"line_number":180,"context_line":"                            \"model\": stats[\"cpu\"][\"model\"],"},{"line_number":181,"context_line":"                            \"topology\": {\"cores\": stats[\"cpu\"][\"cores\"],"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAQn%2F%2FGVk%3D","line":178,"updated":"2013-08-07 07:59:48.000000000","message":"minor nit - i prefer to use \u0027 instead of \"","commit_id":"a901d564141a5553b98d544b01a1ed3947f6a36f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"227ea11dde937ff140373484aad11721364bb80e","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        data[\"disk_used\"] \u003d data[\"disk_total\"] - data[\"disk_available\"]"},{"line_number":186,"context_line":"        data[\"host_memory_total\"] \u003d stats[\u0027mem\u0027][\u0027total\u0027]"},{"line_number":187,"context_line":"        data[\"host_memory_free\"] \u003d stats[\u0027mem\u0027][\u0027free\u0027]"},{"line_number":188,"context_line":"        data[\"hypervisor_type\"] \u003d about_info.name"},{"line_number":189,"context_line":"        data[\"hypervisor_version\"] \u003d about_info.version"},{"line_number":190,"context_line":"        data[\"hypervisor_hostname\"] \u003d self._host_name"},{"line_number":191,"context_line":"        data[\"supported_instances\"] \u003d [(\u0027i686\u0027, \u0027vmware\u0027, \u0027hvm\u0027),"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAASn%2F%2FQRM%3D","line":188,"updated":"2013-09-09 08:07:10.000000000","message":"what if about_info is None? Is this possible?","commit_id":"f59eddb567170eec4d73d3aec26bbbbf6164702a"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"57bb80bff7714941f323ee369366a11baa044697","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        data[\"disk_used\"] \u003d data[\"disk_total\"] - data[\"disk_available\"]"},{"line_number":186,"context_line":"        data[\"host_memory_total\"] \u003d stats[\u0027mem\u0027][\u0027total\u0027]"},{"line_number":187,"context_line":"        data[\"host_memory_free\"] \u003d stats[\u0027mem\u0027][\u0027free\u0027]"},{"line_number":188,"context_line":"        data[\"hypervisor_type\"] \u003d about_info.name"},{"line_number":189,"context_line":"        data[\"hypervisor_version\"] \u003d about_info.version"},{"line_number":190,"context_line":"        data[\"hypervisor_hostname\"] \u003d self._host_name"},{"line_number":191,"context_line":"        data[\"supported_instances\"] \u003d [(\u0027i686\u0027, \u0027vmware\u0027, \u0027hvm\u0027),"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAASn%2F%2FQMA%3D","line":188,"in_reply_to":"AAAASn%2F%2FQNM%3D","updated":"2013-09-09 08:27:57.000000000","message":"Sorry, wrong link http://pubs.vmware.com/vsphere-51/index.jsp#com.vmware.wssdk.apiref.doc/vim.ServiceInstanceContent.html#field_detail","commit_id":"f59eddb567170eec4d73d3aec26bbbbf6164702a"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"77b3d67cc75bfdfec5a0ba18ea874ca5aefae9cd","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        data[\"disk_used\"] \u003d data[\"disk_total\"] - data[\"disk_available\"]"},{"line_number":186,"context_line":"        data[\"host_memory_total\"] \u003d stats[\u0027mem\u0027][\u0027total\u0027]"},{"line_number":187,"context_line":"        data[\"host_memory_free\"] \u003d stats[\u0027mem\u0027][\u0027free\u0027]"},{"line_number":188,"context_line":"        data[\"hypervisor_type\"] \u003d about_info.name"},{"line_number":189,"context_line":"        data[\"hypervisor_version\"] \u003d about_info.version"},{"line_number":190,"context_line":"        data[\"hypervisor_hostname\"] \u003d self._host_name"},{"line_number":191,"context_line":"        data[\"supported_instances\"] \u003d [(\u0027i686\u0027, \u0027vmware\u0027, \u0027hvm\u0027),"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAASn%2F%2FQNM%3D","line":188,"in_reply_to":"AAAASn%2F%2FQRM%3D","updated":"2013-09-09 08:24:12.000000000","message":"According to http://pubs.vmware.com/vsphere-51/index.jsp#com.vmware.wssdk.apiref.doc/vim.AboutInfo.html if the driver is able to communicate with vCenter, this will be property that is available.","commit_id":"f59eddb567170eec4d73d3aec26bbbbf6164702a"}],"nova/virt/vmwareapi/vim_util.py":[{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"2110181ca5db8f0fbcc546a1ffc87393072a958f","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        vim.CancelRetrievePropertiesEx(token\u003dobj_content.token)"},{"line_number":179,"context_line":"    property_dict \u003d {}"},{"line_number":180,"context_line":"    if obj_content.objects:"},{"line_number":181,"context_line":"        dynamic_properties \u003d obj_content.objects[0].propSet"},{"line_number":182,"context_line":"        if dynamic_properties:"},{"line_number":183,"context_line":"            for prop in dynamic_properties:"},{"line_number":184,"context_line":"                property_dict[prop.name] \u003d prop.val"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAASn%2F%2F9T4%3D","line":181,"updated":"2013-08-28 15:49:11.000000000","message":"nit: a comment telling us why there can only be one objects[0] would be nice (non-blocking)","commit_id":"4ab4fbe733826d3d227a119c6f1fffa6446ffe66"}],"nova/virt/vmwareapi/vm_util.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5416b82594020dd9d07e8f4bd0fb4b9706c5087c","unresolved":false,"context_lines":[{"line_number":530,"context_line":"                                    \"host\")"},{"line_number":531,"context_line":"    cpu_info \u003d {\"vendor\": [],"},{"line_number":532,"context_line":"                \"model\": []"},{"line_number":533,"context_line":"    }"},{"line_number":534,"context_line":"    if host_ret:"},{"line_number":535,"context_line":"        host_mors \u003d host_ret.ManagedObjectReference"},{"line_number":536,"context_line":"        obj_content \u003d session._call_method(vim_util,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAP3%2F%2F6yE%3D","line":533,"updated":"2013-07-09 07:50:32.000000000","message":"Consider \"model\": []}","commit_id":"7cbbd9657408ae90907a21df7abc04e3c89b31a8"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"51f6d52e1dffb884cb2e9e3b08a96aa10d99b9c6","unresolved":false,"context_lines":[{"line_number":646,"context_line":"                                    cluster, \"ClusterComputeResource\","},{"line_number":647,"context_line":"                                    \"host\")"},{"line_number":648,"context_line":"    cpu_info \u003d {\"vendor\": [],"},{"line_number":649,"context_line":"                \"model\": []"},{"line_number":650,"context_line":"    }"},{"line_number":651,"context_line":"    if host_ret:"},{"line_number":652,"context_line":"        host_mors \u003d host_ret.ManagedObjectReference"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAP3%2F%2FyHw%3D","line":649,"updated":"2013-07-11 14:53:00.000000000","message":"can you please move the } to this line","commit_id":"1b3d7be119ce5f817e20fb69be8b91f7605f70b6"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e94d21f77d2d576dbf90ee40a4318dc30fad5be5","unresolved":false,"context_lines":[{"line_number":685,"context_line":"    # Get the Host and Resource Pool Managed Object Refs"},{"line_number":686,"context_line":"    prop_dict \u003d session._call_method(vim_util, \"get_dynamic_properties\","},{"line_number":687,"context_line":"                                     cluster, \"ClusterComputeResource\","},{"line_number":688,"context_line":"                                     [\"host\", \"resourcePool\"])"},{"line_number":689,"context_line":"    host_ret \u003d prop_dict[\"host\"]"},{"line_number":690,"context_line":"    if host_ret:"},{"line_number":691,"context_line":"        host_mors \u003d host_ret.ManagedObjectReference"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQ3%2F%2F%2Bkc%3D","line":688,"updated":"2013-08-12 07:32:39.000000000","message":"i think that you should check the prop_dict here is not None.","commit_id":"02dadd7f3efdd8d7243cf236c256d57025c87287"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"98a6f7957d1e14c54febf9ee5c0945101b0e234a","unresolved":false,"context_lines":[{"line_number":685,"context_line":"    # Get the Host and Resource Pool Managed Object Refs"},{"line_number":686,"context_line":"    prop_dict \u003d session._call_method(vim_util, \"get_dynamic_properties\","},{"line_number":687,"context_line":"                                     cluster, \"ClusterComputeResource\","},{"line_number":688,"context_line":"                                     [\"host\", \"resourcePool\"])"},{"line_number":689,"context_line":"    host_ret \u003d prop_dict[\"host\"]"},{"line_number":690,"context_line":"    if host_ret:"},{"line_number":691,"context_line":"        host_mors \u003d host_ret.ManagedObjectReference"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQ3%2F%2F%2Bec%3D","line":688,"in_reply_to":"AAAAQ3%2F%2F%2Bkc%3D","updated":"2013-08-12 08:06:59.000000000","message":"I didn\u0027t check earlier because get_dynamic_properties was always returning a dict object. But your following comment was very valid. I did overlook that scenario. Thanks Gary!","commit_id":"02dadd7f3efdd8d7243cf236c256d57025c87287"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e94d21f77d2d576dbf90ee40a4318dc30fad5be5","unresolved":false,"context_lines":[{"line_number":686,"context_line":"    prop_dict \u003d session._call_method(vim_util, \"get_dynamic_properties\","},{"line_number":687,"context_line":"                                     cluster, \"ClusterComputeResource\","},{"line_number":688,"context_line":"                                     [\"host\", \"resourcePool\"])"},{"line_number":689,"context_line":"    host_ret \u003d prop_dict[\"host\"]"},{"line_number":690,"context_line":"    if host_ret:"},{"line_number":691,"context_line":"        host_mors \u003d host_ret.ManagedObjectReference"},{"line_number":692,"context_line":"        result \u003d session._call_method(vim_util,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQ3%2F%2F%2BkY%3D","line":689,"updated":"2013-08-12 07:32:39.000000000","message":"Consider: host_ret \u003d prop_dict.get(\u0027host\u0027)\nThis will return None if the host is not found","commit_id":"02dadd7f3efdd8d7243cf236c256d57025c87287"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"98a6f7957d1e14c54febf9ee5c0945101b0e234a","unresolved":false,"context_lines":[{"line_number":686,"context_line":"    prop_dict \u003d session._call_method(vim_util, \"get_dynamic_properties\","},{"line_number":687,"context_line":"                                     cluster, \"ClusterComputeResource\","},{"line_number":688,"context_line":"                                     [\"host\", \"resourcePool\"])"},{"line_number":689,"context_line":"    host_ret \u003d prop_dict[\"host\"]"},{"line_number":690,"context_line":"    if host_ret:"},{"line_number":691,"context_line":"        host_mors \u003d host_ret.ManagedObjectReference"},{"line_number":692,"context_line":"        result \u003d session._call_method(vim_util,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQ3%2F%2F%2BeY%3D","line":689,"in_reply_to":"AAAAQ3%2F%2F%2BkY%3D","updated":"2013-08-12 08:06:59.000000000","message":"Done","commit_id":"02dadd7f3efdd8d7243cf236c256d57025c87287"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e94d21f77d2d576dbf90ee40a4318dc30fad5be5","unresolved":false,"context_lines":[{"line_number":701,"context_line":"            cpu_info[\"vendor\"].append(hardware_summary.vendor)"},{"line_number":702,"context_line":"            cpu_info[\"model\"].append(hardware_summary.cpuModel)"},{"line_number":703,"context_line":""},{"line_number":704,"context_line":"    res_mor \u003d prop_dict[\"resourcePool\"]"},{"line_number":705,"context_line":"    if res_mor:"},{"line_number":706,"context_line":"        res_usage \u003d session._call_method(vim_util, \"get_dynamic_property\","},{"line_number":707,"context_line":"                        res_mor, \"ResourcePool\", \"summary.runtime.memory\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQ3%2F%2F%2BkQ%3D","line":704,"updated":"2013-08-12 07:32:39.000000000","message":"res_mor \u003d prop_dict.get(\u0027resourcePool\u0027)","commit_id":"02dadd7f3efdd8d7243cf236c256d57025c87287"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"98a6f7957d1e14c54febf9ee5c0945101b0e234a","unresolved":false,"context_lines":[{"line_number":701,"context_line":"            cpu_info[\"vendor\"].append(hardware_summary.vendor)"},{"line_number":702,"context_line":"            cpu_info[\"model\"].append(hardware_summary.cpuModel)"},{"line_number":703,"context_line":""},{"line_number":704,"context_line":"    res_mor \u003d prop_dict[\"resourcePool\"]"},{"line_number":705,"context_line":"    if res_mor:"},{"line_number":706,"context_line":"        res_usage \u003d session._call_method(vim_util, \"get_dynamic_property\","},{"line_number":707,"context_line":"                        res_mor, \"ResourcePool\", \"summary.runtime.memory\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAQ3%2F%2F%2BeU%3D","line":704,"in_reply_to":"AAAAQ3%2F%2F%2BkQ%3D","updated":"2013-08-12 08:06:59.000000000","message":"Done","commit_id":"02dadd7f3efdd8d7243cf236c256d57025c87287"}]}
