)]}'
{"kuryr_kubernetes/controller/drivers/network_policy.py":[{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"fbbf0684861cf6051be1273fa0fee098e2007d7f","unresolved":false,"context_lines":[{"line_number":314,"context_line":"                if sg_rule not in crd_rules:"},{"line_number":315,"context_line":"                    crd_rules.append(sg_rule)"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def _create_sg_rule_body_on_text_port("},{"line_number":318,"context_line":"        self, sg_id, direction, port, resources, crd_rules, pod_selector,"},{"line_number":319,"context_line":"            policy_namespace, allow_all\u003dFalse):"},{"line_number":320,"context_line":"        selected_pods \u003d driver_utils.get_pods("},{"line_number":321,"context_line":"            pod_selector, policy_namespace).get(\u0027items\u0027)"},{"line_number":322,"context_line":"        matched_pods \u003d {}"}],"source_content_type":"text/x-python","patch_set":12,"id":"3fce034c_2a65d3e1","line":319,"range":{"start_line":317,"start_character":0,"end_line":319,"end_character":47},"updated":"2019-04-15 10:17:33.000000000","message":"perhaps part can be moved to line 317","commit_id":"af8922c89145d3ae70a98d0342bd8c2ef1563445"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"fbbf0684861cf6051be1273fa0fee098e2007d7f","unresolved":false,"context_lines":[{"line_number":317,"context_line":"    def _create_sg_rule_body_on_text_port("},{"line_number":318,"context_line":"        self, sg_id, direction, port, resources, crd_rules, pod_selector,"},{"line_number":319,"context_line":"            policy_namespace, allow_all\u003dFalse):"},{"line_number":320,"context_line":"        selected_pods \u003d driver_utils.get_pods("},{"line_number":321,"context_line":"            pod_selector, policy_namespace).get(\u0027items\u0027)"},{"line_number":322,"context_line":"        matched_pods \u003d {}"},{"line_number":323,"context_line":"        if selected_pods and direction \u003d\u003d \"ingress\":"},{"line_number":324,"context_line":"            for selected_pod in selected_pods:"},{"line_number":325,"context_line":"                container_ports \u003d driver_utils.get_ports(selected_pod, port)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3fce034c_ea8cab80","line":322,"range":{"start_line":320,"start_character":0,"end_line":322,"end_character":25},"updated":"2019-04-15 10:17:33.000000000","message":"this is only needed for ingress, right? Perhaps it will be more clear if you do it as:\nif direction \u003d\u003d \"ingress\":\n ....\nelif direction \u003d\u003d \"egress\":\n ....\n\nThen, inside the ingress if you can get the selected_pods and iterate over them","commit_id":"af8922c89145d3ae70a98d0342bd8c2ef1563445"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"fbbf0684861cf6051be1273fa0fee098e2007d7f","unresolved":false,"context_lines":[{"line_number":442,"context_line":"                        cidr_list \u003d netaddr.cidr_exclude("},{"line_number":443,"context_line":"                            ipblock.get(\u0027cidr\u0027), cidr_except)"},{"line_number":444,"context_line":"                        cidr_list \u003d [{\u0027cidr\u0027: str(cidr),"},{"line_number":445,"context_line":"                                      \u0027namespace\u0027: policy_namespace}"},{"line_number":446,"context_line":"                                     for cidr in cidr_list]"},{"line_number":447,"context_line":"                        allowed_resources.extend(cidr_list)"},{"line_number":448,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3fce034c_ca6d2f99","line":445,"range":{"start_line":445,"start_character":38,"end_line":445,"end_character":67},"updated":"2019-04-15 10:17:33.000000000","message":"is it correct to account for ipblock cidrs belonging to policy_namespace? how ipblock and named ports are meant to work together?","commit_id":"af8922c89145d3ae70a98d0342bd8c2ef1563445"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"fbbf0684861cf6051be1273fa0fee098e2007d7f","unresolved":false,"context_lines":[{"line_number":635,"context_line":"        return pods.get(\u0027items\u0027)"},{"line_number":636,"context_line":""},{"line_number":637,"context_line":"    def _get_resource_details(self, resource):"},{"line_number":638,"context_line":"        if not self._is_namespace(resource):"},{"line_number":639,"context_line":"            cidr \u003d resource[\u0027status\u0027].get(\u0027podIP\u0027)"},{"line_number":640,"context_line":"            namespace \u003d resource[\u0027metadata\u0027][\u0027namespace\u0027]"},{"line_number":641,"context_line":"        elif resource.get(\u0027cidr\u0027):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3fce034c_aa022308","line":638,"range":{"start_line":638,"start_character":8,"end_line":638,"end_character":44},"updated":"2019-04-15 10:17:33.000000000","message":"is this checking if the resource passed is a namespace? It is not clear to me since it is returning the podIP, as well as the function is checking the containers in the spec (and using a double not, one on 638, one on 651)","commit_id":"af8922c89145d3ae70a98d0342bd8c2ef1563445"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"5ea0b941aeba599b911996dcc2b748e1a6171aa3","unresolved":false,"context_lines":[{"line_number":324,"context_line":"            for selected_pod in selected_pods:"},{"line_number":325,"context_line":"                container_ports \u003d driver_utils.get_ports(selected_pod, port)"},{"line_number":326,"context_line":"                for resource in resources:"},{"line_number":327,"context_line":"                    # NOTE(maysams) Skipping objects that refers to ipblocks"},{"line_number":328,"context_line":"                    # and consequently do not contains a spec field"},{"line_number":329,"context_line":"                    if not resource.get(\u0027spec\u0027):"},{"line_number":330,"context_line":"                        continue"},{"line_number":331,"context_line":"                    self._create_sg_rules_with_container_ports("},{"line_number":332,"context_line":"                        container_ports, allow_all, resource, matched_pods,"},{"line_number":333,"context_line":"                        crd_rules, sg_id, direction, port)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3fce034c_fd945e46","line":330,"range":{"start_line":327,"start_character":0,"end_line":330,"end_character":32},"updated":"2019-04-16 08:13:45.000000000","message":"this should be supported at port defition should be on the pods where the NP applies","commit_id":"f5530a7f843cb177eaf54a3edbbf6c2fb239dfad"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"5ea0b941aeba599b911996dcc2b748e1a6171aa3","unresolved":false,"context_lines":[{"line_number":333,"context_line":"                        crd_rules, sg_id, direction, port)"},{"line_number":334,"context_line":"        elif direction \u003d\u003d \"egress\":"},{"line_number":335,"context_line":"            for resource in resources:"},{"line_number":336,"context_line":"                # NOTE(maysams) Skipping objects that refers to ipblocks"},{"line_number":337,"context_line":"                # and consequently do not contains a spec field"},{"line_number":338,"context_line":"                if not resource.get(\u0027spec\u0027):"},{"line_number":339,"context_line":"                    continue"},{"line_number":340,"context_line":"                container_ports \u003d driver_utils.get_ports(resource, port)"},{"line_number":341,"context_line":"                self._create_sg_rules_with_container_ports("},{"line_number":342,"context_line":"                    container_ports, allow_all, resource, matched_pods,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3fce034c_7d8aae1b","line":339,"range":{"start_line":336,"start_character":0,"end_line":339,"end_character":28},"updated":"2019-04-16 08:13:45.000000000","message":"this should contain a warning message about the rules being not created due to ipblock for egress with named port not being supported. I\u0027m not even sure if the comment should be a NOTE as right now, or a FIXME. Thought I\u0027m not sure that could even be fixed (or even need to be fixed)","commit_id":"f5530a7f843cb177eaf54a3edbbf6c2fb239dfad"}],"tox.ini":[{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"9b4eadf6e9cccd08fdd97bcb73965d57d631331b","unresolved":false,"context_lines":[{"line_number":33,"context_line":"commands \u003d oslo_debug_helper -t kuryr_kubernetes/tests {posargs}"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"[testenv:pep8]"},{"line_number":36,"context_line":"basepython \u003d python2.7"},{"line_number":37,"context_line":"commands \u003d flake8"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"[testenv:venv]"}],"source_content_type":"text/x-properties","patch_set":9,"id":"5fc1f717_c3892826","line":36,"range":{"start_line":36,"start_character":0,"end_line":36,"end_character":22},"updated":"2019-04-09 07:57:38.000000000","message":"why you change this?","commit_id":"10ab75f98a58b9d23e08972305100cbcac158e7a"}]}
