)]}'
{"ironic_inspector/conf/port_physnet.py":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"912f8d3d6dab860a18e2db7bd88a0792d5110664","unresolved":false,"context_lines":[{"line_number":22,"context_line":"                sample_default\u003d(\u002710.10.10.0/24:physnet_a,\u0027"},{"line_number":23,"context_line":"                                \u002710.10.11.0/24:physnet_b\u0027),"},{"line_number":24,"context_line":"                help\u003d_(\u0027Mapping of IP subnet CIDR to physical network. When \u0027"},{"line_number":25,"context_line":"                       \u0027the port_physical_network processing hook is enabled \u0027"},{"line_number":26,"context_line":"                       \u0027the physical_network property of baremetal ports is \u0027"},{"line_number":27,"context_line":"                       \u0027poulated based on this mapping.\u0027)),"},{"line_number":28,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f4c43b2_da456d17","line":25,"range":{"start_line":25,"start_character":28,"end_line":25,"end_character":49},"updated":"2020-04-15 13:59:16.000000000","message":"name needs to match","commit_id":"100535ba4b697f3c56c18d339712946a27ee9a03"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"3012dba415413378c9ea71665dcfb261deddaa87","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    cfg.DictOpt(\u0027cidr_map\u0027,"},{"line_number":21,"context_line":"                default\u003d{},"},{"line_number":22,"context_line":"                sample_default\u003d(\u002710.10.10.0/24:physnet_a,\u0027"},{"line_number":23,"context_line":"                                \u002710.10.11.0/24:physnet_b\u0027),"},{"line_number":24,"context_line":"                help\u003d_(\u0027Mapping of IP subnet CIDR to physical network. When \u0027"},{"line_number":25,"context_line":"                       \u0027the physnet_cidr_map processing hook is enabled the \u0027"},{"line_number":26,"context_line":"                       \u0027physical_network property of baremetal ports is \u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f4c43b2_2fd52344","line":23,"updated":"2020-04-16 09:26:50.000000000","message":"Is it possible to specify an IPv6 address using this notation?","commit_id":"f9c12c5b9ab116adaf770cf6e5503c961d385c8e"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"d3fd72328cd8cb9dd692b004ec7462f3e0cf26b1","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    cfg.DictOpt(\u0027cidr_map\u0027,"},{"line_number":21,"context_line":"                default\u003d{},"},{"line_number":22,"context_line":"                sample_default\u003d(\u002710.10.10.0/24:physnet_a,\u0027"},{"line_number":23,"context_line":"                                \u002710.10.11.0/24:physnet_b\u0027),"},{"line_number":24,"context_line":"                help\u003d_(\u0027Mapping of IP subnet CIDR to physical network. When \u0027"},{"line_number":25,"context_line":"                       \u0027the physnet_cidr_map processing hook is enabled the \u0027"},{"line_number":26,"context_line":"                       \u0027physical_network property of baremetal ports is \u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f4c43b2_3a4c3f9d","line":23,"in_reply_to":"3f4c43b2_2fd52344","updated":"2020-04-16 11:02:15.000000000","message":"Nope, I thought it would work if either quoting or escaping he \u0027:\u0027, but nothing seems to work.","commit_id":"f9c12c5b9ab116adaf770cf6e5503c961d385c8e"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"6b19c486bbb418bc46ffe3d9e5a6af544e0bf4b8","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    cfg.DictOpt(\u0027cidr_map\u0027,"},{"line_number":21,"context_line":"                default\u003d{},"},{"line_number":22,"context_line":"                sample_default\u003d(\u002710.10.10.0/24:physnet_a,\u0027"},{"line_number":23,"context_line":"                                \u002710.10.11.0/24:physnet_b\u0027),"},{"line_number":24,"context_line":"                help\u003d_(\u0027Mapping of IP subnet CIDR to physical network. When \u0027"},{"line_number":25,"context_line":"                       \u0027the physnet_cidr_map processing hook is enabled the \u0027"},{"line_number":26,"context_line":"                       \u0027physical_network property of baremetal ports is \u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f4c43b2_60bbb871","line":23,"in_reply_to":"3f4c43b2_3a4c3f9d","updated":"2020-04-16 12:52:54.000000000","message":"I changed this to use a ListOpt, and semicolon to separate key (CIDR), value (physnet). The list is converted to a dict by splitting on semicolon in the plugin.","commit_id":"f9c12c5b9ab116adaf770cf6e5503c961d385c8e"}],"ironic_inspector/plugins/physnet_cidr_map.py":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"3dbdc5399a69330c62524830be7493232a1a74c0","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"\"\"\"Port Physical Network Hook\"\"\""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import netaddr"},{"line_number":17,"context_line":"from oslo_config import cfg"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from ironic_inspector.plugins import base_physnet"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f4c43b2_4c2420c7","line":16,"range":{"start_line":16,"start_character":7,"end_line":16,"end_character":14},"updated":"2020-04-14 17:13:55.000000000","message":"ipaddress is standard in py3.","commit_id":"597aae7cda563233f2ee6c1839ebd7721a895682"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"91c4b02b2d92d50d20ce2f540b820b3b1b672434","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"\"\"\"Port Physical Network Hook\"\"\""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import netaddr"},{"line_number":17,"context_line":"from oslo_config import cfg"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from ironic_inspector.plugins import base_physnet"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f4c43b2_01949a36","line":16,"range":{"start_line":16,"start_character":7,"end_line":16,"end_character":14},"in_reply_to":"3f4c43b2_4c2420c7","updated":"2020-04-14 21:22:34.000000000","message":"Done","commit_id":"597aae7cda563233f2ee6c1839ebd7721a895682"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"3dbdc5399a69330c62524830be7493232a1a74c0","unresolved":false,"context_lines":[{"line_number":40,"context_line":"            try:"},{"line_number":41,"context_line":"                ips.append(netaddr.IPAddress(iface.get(\u0027ipv4_address\u0027)))"},{"line_number":42,"context_line":"            except netaddr.core.AddrFormatError:"},{"line_number":43,"context_line":"                ips.append(netaddr.IPAddress(iface.get(\u0027ipv6_address\u0027)))"},{"line_number":44,"context_line":"            except netaddr.core.AddrFormatError:"},{"line_number":45,"context_line":"                pass"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3f4c43b2_0c14d84d","line":43,"range":{"start_line":43,"start_character":16,"end_line":43,"end_character":72},"updated":"2020-04-14 17:13:55.000000000","message":"If the interface would have neither a v4 nor v6 address, we will get an exception here.\n\nAlso possible it could have a v4 and v6 address.","commit_id":"597aae7cda563233f2ee6c1839ebd7721a895682"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"91c4b02b2d92d50d20ce2f540b820b3b1b672434","unresolved":false,"context_lines":[{"line_number":40,"context_line":"            try:"},{"line_number":41,"context_line":"                ips.append(netaddr.IPAddress(iface.get(\u0027ipv4_address\u0027)))"},{"line_number":42,"context_line":"            except netaddr.core.AddrFormatError:"},{"line_number":43,"context_line":"                ips.append(netaddr.IPAddress(iface.get(\u0027ipv6_address\u0027)))"},{"line_number":44,"context_line":"            except netaddr.core.AddrFormatError:"},{"line_number":45,"context_line":"                pass"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3f4c43b2_c1ed92f0","line":43,"range":{"start_line":43,"start_character":16,"end_line":43,"end_character":72},"in_reply_to":"3f4c43b2_0c14d84d","updated":"2020-04-14 21:22:34.000000000","message":"I changed this to iterate over [\u0027ipv4_address\u0027, \u0027ipv6_address\u0027], it should add both addresses to the ips array, or return an empty array if no addresses are present. I added a unit test with inventory data with neither v4 or v6 address.","commit_id":"597aae7cda563233f2ee6c1839ebd7721a895682"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"3dbdc5399a69330c62524830be7493232a1a74c0","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        for net in known_nets:"},{"line_number":56,"context_line":"            for ip in ips:"},{"line_number":57,"context_line":"                if ip in net:"},{"line_number":58,"context_line":"                    try:"},{"line_number":59,"context_line":"                        return CONF.port_physnet.cidr_map[str(net.cidr)]"},{"line_number":60,"context_line":"                    except KeyError:"},{"line_number":61,"context_line":"                        return CONF.port_physnet.cidr_map["},{"line_number":62,"context_line":"                            str(net.cidr).upper()]"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f4c43b2_f21ce26b","line":62,"range":{"start_line":58,"start_character":20,"end_line":62,"end_character":50},"updated":"2020-04-14 17:13:55.000000000","message":"If you iterate over the map keys directly you won\u0027t need this logic.","commit_id":"597aae7cda563233f2ee6c1839ebd7721a895682"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"91c4b02b2d92d50d20ce2f540b820b3b1b672434","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        for net in known_nets:"},{"line_number":56,"context_line":"            for ip in ips:"},{"line_number":57,"context_line":"                if ip in net:"},{"line_number":58,"context_line":"                    try:"},{"line_number":59,"context_line":"                        return CONF.port_physnet.cidr_map[str(net.cidr)]"},{"line_number":60,"context_line":"                    except KeyError:"},{"line_number":61,"context_line":"                        return CONF.port_physnet.cidr_map["},{"line_number":62,"context_line":"                            str(net.cidr).upper()]"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f4c43b2_e177ee39","line":62,"range":{"start_line":58,"start_character":20,"end_line":62,"end_character":50},"in_reply_to":"3f4c43b2_f21ce26b","updated":"2020-04-14 21:22:34.000000000","message":"I rewrote this to use list comprehension with the in net condition.","commit_id":"597aae7cda563233f2ee6c1839ebd7721a895682"}],"ironic_inspector/test/unit/test_plugins_physnet_cidr_map.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"a90e79336d818d5d1359d058774f044752e10c39","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        self.node_info \u003d node_cache.NodeInfo(uuid\u003dself.uuid, started_at\u003d0,"},{"line_number":48,"context_line":"                                             node\u003dself.node, ports\u003dports)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    @mock.patch.object(node_cache.NodeInfo, \u0027patch_port\u0027)"},{"line_number":51,"context_line":"    def test_expected_data(self, mock_patch):"},{"line_number":52,"context_line":"        cfg.CONF.set_override(\u0027cidr_map\u0027, \u00271.1.1.0/24:physnet_a\u0027,"},{"line_number":53,"context_line":"                              group\u003d\u0027port_physnet\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f4c43b2_3d3d202b","line":50,"updated":"2020-04-20 10:16:56.000000000","message":"autospec\u003dTrue everywhere please","commit_id":"92e2d26f158e543f7eca09376058e0819f195b08"}],"releasenotes/notes/physnet-cidr-map-hook-b38bf8051ad5ba69.yaml":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"3dbdc5399a69330c62524830be7493232a1a74c0","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Added PhysicalNetworkHook processing plugin, the plugin uses the IP address"},{"line_number":4,"context_line":"    of interfaces returned during inspection and set the port"},{"line_number":5,"context_line":"    ``physical_network`` via lookup from a cidr to physical network mapping in"},{"line_number":6,"context_line":"    config option ``[port_physnet]/cidr_map``."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"3f4c43b2_32280a85","line":3,"range":{"start_line":3,"start_character":10,"end_line":3,"end_character":29},"updated":"2020-04-14 17:13:55.000000000","message":"``PhysicalNetworkHook``","commit_id":"597aae7cda563233f2ee6c1839ebd7721a895682"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"91c4b02b2d92d50d20ce2f540b820b3b1b672434","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Added PhysicalNetworkHook processing plugin, the plugin uses the IP address"},{"line_number":4,"context_line":"    of interfaces returned during inspection and set the port"},{"line_number":5,"context_line":"    ``physical_network`` via lookup from a cidr to physical network mapping in"},{"line_number":6,"context_line":"    config option ``[port_physnet]/cidr_map``."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"3f4c43b2_01bdbab6","line":3,"range":{"start_line":3,"start_character":10,"end_line":3,"end_character":29},"in_reply_to":"3f4c43b2_32280a85","updated":"2020-04-14 21:22:34.000000000","message":"Done","commit_id":"597aae7cda563233f2ee6c1839ebd7721a895682"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"3dbdc5399a69330c62524830be7493232a1a74c0","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Added PhysicalNetworkHook processing plugin, the plugin uses the IP address"},{"line_number":4,"context_line":"    of interfaces returned during inspection and set the port"},{"line_number":5,"context_line":"    ``physical_network`` via lookup from a cidr to physical network mapping in"},{"line_number":6,"context_line":"    config option ``[port_physnet]/cidr_map``."},{"line_number":7,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":5,"id":"3f4c43b2_122d0e95","line":5,"range":{"start_line":5,"start_character":43,"end_line":5,"end_character":47},"updated":"2020-04-14 17:13:55.000000000","message":"CIDR","commit_id":"597aae7cda563233f2ee6c1839ebd7721a895682"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"91c4b02b2d92d50d20ce2f540b820b3b1b672434","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Added PhysicalNetworkHook processing plugin, the plugin uses the IP address"},{"line_number":4,"context_line":"    of interfaces returned during inspection and set the port"},{"line_number":5,"context_line":"    ``physical_network`` via lookup from a cidr to physical network mapping in"},{"line_number":6,"context_line":"    config option ``[port_physnet]/cidr_map``."},{"line_number":7,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":5,"id":"3f4c43b2_61b2bee8","line":5,"range":{"start_line":5,"start_character":43,"end_line":5,"end_character":47},"in_reply_to":"3f4c43b2_122d0e95","updated":"2020-04-14 21:22:34.000000000","message":"Done","commit_id":"597aae7cda563233f2ee6c1839ebd7721a895682"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"a90e79336d818d5d1359d058774f044752e10c39","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - Added ``physnet_cidr_map`` processing plugin, the plugin uses the IP"},{"line_number":4,"context_line":"    address of interfaces returned during inspection and set the port"},{"line_number":5,"context_line":"    ``physical_network`` via lookup from a CIDR to physical network mapping in"},{"line_number":6,"context_line":"    config option ``[port_physnet]/cidr_map``."}],"source_content_type":"text/x-yaml","patch_set":11,"id":"3f4c43b2_9d46f4bf","line":6,"updated":"2020-04-20 10:16:56.000000000","message":"Please also update the docs","commit_id":"92e2d26f158e543f7eca09376058e0819f195b08"}],"setup.cfg":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"3dbdc5399a69330c62524830be7493232a1a74c0","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    local_link_connection \u003d ironic_inspector.plugins.local_link_connection:GenericLocalLinkConnectionHook"},{"line_number":44,"context_line":"    lldp_basic \u003d ironic_inspector.plugins.lldp_basic:LLDPBasicProcessingHook"},{"line_number":45,"context_line":"    pci_devices \u003d ironic_inspector.plugins.pci_devices:PciDevicesHook"},{"line_number":46,"context_line":"    port_physical_network \u003d ironic_inspector.plugins.physnet_cidr_map:PhysicalNetworkCidrMapHook"},{"line_number":47,"context_line":"ironic_inspector.hooks.node_not_found \u003d"},{"line_number":48,"context_line":"    example \u003d ironic_inspector.plugins.example:example_not_found_hook"},{"line_number":49,"context_line":"    enroll \u003d ironic_inspector.plugins.discovery:enroll_node_not_found_hook"}],"source_content_type":"text/x-ttcn-cfg","patch_set":5,"id":"3f4c43b2_f23502dc","line":46,"range":{"start_line":46,"start_character":4,"end_line":46,"end_character":25},"updated":"2020-04-14 17:13:55.000000000","message":"maybe port_cidr_physnet?","commit_id":"597aae7cda563233f2ee6c1839ebd7721a895682"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"91c4b02b2d92d50d20ce2f540b820b3b1b672434","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    local_link_connection \u003d ironic_inspector.plugins.local_link_connection:GenericLocalLinkConnectionHook"},{"line_number":44,"context_line":"    lldp_basic \u003d ironic_inspector.plugins.lldp_basic:LLDPBasicProcessingHook"},{"line_number":45,"context_line":"    pci_devices \u003d ironic_inspector.plugins.pci_devices:PciDevicesHook"},{"line_number":46,"context_line":"    port_physical_network \u003d ironic_inspector.plugins.physnet_cidr_map:PhysicalNetworkCidrMapHook"},{"line_number":47,"context_line":"ironic_inspector.hooks.node_not_found \u003d"},{"line_number":48,"context_line":"    example \u003d ironic_inspector.plugins.example:example_not_found_hook"},{"line_number":49,"context_line":"    enroll \u003d ironic_inspector.plugins.discovery:enroll_node_not_found_hook"}],"source_content_type":"text/x-ttcn-cfg","patch_set":5,"id":"3f4c43b2_2106f687","line":46,"range":{"start_line":46,"start_character":4,"end_line":46,"end_character":25},"in_reply_to":"3f4c43b2_f23502dc","updated":"2020-04-14 21:22:34.000000000","message":"I changed it to physnet_cidr_map, follows the pattern of the other processing hooks.","commit_id":"597aae7cda563233f2ee6c1839ebd7721a895682"}]}
