)]}'
{"doc/source/specs/queens/network_policy.rst":[{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"c657251a7b82840cb62f4fce486b97ab1b050429","unresolved":false,"context_lines":[{"line_number":164,"context_line":"by the NetworkPolicyEgressRule\u0027s selector are verified."},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"To keep track of the pods that have container(s) matching a named port,"},{"line_number":167,"context_line":"a new field needs to be added to the security group rule of the Custom Resource Definition,"},{"line_number":168,"context_line":"containing the IP and the namespace of the affected resources. This way, the process"},{"line_number":169,"context_line":"of creating, deleting or updating a security group rule on pod events is facilitated."},{"line_number":170,"context_line":""}],"source_content_type":"text/x-rst","patch_set":10,"id":"dfbec78f_08b0b689","line":167,"range":{"start_line":167,"start_character":38,"end_line":167,"end_character":90},"updated":"2019-05-14 08:52:25.000000000","message":"what custom resource definition? kuryrnetpolicy?","commit_id":"a2477393ec5e5f6fd6bc1a815fdd1364b1b35c8e"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"c657251a7b82840cb62f4fce486b97ab1b050429","unresolved":false,"context_lines":[{"line_number":165,"context_line":""},{"line_number":166,"context_line":"To keep track of the pods that have container(s) matching a named port,"},{"line_number":167,"context_line":"a new field needs to be added to the security group rule of the Custom Resource Definition,"},{"line_number":168,"context_line":"containing the IP and the namespace of the affected resources. This way, the process"},{"line_number":169,"context_line":"of creating, deleting or updating a security group rule on pod events is facilitated."},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"Lets Assume the following pod and network policy are created"}],"source_content_type":"text/x-rst","patch_set":10,"id":"dfbec78f_886906fa","line":168,"range":{"start_line":168,"start_character":0,"end_line":168,"end_character":61},"updated":"2019-05-14 08:52:25.000000000","message":"where is that added? I don\u0027t see it on the example. Do you refer to the remote_ip_prefix field?","commit_id":"a2477393ec5e5f6fd6bc1a815fdd1364b1b35c8e"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"c657251a7b82840cb62f4fce486b97ab1b050429","unresolved":false,"context_lines":[{"line_number":168,"context_line":"containing the IP and the namespace of the affected resources. This way, the process"},{"line_number":169,"context_line":"of creating, deleting or updating a security group rule on pod events is facilitated."},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"Lets Assume the following pod and network policy are created"},{"line_number":172,"context_line":"(based on Kubernetes Upstream e2e tests [11]_):"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"  .. code-block:: yaml"}],"source_content_type":"text/x-rst","patch_set":10,"id":"dfbec78f_881a66c9","line":171,"range":{"start_line":171,"start_character":5,"end_line":171,"end_character":6},"updated":"2019-05-14 08:52:25.000000000","message":"a","commit_id":"a2477393ec5e5f6fd6bc1a815fdd1364b1b35c8e"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"d2d1bb7452b69fcc11bdb6747b1215b1c4723303","unresolved":false,"context_lines":[{"line_number":217,"context_line":"      policyTypes:"},{"line_number":218,"context_line":"      - Ingress"},{"line_number":219,"context_line":"      ingress:"},{"line_number":220,"context_line":"      - from:"},{"line_number":221,"context_line":"        ports:"},{"line_number":222,"context_line":"        - protocol: TCP"},{"line_number":223,"context_line":"          port: serve-80"}],"source_content_type":"text/x-rst","patch_set":12,"id":"bfb3d3c7_0594c58a","line":220,"range":{"start_line":220,"start_character":8,"end_line":220,"end_character":13},"updated":"2019-05-17 08:15:45.000000000","message":"should this be removed?","commit_id":"e62f703984ba4324673f7d0b25bd19761cf8bc37"}],"kuryr_kubernetes/controller/drivers/network_policy_security_groups.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"56372ffa3d7f0962a7569e471bc138b046b03eb9","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        remote_ip_prefixes \u003d crd_rule.get(\u0027remote_ip_prefixes\u0027)"},{"line_number":71,"context_line":"        min_port \u003d crd_rule[\u0027security_group_rule\u0027].get(\u0027port_range_min\u0027)"},{"line_number":72,"context_line":"        max_port \u003d crd_rule[\u0027security_group_rule\u0027].get(\u0027port_range_max\u0027)"},{"line_number":73,"context_line":"        port_range \u003d range(min_port, max_port + 1)"},{"line_number":74,"context_line":"        if remote_ip_prefixes and container_port in port_range:"},{"line_number":75,"context_line":"            return crd_rule"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3fce034c_7b290488","line":73,"range":{"start_line":73,"start_character":8,"end_line":73,"end_character":50},"updated":"2019-05-31 14:19:40.000000000","message":"I don\u0027t think this is a good idea, it has performance implications. Would be much better to just do something like this:\n\n if min_port \u003e\u003d container_port and container_port \u003c\u003d max_port","commit_id":"b0385d14f911375f04ec14f63941f5ff1832fe24"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"1d3544390dbe8c9303f350bd6df0c168a66aa9b4","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                else:"},{"line_number":95,"context_line":"                    matched_pods[container_port] \u003d pod_info"},{"line_number":96,"context_line":"        else:"},{"line_number":97,"context_line":"            matched \u003d True"},{"line_number":98,"context_line":"            pod_ip \u003d driver_utils.get_pod_ip(rule_selected_pod)"},{"line_number":99,"context_line":"            sg_rule \u003d driver_utils.create_security_group_rule_body("},{"line_number":100,"context_line":"                sg_id, direction, container_port,"}],"source_content_type":"text/x-python","patch_set":10,"id":"dfbec78f_23e7ddae","line":97,"range":{"start_line":97,"start_character":12,"end_line":97,"end_character":26},"updated":"2019-05-14 09:46:57.000000000","message":"matched seems to be always true, right? either at if (line 86) or else (line 96). Only if there is no container_ports will be false","commit_id":"a2477393ec5e5f6fd6bc1a815fdd1364b1b35c8e"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"1d3544390dbe8c9303f350bd6df0c168a66aa9b4","unresolved":false,"context_lines":[{"line_number":198,"context_line":"                        _create_sg_rule_on_text_port("},{"line_number":199,"context_line":"                            sg_id, direction, port, [pod],"},{"line_number":200,"context_line":"                            crd_rules, matched, crd,"},{"line_number":201,"context_line":"                            allow_all\u003dallow_all, namespace\u003dnamespace))"},{"line_number":202,"context_line":"    return matched"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"dfbec78f_8369e9f9","line":201,"range":{"start_line":201,"start_character":28,"end_line":201,"end_character":47},"updated":"2019-05-14 09:46:57.000000000","message":"if a namespaceSelector is given, should still be allow_all?","commit_id":"a2477393ec5e5f6fd6bc1a815fdd1364b1b35c8e"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"059c0f27e60e6b0cbb1a7d4ac8161f57663405ea","unresolved":false,"context_lines":[{"line_number":198,"context_line":"                        _create_sg_rule_on_text_port("},{"line_number":199,"context_line":"                            sg_id, direction, port, [pod],"},{"line_number":200,"context_line":"                            crd_rules, matched, crd,"},{"line_number":201,"context_line":"                            allow_all\u003dallow_all, namespace\u003dnamespace))"},{"line_number":202,"context_line":"    return matched"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"dfbec78f_57116a51","line":201,"range":{"start_line":201,"start_character":28,"end_line":201,"end_character":47},"in_reply_to":"dfbec78f_8369e9f9","updated":"2019-05-14 13:51:39.000000000","message":"This is only being forwarded to next methods, to be handled there.","commit_id":"a2477393ec5e5f6fd6bc1a815fdd1364b1b35c8e"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"1d3544390dbe8c9303f350bd6df0c168a66aa9b4","unresolved":false,"context_lines":[{"line_number":225,"context_line":"        if pod_namespace \u003d\u003d policy_namespace:"},{"line_number":226,"context_line":"            matched \u003d _create_sg_rules(crd, pod, pod_selector, rule_block,"},{"line_number":227,"context_line":"                                       crd_rules, direction, matched,"},{"line_number":228,"context_line":"                                       pod_namespace)"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    return matched, crd_rules"},{"line_number":231,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"dfbec78f_634dd598","line":228,"range":{"start_line":228,"start_character":39,"end_line":228,"end_character":52},"updated":"2019-05-14 09:46:57.000000000","message":"use namespace\u003dpod_namespace as in line 223","commit_id":"a2477393ec5e5f6fd6bc1a815fdd1364b1b35c8e"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"1d3544390dbe8c9303f350bd6df0c168a66aa9b4","unresolved":false,"context_lines":[{"line_number":308,"context_line":"                matched, crd_rules \u003d _parse_selectors_on_namespace("},{"line_number":309,"context_line":"                    crd, direction, pod_selector, namespace_selector,"},{"line_number":310,"context_line":"                    rule_block, crd_rules, namespace)"},{"line_number":311,"context_line":"        if pod and not matched:"},{"line_number":312,"context_line":"            for port in rule_block.get(\u0027ports\u0027, []):"},{"line_number":313,"context_line":"                if type(port.get(\u0027port\u0027)) is not int:"},{"line_number":314,"context_line":"                    sg_id \u003d crd[\u0027spec\u0027][\u0027securityGroupId\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"dfbec78f_a3042d19","line":311,"range":{"start_line":311,"start_character":8,"end_line":311,"end_character":31},"updated":"2019-05-14 09:46:57.000000000","message":"add a note specifying what specific case it covers","commit_id":"a2477393ec5e5f6fd6bc1a815fdd1364b1b35c8e"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"d2d1bb7452b69fcc11bdb6747b1215b1c4723303","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                                          port, rule_selected_pod):"},{"line_number":82,"context_line":"    \"\"\"Create security group rules based on container ports"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    If it\u0027s a allow from/to everywhere rule or a rule with a"},{"line_number":85,"context_line":"    NamespaceSelector, update a sg rule that might already exist"},{"line_number":86,"context_line":"    and match the named port or create a new one with the"},{"line_number":87,"context_line":"    remote_ip_prefixes field containing the matched pod info."}],"source_content_type":"text/x-python","patch_set":12,"id":"bfb3d3c7_e56891bb","line":84,"range":{"start_line":84,"start_character":12,"end_line":84,"end_character":13},"updated":"2019-05-17 08:15:45.000000000","message":"an","commit_id":"e62f703984ba4324673f7d0b25bd19761cf8bc37"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"d2d1bb7452b69fcc11bdb6747b1215b1c4723303","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    \"\"\"Create security group rules based on container ports"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    If it\u0027s a allow from/to everywhere rule or a rule with a"},{"line_number":85,"context_line":"    NamespaceSelector, update a sg rule that might already exist"},{"line_number":86,"context_line":"    and match the named port or create a new one with the"},{"line_number":87,"context_line":"    remote_ip_prefixes field containing the matched pod info."},{"line_number":88,"context_line":"    Otherwise, create rules for each container port without"}],"source_content_type":"text/x-python","patch_set":12,"id":"bfb3d3c7_659a61c6","line":85,"range":{"start_line":85,"start_character":23,"end_line":85,"end_character":29},"updated":"2019-05-17 08:15:45.000000000","message":"updates?","commit_id":"e62f703984ba4324673f7d0b25bd19761cf8bc37"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"d2d1bb7452b69fcc11bdb6747b1215b1c4723303","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    If it\u0027s a allow from/to everywhere rule or a rule with a"},{"line_number":85,"context_line":"    NamespaceSelector, update a sg rule that might already exist"},{"line_number":86,"context_line":"    and match the named port or create a new one with the"},{"line_number":87,"context_line":"    remote_ip_prefixes field containing the matched pod info."},{"line_number":88,"context_line":"    Otherwise, create rules for each container port without"},{"line_number":89,"context_line":"    a remote_ip_prefixes field."}],"source_content_type":"text/x-python","patch_set":12,"id":"bfb3d3c7_859f55b3","line":86,"range":{"start_line":86,"start_character":32,"end_line":86,"end_character":39},"updated":"2019-05-17 08:15:45.000000000","message":"creates","commit_id":"e62f703984ba4324673f7d0b25bd19761cf8bc37"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"d2d1bb7452b69fcc11bdb6747b1215b1c4723303","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    NamespaceSelector, update a sg rule that might already exist"},{"line_number":86,"context_line":"    and match the named port or create a new one with the"},{"line_number":87,"context_line":"    remote_ip_prefixes field containing the matched pod info."},{"line_number":88,"context_line":"    Otherwise, create rules for each container port without"},{"line_number":89,"context_line":"    a remote_ip_prefixes field."},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    param matched_pods: List of dicts where the key is a container"}],"source_content_type":"text/x-python","patch_set":12,"id":"bfb3d3c7_25a46908","line":88,"range":{"start_line":88,"start_character":14,"end_line":88,"end_character":22},"updated":"2019-05-17 08:15:45.000000000","message":"creates","commit_id":"e62f703984ba4324673f7d0b25bd19761cf8bc37"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"d2d1bb7452b69fcc11bdb6747b1215b1c4723303","unresolved":false,"context_lines":[{"line_number":330,"context_line":"                matched, crd_rules \u003d _parse_selectors_on_namespace("},{"line_number":331,"context_line":"                    crd, direction, pod_selector, namespace_selector,"},{"line_number":332,"context_line":"                    rule_block, crd_rules, namespace)"},{"line_number":333,"context_line":"        # NOTE(maysams): Cover the case of a network policy that allows"},{"line_number":334,"context_line":"        # from everywhere on a named port."},{"line_number":335,"context_line":"        if pod and not matched:"},{"line_number":336,"context_line":"            for port in rule_block.get(\u0027ports\u0027, []):"},{"line_number":337,"context_line":"                if type(port.get(\u0027port\u0027)) is not int:"}],"source_content_type":"text/x-python","patch_set":12,"id":"bfb3d3c7_85ed1527","line":334,"range":{"start_line":333,"start_character":0,"end_line":334,"end_character":42},"updated":"2019-05-17 08:15:45.000000000","message":"I would add: ,e.g., when there is no \u0027from\u0027 specified","commit_id":"e62f703984ba4324673f7d0b25bd19761cf8bc37"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"56372ffa3d7f0962a7569e471bc138b046b03eb9","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        remote_ip_prefixes \u003d crd_rule.get(\u0027remote_ip_prefixes\u0027)"},{"line_number":71,"context_line":"        min_port \u003d crd_rule[\u0027security_group_rule\u0027].get(\u0027port_range_min\u0027)"},{"line_number":72,"context_line":"        max_port \u003d crd_rule[\u0027security_group_rule\u0027].get(\u0027port_range_max\u0027)"},{"line_number":73,"context_line":"        port_range \u003d range(min_port, max_port + 1)"},{"line_number":74,"context_line":"        if remote_ip_prefixes and container_port in port_range:"},{"line_number":75,"context_line":"            return crd_rule"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"bfb3d3c7_8839c1a4","line":73,"range":{"start_line":73,"start_character":0,"end_line":73,"end_character":50},"updated":"2019-05-31 14:19:40.000000000","message":"I don\u0027t think this is a good idea, it has performance implications. Would be much better to just do something like this:\n\n if min_port \u003e\u003d container_port and container_port \u003c\u003d max_port","commit_id":"4214f954f7a294329522c8e976f746a613b280a6"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"72377b0b2f4cd99d3c6a5f46d5c6e910293fcdbd","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        remote_ip_prefixes \u003d crd_rule.get(\u0027remote_ip_prefixes\u0027)"},{"line_number":71,"context_line":"        min_port \u003d crd_rule[\u0027security_group_rule\u0027].get(\u0027port_range_min\u0027)"},{"line_number":72,"context_line":"        max_port \u003d crd_rule[\u0027security_group_rule\u0027].get(\u0027port_range_max\u0027)"},{"line_number":73,"context_line":"        port_range \u003d range(min_port, max_port + 1)"},{"line_number":74,"context_line":"        if remote_ip_prefixes and container_port in port_range:"},{"line_number":75,"context_line":"            return crd_rule"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9fb8cfa7_56c5718d","line":73,"range":{"start_line":73,"start_character":0,"end_line":73,"end_character":50},"in_reply_to":"bfb3d3c7_8839c1a4","updated":"2019-06-04 13:06:20.000000000","message":"Done","commit_id":"4214f954f7a294329522c8e976f746a613b280a6"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"56372ffa3d7f0962a7569e471bc138b046b03eb9","unresolved":false,"context_lines":[{"line_number":493,"context_line":"                else:"},{"line_number":494,"context_line":"                    i_rules.append(i_rule)"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"            for e_rule in egress_rule_list:"},{"line_number":497,"context_line":"                LOG.debug(\"Parsing egress rule: %r\", e_rule)"},{"line_number":498,"context_line":"                rule_namespace \u003d e_rule.get(\u0027namespace\u0027, None)"},{"line_number":499,"context_line":"                remote_ip_prefixes \u003d e_rule.get(\u0027remote_ip_prefixes\u0027, [])"},{"line_number":500,"context_line":"                if rule_namespace and rule_namespace \u003d\u003d ns_name:"},{"line_number":501,"context_line":"                    matched \u003d True"},{"line_number":502,"context_line":"                    driver_utils.delete_security_group_rule("},{"line_number":503,"context_line":"                        e_rule[\u0027security_group_rule\u0027][\u0027id\u0027])"},{"line_number":504,"context_line":"                for remote_ip, namespace in remote_ip_prefixes:"},{"line_number":505,"context_line":"                    if namespace \u003d\u003d ns_name:"},{"line_number":506,"context_line":"                        matched \u003d True"},{"line_number":507,"context_line":"                        remote_ip_prefixes.pop(remote_ip)"},{"line_number":508,"context_line":"                        if remote_ip_prefixes:"},{"line_number":509,"context_line":"                            e_rule[\u0027remote_ip_prefixes\u0027] \u003d remote_ip_prefixes"},{"line_number":510,"context_line":"                            e_rules.append(e_rule)"},{"line_number":511,"context_line":"                else:"},{"line_number":512,"context_line":"                    e_rules.append(e_rule)"},{"line_number":513,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"bfb3d3c7_685b2df5","line":510,"range":{"start_line":496,"start_character":0,"end_line":510,"end_character":50},"updated":"2019-05-31 14:19:40.000000000","message":"This is literally the same as above code block, isn\u0027t it? Why not combine it into a single function?","commit_id":"4214f954f7a294329522c8e976f746a613b280a6"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"72377b0b2f4cd99d3c6a5f46d5c6e910293fcdbd","unresolved":false,"context_lines":[{"line_number":493,"context_line":"                else:"},{"line_number":494,"context_line":"                    i_rules.append(i_rule)"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"            for e_rule in egress_rule_list:"},{"line_number":497,"context_line":"                LOG.debug(\"Parsing egress rule: %r\", e_rule)"},{"line_number":498,"context_line":"                rule_namespace \u003d e_rule.get(\u0027namespace\u0027, None)"},{"line_number":499,"context_line":"                remote_ip_prefixes \u003d e_rule.get(\u0027remote_ip_prefixes\u0027, [])"},{"line_number":500,"context_line":"                if rule_namespace and rule_namespace \u003d\u003d ns_name:"},{"line_number":501,"context_line":"                    matched \u003d True"},{"line_number":502,"context_line":"                    driver_utils.delete_security_group_rule("},{"line_number":503,"context_line":"                        e_rule[\u0027security_group_rule\u0027][\u0027id\u0027])"},{"line_number":504,"context_line":"                for remote_ip, namespace in remote_ip_prefixes:"},{"line_number":505,"context_line":"                    if namespace \u003d\u003d ns_name:"},{"line_number":506,"context_line":"                        matched \u003d True"},{"line_number":507,"context_line":"                        remote_ip_prefixes.pop(remote_ip)"},{"line_number":508,"context_line":"                        if remote_ip_prefixes:"},{"line_number":509,"context_line":"                            e_rule[\u0027remote_ip_prefixes\u0027] \u003d remote_ip_prefixes"},{"line_number":510,"context_line":"                            e_rules.append(e_rule)"},{"line_number":511,"context_line":"                else:"},{"line_number":512,"context_line":"                    e_rules.append(e_rule)"},{"line_number":513,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9fb8cfa7_1654d9c9","line":510,"range":{"start_line":496,"start_character":0,"end_line":510,"end_character":50},"in_reply_to":"bfb3d3c7_685b2df5","updated":"2019-06-04 13:06:20.000000000","message":"Thanks! I also updated the method \"delete_sg_rules\" since it had same problem as this one.","commit_id":"4214f954f7a294329522c8e976f746a613b280a6"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"0daf67677447fd0a9a1519e362e8badad020a180","unresolved":false,"context_lines":[{"line_number":493,"context_line":"                else:"},{"line_number":494,"context_line":"                    i_rules.append(i_rule)"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"            for e_rule in egress_rule_list:"},{"line_number":497,"context_line":"                LOG.debug(\"Parsing egress rule: %r\", e_rule)"},{"line_number":498,"context_line":"                rule_namespace \u003d e_rule.get(\u0027namespace\u0027, None)"},{"line_number":499,"context_line":"                remote_ip_prefixes \u003d e_rule.get(\u0027remote_ip_prefixes\u0027, [])"},{"line_number":500,"context_line":"                if rule_namespace and rule_namespace \u003d\u003d ns_name:"},{"line_number":501,"context_line":"                    matched \u003d True"},{"line_number":502,"context_line":"                    driver_utils.delete_security_group_rule("},{"line_number":503,"context_line":"                        e_rule[\u0027security_group_rule\u0027][\u0027id\u0027])"},{"line_number":504,"context_line":"                for remote_ip, namespace in remote_ip_prefixes:"},{"line_number":505,"context_line":"                    if namespace \u003d\u003d ns_name:"},{"line_number":506,"context_line":"                        matched \u003d True"},{"line_number":507,"context_line":"                        remote_ip_prefixes.pop(remote_ip)"},{"line_number":508,"context_line":"                        if remote_ip_prefixes:"},{"line_number":509,"context_line":"                            e_rule[\u0027remote_ip_prefixes\u0027] \u003d remote_ip_prefixes"},{"line_number":510,"context_line":"                            e_rules.append(e_rule)"},{"line_number":511,"context_line":"                else:"},{"line_number":512,"context_line":"                    e_rules.append(e_rule)"},{"line_number":513,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9fb8cfa7_7812e95a","line":510,"range":{"start_line":496,"start_character":0,"end_line":510,"end_character":50},"in_reply_to":"bfb3d3c7_685b2df5","updated":"2019-06-04 06:55:59.000000000","message":"good idea! we had something similar in another part of NP code and did the same to avoid code duplication. Thanks!","commit_id":"4214f954f7a294329522c8e976f746a613b280a6"}]}
