)]}'
{"kuryr_tempest_plugin/tests/scenario/test_port_pool.py":[{"author":{"_account_id":21302,"name":"Gena","email":"gcheresh@redhat.com","username":"gcheresh"},"change_message_id":"0c1d133466c946b97063a5d333c5c825b18ba860","unresolved":false,"context_lines":[{"line_number":332,"context_line":"            ports_pool_max\u003dself.PORTS_POOL_DEFAULT_DICT[\u0027ports_pool_max\u0027],"},{"line_number":333,"context_line":"            ports_pool_min\u003dself.PORTS_POOL_DEFAULT_DICT[\u0027ports_pool_min\u0027])"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        self.check_initial_ports_num(subnet_id, namespace_name, POOL_BATCH)"},{"line_number":336,"context_line":"        initial_ports_num \u003d len(self.os_admin.ports_client.list_ports("},{"line_number":337,"context_line":"            fixed_ips\u003d\u0027subnet_id\u003d%s\u0027 % subnet_id)[\u0027ports\u0027])"},{"line_number":338,"context_line":"        # create a pod to test the port pool increase by updated batch value"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_fc7b9176","line":335,"updated":"2019-12-10 13:04:00.000000000","message":"Don\u0027t you want to save this value instead of the following lines of code?","commit_id":"9e4b7c55ef54f9901ca6ae0c0f91cddb4b143708"},{"author":{"_account_id":21302,"name":"Gena","email":"gcheresh@redhat.com","username":"gcheresh"},"change_message_id":"c0004ffb6f480f79a970b6357bf94f1820da216f","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        \"Config map must be modifiable\")"},{"line_number":170,"context_line":"    @lockutils.synchronized(\u0027port-pool-restarts\u0027)"},{"line_number":171,"context_line":"    def test_port_pool_update(self):"},{"line_number":172,"context_line":"        UPDATED_POOL_BATCH \u003d 3"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"        # Check resources are created"},{"line_number":175,"context_line":"        namespace_name, namespace \u003d self.create_namespace()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_7ad756f6","line":172,"updated":"2019-12-16 08:35:26.000000000","message":"Do we want to use a specific value here?","commit_id":"d02743f25b1409b6ae1685431bd39bcdcfe71b3f"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"c1b550abbd9b1f9c6f962148273a46908e513fb2","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        \"Config map must be modifiable\")"},{"line_number":170,"context_line":"    @lockutils.synchronized(\u0027port-pool-restarts\u0027)"},{"line_number":171,"context_line":"    def test_port_pool_update(self):"},{"line_number":172,"context_line":"        UPDATED_POOL_BATCH \u003d 3"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"        # Check resources are created"},{"line_number":175,"context_line":"        namespace_name, namespace \u003d self.create_namespace()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_fa66e656","line":172,"in_reply_to":"3fa7e38b_7ad756f6","updated":"2019-12-18 07:18:42.000000000","message":"I\u0027ll base it on increment of self.PORTS_POOL_DEFAULT_DICT[\u0027ports_pool_batch\u0027]","commit_id":"d02743f25b1409b6ae1685431bd39bcdcfe71b3f"},{"author":{"_account_id":21302,"name":"Gena","email":"gcheresh@redhat.com","username":"gcheresh"},"change_message_id":"c0004ffb6f480f79a970b6357bf94f1820da216f","unresolved":false,"context_lines":[{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        # check the original length of list of ports for new ns"},{"line_number":193,"context_line":"        port_list_num \u003d len(self.os_admin.ports_client.list_ports("},{"line_number":194,"context_line":"            fixed_ips\u003d\u0027subnet_id\u003d%s\u0027 % subnet_id)[\u0027ports\u0027])"},{"line_number":195,"context_line":"        # create a pod to test the port pool increase by updated value"},{"line_number":196,"context_line":"        pod_name1, pod1 \u003d self.create_pod(namespace\u003dnamespace_name,"},{"line_number":197,"context_line":"                                          labels\u003d{\u0027type\u0027: \u0027demo\u0027})"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_9ab7b2d8","line":194,"updated":"2019-12-16 08:35:26.000000000","message":"Use your function here","commit_id":"d02743f25b1409b6ae1685431bd39bcdcfe71b3f"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"c1b550abbd9b1f9c6f962148273a46908e513fb2","unresolved":false,"context_lines":[{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        # check the original length of list of ports for new ns"},{"line_number":193,"context_line":"        port_list_num \u003d len(self.os_admin.ports_client.list_ports("},{"line_number":194,"context_line":"            fixed_ips\u003d\u0027subnet_id\u003d%s\u0027 % subnet_id)[\u0027ports\u0027])"},{"line_number":195,"context_line":"        # create a pod to test the port pool increase by updated value"},{"line_number":196,"context_line":"        pod_name1, pod1 \u003d self.create_pod(namespace\u003dnamespace_name,"},{"line_number":197,"context_line":"                                          labels\u003d{\u0027type\u0027: \u0027demo\u0027})"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_55210b9e","line":194,"in_reply_to":"3fa7e38b_9ab7b2d8","updated":"2019-12-18 07:18:42.000000000","message":"Done","commit_id":"d02743f25b1409b6ae1685431bd39bcdcfe71b3f"},{"author":{"_account_id":21302,"name":"Gena","email":"gcheresh@redhat.com","username":"gcheresh"},"change_message_id":"c0004ffb6f480f79a970b6357bf94f1820da216f","unresolved":false,"context_lines":[{"line_number":267,"context_line":""},{"line_number":268,"context_line":"        # check the original length of list of ports for new ns"},{"line_number":269,"context_line":"        port_list_num \u003d len(self.os_admin.ports_client.list_ports("},{"line_number":270,"context_line":"            fixed_ips\u003d\u0027subnet_id\u003d%s\u0027 % subnet_id)[\u0027ports\u0027])"},{"line_number":271,"context_line":"        # create a pod to test the port pool increase by 1"},{"line_number":272,"context_line":"        self.create_pod(namespace\u003dnamespace_name, labels\u003d{\u0027type\u0027: \u0027demo\u0027})"},{"line_number":273,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_faca6645","line":270,"updated":"2019-12-16 08:35:26.000000000","message":"Use your function here","commit_id":"d02743f25b1409b6ae1685431bd39bcdcfe71b3f"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"ccfc4512a7ec110cf2219af63622d1f6ae4057d4","unresolved":false,"context_lines":[{"line_number":364,"context_line":"        # port free and POOL_MIN\u003d1, so new port batch will be created"},{"line_number":365,"context_line":"        # We wait a bit because sometimes it takes a while for the ports to be"},{"line_number":366,"context_line":"        # created"},{"line_number":367,"context_line":"        time.sleep(30)"},{"line_number":368,"context_line":"        updated2_port_list_num \u003d len(self.os_admin.ports_client.list_ports("},{"line_number":369,"context_line":"            fixed_ips\u003d\u0027subnet_id\u003d%s\u0027 % subnet_id)[\u0027ports\u0027])"},{"line_number":370,"context_line":"        num_to_compare \u003d updated2_port_list_num - 2 * POOL_BATCH"}],"source_content_type":"text/x-python","patch_set":8,"id":"3fa7e38b_b9fd8eb3","line":367,"range":{"start_line":367,"start_character":8,"end_line":367,"end_character":22},"updated":"2019-12-20 08:54:30.000000000","message":"this will be really racy on the gates, I would like to try to avoid these sleeps. If you have this sleep, that means you would need to add it too at line 378, otherwise you could not have wait there enough for this to happen. And the same in other functions","commit_id":"982e2fd79186014242d7ff4f641ee6a03e2cd75a"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"05b0a5d0e823fc076af6d4742bde217767ea5648","unresolved":false,"context_lines":[{"line_number":364,"context_line":"        # port free and POOL_MIN\u003d1, so new port batch will be created"},{"line_number":365,"context_line":"        # We wait a bit because sometimes it takes a while for the ports to be"},{"line_number":366,"context_line":"        # created"},{"line_number":367,"context_line":"        time.sleep(30)"},{"line_number":368,"context_line":"        updated2_port_list_num \u003d len(self.os_admin.ports_client.list_ports("},{"line_number":369,"context_line":"            fixed_ips\u003d\u0027subnet_id\u003d%s\u0027 % subnet_id)[\u0027ports\u0027])"},{"line_number":370,"context_line":"        num_to_compare \u003d updated2_port_list_num - 2 * POOL_BATCH"}],"source_content_type":"text/x-python","patch_set":8,"id":"3fa7e38b_59feda6a","line":367,"range":{"start_line":367,"start_character":8,"end_line":367,"end_character":22},"in_reply_to":"3fa7e38b_b9fd8eb3","updated":"2019-12-20 09:15:03.000000000","message":"I\u0027ll change that","commit_id":"982e2fd79186014242d7ff4f641ee6a03e2cd75a"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"6b0fe20d6c314aefe633a783634ed662ff494506","unresolved":false,"context_lines":[{"line_number":311,"context_line":"            self.PORTS_POOL_DEFAULT_DICT[\u0027ports_pool_batch\u0027])"},{"line_number":312,"context_line":"        self.assertEqual(num_to_compare, new_port_list_num)"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    def check_ports_num_increase(self, base_num_ports, exptected_increase,"},{"line_number":315,"context_line":"                                 subnet_id, retries\u003d5):"},{"line_number":316,"context_line":"        port_list_num \u003d len(self.os_admin.ports_client.list_ports("},{"line_number":317,"context_line":"            fixed_ips\u003d\u0027subnet_id\u003d%s\u0027 % subnet_id)[\u0027ports\u0027])"}],"source_content_type":"text/x-python","patch_set":13,"id":"3fa7e38b_052d42ad","line":314,"range":{"start_line":314,"start_character":55,"end_line":314,"end_character":64},"updated":"2019-12-23 12:54:40.000000000","message":"typo: expected","commit_id":"40a6459c71bbcc5e1594a8c7c5a0e919ee75fac6"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"6b0fe20d6c314aefe633a783634ed662ff494506","unresolved":false,"context_lines":[{"line_number":315,"context_line":"                                 subnet_id, retries\u003d5):"},{"line_number":316,"context_line":"        port_list_num \u003d len(self.os_admin.ports_client.list_ports("},{"line_number":317,"context_line":"            fixed_ips\u003d\u0027subnet_id\u003d%s\u0027 % subnet_id)[\u0027ports\u0027])"},{"line_number":318,"context_line":"        num_to_compare \u003d port_list_num - exptected_increase"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        while num_to_compare !\u003d base_num_ports:"},{"line_number":321,"context_line":"            time.sleep(5)"},{"line_number":322,"context_line":"            retries -\u003d 1"},{"line_number":323,"context_line":"            if retries \u003d\u003d 0:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3fa7e38b_25195e86","line":320,"range":{"start_line":318,"start_character":0,"end_line":320,"end_character":47},"updated":"2019-12-23 12:54:40.000000000","message":"why not doing it the other way around?\nnum_to_compute \u003d base_num_ports + expected_increase\n\nand then you look on while port_list_num !\u003d num_to_compare\n\nActually, as you are going to do X retries, why not using a for loop (instead of having to decrement retries), and then just a break if the port_list_num \u003d\u003d expected ports","commit_id":"40a6459c71bbcc5e1594a8c7c5a0e919ee75fac6"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"1bde02ff5451b48043f918e67ee7474f4df9012c","unresolved":false,"context_lines":[{"line_number":315,"context_line":"                                 subnet_id, retries\u003d5):"},{"line_number":316,"context_line":"        port_list_num \u003d len(self.os_admin.ports_client.list_ports("},{"line_number":317,"context_line":"            fixed_ips\u003d\u0027subnet_id\u003d%s\u0027 % subnet_id)[\u0027ports\u0027])"},{"line_number":318,"context_line":"        num_to_compare \u003d port_list_num - exptected_increase"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        while num_to_compare !\u003d base_num_ports:"},{"line_number":321,"context_line":"            time.sleep(5)"},{"line_number":322,"context_line":"            retries -\u003d 1"},{"line_number":323,"context_line":"            if retries \u003d\u003d 0:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3fa7e38b_28a055a4","line":320,"range":{"start_line":318,"start_character":0,"end_line":320,"end_character":47},"in_reply_to":"3fa7e38b_25195e86","updated":"2019-12-23 14:05:48.000000000","message":"Agree about num_to_compare.\nAbout the for implementation - I\u0027ll just need to check the condition again. If it\u0027s not an issue - I\u0027ll leave it as it is.","commit_id":"40a6459c71bbcc5e1594a8c7c5a0e919ee75fac6"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"72c8c8421e7698fd083e1926928ae1ac22d46944","unresolved":false,"context_lines":[{"line_number":317,"context_line":"            fixed_ips\u003d\u0027subnet_id\u003d%s\u0027 % subnet_id)[\u0027ports\u0027])"},{"line_number":318,"context_line":"        num_to_compare \u003d base_num_ports + expected_increase"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        while port_list_num !\u003d num_to_compare:"},{"line_number":321,"context_line":"            time.sleep(5)"},{"line_number":322,"context_line":"            retries -\u003d 1"},{"line_number":323,"context_line":"            if retries \u003d\u003d 0:"},{"line_number":324,"context_line":"                raise lib_exc.TimeoutException()"},{"line_number":325,"context_line":"            port_list_num \u003d len(self.os_admin.ports_client.list_ports("},{"line_number":326,"context_line":"                fixed_ips\u003d\u0027subnet_id\u003d%s\u0027 % subnet_id)[\u0027ports\u0027])"},{"line_number":327,"context_line":"            num_to_compare \u003d base_num_ports + expected_increase"},{"line_number":328,"context_line":"        return port_list_num"},{"line_number":329,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_0bd9d326","line":326,"range":{"start_line":320,"start_character":0,"end_line":326,"end_character":63},"updated":"2019-12-23 15:29:35.000000000","message":"not a big deal, but why implementing a for loop with a while loop. You can do:\n\n\nfor i in range(retries):\n    port_list_num \u003d len(self....)\n    if port_list_num \u003d\u003d num_to_compare:\n        return port_list_num\nraise lib_exc.TimeoutException()\n\n\nNote we should not even raise that timeout, but allow this to continue and it will fail on the assertEqal at line 370. I would even have something like:\n\nfor i in range(retries):\n    port_list_num \u003d len(self....)\n    if port_list_num \u003d\u003d num_to_compare:\n        break\nreturn port_list_num","commit_id":"cfdbce71aacec17f414761cf3439352307e369f9"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"f6323281afc51e53c96f18b27acb092c6e71c315","unresolved":false,"context_lines":[{"line_number":317,"context_line":"            fixed_ips\u003d\u0027subnet_id\u003d%s\u0027 % subnet_id)[\u0027ports\u0027])"},{"line_number":318,"context_line":"        num_to_compare \u003d base_num_ports + expected_increase"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        while port_list_num !\u003d num_to_compare:"},{"line_number":321,"context_line":"            time.sleep(5)"},{"line_number":322,"context_line":"            retries -\u003d 1"},{"line_number":323,"context_line":"            if retries \u003d\u003d 0:"},{"line_number":324,"context_line":"                raise lib_exc.TimeoutException()"},{"line_number":325,"context_line":"            port_list_num \u003d len(self.os_admin.ports_client.list_ports("},{"line_number":326,"context_line":"                fixed_ips\u003d\u0027subnet_id\u003d%s\u0027 % subnet_id)[\u0027ports\u0027])"},{"line_number":327,"context_line":"            num_to_compare \u003d base_num_ports + expected_increase"},{"line_number":328,"context_line":"        return port_list_num"},{"line_number":329,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_b7a01cf5","line":326,"range":{"start_line":320,"start_character":0,"end_line":326,"end_character":63},"in_reply_to":"3fa7e38b_0bd9d326","updated":"2019-12-23 22:56:17.000000000","message":"Done","commit_id":"cfdbce71aacec17f414761cf3439352307e369f9"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"72c8c8421e7698fd083e1926928ae1ac22d46944","unresolved":false,"context_lines":[{"line_number":324,"context_line":"                raise lib_exc.TimeoutException()"},{"line_number":325,"context_line":"            port_list_num \u003d len(self.os_admin.ports_client.list_ports("},{"line_number":326,"context_line":"                fixed_ips\u003d\u0027subnet_id\u003d%s\u0027 % subnet_id)[\u0027ports\u0027])"},{"line_number":327,"context_line":"            num_to_compare \u003d base_num_ports + expected_increase"},{"line_number":328,"context_line":"        return port_list_num"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"    @decorators.idempotent_id(\u0027bddd5441-1244-429d-a123-b55ddfb137a6\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_0bb473d3","line":327,"range":{"start_line":327,"start_character":12,"end_line":327,"end_character":63},"updated":"2019-12-23 15:29:35.000000000","message":"this is not needed","commit_id":"cfdbce71aacec17f414761cf3439352307e369f9"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"f6323281afc51e53c96f18b27acb092c6e71c315","unresolved":false,"context_lines":[{"line_number":324,"context_line":"                raise lib_exc.TimeoutException()"},{"line_number":325,"context_line":"            port_list_num \u003d len(self.os_admin.ports_client.list_ports("},{"line_number":326,"context_line":"                fixed_ips\u003d\u0027subnet_id\u003d%s\u0027 % subnet_id)[\u0027ports\u0027])"},{"line_number":327,"context_line":"            num_to_compare \u003d base_num_ports + expected_increase"},{"line_number":328,"context_line":"        return port_list_num"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"    @decorators.idempotent_id(\u0027bddd5441-1244-429d-a123-b55ddfb137a6\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_77aaa4d3","line":327,"range":{"start_line":327,"start_character":12,"end_line":327,"end_character":63},"in_reply_to":"3fa7e38b_0bb473d3","updated":"2019-12-23 22:56:17.000000000","message":"Done","commit_id":"cfdbce71aacec17f414761cf3439352307e369f9"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"72c8c8421e7698fd083e1926928ae1ac22d46944","unresolved":false,"context_lines":[{"line_number":364,"context_line":"                                          labels\u003d{\u0027type\u0027: \u0027demo\u0027})"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"        # port number should increase by updated ports_pool_batch value"},{"line_number":367,"context_line":"        updated_port_list_num \u003d len(self.os_admin.ports_client.list_ports("},{"line_number":368,"context_line":"            fixed_ips\u003d\u0027subnet_id\u003d%s\u0027 % subnet_id)[\u0027ports\u0027])"},{"line_number":369,"context_line":"        num_to_compare \u003d updated_port_list_num - POOL_BATCH"},{"line_number":370,"context_line":"        self.assertEqual(num_to_compare, initial_ports_num)"},{"line_number":371,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_6bd167f8","line":368,"range":{"start_line":367,"start_character":0,"end_line":368,"end_character":59},"updated":"2019-12-23 15:29:35.000000000","message":"shouldn\u0027t we use here the new function?","commit_id":"cfdbce71aacec17f414761cf3439352307e369f9"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"f6323281afc51e53c96f18b27acb092c6e71c315","unresolved":false,"context_lines":[{"line_number":364,"context_line":"                                          labels\u003d{\u0027type\u0027: \u0027demo\u0027})"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"        # port number should increase by updated ports_pool_batch value"},{"line_number":367,"context_line":"        updated_port_list_num \u003d len(self.os_admin.ports_client.list_ports("},{"line_number":368,"context_line":"            fixed_ips\u003d\u0027subnet_id\u003d%s\u0027 % subnet_id)[\u0027ports\u0027])"},{"line_number":369,"context_line":"        num_to_compare \u003d updated_port_list_num - POOL_BATCH"},{"line_number":370,"context_line":"        self.assertEqual(num_to_compare, initial_ports_num)"},{"line_number":371,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_37b42c36","line":368,"range":{"start_line":367,"start_character":0,"end_line":368,"end_character":59},"in_reply_to":"3fa7e38b_6bd167f8","updated":"2019-12-23 22:56:17.000000000","message":"Done","commit_id":"cfdbce71aacec17f414761cf3439352307e369f9"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"72c8c8421e7698fd083e1926928ae1ac22d46944","unresolved":false,"context_lines":[{"line_number":381,"context_line":"        # port free and POOL_MIN\u003d1, so new port batch will be created"},{"line_number":382,"context_line":"        # We wait a bit because sometimes it takes a while for the ports to be"},{"line_number":383,"context_line":"        # created"},{"line_number":384,"context_line":"        updated2_port_list_num \u003d self.check_ports_num_increase("},{"line_number":385,"context_line":"            initial_ports_num, 2 * POOL_BATCH, subnet_id)"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"        # create additional pod"},{"line_number":388,"context_line":"        pod_name3, pod3 \u003d self.create_pod("}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_cbfbbb78","line":385,"range":{"start_line":384,"start_character":0,"end_line":385,"end_character":57},"updated":"2019-12-23 15:29:35.000000000","message":"I would add there the assertEqual too","commit_id":"cfdbce71aacec17f414761cf3439352307e369f9"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"f6323281afc51e53c96f18b27acb092c6e71c315","unresolved":false,"context_lines":[{"line_number":381,"context_line":"        # port free and POOL_MIN\u003d1, so new port batch will be created"},{"line_number":382,"context_line":"        # We wait a bit because sometimes it takes a while for the ports to be"},{"line_number":383,"context_line":"        # created"},{"line_number":384,"context_line":"        updated2_port_list_num \u003d self.check_ports_num_increase("},{"line_number":385,"context_line":"            initial_ports_num, 2 * POOL_BATCH, subnet_id)"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"        # create additional pod"},{"line_number":388,"context_line":"        pod_name3, pod3 \u003d self.create_pod("}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_57af68df","line":385,"range":{"start_line":384,"start_character":0,"end_line":385,"end_character":57},"in_reply_to":"3fa7e38b_cbfbbb78","updated":"2019-12-23 22:56:17.000000000","message":"Done","commit_id":"cfdbce71aacec17f414761cf3439352307e369f9"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"72c8c8421e7698fd083e1926928ae1ac22d46944","unresolved":false,"context_lines":[{"line_number":390,"context_line":"            affinity\u003d{\u0027podAffinity\u0027: consts.POD_AFFINITY})"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"        # the total number of ports should stay the same"},{"line_number":393,"context_line":"        updated3_port_list_num \u003d len(self.os_admin.ports_client.list_ports("},{"line_number":394,"context_line":"            fixed_ips\u003d\u0027subnet_id\u003d%s\u0027 % subnet_id)[\u0027ports\u0027])"},{"line_number":395,"context_line":"        self.assertEqual(updated2_port_list_num, updated3_port_list_num)"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"        # check connectivity between pods"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_ebfeb768","line":394,"range":{"start_line":393,"start_character":0,"end_line":394,"end_character":59},"updated":"2019-12-23 15:29:35.000000000","message":"we should also use here the new function, and ensure it also wait for the ports to be created (though they should not)","commit_id":"cfdbce71aacec17f414761cf3439352307e369f9"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"100986238dac786c26a05170d0908ef2764874aa","unresolved":false,"context_lines":[{"line_number":390,"context_line":"            affinity\u003d{\u0027podAffinity\u0027: consts.POD_AFFINITY})"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"        # the total number of ports should stay the same"},{"line_number":393,"context_line":"        updated3_port_list_num \u003d len(self.os_admin.ports_client.list_ports("},{"line_number":394,"context_line":"            fixed_ips\u003d\u0027subnet_id\u003d%s\u0027 % subnet_id)[\u0027ports\u0027])"},{"line_number":395,"context_line":"        self.assertEqual(updated2_port_list_num, updated3_port_list_num)"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"        # check connectivity between pods"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_2c72a213","line":394,"range":{"start_line":393,"start_character":0,"end_line":394,"end_character":59},"in_reply_to":"3fa7e38b_8c35d645","updated":"2019-12-24 08:49:35.000000000","message":"mm, But then it\u0027s kind of misuse of the function.\nI\u0027ll use sleep..","commit_id":"cfdbce71aacec17f414761cf3439352307e369f9"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"f6323281afc51e53c96f18b27acb092c6e71c315","unresolved":false,"context_lines":[{"line_number":390,"context_line":"            affinity\u003d{\u0027podAffinity\u0027: consts.POD_AFFINITY})"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"        # the total number of ports should stay the same"},{"line_number":393,"context_line":"        updated3_port_list_num \u003d len(self.os_admin.ports_client.list_ports("},{"line_number":394,"context_line":"            fixed_ips\u003d\u0027subnet_id\u003d%s\u0027 % subnet_id)[\u0027ports\u0027])"},{"line_number":395,"context_line":"        self.assertEqual(updated2_port_list_num, updated3_port_list_num)"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"        # check connectivity between pods"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_f77f7466","line":394,"range":{"start_line":393,"start_character":0,"end_line":394,"end_character":59},"in_reply_to":"3fa7e38b_ebfeb768","updated":"2019-12-23 22:56:17.000000000","message":"If you think that new ports can be created at this stage maybe we need to add a sleep here because the new function will return immediately.","commit_id":"cfdbce71aacec17f414761cf3439352307e369f9"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"3b17dbb83c10f0b6964aaab5589b48b5cc06a74e","unresolved":false,"context_lines":[{"line_number":390,"context_line":"            affinity\u003d{\u0027podAffinity\u0027: consts.POD_AFFINITY})"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"        # the total number of ports should stay the same"},{"line_number":393,"context_line":"        updated3_port_list_num \u003d len(self.os_admin.ports_client.list_ports("},{"line_number":394,"context_line":"            fixed_ips\u003d\u0027subnet_id\u003d%s\u0027 % subnet_id)[\u0027ports\u0027])"},{"line_number":395,"context_line":"        self.assertEqual(updated2_port_list_num, updated3_port_list_num)"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"        # check connectivity between pods"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_8c35d645","line":394,"range":{"start_line":393,"start_character":0,"end_line":394,"end_character":59},"in_reply_to":"3fa7e38b_f77f7466","updated":"2019-12-24 08:35:38.000000000","message":"I think you need to wait yes. Otherwise you don\u0027t know if there was no increase because it should not be, or because you did not give it the time to do it. Perhaps you can reuse the check_port_num_increase function, passing a larger number, thus waiting for the retries to fail","commit_id":"cfdbce71aacec17f414761cf3439352307e369f9"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"3b17dbb83c10f0b6964aaab5589b48b5cc06a74e","unresolved":false,"context_lines":[{"line_number":310,"context_line":"            self.PORTS_POOL_DEFAULT_DICT[\u0027ports_pool_batch\u0027])"},{"line_number":311,"context_line":"        self.assertEqual(num_to_compare, new_port_list_num)"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"    def check_ports_num_increase(self, base_num_ports, expected_increase,"},{"line_number":314,"context_line":"                                 subnet_id, retries\u003d5):"},{"line_number":315,"context_line":"        num_to_compare \u003d base_num_ports + expected_increase"},{"line_number":316,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3fa7e38b_ec26ca22","line":313,"range":{"start_line":313,"start_character":39,"end_line":313,"end_character":72},"updated":"2019-12-24 08:35:38.000000000","message":"why not a single argument named expected_ports","commit_id":"0dfa6ed2078d3d6d989b520d9a35a8fd0a5d7c7b"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"100986238dac786c26a05170d0908ef2764874aa","unresolved":false,"context_lines":[{"line_number":310,"context_line":"            self.PORTS_POOL_DEFAULT_DICT[\u0027ports_pool_batch\u0027])"},{"line_number":311,"context_line":"        self.assertEqual(num_to_compare, new_port_list_num)"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"    def check_ports_num_increase(self, base_num_ports, expected_increase,"},{"line_number":314,"context_line":"                                 subnet_id, retries\u003d5):"},{"line_number":315,"context_line":"        num_to_compare \u003d base_num_ports + expected_increase"},{"line_number":316,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3fa7e38b_ac7e92e0","line":313,"range":{"start_line":313,"start_character":39,"end_line":313,"end_character":72},"in_reply_to":"3fa7e38b_ec26ca22","updated":"2019-12-24 08:49:35.000000000","message":"Done","commit_id":"0dfa6ed2078d3d6d989b520d9a35a8fd0a5d7c7b"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"3b17dbb83c10f0b6964aaab5589b48b5cc06a74e","unresolved":false,"context_lines":[{"line_number":379,"context_line":"        # created"},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"        updated2_port_list_num \u003d self.check_ports_num_increase("},{"line_number":382,"context_line":"            initial_ports_num, 2 * POOL_BATCH, subnet_id)"},{"line_number":383,"context_line":"        self.assertEqual(updated2_port_list_num,"},{"line_number":384,"context_line":"                         initial_ports_num + 2 * POOL_BATCH)"},{"line_number":385,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3fa7e38b_0c2a46e5","line":382,"range":{"start_line":382,"start_character":12,"end_line":382,"end_character":46},"updated":"2019-12-24 08:35:38.000000000","message":"ditto, this could be inital_ports_num + 2 * POOL_BATCH","commit_id":"0dfa6ed2078d3d6d989b520d9a35a8fd0a5d7c7b"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"100986238dac786c26a05170d0908ef2764874aa","unresolved":false,"context_lines":[{"line_number":379,"context_line":"        # created"},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"        updated2_port_list_num \u003d self.check_ports_num_increase("},{"line_number":382,"context_line":"            initial_ports_num, 2 * POOL_BATCH, subnet_id)"},{"line_number":383,"context_line":"        self.assertEqual(updated2_port_list_num,"},{"line_number":384,"context_line":"                         initial_ports_num + 2 * POOL_BATCH)"},{"line_number":385,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3fa7e38b_cc818ec4","line":382,"range":{"start_line":382,"start_character":12,"end_line":382,"end_character":46},"in_reply_to":"3fa7e38b_0c2a46e5","updated":"2019-12-24 08:49:35.000000000","message":"Done","commit_id":"0dfa6ed2078d3d6d989b520d9a35a8fd0a5d7c7b"}]}
