)]}'
{"kuryr_tempest_plugin/tests/scenario/base.py":[{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"fe19adba5432a3287e0ed85a6895cef4e1ddace7","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                fip[\u0027floatingip\u0027][\u0027id\u0027])"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    @classmethod"},{"line_number":81,"context_line":"    def create_network_policy(cls, name\u003dNone, namespace\u003d\u0027default\u0027,"},{"line_number":82,"context_line":"                              match_labels\u003dNone, match_expressions\u003dNone,"},{"line_number":83,"context_line":"                              ingress_port\u003dNone, ingress_port_protocol\u003d\u0027TCP\u0027,"},{"line_number":84,"context_line":"                              ingress_ipblock_cidr\u003dNone,"},{"line_number":85,"context_line":"                              ingress_ipblock_except\u003d[],"},{"line_number":86,"context_line":"                              egress_port\u003dNone, egress_port_protocol\u003d\u0027TCP\u0027,"},{"line_number":87,"context_line":"                              egress_ipblock_cidr\u003dNone,"},{"line_number":88,"context_line":"                              egress_ipblock_except\u003d[]):"},{"line_number":89,"context_line":"        if not name:"},{"line_number":90,"context_line":"            name \u003d data_utils.rand_name(prefix\u003d\u0027kuryr-network-policy\u0027)"},{"line_number":91,"context_line":"        np \u003d k8s_client.V1NetworkPolicy()"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_bf4bd584","line":88,"range":{"start_line":81,"start_character":0,"end_line":88,"end_character":56},"updated":"2019-10-30 08:39:30.000000000","message":"it is a bit ugly to have that many parameters here... not sure if better to move to kwargs? No strong opinion though","commit_id":"0564717e89af8f96e8f5bb2e32197abe36111830"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"b135987604a7c13de682016081ee81955837f9cc","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                fip[\u0027floatingip\u0027][\u0027id\u0027])"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    @classmethod"},{"line_number":81,"context_line":"    def create_network_policy(cls, name\u003dNone, namespace\u003d\u0027default\u0027,"},{"line_number":82,"context_line":"                              match_labels\u003dNone, match_expressions\u003dNone,"},{"line_number":83,"context_line":"                              ingress_port\u003dNone, ingress_port_protocol\u003d\u0027TCP\u0027,"},{"line_number":84,"context_line":"                              ingress_ipblock_cidr\u003dNone,"},{"line_number":85,"context_line":"                              ingress_ipblock_except\u003d[],"},{"line_number":86,"context_line":"                              egress_port\u003dNone, egress_port_protocol\u003d\u0027TCP\u0027,"},{"line_number":87,"context_line":"                              egress_ipblock_cidr\u003dNone,"},{"line_number":88,"context_line":"                              egress_ipblock_except\u003d[]):"},{"line_number":89,"context_line":"        if not name:"},{"line_number":90,"context_line":"            name \u003d data_utils.rand_name(prefix\u003d\u0027kuryr-network-policy\u0027)"},{"line_number":91,"context_line":"        np \u003d k8s_client.V1NetworkPolicy()"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_1f00e901","line":88,"range":{"start_line":81,"start_character":0,"end_line":88,"end_character":56},"in_reply_to":"3fa7e38b_bf4bd584","updated":"2019-10-30 08:44:08.000000000","message":"I\u0027d keep the parameters, it\u0027s self-explanatory this way. Maybe some could be moved to a function that creates an NP spec, but I don\u0027t think it\u0027s necessary.","commit_id":"0564717e89af8f96e8f5bb2e32197abe36111830"}],"kuryr_tempest_plugin/tests/scenario/test_network_policy.py":[{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"fe19adba5432a3287e0ed85a6895cef4e1ddace7","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        if not CONF.kuryr_kubernetes.network_policy_enabled:"},{"line_number":38,"context_line":"            raise cls.skipException(\u0027Network Policy driver and handler must \u0027"},{"line_number":39,"context_line":"                                    \u0027be enabled to run this tests\u0027)"},{"line_number":40,"context_line":"        if not CONF.kuryr_kubernetes.subnet_per_namespace:"},{"line_number":41,"context_line":"            raise cls.skipException(\u0027Namespace handler must be enabled to\u0027"},{"line_number":42,"context_line":"                                    \u0027 run these tests\u0027)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    @decorators.idempotent_id(\u0027a9db5bc5-e921-4719-8201-5431537c86f8\u0027)"},{"line_number":45,"context_line":"    def test_ipblock_network_policy_sg_rules(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_df67b124","line":42,"range":{"start_line":40,"start_character":0,"end_line":42,"end_character":55},"updated":"2019-10-30 08:39:30.000000000","message":"I think network policy is only supported if subnet_per_namespace is enabled, so, the flag network_policy_enabled should already include this","commit_id":"0564717e89af8f96e8f5bb2e32197abe36111830"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"0c27dc7b25f167da3eab5261d5c6db00f30cffc1","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        if not CONF.kuryr_kubernetes.network_policy_enabled:"},{"line_number":38,"context_line":"            raise cls.skipException(\u0027Network Policy driver and handler must \u0027"},{"line_number":39,"context_line":"                                    \u0027be enabled to run this tests\u0027)"},{"line_number":40,"context_line":"        if not CONF.kuryr_kubernetes.subnet_per_namespace:"},{"line_number":41,"context_line":"            raise cls.skipException(\u0027Namespace handler must be enabled to\u0027"},{"line_number":42,"context_line":"                                    \u0027 run these tests\u0027)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    @decorators.idempotent_id(\u0027a9db5bc5-e921-4719-8201-5431537c86f8\u0027)"},{"line_number":45,"context_line":"    def test_ipblock_network_policy_sg_rules(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_83747537","line":42,"range":{"start_line":40,"start_character":0,"end_line":42,"end_character":55},"in_reply_to":"3fa7e38b_df67b124","updated":"2019-10-31 07:18:28.000000000","message":"Done","commit_id":"0564717e89af8f96e8f5bb2e32197abe36111830"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"b135987604a7c13de682016081ee81955837f9cc","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        LOG.debug(\"Creating network policy %s\", np)"},{"line_number":55,"context_line":"        self.addCleanup(self.delete_network_policy, np.metadata.name,"},{"line_number":56,"context_line":"                        namespace_name)"},{"line_number":57,"context_line":"        LOG.debug(\"Creating network policy %s\" % np)"},{"line_number":58,"context_line":"        network_policy_name \u003d np.metadata.name"},{"line_number":59,"context_line":"        kuryr_netpolicy_crd_name \u003d \u0027np-\u0027 + network_policy_name"},{"line_number":60,"context_line":"        kuryrnetpolicies \u003d \u0027\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_df1ed16e","line":57,"range":{"start_line":57,"start_character":0,"end_line":57,"end_character":52},"updated":"2019-10-30 08:44:08.000000000","message":"This duplicates line 54.","commit_id":"0564717e89af8f96e8f5bb2e32197abe36111830"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"0c27dc7b25f167da3eab5261d5c6db00f30cffc1","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        LOG.debug(\"Creating network policy %s\", np)"},{"line_number":55,"context_line":"        self.addCleanup(self.delete_network_policy, np.metadata.name,"},{"line_number":56,"context_line":"                        namespace_name)"},{"line_number":57,"context_line":"        LOG.debug(\"Creating network policy %s\" % np)"},{"line_number":58,"context_line":"        network_policy_name \u003d np.metadata.name"},{"line_number":59,"context_line":"        kuryr_netpolicy_crd_name \u003d \u0027np-\u0027 + network_policy_name"},{"line_number":60,"context_line":"        kuryrnetpolicies \u003d \u0027\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_e36f698f","line":57,"range":{"start_line":57,"start_character":0,"end_line":57,"end_character":52},"in_reply_to":"3fa7e38b_df1ed16e","updated":"2019-10-31 07:18:28.000000000","message":"Done","commit_id":"0564717e89af8f96e8f5bb2e32197abe36111830"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"b135987604a7c13de682016081ee81955837f9cc","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        LOG.debug(\"Creating network policy %s\" % np)"},{"line_number":58,"context_line":"        network_policy_name \u003d np.metadata.name"},{"line_number":59,"context_line":"        kuryr_netpolicy_crd_name \u003d \u0027np-\u0027 + network_policy_name"},{"line_number":60,"context_line":"        kuryrnetpolicies \u003d \u0027\u0027"},{"line_number":61,"context_line":"        start \u003d time.time()"},{"line_number":62,"context_line":"        while time.time() - start \u003c TIMEOUT_PERIOD:"},{"line_number":63,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_5f2181b3","line":60,"range":{"start_line":60,"start_character":27,"end_line":60,"end_character":29},"updated":"2019-10-30 08:44:08.000000000","message":"This should be None if this is planned to be dict.","commit_id":"0564717e89af8f96e8f5bb2e32197abe36111830"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"0c27dc7b25f167da3eab5261d5c6db00f30cffc1","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        LOG.debug(\"Creating network policy %s\" % np)"},{"line_number":58,"context_line":"        network_policy_name \u003d np.metadata.name"},{"line_number":59,"context_line":"        kuryr_netpolicy_crd_name \u003d \u0027np-\u0027 + network_policy_name"},{"line_number":60,"context_line":"        kuryrnetpolicies \u003d \u0027\u0027"},{"line_number":61,"context_line":"        start \u003d time.time()"},{"line_number":62,"context_line":"        while time.time() - start \u003c TIMEOUT_PERIOD:"},{"line_number":63,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_c3f90dc8","line":60,"range":{"start_line":60,"start_character":27,"end_line":60,"end_character":29},"in_reply_to":"3fa7e38b_5f2181b3","updated":"2019-10-31 07:18:28.000000000","message":"Done. I suppose {} Can also do it.","commit_id":"0564717e89af8f96e8f5bb2e32197abe36111830"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"b135987604a7c13de682016081ee81955837f9cc","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            except kubernetes.client.rest.ApiException:"},{"line_number":69,"context_line":"                time.sleep(1)"},{"line_number":70,"context_line":"                continue"},{"line_number":71,"context_line":"        sg_id \u003d kuryrnetpolicies[\u0027spec\u0027][\u0027securityGroupId\u0027]"},{"line_number":72,"context_line":"        sec_group_rules \u003d self.list_security_group_rules(sg_id)"},{"line_number":73,"context_line":"        ingress_block_found, egress_block_found \u003d False, False"},{"line_number":74,"context_line":"        for rule in sec_group_rules:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_9f3b79e8","line":71,"range":{"start_line":71,"start_character":0,"end_line":71,"end_character":59},"updated":"2019-10-30 08:44:08.000000000","message":"Before calling this you should assert if kuryrnetpolicies isn\u0027t None?","commit_id":"0564717e89af8f96e8f5bb2e32197abe36111830"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"0c27dc7b25f167da3eab5261d5c6db00f30cffc1","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            except kubernetes.client.rest.ApiException:"},{"line_number":69,"context_line":"                time.sleep(1)"},{"line_number":70,"context_line":"                continue"},{"line_number":71,"context_line":"        sg_id \u003d kuryrnetpolicies[\u0027spec\u0027][\u0027securityGroupId\u0027]"},{"line_number":72,"context_line":"        sec_group_rules \u003d self.list_security_group_rules(sg_id)"},{"line_number":73,"context_line":"        ingress_block_found, egress_block_found \u003d False, False"},{"line_number":74,"context_line":"        for rule in sec_group_rules:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_633299a9","line":71,"range":{"start_line":71,"start_character":0,"end_line":71,"end_character":59},"in_reply_to":"3fa7e38b_9f3b79e8","updated":"2019-10-31 07:18:28.000000000","message":"Done","commit_id":"0564717e89af8f96e8f5bb2e32197abe36111830"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"b135987604a7c13de682016081ee81955837f9cc","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        sec_group_rules \u003d self.list_security_group_rules(sg_id)"},{"line_number":73,"context_line":"        ingress_block_found, egress_block_found \u003d False, False"},{"line_number":74,"context_line":"        for rule in sec_group_rules:"},{"line_number":75,"context_line":"            if rule[\u0027direction\u0027] \u003d\u003d \u0027ingress\u0027 and \\"},{"line_number":76,"context_line":"                    rule[\u0027remote_ip_prefix\u0027] \u003d\u003d ingress_ipblock:"},{"line_number":77,"context_line":"                ingress_block_found \u003d True"},{"line_number":78,"context_line":"            if rule[\u0027direction\u0027] \u003d\u003d \u0027egress\u0027 and \\"},{"line_number":79,"context_line":"                    rule[\u0027remote_ip_prefix\u0027] \u003d\u003d egress_ipblock:"},{"line_number":80,"context_line":"                egress_block_found \u003d True"},{"line_number":81,"context_line":"        self.assertTrue(ingress_block_found and egress_block_found)"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_ff7b8dbb","line":79,"range":{"start_line":75,"start_character":0,"end_line":79,"end_character":63},"updated":"2019-10-30 08:44:08.000000000","message":"OpenStack prefers using parentheses to wrap lines [1].\n\n[1] https://docs.openstack.org/hacking/latest/user/hacking.html#general","commit_id":"0564717e89af8f96e8f5bb2e32197abe36111830"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"0c27dc7b25f167da3eab5261d5c6db00f30cffc1","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        sec_group_rules \u003d self.list_security_group_rules(sg_id)"},{"line_number":73,"context_line":"        ingress_block_found, egress_block_found \u003d False, False"},{"line_number":74,"context_line":"        for rule in sec_group_rules:"},{"line_number":75,"context_line":"            if rule[\u0027direction\u0027] \u003d\u003d \u0027ingress\u0027 and \\"},{"line_number":76,"context_line":"                    rule[\u0027remote_ip_prefix\u0027] \u003d\u003d ingress_ipblock:"},{"line_number":77,"context_line":"                ingress_block_found \u003d True"},{"line_number":78,"context_line":"            if rule[\u0027direction\u0027] \u003d\u003d \u0027egress\u0027 and \\"},{"line_number":79,"context_line":"                    rule[\u0027remote_ip_prefix\u0027] \u003d\u003d egress_ipblock:"},{"line_number":80,"context_line":"                egress_block_found \u003d True"},{"line_number":81,"context_line":"        self.assertTrue(ingress_block_found and egress_block_found)"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_83ed55f1","line":79,"range":{"start_line":75,"start_character":0,"end_line":79,"end_character":63},"in_reply_to":"3fa7e38b_ff7b8dbb","updated":"2019-10-31 07:18:28.000000000","message":"Done","commit_id":"0564717e89af8f96e8f5bb2e32197abe36111830"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"b135987604a7c13de682016081ee81955837f9cc","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            if rule[\u0027direction\u0027] \u003d\u003d \u0027egress\u0027 and \\"},{"line_number":79,"context_line":"                    rule[\u0027remote_ip_prefix\u0027] \u003d\u003d egress_ipblock:"},{"line_number":80,"context_line":"                egress_block_found \u003d True"},{"line_number":81,"context_line":"        self.assertTrue(ingress_block_found and egress_block_found)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    @decorators.idempotent_id(\u002724577a9b-1d29-409b-8b60-da3b49d776b1\u0027)"},{"line_number":84,"context_line":"    def test_create_delete_network_policy(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_1f2789c9","line":81,"range":{"start_line":81,"start_character":0,"end_line":81,"end_character":67},"updated":"2019-10-30 08:44:08.000000000","message":"This should be separate assertTrue so we know which rule is missing. Useful for debugging.","commit_id":"0564717e89af8f96e8f5bb2e32197abe36111830"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"fe19adba5432a3287e0ed85a6895cef4e1ddace7","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            if rule[\u0027direction\u0027] \u003d\u003d \u0027egress\u0027 and \\"},{"line_number":79,"context_line":"                    rule[\u0027remote_ip_prefix\u0027] \u003d\u003d egress_ipblock:"},{"line_number":80,"context_line":"                egress_block_found \u003d True"},{"line_number":81,"context_line":"        self.assertTrue(ingress_block_found and egress_block_found)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    @decorators.idempotent_id(\u002724577a9b-1d29-409b-8b60-da3b49d776b1\u0027)"},{"line_number":84,"context_line":"    def test_create_delete_network_policy(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_5f73c1e7","line":81,"range":{"start_line":81,"start_character":0,"end_line":81,"end_character":67},"updated":"2019-10-30 08:39:30.000000000","message":"do we want to include also connectivity testing? not just SG creation? what if SG is not attached to the respective pods?","commit_id":"0564717e89af8f96e8f5bb2e32197abe36111830"},{"author":{"_account_id":4727,"name":"Itzik Brown","email":"itzikb@redhat.com","username":"itzikb1"},"change_message_id":"0c27dc7b25f167da3eab5261d5c6db00f30cffc1","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            if rule[\u0027direction\u0027] \u003d\u003d \u0027egress\u0027 and \\"},{"line_number":79,"context_line":"                    rule[\u0027remote_ip_prefix\u0027] \u003d\u003d egress_ipblock:"},{"line_number":80,"context_line":"                egress_block_found \u003d True"},{"line_number":81,"context_line":"        self.assertTrue(ingress_block_found and egress_block_found)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    @decorators.idempotent_id(\u002724577a9b-1d29-409b-8b60-da3b49d776b1\u0027)"},{"line_number":84,"context_line":"    def test_create_delete_network_policy(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_638e192f","line":81,"range":{"start_line":81,"start_character":0,"end_line":81,"end_character":67},"in_reply_to":"3fa7e38b_1f2789c9","updated":"2019-10-31 07:18:28.000000000","message":"@Luis, I think we have https://review.opendev.org/#/c/674482/ for that\n@Michal, Done","commit_id":"0564717e89af8f96e8f5bb2e32197abe36111830"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"275311f34b12f36157dc820716de9e7f38b3a657","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        sec_group_rules \u003d self.list_security_group_rules(sg_id)"},{"line_number":70,"context_line":"        ingress_block_found, egress_block_found \u003d False, False"},{"line_number":71,"context_line":"        for rule in sec_group_rules:"},{"line_number":72,"context_line":"            if (rule[\u0027direction\u0027] \u003d\u003d \u0027ingress\u0027 and"},{"line_number":73,"context_line":"                    rule[\u0027remote_ip_prefix\u0027] \u003d\u003d ingress_ipblock):"},{"line_number":74,"context_line":"                ingress_block_found \u003d True"},{"line_number":75,"context_line":"            if (rule[\u0027direction\u0027] \u003d\u003d \u0027egress\u0027 and"},{"line_number":76,"context_line":"                    rule[\u0027remote_ip_prefix\u0027] \u003d\u003d egress_ipblock):"},{"line_number":77,"context_line":"                egress_block_found \u003d True"},{"line_number":78,"context_line":"        self.assertTrue(ingress_block_found)"},{"line_number":79,"context_line":"        self.assertTrue(egress_block_found)"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_5d3718ff","line":77,"range":{"start_line":72,"start_character":0,"end_line":77,"end_character":41},"updated":"2019-11-03 12:14:00.000000000","message":"You could check if the rule port matches the one defined in the policy. Also, it\u0027s good to check if there isn\u0027t any other rule allowing different ingress/egress than the ones defined in the Network Policy. Note that is OK to have a rule allowing traffic from the SVC subnet.","commit_id":"c509caa226438d5171024b4b98c62a5d7a549ecf"}]}
