)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"51763a816df6b0858e51123f1e4a815696613a23","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Gerrit Code Review \u003creview@openstack.org\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-08-30 03:30:46 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Added plugin (e.g. network) to monitor and collect resource data"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch gives a plugin interface for users to add their own plugins"},{"line_number":10,"context_line":"to monitor resources on compute nodes on the compute manager."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAASn%2F%2Fbgg%3D","line":7,"updated":"2013-09-04 20:37:45.000000000","message":"why is network in parens? Isn\u0027t that the main part of this patch?","commit_id":"f702a61973da9fa716559679a9a614b6885e929a"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"fdd1f563779a9027a3c5f1db42d76dcccf1ec450","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Gerrit Code Review \u003creview@openstack.org\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-08-30 03:30:46 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Added plugin (e.g. network) to monitor and collect resource data"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch gives a plugin interface for users to add their own plugins"},{"line_number":10,"context_line":"to monitor resources on compute nodes on the compute manager."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAASn%2F%2FZRw%3D","line":7,"in_reply_to":"AAAASn%2F%2Fbgg%3D","updated":"2013-09-05 09:15:18.000000000","message":"Done","commit_id":"f702a61973da9fa716559679a9a614b6885e929a"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"51763a816df6b0858e51123f1e4a815696613a23","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Added plugin (e.g. network) to monitor and collect resource data"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch gives a plugin interface for users to add their own plugins"},{"line_number":10,"context_line":"to monitor resources on compute nodes on the compute manager."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"The compute manager loads the plugins and gets the metrics, and sends to"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAASn%2F%2FbgQ%3D","line":9,"updated":"2013-09-04 20:37:45.000000000","message":"another patch does this, https://review.openstack.org/#/c/35760/","commit_id":"f702a61973da9fa716559679a9a614b6885e929a"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"fdd1f563779a9027a3c5f1db42d76dcccf1ec450","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Added plugin (e.g. network) to monitor and collect resource data"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch gives a plugin interface for users to add their own plugins"},{"line_number":10,"context_line":"to monitor resources on compute nodes on the compute manager."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"The compute manager loads the plugins and gets the metrics, and sends to"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAASn%2F%2FZP8%3D","line":9,"in_reply_to":"AAAASn%2F%2FbgQ%3D","updated":"2013-09-05 09:15:18.000000000","message":"Done","commit_id":"f702a61973da9fa716559679a9a614b6885e929a"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"60ff4893d0f1211bec3a00a0cc136950d9dca793","unresolved":false,"context_lines":[{"line_number":16,"context_line":"because the original contributor Yijing Zhang has left."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Iba202d80f822078ebcb7ac4cdf6833d25b556ea6"},{"line_number":19,"context_line":"Signed-off-by: Lianhao Lu \u003clianhao.lu@intel.com\u003e"},{"line_number":20,"context_line":"Signed-off-by: Yijing Zhang \u003ctraceyzhang@siu.edu\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAATn%2F9xf4%3D","line":19,"updated":"2013-12-06 03:53:56.000000000","message":"openstack don\u0027t need sob in commit message, it should be removed.","commit_id":"d72a223331d521cbc5febbb9a321e38a0a158f52"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"38ac48b0e9e0617fdf9e92362e038c1c211e7e15","unresolved":false,"context_lines":[{"line_number":16,"context_line":"because the original contributor Yijing Zhang has left."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Iba202d80f822078ebcb7ac4cdf6833d25b556ea6"},{"line_number":19,"context_line":"Signed-off-by: Lianhao Lu \u003clianhao.lu@intel.com\u003e"},{"line_number":20,"context_line":"Signed-off-by: Yijing Zhang \u003ctraceyzhang@siu.edu\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAATn%2F9xSI%3D","line":19,"in_reply_to":"AAAATn%2F9xf4%3D","updated":"2013-12-06 05:49:16.000000000","message":"Done","commit_id":"d72a223331d521cbc5febbb9a321e38a0a158f52"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"85d3872002ce5ad75d0627c9b438a6e17b5a5633","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Added network monitor for compute node"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The patch defines the network monitor plugin to collect network related"},{"line_number":10,"context_line":"metrics for the compute node. It also gives an implemenation using"},{"line_number":11,"context_line":"psutil."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This is part of the blueprint utilization-aware-scheduling."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"AAAAUX%2F%2FkoA%3D","line":10,"updated":"2014-02-12 09:22:28.000000000","message":"implementation","commit_id":"9cdbf5323a6de62aa120819306ccaecde5acaa90"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"05a705d2c77f27b56115a40095d69bc79517b0bd","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Added network monitor for compute node"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The patch defines the network monitor plugin to collect network related"},{"line_number":10,"context_line":"metrics for the compute node. It also gives an implemenation using"},{"line_number":11,"context_line":"psutil."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This is part of the blueprint utilization-aware-scheduling."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"AAAAUX%2F%2FdKQ%3D","line":10,"in_reply_to":"AAAAUX%2F%2FkoA%3D","updated":"2014-02-13 03:35:54.000000000","message":"Done","commit_id":"9cdbf5323a6de62aa120819306ccaecde5acaa90"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"85d3872002ce5ad75d0627c9b438a6e17b5a5633","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This is part of the blueprint utilization-aware-scheduling."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This patch is a refactor of the https://review.openstack.org/37858,"},{"line_number":16,"context_line":"because the original contributor Yijing Zhang has left."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Iba202d80f822078ebcb7ac4cdf6833d25b556ea6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"AAAAUX%2F%2Fknc%3D","line":15,"updated":"2014-02-12 09:22:28.000000000","message":"Can you remove the comma at the end as I cannot open the link directly","commit_id":"9cdbf5323a6de62aa120819306ccaecde5acaa90"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"05a705d2c77f27b56115a40095d69bc79517b0bd","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This is part of the blueprint utilization-aware-scheduling."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This patch is a refactor of the https://review.openstack.org/37858,"},{"line_number":16,"context_line":"because the original contributor Yijing Zhang has left."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Iba202d80f822078ebcb7ac4cdf6833d25b556ea6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"AAAAUX%2F%2FdJ0%3D","line":15,"in_reply_to":"AAAAUX%2F%2Fknc%3D","updated":"2014-02-13 03:35:54.000000000","message":"Done","commit_id":"9cdbf5323a6de62aa120819306ccaecde5acaa90"}],"nova/compute/monitors/network_monitor.py":[{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"51763a816df6b0858e51123f1e4a815696613a23","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        return None, None"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def get_send_errors_rate(self, **kwargs):"},{"line_number":65,"context_line":"        \"\"\"Return Network current send errors rate.\"\"\""},{"line_number":66,"context_line":"        return None, None"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def get_send_drops_rate(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAASn%2F%2FbfI%3D","line":65,"updated":"2013-09-04 20:37:45.000000000","message":"same question as Brian brought up in https://review.openstack.org/#/c/35760/","commit_id":"f702a61973da9fa716559679a9a614b6885e929a"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"fdd1f563779a9027a3c5f1db42d76dcccf1ec450","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        return None, None"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def get_send_errors_rate(self, **kwargs):"},{"line_number":65,"context_line":"        \"\"\"Return Network current send errors rate.\"\"\""},{"line_number":66,"context_line":"        return None, None"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def get_send_drops_rate(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAASn%2F%2FZP4%3D","line":65,"in_reply_to":"AAAASn%2F%2FbfI%3D","updated":"2013-09-05 09:15:18.000000000","message":"Done","commit_id":"f702a61973da9fa716559679a9a614b6885e929a"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"60ff4893d0f1211bec3a00a0cc136950d9dca793","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"# @author: Yijing Zhang, Intel Corporation."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"\"\"\""},{"line_number":18,"context_line":"Network monitor Plugin to retrieve network information"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9xj8%3D","line":15,"updated":"2013-12-06 03:53:56.000000000","message":"usually we don\u0027t add auth info in copyright in openstack","commit_id":"d72a223331d521cbc5febbb9a321e38a0a158f52"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"38ac48b0e9e0617fdf9e92362e038c1c211e7e15","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"# @author: Yijing Zhang, Intel Corporation."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"\"\"\""},{"line_number":18,"context_line":"Network monitor Plugin to retrieve network information"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9xSE%3D","line":15,"in_reply_to":"AAAATn%2F9xj8%3D","updated":"2013-12-06 05:49:16.000000000","message":"Done","commit_id":"d72a223331d521cbc5febbb9a321e38a0a158f52"},{"author":{"_account_id":9275,"name":"Leandro Ignacio Costantino","email":"leandro.i.costantino@intel.com","username":"lcostantino"},"change_message_id":"de59a3e8b0f52b2dd152f0db2144fd6e6f50d6f7","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        return None, None"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def _get_network_recv_errors_rate(self, **kwargs):"},{"line_number":38,"context_line":"        \"\"\"Return Network current receive errors rate, timetamp.\"\"\""},{"line_number":39,"context_line":"        return None, None"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def _get_network_recv_drops_rate(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAU3%2F%2FpEo%3D","line":38,"updated":"2014-02-25 14:20:27.000000000","message":"\u0027timetamp\u0027","commit_id":"5063f6108f365727865cf5850748d4ef83b3e2a8"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"092d06c9d257841fe31416562c240f3776f9afdd","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        return None, None"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def _get_network_recv_errors_rate(self, **kwargs):"},{"line_number":38,"context_line":"        \"\"\"Return Network current receive errors rate, timetamp.\"\"\""},{"line_number":39,"context_line":"        return None, None"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def _get_network_recv_drops_rate(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAVX%2F%2F9OU%3D","line":38,"in_reply_to":"AAAAU3%2F%2FpEo%3D","updated":"2014-02-27 06:44:53.000000000","message":"Thanks for catching. I\u0027ll fix in the later patch.","commit_id":"5063f6108f365727865cf5850748d4ef83b3e2a8"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"973fd75b87bcb5ab7a2f72549f9e7472c371e8eb","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def _get_network_send_drops_rate(self, **kwargs):"},{"line_number":58,"context_line":"        \"\"\"Return Network current send drops rate,timestamp.\"\"\""},{"line_number":59,"context_line":"        return None, None"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAU3%2F%2Fe%2FQ%3D","line":59,"updated":"2014-02-26 11:02:07.000000000","message":"I\u0027m not very convinced that this API design is good enough, since it is limited by design to returning network utilization of the host as a whole.\n\nA compute node can have multiple logical networks defined, potentially using multiple different physical NICs. IMHO any schedular utilization logic needs to take this into account and also consider which networks the VM is going to be connected to.\n\nie if you have 2 nics and 2 networks, one can be 100% utilized, while the other is 0% utilized. If you only use aggregated stats for the entire host you\u0027ll see 50% utilized and happily place the guest on the host potentially connecting it to a network which is 100% utilized.","commit_id":"5063f6108f365727865cf5850748d4ef83b3e2a8"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"092d06c9d257841fe31416562c240f3776f9afdd","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def _get_network_send_drops_rate(self, **kwargs):"},{"line_number":58,"context_line":"        \"\"\"Return Network current send drops rate,timestamp.\"\"\""},{"line_number":59,"context_line":"        return None, None"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAVX%2F%2F9CY%3D","line":59,"in_reply_to":"AAAAU3%2F%2Fe%2FQ%3D","updated":"2014-02-27 06:44:53.000000000","message":"@Daniel,\n\nYou\u0027re right about the limitation. But how can we know which physical NIC on the compute node host will be used when scheduling new VM instance, in current OpenStack environment? Who is doing that kind of load balancing jobs between multiple NICs when creating new VMs?","commit_id":"5063f6108f365727865cf5850748d4ef83b3e2a8"}],"nova/compute/monitors/psutil/network_monitor.py":[{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"51763a816df6b0858e51123f1e4a815696613a23","unresolved":false,"context_lines":[{"line_number":30,"context_line":"OPTS \u003d ["},{"line_number":31,"context_line":"    cfg.IntOpt(\u0027network_stat_update_interval\u0027,"},{"line_number":32,"context_line":"               default\u003d5,"},{"line_number":33,"context_line":"               help\u003d\u0027time difference for network stat update\u0027),"},{"line_number":34,"context_line":"]"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAASn%2F%2Fbe8%3D","line":33,"updated":"2013-09-04 20:37:45.000000000","message":"Shouldn\u0027t this be the same as how frequently we update the DB with this information?\n\nif we update the DB every minute but update this every 5 seconds we are just throwing out data","commit_id":"f702a61973da9fa716559679a9a614b6885e929a"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"fdd1f563779a9027a3c5f1db42d76dcccf1ec450","unresolved":false,"context_lines":[{"line_number":30,"context_line":"OPTS \u003d ["},{"line_number":31,"context_line":"    cfg.IntOpt(\u0027network_stat_update_interval\u0027,"},{"line_number":32,"context_line":"               default\u003d5,"},{"line_number":33,"context_line":"               help\u003d\u0027time difference for network stat update\u0027),"},{"line_number":34,"context_line":"]"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAASn%2F%2FZP0%3D","line":33,"in_reply_to":"AAAASn%2F%2Fbe8%3D","updated":"2013-09-05 09:15:18.000000000","message":"ok, i\u0027ll remove this.","commit_id":"f702a61973da9fa716559679a9a614b6885e929a"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"60ff4893d0f1211bec3a00a0cc136950d9dca793","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"# @author: Yijing Zhang, Intel Corporation."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"\"\"\""},{"line_number":18,"context_line":"Network monitor Plugin based on psutil to retrieve network information"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9xiI%3D","line":15,"updated":"2013-12-06 03:53:56.000000000","message":"ditto","commit_id":"d72a223331d521cbc5febbb9a321e38a0a158f52"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"38ac48b0e9e0617fdf9e92362e038c1c211e7e15","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"# @author: Yijing Zhang, Intel Corporation."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"\"\"\""},{"line_number":18,"context_line":"Network monitor Plugin based on psutil to retrieve network information"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9xSA%3D","line":15,"in_reply_to":"AAAATn%2F9xiI%3D","updated":"2013-12-06 05:49:16.000000000","message":"Done","commit_id":"d72a223331d521cbc5febbb9a321e38a0a158f52"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"60ff4893d0f1211bec3a00a0cc136950d9dca793","unresolved":false,"context_lines":[{"line_number":17,"context_line":"\"\"\""},{"line_number":18,"context_line":"Network monitor Plugin based on psutil to retrieve network information"},{"line_number":19,"context_line":"\"\"\""},{"line_number":20,"context_line":"import copy"},{"line_number":21,"context_line":"import psutil"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from nova.compute.monitors import network_monitor"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9xiM%3D","line":20,"updated":"2013-12-06 03:53:56.000000000","message":"the python native lib and third party lib should be put into different section","commit_id":"d72a223331d521cbc5febbb9a321e38a0a158f52"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"38ac48b0e9e0617fdf9e92362e038c1c211e7e15","unresolved":false,"context_lines":[{"line_number":17,"context_line":"\"\"\""},{"line_number":18,"context_line":"Network monitor Plugin based on psutil to retrieve network information"},{"line_number":19,"context_line":"\"\"\""},{"line_number":20,"context_line":"import copy"},{"line_number":21,"context_line":"import psutil"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from nova.compute.monitors import network_monitor"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9xR8%3D","line":20,"in_reply_to":"AAAATn%2F9xiM%3D","updated":"2013-12-06 05:49:16.000000000","message":"Done","commit_id":"d72a223331d521cbc5febbb9a321e38a0a158f52"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"e3515ec57de7ace1b2172036343d2977c180a62c","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    def _get_network_send_errors_rate(self, **kwargs):"},{"line_number":78,"context_line":"        return self.__internal_get_data(\"network.send.errors.rate\")"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def _get_network_send_drops_rate(self, **kwargs):"},{"line_number":81,"context_line":"        return self.__internal_get_data(\"network.send.drops.rate\")"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def __internal_get_data(self, name):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2BRaI%3D","line":80,"updated":"2013-11-28 02:51:26.000000000","message":"Sorry, but I don\u0027t see anywhere calling these _get_network_xxx functions. Are they of any use?","commit_id":"d72a223331d521cbc5febbb9a321e38a0a158f52"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"f3b89fceeadb78da84ce1d09580e9d1762ac7a7b","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    def _get_network_send_errors_rate(self, **kwargs):"},{"line_number":78,"context_line":"        return self.__internal_get_data(\"network.send.errors.rate\")"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def _get_network_send_drops_rate(self, **kwargs):"},{"line_number":81,"context_line":"        return self.__internal_get_data(\"network.send.drops.rate\")"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def __internal_get_data(self, name):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2BQ00%3D","line":80,"in_reply_to":"AAAATn%2F%2BRaI%3D","updated":"2013-11-28 07:44:56.000000000","message":"It\u0027s in the base class https://review.openstack.org/#/c/35760/35/nova/compute/monitors/__init__.py","commit_id":"d72a223331d521cbc5febbb9a321e38a0a158f52"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"60ff4893d0f1211bec3a00a0cc136950d9dca793","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        time_cur \u003d psutil.time.time()"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        # Psutil returns the current values for network information."},{"line_number":111,"context_line":"        # We compute the throughput for each specific time"},{"line_number":112,"context_line":"        # that users could define."},{"line_number":113,"context_line":"        time_interval \u003d float(time_cur - self._last_time)"},{"line_number":114,"context_line":"        self._process_data(netstat_cur, time_interval)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9xg4%3D","line":111,"updated":"2013-12-06 03:53:56.000000000","message":"/s/compute/calculate?","commit_id":"d72a223331d521cbc5febbb9a321e38a0a158f52"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"38ac48b0e9e0617fdf9e92362e038c1c211e7e15","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        time_cur \u003d psutil.time.time()"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        # Psutil returns the current values for network information."},{"line_number":111,"context_line":"        # We compute the throughput for each specific time"},{"line_number":112,"context_line":"        # that users could define."},{"line_number":113,"context_line":"        time_interval \u003d float(time_cur - self._last_time)"},{"line_number":114,"context_line":"        self._process_data(netstat_cur, time_interval)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9xRk%3D","line":111,"in_reply_to":"AAAATn%2F9xg4%3D","updated":"2013-12-06 05:49:16.000000000","message":"Done","commit_id":"d72a223331d521cbc5febbb9a321e38a0a158f52"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"5feb9404c6bbcafaa0c88b071116820421df1ea9","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        self.source \u003d \u0027psutil\u0027"},{"line_number":42,"context_line":"        self._netstat \u003d {}"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        #Initialize network statistics."},{"line_number":45,"context_line":"        self._netstat[\"network.recv.bytes.rate\"] \u003d 0.0"},{"line_number":46,"context_line":"        self._netstat[\"network.recv.packets.rate\"] \u003d 0.0"},{"line_number":47,"context_line":"        self._netstat[\"network.recv.errors.rate\"] \u003d 0.0"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2F%2B0A%3D","line":44,"updated":"2014-01-05 10:52:22.000000000","message":"nit: Blank space between # and Initialize","commit_id":"9e8ce335fca01e9786a0e5938b339aa6d02bc389"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"d67e6805212ba78c4871a1af6a40cfca80067843","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        self.source \u003d \u0027psutil\u0027"},{"line_number":42,"context_line":"        self._netstat \u003d {}"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        #Initialize network statistics."},{"line_number":45,"context_line":"        self._netstat[\"network.recv.bytes.rate\"] \u003d 0.0"},{"line_number":46,"context_line":"        self._netstat[\"network.recv.packets.rate\"] \u003d 0.0"},{"line_number":47,"context_line":"        self._netstat[\"network.recv.errors.rate\"] \u003d 0.0"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2F%2BDE%3D","line":44,"in_reply_to":"AAAAUH%2F%2F%2B0A%3D","updated":"2014-01-06 03:26:17.000000000","message":"Done","commit_id":"9e8ce335fca01e9786a0e5938b339aa6d02bc389"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"60160c75c5854f8f8778c6fe5d74d2209446e741","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        self._last_time \u003d psutil.time.time()"},{"line_number":55,"context_line":"        self._last_netstat \u003d psutil.network_io_counters()"},{"line_number":56,"context_line":"        self._timestamp \u003d timeutils.utcnow()"},{"line_number":57,"context_line":"        self._update_netstat()"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def _get_network_recv_bytes_rate(self, **kwargs):"},{"line_number":60,"context_line":"        return self.__internal_get_data(\"network.recv.bytes.rate\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F8tAQ%3D","line":57,"updated":"2013-12-22 16:04:17.000000000","message":"nit, looks like this is needless. in \u0027get_metrics\u0027 will try to update the netstat. but it isn\u0027t something big. you can update it when  you have to.","commit_id":"9e8ce335fca01e9786a0e5938b339aa6d02bc389"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"d67e6805212ba78c4871a1af6a40cfca80067843","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        self._last_time \u003d psutil.time.time()"},{"line_number":55,"context_line":"        self._last_netstat \u003d psutil.network_io_counters()"},{"line_number":56,"context_line":"        self._timestamp \u003d timeutils.utcnow()"},{"line_number":57,"context_line":"        self._update_netstat()"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def _get_network_recv_bytes_rate(self, **kwargs):"},{"line_number":60,"context_line":"        return self.__internal_get_data(\"network.recv.bytes.rate\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2F%2BCw%3D","line":57,"in_reply_to":"AAAATn%2F8tAQ%3D","updated":"2014-01-06 03:26:17.000000000","message":"This is meant to avoid the data returned by the for call to get_metrics contains the history network utilization data before nova-compute started.","commit_id":"9e8ce335fca01e9786a0e5938b339aa6d02bc389"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"85d3872002ce5ad75d0627c9b438a6e17b5a5633","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            - self._last_netstat.dropout) / time_interval"},{"line_number":103,"context_line":"        self._timestamp \u003d timeutils.utcnow()"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    # This function should be called everytime get_metrics() is called"},{"line_number":106,"context_line":"    def _update_netstat(self):"},{"line_number":107,"context_line":"        netstat_cur \u003d psutil.net_io_counters()"},{"line_number":108,"context_line":"        time_cur \u003d psutil.time.time()"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUX%2F%2Fkl0%3D","line":105,"updated":"2014-02-12 09:22:28.000000000","message":"We often put comments inside the function","commit_id":"9cdbf5323a6de62aa120819306ccaecde5acaa90"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"05a705d2c77f27b56115a40095d69bc79517b0bd","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            - self._last_netstat.dropout) / time_interval"},{"line_number":103,"context_line":"        self._timestamp \u003d timeutils.utcnow()"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    # This function should be called everytime get_metrics() is called"},{"line_number":106,"context_line":"    def _update_netstat(self):"},{"line_number":107,"context_line":"        netstat_cur \u003d psutil.net_io_counters()"},{"line_number":108,"context_line":"        time_cur \u003d psutil.time.time()"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUX%2F%2FdLs%3D","line":105,"in_reply_to":"AAAAUX%2F%2Fkl0%3D","updated":"2014-02-13 03:35:54.000000000","message":"Done","commit_id":"9cdbf5323a6de62aa120819306ccaecde5acaa90"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"a1df5bd1c55558255339c4342b902cb7659d7505","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        self._data[\"timestamp\"] \u003d self._timestamp"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def _update_data(self, init\u003dFalse):"},{"line_number":98,"context_line":"        # This function should be called everytime get_metrics() is called"},{"line_number":99,"context_line":"        netstat_cur \u003d psutil.net_io_counters()"},{"line_number":100,"context_line":"        time_cur \u003d timeutils.utcnow()"},{"line_number":101,"context_line":"        self._timestamp \u003d time_cur"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUX%2F%2BdQI%3D","line":98,"updated":"2014-02-21 02:17:40.000000000","message":"_update_data() of ComputeDriverCPUMonitor contains the following check code:\n\n 93         # Don\u0027t allow to call this function so frequently (\u003c\u003d 1 sec)\n 94         now \u003d timeutils.utcnow()\n 95         if self._data.get(\"timestamp\") is not None:\n 96             delta \u003d now - self._data.get(\"timestamp\")\n 97             if delta.seconds \u003c\u003d 1:\n 98                 return\n\nCan we call this method in 1 second?","commit_id":"5063f6108f365727865cf5850748d4ef83b3e2a8"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"092d06c9d257841fe31416562c240f3776f9afdd","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        self._data[\"timestamp\"] \u003d self._timestamp"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def _update_data(self, init\u003dFalse):"},{"line_number":98,"context_line":"        # This function should be called everytime get_metrics() is called"},{"line_number":99,"context_line":"        netstat_cur \u003d psutil.net_io_counters()"},{"line_number":100,"context_line":"        time_cur \u003d timeutils.utcnow()"},{"line_number":101,"context_line":"        self._timestamp \u003d time_cur"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAVX%2F%2F9EU%3D","line":98,"in_reply_to":"AAAAUX%2F%2BdQI%3D","updated":"2014-02-27 06:44:53.000000000","message":"Theoretically yes. But actually, the monitor is triggered periodically by the nova compute resource tracker, whose interval by default is 60 sec. So I don\u0027t see strong reason to limit that.","commit_id":"5063f6108f365727865cf5850748d4ef83b3e2a8"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"cc986cd5bb5a214c9e1d8bbe3ffa1308790a535a","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        self._data[\"timestamp\"] \u003d self._timestamp"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def _update_data(self, init\u003dFalse):"},{"line_number":98,"context_line":"        # This function should be called everytime get_metrics() is called"},{"line_number":99,"context_line":"        netstat_cur \u003d psutil.net_io_counters()"},{"line_number":100,"context_line":"        time_cur \u003d timeutils.utcnow()"},{"line_number":101,"context_line":"        self._timestamp \u003d time_cur"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAVX%2F%2FpUg%3D","line":98,"in_reply_to":"AAAAVX%2F%2F9EU%3D","updated":"2014-03-02 03:09:33.000000000","message":"Yes, I also think it is useless. But what Ken\u0027ichi means might be related to https://github.com/openstack/nova/blob/master/nova/compute/monitors/virt/cpu_monitor.py#L93 , I think the logic in ComputeDriverCPUMonitor can be removed.","commit_id":"5063f6108f365727865cf5850748d4ef83b3e2a8"}],"nova/tests/compute/monitors/psutil/test_network_monitor.py":[{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"84c128cecbbe1697fe2bcc8adad945bb1e6b16ce","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from nova import test"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class PsutilNetworkMonitorTestCase(test.TestCase):"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def _fake_time(self):"},{"line_number":30,"context_line":"        self._faketime +\u003d 1"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATH%2F%2FmvY%3D","line":27,"updated":"2013-10-13 10:08:19.000000000","message":"NoDBTestCase","commit_id":"cea3265e09d4bbe17bef22fe1b7919c2cfdfc047"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"f93a1c888370862948ec68887794580d90330bbf","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from nova import test"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class PsutilNetworkMonitorTestCase(test.TestCase):"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def _fake_time(self):"},{"line_number":30,"context_line":"        self._faketime +\u003d 1"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2Bb08%3D","line":27,"in_reply_to":"AAAATH%2F%2FmvY%3D","updated":"2013-11-26 05:14:15.000000000","message":"Done","commit_id":"cea3265e09d4bbe17bef22fe1b7919c2cfdfc047"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"84c128cecbbe1697fe2bcc8adad945bb1e6b16ce","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    def _fake_network_io_counters(self):"},{"line_number":34,"context_line":"        c \u003d self._fakecounters"},{"line_number":35,"context_line":"        self._fakecounters \u003d psutil._nt_net_iostat(c.bytes_sent + 1,"},{"line_number":36,"context_line":"                                                       c.bytes_recv + 2,"},{"line_number":37,"context_line":"                                                       c.packets_sent + 3,"},{"line_number":38,"context_line":"                                                       c.packets_recv + 4,"},{"line_number":39,"context_line":"                                                       c.errin + 5,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATH%2F%2FmvU%3D","line":36,"updated":"2013-10-13 10:08:19.000000000","message":"nit: alignment","commit_id":"cea3265e09d4bbe17bef22fe1b7919c2cfdfc047"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"f93a1c888370862948ec68887794580d90330bbf","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    def _fake_network_io_counters(self):"},{"line_number":34,"context_line":"        c \u003d self._fakecounters"},{"line_number":35,"context_line":"        self._fakecounters \u003d psutil._nt_net_iostat(c.bytes_sent + 1,"},{"line_number":36,"context_line":"                                                       c.bytes_recv + 2,"},{"line_number":37,"context_line":"                                                       c.packets_sent + 3,"},{"line_number":38,"context_line":"                                                       c.packets_recv + 4,"},{"line_number":39,"context_line":"                                                       c.errin + 5,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2Bb04%3D","line":36,"in_reply_to":"AAAATH%2F%2FmvU%3D","updated":"2013-11-26 05:14:15.000000000","message":"Done","commit_id":"cea3265e09d4bbe17bef22fe1b7919c2cfdfc047"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"60ff4893d0f1211bec3a00a0cc136950d9dca793","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        #After initialization, verify if fake_network_io_counters"},{"line_number":79,"context_line":"        # would return \u0027bytes_sent\u0027 + 1, \u0027bytes_recv\u0027 + 2,etc."},{"line_number":80,"context_line":"        self.assertEqual(metrics[\"network.recv.bytes.rate\"], 2.0)"},{"line_number":81,"context_line":"        self.assertEqual(metrics[\"network.recv.packets.rate\"], 4.0)"},{"line_number":82,"context_line":"        self.assertEqual(metrics[\"network.recv.errors.rate\"], 5.0)"},{"line_number":83,"context_line":"        self.assertEqual(metrics[\"network.recv.drops.rate\"], 7.0)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9xgc%3D","line":80,"updated":"2013-12-06 03:53:56.000000000","message":"nit: the assertEqual \u0027s parameter order is (expected, observed)","commit_id":"d72a223331d521cbc5febbb9a321e38a0a158f52"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"38ac48b0e9e0617fdf9e92362e038c1c211e7e15","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        #After initialization, verify if fake_network_io_counters"},{"line_number":79,"context_line":"        # would return \u0027bytes_sent\u0027 + 1, \u0027bytes_recv\u0027 + 2,etc."},{"line_number":80,"context_line":"        self.assertEqual(metrics[\"network.recv.bytes.rate\"], 2.0)"},{"line_number":81,"context_line":"        self.assertEqual(metrics[\"network.recv.packets.rate\"], 4.0)"},{"line_number":82,"context_line":"        self.assertEqual(metrics[\"network.recv.errors.rate\"], 5.0)"},{"line_number":83,"context_line":"        self.assertEqual(metrics[\"network.recv.drops.rate\"], 7.0)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9xRU%3D","line":80,"in_reply_to":"AAAATn%2F9xgc%3D","updated":"2013-12-06 05:49:16.000000000","message":"Done","commit_id":"d72a223331d521cbc5febbb9a321e38a0a158f52"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"5feb9404c6bbcafaa0c88b071116820421df1ea9","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright 2013 Intel Corporation"},{"line_number":4,"context_line":"# All Rights Reserved."}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2F%2B0g%3D","line":1,"updated":"2014-01-05 10:52:22.000000000","message":"not needed","commit_id":"9e8ce335fca01e9786a0e5938b339aa6d02bc389"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"d67e6805212ba78c4871a1af6a40cfca80067843","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright 2013 Intel Corporation"},{"line_number":4,"context_line":"# All Rights Reserved."}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2F%2BCY%3D","line":1,"in_reply_to":"AAAAUH%2F%2F%2B0g%3D","updated":"2014-01-06 03:26:17.000000000","message":"Done","commit_id":"9e8ce335fca01e9786a0e5938b339aa6d02bc389"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"5feb9404c6bbcafaa0c88b071116820421df1ea9","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright 2013 Intel Corporation"},{"line_number":4,"context_line":"# All Rights Reserved."},{"line_number":5,"context_line":"#"},{"line_number":6,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2F%2Bz8%3D","line":3,"updated":"2014-01-05 10:52:22.000000000","message":"nit: 2014","commit_id":"9e8ce335fca01e9786a0e5938b339aa6d02bc389"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"d67e6805212ba78c4871a1af6a40cfca80067843","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright 2013 Intel Corporation"},{"line_number":4,"context_line":"# All Rights Reserved."},{"line_number":5,"context_line":"#"},{"line_number":6,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2F%2BCU%3D","line":3,"in_reply_to":"AAAAUH%2F%2F%2Bz8%3D","updated":"2014-01-06 03:26:17.000000000","message":"Done","commit_id":"9e8ce335fca01e9786a0e5938b339aa6d02bc389"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"5feb9404c6bbcafaa0c88b071116820421df1ea9","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        return self._fakecounters"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def set_fake_psutil(self):"},{"line_number":46,"context_line":"        self.stubs.Set(psutil, \u0027network_io_counters\u0027,"},{"line_number":47,"context_line":"                      self._fake_network_io_counters)"},{"line_number":48,"context_line":"        self.stubs.Set(psutil.time, \u0027time\u0027, self._fake_time)"},{"line_number":49,"context_line":"        self._faketime \u003d 0"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2F%2Bz4%3D","line":46,"updated":"2014-01-05 10:52:22.000000000","message":"It is suggested that all new test cases should use mock but not stub.\n\nhttps://wiki.openstack.org/wiki/ReviewChecklist Search \"Test Case implementation (Mock vs. Mox) \"","commit_id":"9e8ce335fca01e9786a0e5938b339aa6d02bc389"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"d67e6805212ba78c4871a1af6a40cfca80067843","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        return self._fakecounters"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def set_fake_psutil(self):"},{"line_number":46,"context_line":"        self.stubs.Set(psutil, \u0027network_io_counters\u0027,"},{"line_number":47,"context_line":"                      self._fake_network_io_counters)"},{"line_number":48,"context_line":"        self.stubs.Set(psutil.time, \u0027time\u0027, self._fake_time)"},{"line_number":49,"context_line":"        self._faketime \u003d 0"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2F%2BCg%3D","line":46,"in_reply_to":"AAAAUH%2F%2F%2Bz4%3D","updated":"2014-01-06 03:26:17.000000000","message":"Done","commit_id":"9e8ce335fca01e9786a0e5938b339aa6d02bc389"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"1b1c734225e0ba6b070715154e5201b72aa5d657","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        return self._fakecounters"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def set_fake_psutil(self):"},{"line_number":45,"context_line":"        self.useFixture(fixtures.MonkeyPatch(\u0027psutil.network_io_counters\u0027,"},{"line_number":46,"context_line":"                                             self._fake_network_io_counters))"},{"line_number":47,"context_line":"        self.useFixture(fixtures.MonkeyPatch(\u0027psutil.time.time\u0027,"},{"line_number":48,"context_line":"                                             self._fake_time))"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2F9%2FY%3D","line":45,"updated":"2014-01-06 03:36:08.000000000","message":"Can you pls use mock instead? You can refer to https://github.com/openstack/nova/blob/master/nova/tests/virt/vmwareapi/test_vmwareapi_volumeops.py#L59","commit_id":"dc7363e45b797897ffce1373793b2f8405553cd0"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"0ec688278282d326c0ee70f1f392acba4be725c9","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        return self._fakecounters"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def set_fake_psutil(self):"},{"line_number":45,"context_line":"        self.useFixture(fixtures.MonkeyPatch(\u0027psutil.network_io_counters\u0027,"},{"line_number":46,"context_line":"                                             self._fake_network_io_counters))"},{"line_number":47,"context_line":"        self.useFixture(fixtures.MonkeyPatch(\u0027psutil.time.time\u0027,"},{"line_number":48,"context_line":"                                             self._fake_time))"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2F9n0%3D","line":45,"in_reply_to":"AAAAUH%2F%2F9%2FY%3D","updated":"2014-01-06 06:15:18.000000000","message":"I saw fixtures.MonkeyPatch is used several other places over nova unit tests. However, I\u0027ll change it to openstack.common.fixtures.mockpatch anyway.","commit_id":"dc7363e45b797897ffce1373793b2f8405553cd0"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"1b1c734225e0ba6b070715154e5201b72aa5d657","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            self.assertIn(metric[\u0027name\u0027], names)"},{"line_number":76,"context_line":"            metrics[metric[\u0027name\u0027]] \u003d metric[\u0027value\u0027]"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        #After initialization, verify if fake_network_io_counters"},{"line_number":79,"context_line":"        # would return \u0027bytes_sent\u0027 + 1, \u0027bytes_recv\u0027 + 2,etc."},{"line_number":80,"context_line":"        self.assertEqual(2.0, metrics[\"network.recv.bytes.rate\"])"},{"line_number":81,"context_line":"        self.assertEqual(4.0, metrics[\"network.recv.packets.rate\"])"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2F%2BAM%3D","line":78,"updated":"2014-01-06 03:36:08.000000000","message":"nit: # After","commit_id":"dc7363e45b797897ffce1373793b2f8405553cd0"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"0ec688278282d326c0ee70f1f392acba4be725c9","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            self.assertIn(metric[\u0027name\u0027], names)"},{"line_number":76,"context_line":"            metrics[metric[\u0027name\u0027]] \u003d metric[\u0027value\u0027]"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        #After initialization, verify if fake_network_io_counters"},{"line_number":79,"context_line":"        # would return \u0027bytes_sent\u0027 + 1, \u0027bytes_recv\u0027 + 2,etc."},{"line_number":80,"context_line":"        self.assertEqual(2.0, metrics[\"network.recv.bytes.rate\"])"},{"line_number":81,"context_line":"        self.assertEqual(4.0, metrics[\"network.recv.packets.rate\"])"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2F9nw%3D","line":78,"in_reply_to":"AAAAUH%2F%2F%2BAM%3D","updated":"2014-01-06 06:15:18.000000000","message":"Done","commit_id":"dc7363e45b797897ffce1373793b2f8405553cd0"}],"requirements.txt":[{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"e3515ec57de7ace1b2172036343d2977c180a62c","unresolved":false,"context_lines":[{"line_number":29,"context_line":"stevedore\u003e\u003d0.10"},{"line_number":30,"context_line":"websockify\u003e\u003d0.5.1,\u003c0.6"},{"line_number":31,"context_line":"oslo.config\u003e\u003d1.2.0"},{"line_number":32,"context_line":"psutil\u003e\u003d0.6.1,\u003c1.0"}],"source_content_type":"text/plain","patch_set":6,"id":"AAAATn%2F%2BRcc%3D","line":32,"updated":"2013-11-28 02:51:26.000000000","message":"Just curious, why version under 1.0?","commit_id":"d72a223331d521cbc5febbb9a321e38a0a158f52"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"fb64f1278efd2b4085fa17973edcfef04ce63a8e","unresolved":false,"context_lines":[{"line_number":29,"context_line":"stevedore\u003e\u003d0.10"},{"line_number":30,"context_line":"websockify\u003e\u003d0.5.1,\u003c0.6"},{"line_number":31,"context_line":"oslo.config\u003e\u003d1.2.0"},{"line_number":32,"context_line":"psutil\u003e\u003d0.6.1,\u003c1.0"}],"source_content_type":"text/plain","patch_set":6,"id":"AAAATn%2F%2BQyc%3D","line":32,"in_reply_to":"AAAATn%2F%2BQ0w%3D","updated":"2013-11-28 08:00:35.000000000","message":"Well, I mean why 1.0. Thanks for the pointer though.\n\nAnyway, I\u0027ve already had my answer. Seems psutil has incompatible API change from psutil.network_io_counters() to psutil.net_io_counters() in 1.0 release.\n\nhttp://psutil.googlecode.com/hg/HISTORY","commit_id":"d72a223331d521cbc5febbb9a321e38a0a158f52"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"f3b89fceeadb78da84ce1d09580e9d1762ac7a7b","unresolved":false,"context_lines":[{"line_number":29,"context_line":"stevedore\u003e\u003d0.10"},{"line_number":30,"context_line":"websockify\u003e\u003d0.5.1,\u003c0.6"},{"line_number":31,"context_line":"oslo.config\u003e\u003d1.2.0"},{"line_number":32,"context_line":"psutil\u003e\u003d0.6.1,\u003c1.0"}],"source_content_type":"text/plain","patch_set":6,"id":"AAAATn%2F%2BQ0w%3D","line":32,"in_reply_to":"AAAATn%2F%2BRcc%3D","updated":"2013-11-28 07:44:56.000000000","message":"it\u0027s from openstack global requirements project. I think it\u0027s from there, https://wiki.openstack.org/wiki/Requirements.","commit_id":"d72a223331d521cbc5febbb9a321e38a0a158f52"}]}
