)]}'
{"ceilometer/compute/virt/vmware/inspector.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f6103f46dc7f8144b2aa920af448b9ac16588f05","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        self._ops \u003d vsphere_operations.VsphereOperations("},{"line_number":100,"context_line":"            get_api_session(), 1000)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def _get_vm_mobj(self, instance):"},{"line_number":103,"context_line":"        vm_mobj \u003d self._ops.get_vm_mobj(instance.id)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        if vm_mobj is None:"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_8ab9db17","line":102,"updated":"2016-11-02 08:14:13.000000000","message":"i think that the name here is cryptic - maybe it interests someone that the state of the VM is indeed shutdown","commit_id":"b83225da31e718412a131e75456ae76ccb58e375"},{"author":{"_account_id":17289,"name":"Su Zhengwei","email":"su.zhengwei@zte.com.cn","username":"su-zhengwei"},"change_message_id":"f34c8680ed1552e82d6dccb0c184391f290d4e99","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        self._ops \u003d vsphere_operations.VsphereOperations("},{"line_number":100,"context_line":"            get_api_session(), 1000)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def _get_vm_mobj(self, instance):"},{"line_number":103,"context_line":"        vm_mobj \u003d self._ops.get_vm_mobj(instance.id)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        if vm_mobj is None:"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_0daec597","line":102,"in_reply_to":"ba5da102_8ab9db17","updated":"2016-11-02 09:01:16.000000000","message":"How about _get_vm_mobj_not_poweroff_or_raise():","commit_id":"b83225da31e718412a131e75456ae76ccb58e375"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f6103f46dc7f8144b2aa920af448b9ac16588f05","unresolved":false,"context_lines":[{"line_number":106,"context_line":"            raise virt_inspector.InstanceNotFoundException("},{"line_number":107,"context_line":"                _(\u0027VM %s not found in VMware vSphere\u0027) % instance.id)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        vm_powerState \u003d self._ops.query_vm_property(vm_mobj,"},{"line_number":110,"context_line":"                                                    \u0027runtime.powerState\u0027)"},{"line_number":111,"context_line":"        if vm_powerState \u003d\u003d \"poweredOff\":"},{"line_number":112,"context_line":"            raise virt_inspector.InstanceShutOffException("}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_6a53a7e2","line":109,"updated":"2016-11-02 08:14:13.000000000","message":"i think that you should have a separate method doing this validation - is VM up? or something along those lines. What is the VM is suspended?","commit_id":"b83225da31e718412a131e75456ae76ccb58e375"},{"author":{"_account_id":15857,"name":"Xinhui Li","email":"lxinhui@vmware.com","username":"Cindia-blue"},"change_message_id":"7ea2cbc45abc203811bf333511f3f1b68fdabd79","unresolved":false,"context_lines":[{"line_number":106,"context_line":"            raise virt_inspector.InstanceNotFoundException("},{"line_number":107,"context_line":"                _(\u0027VM %s not found in VMware vSphere\u0027) % instance.id)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        vm_powerState \u003d self._ops.query_vm_property(vm_mobj,"},{"line_number":110,"context_line":"                                                    \u0027runtime.powerState\u0027)"},{"line_number":111,"context_line":"        if vm_powerState \u003d\u003d \"poweredOff\":"},{"line_number":112,"context_line":"            raise virt_inspector.InstanceShutOffException("}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_8db9f517","line":109,"in_reply_to":"ba5da102_6a53a7e2","updated":"2016-11-02 08:55:24.000000000","message":"I agree to garyk here. why need we throw poweroff exception when get moid?","commit_id":"b83225da31e718412a131e75456ae76ccb58e375"},{"author":{"_account_id":17289,"name":"Su Zhengwei","email":"su.zhengwei@zte.com.cn","username":"su-zhengwei"},"change_message_id":"f34c8680ed1552e82d6dccb0c184391f290d4e99","unresolved":false,"context_lines":[{"line_number":106,"context_line":"            raise virt_inspector.InstanceNotFoundException("},{"line_number":107,"context_line":"                _(\u0027VM %s not found in VMware vSphere\u0027) % instance.id)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        vm_powerState \u003d self._ops.query_vm_property(vm_mobj,"},{"line_number":110,"context_line":"                                                    \u0027runtime.powerState\u0027)"},{"line_number":111,"context_line":"        if vm_powerState \u003d\u003d \"poweredOff\":"},{"line_number":112,"context_line":"            raise virt_inspector.InstanceShutOffException("}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_2d970949","line":109,"in_reply_to":"ba5da102_6a53a7e2","updated":"2016-11-02 09:01:16.000000000","message":"vmware vms have three powerState:PoweredOff,PoweredOn,Suspended.\njust refer to libvirt hypervisor, not inspect instances which state is SHUTOFF, but still inspect suspended vms.\nI think it\u0027s a little thing whether to separate this method.","commit_id":"b83225da31e718412a131e75456ae76ccb58e375"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"a9872325a81fd6884bcc091c90d0de86032236b1","unresolved":false,"context_lines":[{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        if vm_mobj is None:"},{"line_number":106,"context_line":"            raise virt_inspector.InstanceNotFoundException("},{"line_number":107,"context_line":"                _(\u0027VM %s not found in VMware vSphere\u0027) % instance.id)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        vm_powerState \u003d self._ops.query_vm_property(vm_mobj,"},{"line_number":110,"context_line":"                                                    \u0027runtime.powerState\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a74a57a_39126bb5","line":107,"range":{"start_line":107,"start_character":16,"end_line":107,"end_character":17},"updated":"2016-11-23 14:18:44.000000000","message":"i don\u0027t think we need this translated since it gets logged as debug.","commit_id":"291f2d9bea165be6e48c5c39f39287a46b32e4af"},{"author":{"_account_id":15857,"name":"Xinhui Li","email":"lxinhui@vmware.com","username":"Cindia-blue"},"change_message_id":"1300dd08ab5efd23a3f4afb282fa9f0d581f6203","unresolved":false,"context_lines":[{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        if vm_mobj is None:"},{"line_number":106,"context_line":"            raise virt_inspector.InstanceNotFoundException("},{"line_number":107,"context_line":"                _(\u0027VM %s not found in VMware vSphere\u0027) % instance.id)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        vm_powerState \u003d self._ops.query_vm_property(vm_mobj,"},{"line_number":110,"context_line":"                                                    \u0027runtime.powerState\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a74a57a_b23060ea","line":107,"range":{"start_line":107,"start_character":16,"end_line":107,"end_character":17},"in_reply_to":"5a74a57a_39126bb5","updated":"2016-11-30 00:13:05.000000000","message":"+1","commit_id":"291f2d9bea165be6e48c5c39f39287a46b32e4af"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"a9872325a81fd6884bcc091c90d0de86032236b1","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                                                    \u0027runtime.powerState\u0027)"},{"line_number":111,"context_line":"        if vm_powerState \u003d\u003d \"poweredOff\":"},{"line_number":112,"context_line":"            raise virt_inspector.InstanceShutOffException("},{"line_number":113,"context_line":"                _(\u0027VM %s is poweroff in VMware vSphere\u0027) % instance.id)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        return vm_mobj"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5a74a57a_5c3c7593","line":113,"range":{"start_line":113,"start_character":15,"end_line":113,"end_character":17},"updated":"2016-11-23 14:18:44.000000000","message":"same as above","commit_id":"291f2d9bea165be6e48c5c39f39287a46b32e4af"}],"ceilometer/compute/virt/vmware/vsphere_operations.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f6103f46dc7f8144b2aa920af448b9ac16588f05","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                                    False)"},{"line_number":57,"context_line":"        while result:"},{"line_number":58,"context_line":"            for object in result.objects:"},{"line_number":59,"context_line":"                vm_mobj \u003d object.obj"},{"line_number":60,"context_line":"                # propSet will be set only if the server provides value"},{"line_number":61,"context_line":"                if hasattr(object, \u0027propSet\u0027) and object.propSet:"},{"line_number":62,"context_line":"                    vm_instance_id \u003d object.propSet[0].val"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_4a718375","line":59,"updated":"2016-11-02 08:14:13.000000000","message":"this is actually the moid - so not 100% sure about this change","commit_id":"b83225da31e718412a131e75456ae76ccb58e375"},{"author":{"_account_id":17289,"name":"Su Zhengwei","email":"su.zhengwei@zte.com.cn","username":"su-zhengwei"},"change_message_id":"f34c8680ed1552e82d6dccb0c184391f290d4e99","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                                    False)"},{"line_number":57,"context_line":"        while result:"},{"line_number":58,"context_line":"            for object in result.objects:"},{"line_number":59,"context_line":"                vm_mobj \u003d object.obj"},{"line_number":60,"context_line":"                # propSet will be set only if the server provides value"},{"line_number":61,"context_line":"                if hasattr(object, \u0027propSet\u0027) and object.propSet:"},{"line_number":62,"context_line":"                    vm_instance_id \u003d object.propSet[0].val"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_ea417764","line":59,"in_reply_to":"ba5da102_4a718375","updated":"2016-11-02 09:01:16.000000000","message":"we just use mobj to get perfermance and property data.If we ceate a map of moid,then we should need to get the mobj by moid, use method vim_util.get_moref().If we firstly create a map of mobj, then it can reduce the calls of vmware api.","commit_id":"b83225da31e718412a131e75456ae76ccb58e375"}],"ceilometer/tests/unit/compute/virt/vmware/test_inspector.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"a9872325a81fd6884bcc091c90d0de86032236b1","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        fake_stat \u003d virt_inspector.MemoryUsageStats(usage\u003d1.0)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        self._inspector._get_vm_mobj_not_power_off_or_raise \u003d mock.MagicMock()"},{"line_number":82,"context_line":"        self._inspector._get_vm_mobj_not_power_off_or_raise.return_value \u003d \\"},{"line_number":83,"context_line":"            test_vm_mobj"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        ops_mock \u003d self._inspector._ops"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a74a57a_9cb9adec","line":82,"range":{"start_line":82,"start_character":75,"end_line":82,"end_character":76},"updated":"2016-11-23 14:18:44.000000000","message":"use \u0027(\u0027 and \u0027)\u0027","commit_id":"291f2d9bea165be6e48c5c39f39287a46b32e4af"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"a9872325a81fd6884bcc091c90d0de86032236b1","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        fake_stat \u003d virt_inspector.CPUUtilStats(util\u003d60)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        self._inspector._get_vm_mobj_not_power_off_or_raise \u003d mock.MagicMock()"},{"line_number":99,"context_line":"        self._inspector._get_vm_mobj_not_power_off_or_raise.return_value \u003d \\"},{"line_number":100,"context_line":"            test_vm_mobj"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        ops_mock \u003d self._inspector._ops"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a74a57a_fcc8e176","line":99,"range":{"start_line":99,"start_character":75,"end_line":99,"end_character":76},"updated":"2016-11-23 14:18:44.000000000","message":"same","commit_id":"291f2d9bea165be6e48c5c39f39287a46b32e4af"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"a9872325a81fd6884bcc091c90d0de86032236b1","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            return counter_id_to_stats_map[counter_id]"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        self._inspector._get_vm_mobj_not_power_off_or_raise \u003d mock.MagicMock()"},{"line_number":135,"context_line":"        self._inspector._get_vm_mobj_not_power_off_or_raise.return_value \u003d \\"},{"line_number":136,"context_line":"            test_vm_mobj"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"        # configure vsphere operations mock with the test data"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a74a57a_5ca635c2","line":135,"range":{"start_line":135,"start_character":75,"end_line":135,"end_character":76},"updated":"2016-11-23 14:18:44.000000000","message":"same","commit_id":"291f2d9bea165be6e48c5c39f39287a46b32e4af"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"a9872325a81fd6884bcc091c90d0de86032236b1","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            return counter_id_to_stats_map[counter_id]"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"        self._inspector._get_vm_mobj_not_power_off_or_raise \u003d mock.MagicMock()"},{"line_number":182,"context_line":"        self._inspector._get_vm_mobj_not_power_off_or_raise.return_value \u003d \\"},{"line_number":183,"context_line":"            test_vm_mobj"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        # configure vsphere operations mock with the test data"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a74a57a_bc958941","line":182,"range":{"start_line":182,"start_character":75,"end_line":182,"end_character":76},"updated":"2016-11-23 14:18:44.000000000","message":"same","commit_id":"291f2d9bea165be6e48c5c39f39287a46b32e4af"}]}
