)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"1e91526e7b9a109619b7ca646b4c20af758a2f79","unresolved":false,"context_lines":[{"line_number":26,"context_line":"guarantee that the create will work, but does catch the"},{"line_number":27,"context_line":"majority of cases."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Sneaks up on bug: 1172808"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Change-Id: Iaaee059a6746fad68049712f94b2f8cfea6ab8dc"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAATH%2F%2FeSA%3D","line":29,"updated":"2013-10-15 18:37:56.000000000","message":"I don\u0027t like \"Sneaks up on\"  Nobody will ever grep for that.  \"Refs\" is more standard.","commit_id":"da9b6f32eca54923930ad98ebdfae298ad6b70ac"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"0c2bb081a42c504675347bbf32eeebcdbdee8cf5","unresolved":false,"context_lines":[{"line_number":26,"context_line":"guarantee that the create will work, but does catch the"},{"line_number":27,"context_line":"majority of cases."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Sneaks up on bug: 1172808"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Change-Id: Iaaee059a6746fad68049712f94b2f8cfea6ab8dc"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAATH%2F%2FbUs%3D","line":29,"in_reply_to":"AAAATH%2F%2FeSA%3D","updated":"2013-10-16 11:10:13.000000000","message":"Done","commit_id":"da9b6f32eca54923930ad98ebdfae298ad6b70ac"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"cf09eac28832b22e6b34e2d297b9018ea9f212a4","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Unless ports are passed into Nova it will create ports on the"},{"line_number":10,"context_line":"requested networks as part of the network allocation in"},{"line_number":11,"context_line":"the compute manager.  However if the user exceeds there"},{"line_number":12,"context_line":"port quota the instance will end up in an Error state, having"},{"line_number":13,"context_line":"first been re-scheduled a number of times."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAATH%2F%2FbPk%3D","line":11,"updated":"2013-10-16 11:20:32.000000000","message":"nit: extra space","commit_id":"7f1f8e22ede0cfb8d3e86108d9d37e96deadd89b"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"747f2540023edd39367ed55d72a4cf94ebca86fd","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Unless ports are passed into Nova it will create ports on the"},{"line_number":10,"context_line":"requested networks as part of the network allocation in"},{"line_number":11,"context_line":"the compute manager.  However if the user exceeds there"},{"line_number":12,"context_line":"port quota the instance will end up in an Error state, having"},{"line_number":13,"context_line":"first been re-scheduled a number of times."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAATH%2F%2FbAo%3D","line":11,"updated":"2013-10-16 12:48:01.000000000","message":"there \u003d\u003e their","commit_id":"7f1f8e22ede0cfb8d3e86108d9d37e96deadd89b"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"4e9688e4182c44389b4759948b5b87292c3093c9","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Unless ports are passed into Nova it will create ports on the"},{"line_number":10,"context_line":"requested networks as part of the network allocation in"},{"line_number":11,"context_line":"the compute manager.  However if the user exceeds there"},{"line_number":12,"context_line":"port quota the instance will end up in an Error state, having"},{"line_number":13,"context_line":"first been re-scheduled a number of times."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAATH%2F%2FYik%3D","line":11,"in_reply_to":"AAAATH%2F%2FbAo%3D","updated":"2013-10-16 21:01:26.000000000","message":"Done","commit_id":"7f1f8e22ede0cfb8d3e86108d9d37e96deadd89b"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"747f2540023edd39367ed55d72a4cf94ebca86fd","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"A full fix would include reserving or creating the ports at"},{"line_number":20,"context_line":"this stage, but there is no reservation mechanism in the"},{"line_number":21,"context_line":"Neutron API, and port creation depends in some cases"},{"line_number":22,"context_line":"on mac addresses only available on the compute manager."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Instead this change just validates the quota and adjusts the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAATH%2F%2FbAA%3D","line":21,"updated":"2013-10-16 12:48:01.000000000","message":"i do not understand the reference to the reservation. at the moment neutron does not enable on to update a mac address. would this be an option if it could?","commit_id":"7f1f8e22ede0cfb8d3e86108d9d37e96deadd89b"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"4e9688e4182c44389b4759948b5b87292c3093c9","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"A full fix would include reserving or creating the ports at"},{"line_number":20,"context_line":"this stage, but there is no reservation mechanism in the"},{"line_number":21,"context_line":"Neutron API, and port creation depends in some cases"},{"line_number":22,"context_line":"on mac addresses only available on the compute manager."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Instead this change just validates the quota and adjusts the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAATH%2F%2FYoI%3D","line":21,"in_reply_to":"AAAATH%2F%2FbAA%3D","updated":"2013-10-16 21:01:26.000000000","message":"Maybe it would - but any change like that seems a long way off.  This bug has been open all the way through H hoping someone from the Neutron team would work out if there was a neater solution, but none has been offered.  In the mean time we get VMs going to error for something that can be validated at least 90% of the time in the API layer - hence this approach.\n\nIn the V3 APi if we really want to have clean separation between Nuetroun and Nova we should stop Nova creating ports at all, and insist that they are created in Neutron and passed into Nova.b","commit_id":"7f1f8e22ede0cfb8d3e86108d9d37e96deadd89b"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5bdfe1f0ce3221854132497b6a626da1af63e6f1","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Unless ports are passed into Nova it will create ports on the"},{"line_number":10,"context_line":"requested networks as part of the network allocation in"},{"line_number":11,"context_line":"the compute manager. However if the user exceeds thier"},{"line_number":12,"context_line":"port quota the instance will end up in an Error state, having"},{"line_number":13,"context_line":"first been re-scheduled a number of times."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAATX%2F%2F%2BXU%3D","line":11,"updated":"2013-10-23 13:13:54.000000000","message":"thier \u003d\u003e their","commit_id":"e5e77e7d811df6aae744f08c4e2d1d7934a8e387"}],"nova/compute/api.py":[{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"49e8541369dbcb0f284ef8853f6e3a652b25a6de","unresolved":false,"context_lines":[{"line_number":324,"context_line":"        try:"},{"line_number":325,"context_line":"            reservations \u003d QUOTAS.reserve(context, instances\u003dmax_count,"},{"line_number":326,"context_line":"                                          cores\u003dreq_cores, ram\u003dreq_ram)"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"        except exception.OverQuota as exc:"},{"line_number":329,"context_line":"            # OK, we exceeded quota; let\u0027s figure out why..."},{"line_number":330,"context_line":"            quotas \u003d exc.kwargs[\u0027quotas\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATH%2F%2F7L8%3D","line":327,"updated":"2013-10-08 00:03:37.000000000","message":"femtonit: I don\u0027t think this newline change should be part of this patch.\n\n(no need to change unless you have to respin anyway)","commit_id":"da9b6f32eca54923930ad98ebdfae298ad6b70ac"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"0c2bb081a42c504675347bbf32eeebcdbdee8cf5","unresolved":false,"context_lines":[{"line_number":324,"context_line":"        try:"},{"line_number":325,"context_line":"            reservations \u003d QUOTAS.reserve(context, instances\u003dmax_count,"},{"line_number":326,"context_line":"                                          cores\u003dreq_cores, ram\u003dreq_ram)"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"        except exception.OverQuota as exc:"},{"line_number":329,"context_line":"            # OK, we exceeded quota; let\u0027s figure out why..."},{"line_number":330,"context_line":"            quotas \u003d exc.kwargs[\u0027quotas\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATH%2F%2FbVk%3D","line":327,"in_reply_to":"AAAATH%2F%2F7L8%3D","updated":"2013-10-16 11:10:13.000000000","message":"Done","commit_id":"da9b6f32eca54923930ad98ebdfae298ad6b70ac"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"747f2540023edd39367ed55d72a4cf94ebca86fd","unresolved":false,"context_lines":[{"line_number":639,"context_line":"                                         requested_networks, config_drive,"},{"line_number":640,"context_line":"                                         block_device_mapping,"},{"line_number":641,"context_line":"                                         auto_disk_config, reservation_id,"},{"line_number":642,"context_line":"                                         max_count):"},{"line_number":643,"context_line":"        \"\"\"Verify all the input parameters regardless of the provisioning"},{"line_number":644,"context_line":"        strategy being performed."},{"line_number":645,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2Fa8M%3D","line":642,"updated":"2013-10-16 12:48:01.000000000","message":"maybe this should be max_ports. max_count is very general.","commit_id":"7f1f8e22ede0cfb8d3e86108d9d37e96deadd89b"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"4e9688e4182c44389b4759948b5b87292c3093c9","unresolved":false,"context_lines":[{"line_number":639,"context_line":"                                         requested_networks, config_drive,"},{"line_number":640,"context_line":"                                         block_device_mapping,"},{"line_number":641,"context_line":"                                         auto_disk_config, reservation_id,"},{"line_number":642,"context_line":"                                         max_count):"},{"line_number":643,"context_line":"        \"\"\"Verify all the input parameters regardless of the provisioning"},{"line_number":644,"context_line":"        strategy being performed."},{"line_number":645,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2FYrc%3D","line":642,"in_reply_to":"AAAATH%2F%2Fa8M%3D","updated":"2013-10-16 21:01:26.000000000","message":"Its the existing \"max_count\" value from _create_instance (which calls this) - and its the maximum number of instances requested by the user, not ports.  An instance may need more than one port","commit_id":"7f1f8e22ede0cfb8d3e86108d9d37e96deadd89b"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5bdfe1f0ce3221854132497b6a626da1af63e6f1","unresolved":false,"context_lines":[{"line_number":868,"context_line":"        elif max_net_count \u003c max_count:"},{"line_number":869,"context_line":"            LOG.debug(_(\"max count reduced from %(max_count)d to \""},{"line_number":870,"context_line":"                        \"%(max_net_count)d due to network port quota\"),"},{"line_number":871,"context_line":"                       max_count\u003dmax_count, max_net_count\u003dmax_net_count)"},{"line_number":872,"context_line":"            max_count \u003d max_net_count"},{"line_number":873,"context_line":""},{"line_number":874,"context_line":"        block_device_mapping \u003d self._check_and_transform_bdm("}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATX%2F%2F%2BWw%3D","line":871,"updated":"2013-10-23 13:13:54.000000000","message":"please use a dict here:\n{\u0027max_count\u0027: max_count, \u0027max_net_count\u0027: max_net_count}","commit_id":"e5e77e7d811df6aae744f08c4e2d1d7934a8e387"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"b4ca1c35889142357dc62fa7112add1f00bf449d","unresolved":false,"context_lines":[{"line_number":871,"context_line":"                        \"%(max_net_count)d due to network port quota\"),"},{"line_number":872,"context_line":"                       {\u0027max_count\u0027: max_count,"},{"line_number":873,"context_line":"                        \u0027max_net_count\u0027: max_net_count})"},{"line_number":874,"context_line":"            max_count \u003d max_net_count"},{"line_number":875,"context_line":""},{"line_number":876,"context_line":"        block_device_mapping \u003d self._check_and_transform_bdm("},{"line_number":877,"context_line":"            base_options, min_count, max_count,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FYBc%3D","line":874,"updated":"2013-11-07 22:33:03.000000000","message":"Reading this I feared that it would be  faulty: if the user has requested two networks, then max_count (instances) should be compared to 1/2 (max_net_count (ports))....\n\nbut then I saw the rest of the code. So - perhaps a small comment above the assignment? (Applies in a couple of places in this file)","commit_id":"2f423948ff315caf0bd949e2f33e70382fb4a7ad"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"8f6ba4b9356a27a07bbe4417b411b8dcafa2cf3f","unresolved":false,"context_lines":[{"line_number":452,"context_line":"        same the network block"},{"line_number":453,"context_line":"        \"\"\""},{"line_number":454,"context_line":"        return self.network_api.validate_networks(context, requested_networks,"},{"line_number":455,"context_line":"                                                  max_count)"},{"line_number":456,"context_line":""},{"line_number":457,"context_line":"    @staticmethod"},{"line_number":458,"context_line":"    def _handle_kernel_and_ramdisk(context, kernel_id, ramdisk_id, image):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2BWRY%3D","line":455,"updated":"2013-11-27 03:25:48.000000000","message":"This isn\u0027t compatible with nova-network?","commit_id":"bd3ebfc33e6eaadbc8135578bb55329da7c41569"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"95dd93279ac9ef8ae531793a404f9b3d6226597b","unresolved":false,"context_lines":[{"line_number":452,"context_line":"        same the network block"},{"line_number":453,"context_line":"        \"\"\""},{"line_number":454,"context_line":"        return self.network_api.validate_networks(context, requested_networks,"},{"line_number":455,"context_line":"                                                  max_count)"},{"line_number":456,"context_line":""},{"line_number":457,"context_line":"    @staticmethod"},{"line_number":458,"context_line":"    def _handle_kernel_and_ramdisk(context, kernel_id, ramdisk_id, image):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2BVVM%3D","line":455,"in_reply_to":"AAAATn%2F%2BWRY%3D","updated":"2013-11-27 12:07:56.000000000","message":"Yes it is - nova-network has been modified in this patch to return unmodified the max_count parameter (since it doesn\u0027t have any network quotas that need to be validated)","commit_id":"bd3ebfc33e6eaadbc8135578bb55329da7c41569"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"8f6ba4b9356a27a07bbe4417b411b8dcafa2cf3f","unresolved":false,"context_lines":[{"line_number":890,"context_line":"        # user adjusted for any network quota constraints, including"},{"line_number":891,"context_line":"        # considertaion of connections to each requested network"},{"line_number":892,"context_line":"        if max_net_count \u003d\u003d 0:"},{"line_number":893,"context_line":"            raise exception.PortLimitExceeded()"},{"line_number":894,"context_line":"        elif max_net_count \u003c max_count:"},{"line_number":895,"context_line":"            LOG.debug(_(\"max count reduced from %(max_count)d to \""},{"line_number":896,"context_line":"                        \"%(max_net_count)d due to network port quota\"),"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2BWSE%3D","line":893,"updated":"2013-11-27 03:25:48.000000000","message":"This need be catched at api layer explicitly.","commit_id":"bd3ebfc33e6eaadbc8135578bb55329da7c41569"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"95dd93279ac9ef8ae531793a404f9b3d6226597b","unresolved":false,"context_lines":[{"line_number":890,"context_line":"        # user adjusted for any network quota constraints, including"},{"line_number":891,"context_line":"        # considertaion of connections to each requested network"},{"line_number":892,"context_line":"        if max_net_count \u003d\u003d 0:"},{"line_number":893,"context_line":"            raise exception.PortLimitExceeded()"},{"line_number":894,"context_line":"        elif max_net_count \u003c max_count:"},{"line_number":895,"context_line":"            LOG.debug(_(\"max count reduced from %(max_count)d to \""},{"line_number":896,"context_line":"                        \"%(max_net_count)d due to network port quota\"),"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2BUow%3D","line":893,"in_reply_to":"AAAATn%2F%2BWSE%3D","updated":"2013-11-27 12:07:56.000000000","message":"Done","commit_id":"bd3ebfc33e6eaadbc8135578bb55329da7c41569"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e3bb8e4ce143ac3732c9eccec46c7d90637fdb7e","unresolved":false,"context_lines":[{"line_number":897,"context_line":""},{"line_number":898,"context_line":"        # max_net_count is the maximum number of instances requested by the"},{"line_number":899,"context_line":"        # user adjusted for any network quota constraints, including"},{"line_number":900,"context_line":"        # considertaion of connections to each requested network"},{"line_number":901,"context_line":"        if max_net_count \u003d\u003d 0:"},{"line_number":902,"context_line":"            raise exception.PortLimitExceeded()"},{"line_number":903,"context_line":"        elif max_net_count \u003c max_count:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F98O0%3D","line":900,"updated":"2013-12-04 08:03:05.000000000","message":"considertaion \u003d\u003e consideration","commit_id":"1d9a0a620d78ab54f7a3da61b803a97cdbdd01f2"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e3bb8e4ce143ac3732c9eccec46c7d90637fdb7e","unresolved":false,"context_lines":[{"line_number":898,"context_line":"        # max_net_count is the maximum number of instances requested by the"},{"line_number":899,"context_line":"        # user adjusted for any network quota constraints, including"},{"line_number":900,"context_line":"        # considertaion of connections to each requested network"},{"line_number":901,"context_line":"        if max_net_count \u003d\u003d 0:"},{"line_number":902,"context_line":"            raise exception.PortLimitExceeded()"},{"line_number":903,"context_line":"        elif max_net_count \u003c max_count:"},{"line_number":904,"context_line":"            LOG.debug(_(\"max count reduced from %(max_count)d to \""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F98M8%3D","line":901,"updated":"2013-12-04 08:03:05.000000000","message":"there are other cases that are not dealt with here:\nsay we want to deploy 5 instance and each requires 3 ports. Say we have 18 ports free. This number will not be zero.","commit_id":"1d9a0a620d78ab54f7a3da61b803a97cdbdd01f2"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"834503bb0a3150680d995091bbaf26ff73b31d68","unresolved":false,"context_lines":[{"line_number":898,"context_line":"        # max_net_count is the maximum number of instances requested by the"},{"line_number":899,"context_line":"        # user adjusted for any network quota constraints, including"},{"line_number":900,"context_line":"        # considertaion of connections to each requested network"},{"line_number":901,"context_line":"        if max_net_count \u003d\u003d 0:"},{"line_number":902,"context_line":"            raise exception.PortLimitExceeded()"},{"line_number":903,"context_line":"        elif max_net_count \u003c max_count:"},{"line_number":904,"context_line":"            LOG.debug(_(\"max count reduced from %(max_count)d to \""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F9zQU%3D","line":901,"in_reply_to":"AAAATn%2F93X8%3D","updated":"2013-12-05 19:13:41.000000000","message":"Rob - you need to go back to maths school ;-)\n(5*3\u003d15)","commit_id":"1d9a0a620d78ab54f7a3da61b803a97cdbdd01f2"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"834503bb0a3150680d995091bbaf26ff73b31d68","unresolved":false,"context_lines":[{"line_number":898,"context_line":"        # max_net_count is the maximum number of instances requested by the"},{"line_number":899,"context_line":"        # user adjusted for any network quota constraints, including"},{"line_number":900,"context_line":"        # considertaion of connections to each requested network"},{"line_number":901,"context_line":"        if max_net_count \u003d\u003d 0:"},{"line_number":902,"context_line":"            raise exception.PortLimitExceeded()"},{"line_number":903,"context_line":"        elif max_net_count \u003c max_count:"},{"line_number":904,"context_line":"            LOG.debug(_(\"max count reduced from %(max_count)d to \""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F9zQk%3D","line":901,"in_reply_to":"AAAATn%2F98M8%3D","updated":"2013-12-05 19:13:41.000000000","message":"Right - it will be 18//15 \u003d 5   \ni.e the maximum # of instanced the network quota allows is 5.  If that\u0027s somewhere between min_count and max_count then the number will be adjusted\n\nIt will only be zero if you don;t have enough ports for any instances.","commit_id":"1d9a0a620d78ab54f7a3da61b803a97cdbdd01f2"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"c53dbb17efbac7dc81bc737d094d531c828fc246","unresolved":false,"context_lines":[{"line_number":898,"context_line":"        # max_net_count is the maximum number of instances requested by the"},{"line_number":899,"context_line":"        # user adjusted for any network quota constraints, including"},{"line_number":900,"context_line":"        # considertaion of connections to each requested network"},{"line_number":901,"context_line":"        if max_net_count \u003d\u003d 0:"},{"line_number":902,"context_line":"            raise exception.PortLimitExceeded()"},{"line_number":903,"context_line":"        elif max_net_count \u003c max_count:"},{"line_number":904,"context_line":"            LOG.debug(_(\"max count reduced from %(max_count)d to \""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F93X8%3D","line":901,"in_reply_to":"AAAATn%2F98M8%3D","updated":"2013-12-05 03:32:05.000000000","message":"Yes it will, as \n\n\u003e\u003e\u003e 18//24\n0","commit_id":"1d9a0a620d78ab54f7a3da61b803a97cdbdd01f2"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"28d34372ff197d3e54c245e646b4991ca233c96e","unresolved":false,"context_lines":[{"line_number":898,"context_line":"        # max_net_count is the maximum number of instances requested by the"},{"line_number":899,"context_line":"        # user adjusted for any network quota constraints, including"},{"line_number":900,"context_line":"        # considertaion of connections to each requested network"},{"line_number":901,"context_line":"        if max_net_count \u003d\u003d 0:"},{"line_number":902,"context_line":"            raise exception.PortLimitExceeded()"},{"line_number":903,"context_line":"        elif max_net_count \u003c max_count:"},{"line_number":904,"context_line":"            LOG.debug(_(\"max count reduced from %(max_count)d to \""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F9t3s%3D","line":901,"in_reply_to":"AAAATn%2F9zQk%3D","updated":"2013-12-06 19:36:05.000000000","message":"ok, thanks - this is what was not clear to me - the fact that you chnage the max_count","commit_id":"1d9a0a620d78ab54f7a3da61b803a97cdbdd01f2"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"28d34372ff197d3e54c245e646b4991ca233c96e","unresolved":false,"context_lines":[{"line_number":901,"context_line":"        if max_net_count \u003d\u003d 0:"},{"line_number":902,"context_line":"            raise exception.PortLimitExceeded()"},{"line_number":903,"context_line":"        elif max_net_count \u003c max_count:"},{"line_number":904,"context_line":"            LOG.debug(_(\"max count reduced from %(max_count)d to \""},{"line_number":905,"context_line":"                        \"%(max_net_count)d due to network port quota\"),"},{"line_number":906,"context_line":"                       {\u0027max_count\u0027: max_count,"},{"line_number":907,"context_line":"                        \u0027max_net_count\u0027: max_net_count})"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F9t3c%3D","line":904,"updated":"2013-12-06 19:36:05.000000000","message":"i think that info/warning here may be better - but this is not a blocking issues.\nconcern here is that the user wanted to run X and they only had Y run.\nwould it not be better to fail with an exception and say - you can only run Y instances?","commit_id":"1d9a0a620d78ab54f7a3da61b803a97cdbdd01f2"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"e7450d29ba62d03bcd7d9a729249fd530c53ec9f","unresolved":false,"context_lines":[{"line_number":901,"context_line":"        if max_net_count \u003d\u003d 0:"},{"line_number":902,"context_line":"            raise exception.PortLimitExceeded()"},{"line_number":903,"context_line":"        elif max_net_count \u003c max_count:"},{"line_number":904,"context_line":"            LOG.debug(_(\"max count reduced from %(max_count)d to \""},{"line_number":905,"context_line":"                        \"%(max_net_count)d due to network port quota\"),"},{"line_number":906,"context_line":"                       {\u0027max_count\u0027: max_count,"},{"line_number":907,"context_line":"                        \u0027max_net_count\u0027: max_net_count})"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F9trc%3D","line":904,"in_reply_to":"AAAATn%2F9t3c%3D","updated":"2013-12-06 20:13:43.000000000","message":"I\u0027m not sure about a warning, as log as we stay between the min_count and max_count specified by the user its normal behaviour","commit_id":"1d9a0a620d78ab54f7a3da61b803a97cdbdd01f2"}],"nova/network/api.py":[{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"49e8541369dbcb0f284ef8853f6e3a652b25a6de","unresolved":false,"context_lines":[{"line_number":419,"context_line":""},{"line_number":420,"context_line":"        self.network_rpcapi.validate_networks(context,"},{"line_number":421,"context_line":"                                              requested_networks)"},{"line_number":422,"context_line":"        # Neutron validtaion checks and returns  how many of max_count"},{"line_number":423,"context_line":"        # instances can be supported by the quota.  For Nova network"},{"line_number":424,"context_line":"        # this is part of the later quota check"},{"line_number":425,"context_line":"        return max_count"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATH%2F%2F7L4%3D","line":422,"updated":"2013-10-08 00:03:37.000000000","message":"nit: typo -- validation  (no need to change unless you have to respin anyway)","commit_id":"da9b6f32eca54923930ad98ebdfae298ad6b70ac"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"0c2bb081a42c504675347bbf32eeebcdbdee8cf5","unresolved":false,"context_lines":[{"line_number":419,"context_line":""},{"line_number":420,"context_line":"        self.network_rpcapi.validate_networks(context,"},{"line_number":421,"context_line":"                                              requested_networks)"},{"line_number":422,"context_line":"        # Neutron validtaion checks and returns  how many of max_count"},{"line_number":423,"context_line":"        # instances can be supported by the quota.  For Nova network"},{"line_number":424,"context_line":"        # this is part of the later quota check"},{"line_number":425,"context_line":"        return max_count"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATH%2F%2FbVc%3D","line":422,"in_reply_to":"AAAATH%2F%2F7L4%3D","updated":"2013-10-16 11:10:13.000000000","message":"Done","commit_id":"da9b6f32eca54923930ad98ebdfae298ad6b70ac"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"b4ca1c35889142357dc62fa7112add1f00bf449d","unresolved":false,"context_lines":[{"line_number":410,"context_line":"        the server"},{"line_number":411,"context_line":"        \"\"\""},{"line_number":412,"context_line":"        if not requested_networks:"},{"line_number":413,"context_line":"            return max_count"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"        self.network_rpcapi.validate_networks(context,"},{"line_number":416,"context_line":"                                              requested_networks)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FYBU%3D","line":413,"updated":"2013-11-07 22:33:03.000000000","message":"This reads like it has a dimensional error - networks * max_count...\n\nI think the following would avoid that:\n - change max_count to num_instances\n - add to the docstring:\n\n :return: The number of instances that can be successfully allocated with the requested network configuration\n\nThanks!","commit_id":"2f423948ff315caf0bd949e2f33e70382fb4a7ad"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"b4ca1c35889142357dc62fa7112add1f00bf449d","unresolved":false,"context_lines":[{"line_number":416,"context_line":"                                              requested_networks)"},{"line_number":417,"context_line":"        # Neutron validation checks and returns how many of max_count"},{"line_number":418,"context_line":"        # instances can be supported by the quota.  For Nova network"},{"line_number":419,"context_line":"        # this is part of the later quota check"},{"line_number":420,"context_line":"        return max_count"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"    @wrap_check_policy"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FYA8%3D","line":419,"updated":"2013-11-07 22:33:03.000000000","message":"Typo - \u0027latter\u0027, and missing the trailing period.","commit_id":"2f423948ff315caf0bd949e2f33e70382fb4a7ad"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"067963df569240234b98531a9b4518c3b432dbbe","unresolved":false,"context_lines":[{"line_number":411,"context_line":"        \"\"\"validate the networks passed at the time of creating"},{"line_number":412,"context_line":"        the server."},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"        Return the number of instances than can be sucessfully allocated"},{"line_number":415,"context_line":"        with the requested network configurtaion."},{"line_number":416,"context_line":"        \"\"\""},{"line_number":417,"context_line":"        if requested_networks:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2FAyI%3D","line":414,"updated":"2013-11-15 17:55:05.000000000","message":"successfully","commit_id":"acf771a403dde0dcc3044f0c11664e6e39a50992"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"a0b5bc4e8065d2cff6d482c9464f19ee765d1947","unresolved":false,"context_lines":[{"line_number":411,"context_line":"        \"\"\"validate the networks passed at the time of creating"},{"line_number":412,"context_line":"        the server."},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"        Return the number of instances than can be sucessfully allocated"},{"line_number":415,"context_line":"        with the requested network configurtaion."},{"line_number":416,"context_line":"        \"\"\""},{"line_number":417,"context_line":"        if requested_networks:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2B0tc%3D","line":414,"in_reply_to":"AAAATn%2F%2FAyI%3D","updated":"2013-11-19 17:28:46.000000000","message":"Done","commit_id":"acf771a403dde0dcc3044f0c11664e6e39a50992"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"067963df569240234b98531a9b4518c3b432dbbe","unresolved":false,"context_lines":[{"line_number":412,"context_line":"        the server."},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"        Return the number of instances than can be sucessfully allocated"},{"line_number":415,"context_line":"        with the requested network configurtaion."},{"line_number":416,"context_line":"        \"\"\""},{"line_number":417,"context_line":"        if requested_networks:"},{"line_number":418,"context_line":"            self.network_rpcapi.validate_networks(context,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2FAyo%3D","line":415,"updated":"2013-11-15 17:55:05.000000000","message":"configuration","commit_id":"acf771a403dde0dcc3044f0c11664e6e39a50992"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"a0b5bc4e8065d2cff6d482c9464f19ee765d1947","unresolved":false,"context_lines":[{"line_number":412,"context_line":"        the server."},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"        Return the number of instances than can be sucessfully allocated"},{"line_number":415,"context_line":"        with the requested network configurtaion."},{"line_number":416,"context_line":"        \"\"\""},{"line_number":417,"context_line":"        if requested_networks:"},{"line_number":418,"context_line":"            self.network_rpcapi.validate_networks(context,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2B0tY%3D","line":415,"in_reply_to":"AAAATn%2F%2FAyo%3D","updated":"2013-11-19 17:28:46.000000000","message":"Done","commit_id":"acf771a403dde0dcc3044f0c11664e6e39a50992"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"0f86678b7ee746e0bcbc26ecf8484a64d15de696","unresolved":false,"context_lines":[{"line_number":411,"context_line":"        \"\"\"validate the networks passed at the time of creating"},{"line_number":412,"context_line":"        the server."},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"        Return the number of instances than can be successfully allocated"},{"line_number":415,"context_line":"        with the requested network configuration."},{"line_number":416,"context_line":"        \"\"\""},{"line_number":417,"context_line":"        if requested_networks:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2Bc6U%3D","line":414,"updated":"2013-11-25 22:19:13.000000000","message":"s/than/that ?","commit_id":"bd3ebfc33e6eaadbc8135578bb55329da7c41569"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"938442f55ca5d671ff04ea355b52f07ec11ecf81","unresolved":false,"context_lines":[{"line_number":411,"context_line":"        \"\"\"validate the networks passed at the time of creating"},{"line_number":412,"context_line":"        the server."},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"        Return the number of instances than can be successfully allocated"},{"line_number":415,"context_line":"        with the requested network configuration."},{"line_number":416,"context_line":"        \"\"\""},{"line_number":417,"context_line":"        if requested_networks:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2BYJo%3D","line":414,"in_reply_to":"AAAATn%2F%2Bc6U%3D","updated":"2013-11-26 18:34:34.000000000","message":"Noted - If I have to respin I\u0027ll fix this","commit_id":"bd3ebfc33e6eaadbc8135578bb55329da7c41569"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e3bb8e4ce143ac3732c9eccec46c7d90637fdb7e","unresolved":false,"context_lines":[{"line_number":420,"context_line":"        if requested_networks:"},{"line_number":421,"context_line":"            self.network_rpcapi.validate_networks(context,"},{"line_number":422,"context_line":"                                                  requested_networks)"},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"        # Neutron validation checks and returns how many of num_instances"},{"line_number":425,"context_line":"        # instances can be supported by the quota.  For Nova network"},{"line_number":426,"context_line":"        # this is part of the subsequent quota check, so we just return"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F98Oc%3D","line":423,"updated":"2013-12-04 08:03:05.000000000","message":"I think that here we should do a quota validation with neutron. The check above it interfaces with neutron to validate that the requested networks are correct. We should perform a check here that the user has not exceeded their quota.","commit_id":"1d9a0a620d78ab54f7a3da61b803a97cdbdd01f2"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"834503bb0a3150680d995091bbaf26ff73b31d68","unresolved":false,"context_lines":[{"line_number":420,"context_line":"        if requested_networks:"},{"line_number":421,"context_line":"            self.network_rpcapi.validate_networks(context,"},{"line_number":422,"context_line":"                                                  requested_networks)"},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"        # Neutron validation checks and returns how many of num_instances"},{"line_number":425,"context_line":"        # instances can be supported by the quota.  For Nova network"},{"line_number":426,"context_line":"        # this is part of the subsequent quota check, so we just return"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F9zQI%3D","line":423,"in_reply_to":"AAAATn%2F93YY%3D","updated":"2013-12-05 19:13:41.000000000","message":"Lifeless is right - this is the Nova network patch , where quotas don\u0027t need to be handled by the network","commit_id":"1d9a0a620d78ab54f7a3da61b803a97cdbdd01f2"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"7a203b18ba1e7b25fed8a8d2eeda52df1171c7d3","unresolved":false,"context_lines":[{"line_number":420,"context_line":"        if requested_networks:"},{"line_number":421,"context_line":"            self.network_rpcapi.validate_networks(context,"},{"line_number":422,"context_line":"                                                  requested_networks)"},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"        # Neutron validation checks and returns how many of num_instances"},{"line_number":425,"context_line":"        # instances can be supported by the quota.  For Nova network"},{"line_number":426,"context_line":"        # this is part of the subsequent quota check, so we just return"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F93YY%3D","line":423,"in_reply_to":"AAAATn%2F98Oc%3D","updated":"2013-12-05 03:31:14.000000000","message":"The validation is done, this layer is the API definition - totally the wrong place to talk to Neutron. You need to look in the neutron v2 implementation.","commit_id":"1d9a0a620d78ab54f7a3da61b803a97cdbdd01f2"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e3bb8e4ce143ac3732c9eccec46c7d90637fdb7e","unresolved":false,"context_lines":[{"line_number":425,"context_line":"        # instances can be supported by the quota.  For Nova network"},{"line_number":426,"context_line":"        # this is part of the subsequent quota check, so we just return"},{"line_number":427,"context_line":"        # the requested number in this case."},{"line_number":428,"context_line":"        return num_instances"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"    @wrap_check_policy"},{"line_number":431,"context_line":"    def get_instance_uuids_by_ip_filter(self, context, filters):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F98OY%3D","line":428,"updated":"2013-12-04 08:03:05.000000000","message":"This is a bit odd. What if each instance has more than one port.","commit_id":"1d9a0a620d78ab54f7a3da61b803a97cdbdd01f2"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"834503bb0a3150680d995091bbaf26ff73b31d68","unresolved":false,"context_lines":[{"line_number":425,"context_line":"        # instances can be supported by the quota.  For Nova network"},{"line_number":426,"context_line":"        # this is part of the subsequent quota check, so we just return"},{"line_number":427,"context_line":"        # the requested number in this case."},{"line_number":428,"context_line":"        return num_instances"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"    @wrap_check_policy"},{"line_number":431,"context_line":"    def get_instance_uuids_by_ip_filter(self, context, filters):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F9zPE%3D","line":428,"in_reply_to":"AAAATn%2F93Yo%3D","updated":"2013-12-05 19:13:41.000000000","message":"Right again - ports are not a consideration in Nova network.  In nova network we can always (from a network perspective)  create the required number of instances - hence the pass back.","commit_id":"1d9a0a620d78ab54f7a3da61b803a97cdbdd01f2"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"7a203b18ba1e7b25fed8a8d2eeda52df1171c7d3","unresolved":false,"context_lines":[{"line_number":425,"context_line":"        # instances can be supported by the quota.  For Nova network"},{"line_number":426,"context_line":"        # this is part of the subsequent quota check, so we just return"},{"line_number":427,"context_line":"        # the requested number in this case."},{"line_number":428,"context_line":"        return num_instances"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"    @wrap_check_policy"},{"line_number":431,"context_line":"    def get_instance_uuids_by_ip_filter(self, context, filters):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F93Yo%3D","line":428,"in_reply_to":"AAAATn%2F98OY%3D","updated":"2013-12-05 03:31:14.000000000","message":"The unit of comparison here and elsewhere is \u0027number of instances\u0027 not \u0027number of ports\u0027.","commit_id":"1d9a0a620d78ab54f7a3da61b803a97cdbdd01f2"}],"nova/network/neutronv2/api.py":[{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"49e8541369dbcb0f284ef8853f6e3a652b25a6de","unresolved":false,"context_lines":[{"line_number":539,"context_line":""},{"line_number":540,"context_line":"        if not requested_networks:"},{"line_number":541,"context_line":"            nets \u003d self._get_available_networks(context, context.project_id,"},{"line_number":542,"context_line":"                                                neutron\u003dneutron)"},{"line_number":543,"context_line":"            if len(nets) \u003e 1:"},{"line_number":544,"context_line":"                # Attaching to more than one network by default doesn\u0027t"},{"line_number":545,"context_line":"                # make sense, as the order will be arbitrary and the guest OS"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATH%2F%2F7L0%3D","line":542,"updated":"2013-10-08 00:03:37.000000000","message":"why is the neutron param needed?","commit_id":"da9b6f32eca54923930ad98ebdfae298ad6b70ac"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"c54313142b6f6d4515664154cf797cd238b4e237","unresolved":false,"context_lines":[{"line_number":539,"context_line":""},{"line_number":540,"context_line":"        if not requested_networks:"},{"line_number":541,"context_line":"            nets \u003d self._get_available_networks(context, context.project_id,"},{"line_number":542,"context_line":"                                                neutron\u003dneutron)"},{"line_number":543,"context_line":"            if len(nets) \u003e 1:"},{"line_number":544,"context_line":"                # Attaching to more than one network by default doesn\u0027t"},{"line_number":545,"context_line":"                # make sense, as the order will be arbitrary and the guest OS"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATH%2F%2F47Y%3D","line":542,"in_reply_to":"AAAATH%2F%2F7L0%3D","updated":"2013-10-08 13:02:51.000000000","message":"It avoids _get_available_networks() from creating a new copy of the Neutron client, with all the overhead of re-authenticating, etc","commit_id":"da9b6f32eca54923930ad98ebdfae298ad6b70ac"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"1e91526e7b9a109619b7ca646b4c20af758a2f79","unresolved":false,"context_lines":[{"line_number":587,"context_line":"                raise exception.NetworkNotFound(network_id\u003did_str)"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"        # Note(PhilD): Ideally Nova would create all required ports as part of"},{"line_number":590,"context_line":"        # network vaidation, but port creation required some details"},{"line_number":591,"context_line":"        # from the hypervisor.  So we just check the quota and return"},{"line_number":592,"context_line":"        # how many of the requested number of instances can be created"},{"line_number":593,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATH%2F%2FeTA%3D","line":590,"updated":"2013-10-15 18:37:56.000000000","message":"typo","commit_id":"da9b6f32eca54923930ad98ebdfae298ad6b70ac"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"0c2bb081a42c504675347bbf32eeebcdbdee8cf5","unresolved":false,"context_lines":[{"line_number":587,"context_line":"                raise exception.NetworkNotFound(network_id\u003did_str)"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"        # Note(PhilD): Ideally Nova would create all required ports as part of"},{"line_number":590,"context_line":"        # network vaidation, but port creation required some details"},{"line_number":591,"context_line":"        # from the hypervisor.  So we just check the quota and return"},{"line_number":592,"context_line":"        # how many of the requested number of instances can be created"},{"line_number":593,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATH%2F%2FbVE%3D","line":590,"in_reply_to":"AAAATH%2F%2FeTA%3D","updated":"2013-10-16 11:10:13.000000000","message":"Done","commit_id":"da9b6f32eca54923930ad98ebdfae298ad6b70ac"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"1e91526e7b9a109619b7ca646b4c20af758a2f79","unresolved":false,"context_lines":[{"line_number":598,"context_line":"        if free_ports \u003e\u003d ports_needed:"},{"line_number":599,"context_line":"            return num_instances"},{"line_number":600,"context_line":"        else:"},{"line_number":601,"context_line":"            return int(free_ports / ports_needed_per_instance)"},{"line_number":602,"context_line":""},{"line_number":603,"context_line":"    def _get_instance_uuids_by_ip(self, context, address):"},{"line_number":604,"context_line":"        \"\"\"Retrieve instance uuids associated with the given ip address."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATH%2F%2FeSo%3D","line":601,"updated":"2013-10-15 18:37:56.000000000","message":"Maybe use // rather than / here since you want an int?","commit_id":"da9b6f32eca54923930ad98ebdfae298ad6b70ac"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"0c2bb081a42c504675347bbf32eeebcdbdee8cf5","unresolved":false,"context_lines":[{"line_number":598,"context_line":"        if free_ports \u003e\u003d ports_needed:"},{"line_number":599,"context_line":"            return num_instances"},{"line_number":600,"context_line":"        else:"},{"line_number":601,"context_line":"            return int(free_ports / ports_needed_per_instance)"},{"line_number":602,"context_line":""},{"line_number":603,"context_line":"    def _get_instance_uuids_by_ip(self, context, address):"},{"line_number":604,"context_line":"        \"\"\"Retrieve instance uuids associated with the given ip address."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATH%2F%2FbVA%3D","line":601,"in_reply_to":"AAAATH%2F%2FeSo%3D","updated":"2013-10-16 11:10:13.000000000","message":"Done","commit_id":"da9b6f32eca54923930ad98ebdfae298ad6b70ac"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"747f2540023edd39367ed55d72a4cf94ebca86fd","unresolved":false,"context_lines":[{"line_number":593,"context_line":"        if free_ports \u003e\u003d ports_needed:"},{"line_number":594,"context_line":"            return num_instances"},{"line_number":595,"context_line":"        else:"},{"line_number":596,"context_line":"            return free_ports // ports_needed_per_instance"},{"line_number":597,"context_line":""},{"line_number":598,"context_line":"    def _get_instance_uuids_by_ip(self, context, address):"},{"line_number":599,"context_line":"        \"\"\"Retrieve instance uuids associated with the given ip address."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2Fa60%3D","line":596,"updated":"2013-10-16 12:48:01.000000000","message":"// ?","commit_id":"7f1f8e22ede0cfb8d3e86108d9d37e96deadd89b"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"4e9688e4182c44389b4759948b5b87292c3093c9","unresolved":false,"context_lines":[{"line_number":593,"context_line":"        if free_ports \u003e\u003d ports_needed:"},{"line_number":594,"context_line":"            return num_instances"},{"line_number":595,"context_line":"        else:"},{"line_number":596,"context_line":"            return free_ports // ports_needed_per_instance"},{"line_number":597,"context_line":""},{"line_number":598,"context_line":"    def _get_instance_uuids_by_ip(self, context, address):"},{"line_number":599,"context_line":"        \"\"\"Retrieve instance uuids associated with the given ip address."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2FYqQ%3D","line":596,"in_reply_to":"AAAATH%2F%2Fa60%3D","updated":"2013-10-16 21:01:26.000000000","message":"Not sure if your questioning the syntax or the logic:\n\nIn the last patch set I had this as int(    )  and was asked to change it to //\n\nIts possible that the available number of ports in the quota (free_ports) is not a whole multiple of the number needed per instance ;  for example if the remaining quota is 5, and we need two ports per instance the maximum number of instances is\n 2 (5 // 2) not  2.5 (5 / 2)","commit_id":"7f1f8e22ede0cfb8d3e86108d9d37e96deadd89b"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"b4ca1c35889142357dc62fa7112add1f00bf449d","unresolved":false,"context_lines":[{"line_number":562,"context_line":"                    net_id \u003d port[\u0027network_id\u0027]"},{"line_number":563,"context_line":"                else:"},{"line_number":564,"context_line":"                    ports_needed_per_instance \u003d ("},{"line_number":565,"context_line":"                        ports_needed_per_instance + 1)"},{"line_number":566,"context_line":"                if net_id in net_ids:"},{"line_number":567,"context_line":"                    raise exception.NetworkDuplicated(network_id\u003dnet_id)"},{"line_number":568,"context_line":"                net_ids.append(net_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FYBQ%3D","line":565,"updated":"2013-11-07 22:33:03.000000000","message":"You can just do +\u003d1 here.","commit_id":"2f423948ff315caf0bd949e2f33e70382fb4a7ad"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"067963df569240234b98531a9b4518c3b432dbbe","unresolved":false,"context_lines":[{"line_number":525,"context_line":"    def validate_networks(self, context, requested_networks, num_instances):"},{"line_number":526,"context_line":"        \"\"\"Validate that the tenant can use the requested networks."},{"line_number":527,"context_line":""},{"line_number":528,"context_line":"        Return the number of instances than can be sucessfully allocated"},{"line_number":529,"context_line":"        with the requested network configurtaion."},{"line_number":530,"context_line":"        \"\"\""},{"line_number":531,"context_line":"        LOG.debug(_(\u0027validate_networks() for %s\u0027),"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2FAyY%3D","line":528,"updated":"2013-11-15 17:55:05.000000000","message":"successfully","commit_id":"acf771a403dde0dcc3044f0c11664e6e39a50992"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"a0b5bc4e8065d2cff6d482c9464f19ee765d1947","unresolved":false,"context_lines":[{"line_number":525,"context_line":"    def validate_networks(self, context, requested_networks, num_instances):"},{"line_number":526,"context_line":"        \"\"\"Validate that the tenant can use the requested networks."},{"line_number":527,"context_line":""},{"line_number":528,"context_line":"        Return the number of instances than can be sucessfully allocated"},{"line_number":529,"context_line":"        with the requested network configurtaion."},{"line_number":530,"context_line":"        \"\"\""},{"line_number":531,"context_line":"        LOG.debug(_(\u0027validate_networks() for %s\u0027),"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2B0uQ%3D","line":528,"in_reply_to":"AAAATn%2F%2FAyY%3D","updated":"2013-11-19 17:28:46.000000000","message":"Done","commit_id":"acf771a403dde0dcc3044f0c11664e6e39a50992"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"067963df569240234b98531a9b4518c3b432dbbe","unresolved":false,"context_lines":[{"line_number":526,"context_line":"        \"\"\"Validate that the tenant can use the requested networks."},{"line_number":527,"context_line":""},{"line_number":528,"context_line":"        Return the number of instances than can be sucessfully allocated"},{"line_number":529,"context_line":"        with the requested network configurtaion."},{"line_number":530,"context_line":"        \"\"\""},{"line_number":531,"context_line":"        LOG.debug(_(\u0027validate_networks() for %s\u0027),"},{"line_number":532,"context_line":"                  requested_networks)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2FAyQ%3D","line":529,"updated":"2013-11-15 17:55:05.000000000","message":"configuration","commit_id":"acf771a403dde0dcc3044f0c11664e6e39a50992"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"a0b5bc4e8065d2cff6d482c9464f19ee765d1947","unresolved":false,"context_lines":[{"line_number":526,"context_line":"        \"\"\"Validate that the tenant can use the requested networks."},{"line_number":527,"context_line":""},{"line_number":528,"context_line":"        Return the number of instances than can be sucessfully allocated"},{"line_number":529,"context_line":"        with the requested network configurtaion."},{"line_number":530,"context_line":"        \"\"\""},{"line_number":531,"context_line":"        LOG.debug(_(\u0027validate_networks() for %s\u0027),"},{"line_number":532,"context_line":"                  requested_networks)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2B0uM%3D","line":529,"in_reply_to":"AAAATn%2F%2FAyQ%3D","updated":"2013-11-19 17:28:46.000000000","message":"Done","commit_id":"acf771a403dde0dcc3044f0c11664e6e39a50992"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"8f6ba4b9356a27a07bbe4417b411b8dcafa2cf3f","unresolved":false,"context_lines":[{"line_number":588,"context_line":"        # from the hypervisor.  So we just check the quota and return"},{"line_number":589,"context_line":"        # how many of the requested number of instances can be created"},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"        ports \u003d neutron.list_ports()[\u0027ports\u0027]"},{"line_number":592,"context_line":"        quotas \u003d neutron.show_quota(tenant_id\u003dcontext.project_id)[\u0027quota\u0027]"},{"line_number":593,"context_line":"        free_ports \u003d quotas.get(\u0027port\u0027) - len(ports)"},{"line_number":594,"context_line":"        ports_needed \u003d ports_needed_per_instance * num_instances"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2BWS8%3D","line":591,"updated":"2013-11-27 03:25:48.000000000","message":"This should be \"ports \u003d neutron.list_ports(tenant_id\u003dcontext.project_id)[\u0027ports\u0027]\", otherwise when user is admin, this will get all ports for all tenants from neutron.","commit_id":"bd3ebfc33e6eaadbc8135578bb55329da7c41569"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"95dd93279ac9ef8ae531793a404f9b3d6226597b","unresolved":false,"context_lines":[{"line_number":588,"context_line":"        # from the hypervisor.  So we just check the quota and return"},{"line_number":589,"context_line":"        # how many of the requested number of instances can be created"},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"        ports \u003d neutron.list_ports()[\u0027ports\u0027]"},{"line_number":592,"context_line":"        quotas \u003d neutron.show_quota(tenant_id\u003dcontext.project_id)[\u0027quota\u0027]"},{"line_number":593,"context_line":"        free_ports \u003d quotas.get(\u0027port\u0027) - len(ports)"},{"line_number":594,"context_line":"        ports_needed \u003d ports_needed_per_instance * num_instances"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2BVUo%3D","line":591,"in_reply_to":"AAAATn%2F%2BWS8%3D","updated":"2013-11-27 12:07:56.000000000","message":"Good catch","commit_id":"bd3ebfc33e6eaadbc8135578bb55329da7c41569"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"0f86678b7ee746e0bcbc26ecf8484a64d15de696","unresolved":false,"context_lines":[{"line_number":595,"context_line":"        if free_ports \u003e\u003d ports_needed:"},{"line_number":596,"context_line":"            return num_instances"},{"line_number":597,"context_line":"        else:"},{"line_number":598,"context_line":"            return free_ports // ports_needed_per_instance"},{"line_number":599,"context_line":""},{"line_number":600,"context_line":"    def _get_instance_uuids_by_ip(self, context, address):"},{"line_number":601,"context_line":"        \"\"\"Retrieve instance uuids associated with the given ip address."}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2Bc48%3D","line":598,"updated":"2013-11-25 22:19:13.000000000","message":"Is this an integer? Do we need this to be an integer?","commit_id":"bd3ebfc33e6eaadbc8135578bb55329da7c41569"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"938442f55ca5d671ff04ea355b52f07ec11ecf81","unresolved":false,"context_lines":[{"line_number":595,"context_line":"        if free_ports \u003e\u003d ports_needed:"},{"line_number":596,"context_line":"            return num_instances"},{"line_number":597,"context_line":"        else:"},{"line_number":598,"context_line":"            return free_ports // ports_needed_per_instance"},{"line_number":599,"context_line":""},{"line_number":600,"context_line":"    def _get_instance_uuids_by_ip(self, context, address):"},{"line_number":601,"context_line":"        \"\"\"Retrieve instance uuids associated with the given ip address."}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2BYJw%3D","line":598,"in_reply_to":"AAAATn%2F%2Bc48%3D","updated":"2013-11-26 18:34:34.000000000","message":"Yes it needs to be an integer - and the result of \"//\" is a by definition an integer.\n\nIf you had 7 ports free and needed 2 ports per instance then the number of instances you can support ids 7 // 2 \u003d 3","commit_id":"bd3ebfc33e6eaadbc8135578bb55329da7c41569"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e3bb8e4ce143ac3732c9eccec46c7d90637fdb7e","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        \"\"\"Setup or teardown the network structures.\"\"\""},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def _get_available_networks(self, context, project_id,"},{"line_number":120,"context_line":"                                net_ids\u003dNone, neutron\u003dNone):"},{"line_number":121,"context_line":"        \"\"\"Return a network list available for the tenant."},{"line_number":122,"context_line":"        The list contains networks owned by the tenant and public networks."},{"line_number":123,"context_line":"        If net_ids specified, it searches networks with requested IDs only."}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F98N8%3D","line":120,"updated":"2013-12-04 08:03:05.000000000","message":"the parameter name here is a little confusing. can you change it to say neutron_client","commit_id":"1d9a0a620d78ab54f7a3da61b803a97cdbdd01f2"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"834503bb0a3150680d995091bbaf26ff73b31d68","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        \"\"\"Setup or teardown the network structures.\"\"\""},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def _get_available_networks(self, context, project_id,"},{"line_number":120,"context_line":"                                net_ids\u003dNone, neutron\u003dNone):"},{"line_number":121,"context_line":"        \"\"\"Return a network list available for the tenant."},{"line_number":122,"context_line":"        The list contains networks owned by the tenant and public networks."},{"line_number":123,"context_line":"        If net_ids specified, it searches networks with requested IDs only."}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F9zOg%3D","line":120,"in_reply_to":"AAAATn%2F98N8%3D","updated":"2013-12-05 19:13:41.000000000","message":"I guess I could if I have to re-spin this - but the name used within the body of this method is \"neutron\", so I kind of think its OK","commit_id":"1d9a0a620d78ab54f7a3da61b803a97cdbdd01f2"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"71bc495a05860e345687e225fd0affd2925f6a26","unresolved":false,"context_lines":[{"line_number":591,"context_line":"        # how many of the requested number of instances can be created"},{"line_number":592,"context_line":""},{"line_number":593,"context_line":"        ports \u003d neutron.list_ports(tenant_id\u003dcontext.project_id)[\u0027ports\u0027]"},{"line_number":594,"context_line":"        quotas \u003d neutron.show_quota(tenant_id\u003dcontext.project_id)[\u0027quota\u0027]"},{"line_number":595,"context_line":"        if quotas.get(\u0027port\u0027) \u003d\u003d -1:"},{"line_number":596,"context_line":"            # Unlimited Port Quota"},{"line_number":597,"context_line":"            return num_instances"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F8ugY%3D","line":594,"updated":"2013-12-21 01:27:05.000000000","message":"two additional calls to neutron seems like good trade off here, but we will see","commit_id":"1d9a0a620d78ab54f7a3da61b803a97cdbdd01f2"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e3bb8e4ce143ac3732c9eccec46c7d90637fdb7e","unresolved":false,"context_lines":[{"line_number":601,"context_line":"            if free_ports \u003e\u003d ports_needed:"},{"line_number":602,"context_line":"                return num_instances"},{"line_number":603,"context_line":"            else:"},{"line_number":604,"context_line":"                return free_ports // ports_needed_per_instance"},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"    def _get_instance_uuids_by_ip(self, context, address):"},{"line_number":607,"context_line":"        \"\"\"Retrieve instance uuids associated with the given ip address."}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F98NQ%3D","line":604,"updated":"2013-12-04 08:03:05.000000000","message":"can you please add a comment here indicating that this is the number of instances that can be supported taking into account the quota","commit_id":"1d9a0a620d78ab54f7a3da61b803a97cdbdd01f2"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"834503bb0a3150680d995091bbaf26ff73b31d68","unresolved":false,"context_lines":[{"line_number":601,"context_line":"            if free_ports \u003e\u003d ports_needed:"},{"line_number":602,"context_line":"                return num_instances"},{"line_number":603,"context_line":"            else:"},{"line_number":604,"context_line":"                return free_ports // ports_needed_per_instance"},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"    def _get_instance_uuids_by_ip(self, context, address):"},{"line_number":607,"context_line":"        \"\"\"Retrieve instance uuids associated with the given ip address."}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F9zOM%3D","line":604,"in_reply_to":"AAAATn%2F93Yk%3D","updated":"2013-12-05 19:13:41.000000000","message":"Doesn\u0027t the 4 lien comment block just before this already make that clear ?","commit_id":"1d9a0a620d78ab54f7a3da61b803a97cdbdd01f2"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"7a203b18ba1e7b25fed8a8d2eeda52df1171c7d3","unresolved":false,"context_lines":[{"line_number":601,"context_line":"            if free_ports \u003e\u003d ports_needed:"},{"line_number":602,"context_line":"                return num_instances"},{"line_number":603,"context_line":"            else:"},{"line_number":604,"context_line":"                return free_ports // ports_needed_per_instance"},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"    def _get_instance_uuids_by_ip(self, context, address):"},{"line_number":607,"context_line":"        \"\"\"Retrieve instance uuids associated with the given ip address."}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F93Yk%3D","line":604,"in_reply_to":"AAAATn%2F98NQ%3D","updated":"2013-12-05 03:31:14.000000000","message":"Thats pretty obvious to me - free ports // ports-per-instance.","commit_id":"1d9a0a620d78ab54f7a3da61b803a97cdbdd01f2"}],"nova/tests/api/openstack/fakes.py":[{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"1e91526e7b9a109619b7ca646b4c20af758a2f79","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        def get_floating_ips_by_fixed_address(*args, **kwargs):"},{"line_number":237,"context_line":"            return publics"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        def validate_networks(self, context, networks, max_count):"},{"line_number":240,"context_line":"            return max_count"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    if cls is None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATH%2F%2FeTg%3D","line":239,"updated":"2013-10-15 18:37:56.000000000","message":"Was there a good reason this was using *args and **kwargs before?  (I remember another review where we did this for compatibility with a module whose signature had changed, for example.)","commit_id":"da9b6f32eca54923930ad98ebdfae298ad6b70ac"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"0c2bb081a42c504675347bbf32eeebcdbdee8cf5","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        def get_floating_ips_by_fixed_address(*args, **kwargs):"},{"line_number":237,"context_line":"            return publics"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        def validate_networks(self, context, networks, max_count):"},{"line_number":240,"context_line":"            return max_count"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    if cls is None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATH%2F%2FbV4%3D","line":239,"in_reply_to":"AAAATH%2F%2FeTg%3D","updated":"2013-10-16 11:10:13.000000000","message":"I can\u0027t speak for sure for the original intent - it looks to me that given that the body was a pass the author just didn\u0027t care about what was passed (Seems to be a fairly common pattern in fakes)   However for the tests to pass now I need this fake method to return the same value as its counterpart.","commit_id":"da9b6f32eca54923930ad98ebdfae298ad6b70ac"}],"nova/tests/network/test_neutronv2.py":[{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"cf09eac28832b22e6b34e2d297b9018ea9f212a4","unresolved":false,"context_lines":[{"line_number":1059,"context_line":"        api \u003d neutronapi.API()"},{"line_number":1060,"context_line":"        max_count \u003d api.validate_networks(self.context,"},{"line_number":1061,"context_line":"                                          requested_networks, 1)"},{"line_number":1062,"context_line":"        self.assertEquals(max_count, 0)"},{"line_number":1063,"context_line":""},{"line_number":1064,"context_line":"    def test_validate_networks_some_quota(self):"},{"line_number":1065,"context_line":"        # Test validation for a request for two instance needing"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2FbQU%3D","line":1062,"updated":"2013-10-16 11:20:32.000000000","message":"nit; we no longer use asstEquals, pls use assertEqual","commit_id":"7f1f8e22ede0cfb8d3e86108d9d37e96deadd89b"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"cf09eac28832b22e6b34e2d297b9018ea9f212a4","unresolved":false,"context_lines":[{"line_number":1080,"context_line":"        api \u003d neutronapi.API()"},{"line_number":1081,"context_line":"        max_count \u003d api.validate_networks(self.context,"},{"line_number":1082,"context_line":"                                          requested_networks, 2)"},{"line_number":1083,"context_line":"        self.assertEquals(max_count, 1)"},{"line_number":1084,"context_line":""},{"line_number":1085,"context_line":"    def test_validate_networks_no_quota_but_ports_supplied(self):"},{"line_number":1086,"context_line":"        # Test validation for a request for one instance needing"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2FbQE%3D","line":1083,"updated":"2013-10-16 11:20:32.000000000","message":"ditto","commit_id":"7f1f8e22ede0cfb8d3e86108d9d37e96deadd89b"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"4e9688e4182c44389b4759948b5b87292c3093c9","unresolved":false,"context_lines":[{"line_number":1080,"context_line":"        api \u003d neutronapi.API()"},{"line_number":1081,"context_line":"        max_count \u003d api.validate_networks(self.context,"},{"line_number":1082,"context_line":"                                          requested_networks, 2)"},{"line_number":1083,"context_line":"        self.assertEquals(max_count, 1)"},{"line_number":1084,"context_line":""},{"line_number":1085,"context_line":"    def test_validate_networks_no_quota_but_ports_supplied(self):"},{"line_number":1086,"context_line":"        # Test validation for a request for one instance needing"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2FYps%3D","line":1083,"in_reply_to":"AAAATH%2F%2FbQE%3D","updated":"2013-10-16 21:01:26.000000000","message":"Done","commit_id":"7f1f8e22ede0cfb8d3e86108d9d37e96deadd89b"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"cf09eac28832b22e6b34e2d297b9018ea9f212a4","unresolved":false,"context_lines":[{"line_number":1113,"context_line":"        api \u003d neutronapi.API()"},{"line_number":1114,"context_line":"        max_count \u003d api.validate_networks(self.context,"},{"line_number":1115,"context_line":"                                          requested_networks, 1)"},{"line_number":1116,"context_line":"        self.assertEquals(max_count, 1)"},{"line_number":1117,"context_line":""},{"line_number":1118,"context_line":"    def _mock_list_ports(self, port_data\u003dNone):"},{"line_number":1119,"context_line":"        if port_data is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2FbQA%3D","line":1116,"updated":"2013-10-16 11:20:32.000000000","message":"ditto","commit_id":"7f1f8e22ede0cfb8d3e86108d9d37e96deadd89b"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"4e9688e4182c44389b4759948b5b87292c3093c9","unresolved":false,"context_lines":[{"line_number":1113,"context_line":"        api \u003d neutronapi.API()"},{"line_number":1114,"context_line":"        max_count \u003d api.validate_networks(self.context,"},{"line_number":1115,"context_line":"                                          requested_networks, 1)"},{"line_number":1116,"context_line":"        self.assertEquals(max_count, 1)"},{"line_number":1117,"context_line":""},{"line_number":1118,"context_line":"    def _mock_list_ports(self, port_data\u003dNone):"},{"line_number":1119,"context_line":"        if port_data is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2FYpw%3D","line":1116,"in_reply_to":"AAAATH%2F%2FbQA%3D","updated":"2013-10-16 21:01:26.000000000","message":"Done","commit_id":"7f1f8e22ede0cfb8d3e86108d9d37e96deadd89b"}]}
