)]}'
{"nova/network/neutronv2/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2bb038bce97452c340475356312550a1229b106e","unresolved":false,"context_lines":[{"line_number":373,"context_line":"        \"\"\"Processes and validates requested networks for allocation."},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"        Iterates over the list of NetworkRequest objects, validating the"},{"line_number":376,"context_line":"        request"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"        :param instance: allocate networks on this instance"},{"line_number":379,"context_line":"        :type instance: nova.objects.Instance"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aaa499b_98952d42","line":376,"updated":"2015-04-10 19:08:30.000000000","message":"Need to complete this description...","commit_id":"83267fa7ae8fec425d576122c82be048cbdfb6c9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2bb038bce97452c340475356312550a1229b106e","unresolved":false,"context_lines":[{"line_number":398,"context_line":"                or the network for an explicit port request)"},{"line_number":399,"context_line":"            - available_macs: set of available MAC addresses to use if creating"},{"line_number":400,"context_line":"                a port later; this is the set of hypervisor_macs after removing"},{"line_number":401,"context_line":"                any MAC addresses from explicitly requested ports."},{"line_number":402,"context_line":"        \"\"\""},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"        available_macs \u003d None"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aaa499b_389cd968","line":401,"updated":"2015-04-10 19:08:30.000000000","message":"List the 3 exceptions raised from this method.","commit_id":"83267fa7ae8fec425d576122c82be048cbdfb6c9"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e07db459b14a878a20031a9a43f98373098212f3","unresolved":false,"context_lines":[{"line_number":391,"context_line":"            the bare metal hypervisor (which is the only one known to limit"},{"line_number":392,"context_line":"            MAC addresses)."},{"line_number":393,"context_line":"        :type hypervisor_macs: set"},{"line_number":394,"context_line":"        :returns: tuple of:"},{"line_number":395,"context_line":"            - ports: dict mapping of port id to port dict"},{"line_number":396,"context_line":"            - net_ids: list of requested network ids"},{"line_number":397,"context_line":"            - ordered_networks: list of nova.objects.NetworkRequest objects"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aaa499b_26302856","line":394,"updated":"2015-04-12 12:57:44.000000000","message":"how about we return an object?","commit_id":"50af0f1075eed2708e937610d72c3406eee82da7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6e3d33dbf929b01c55d71da65eeb5da24a90abab","unresolved":false,"context_lines":[{"line_number":391,"context_line":"            the bare metal hypervisor (which is the only one known to limit"},{"line_number":392,"context_line":"            MAC addresses)."},{"line_number":393,"context_line":"        :type hypervisor_macs: set"},{"line_number":394,"context_line":"        :returns: tuple of:"},{"line_number":395,"context_line":"            - ports: dict mapping of port id to port dict"},{"line_number":396,"context_line":"            - net_ids: list of requested network ids"},{"line_number":397,"context_line":"            - ordered_networks: list of nova.objects.NetworkRequest objects"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aaa499b_469574e2","line":394,"in_reply_to":"7aaa499b_26302856","updated":"2015-04-12 13:19:32.000000000","message":"I thought about it, but since there is only one caller of this method right now I felt using something like a named tuple was going overboard.  I wouldn\u0027t use an object since it doesn\u0027t have a state or operations on what\u0027s being returned besides getters, so if anything collections would be what I\u0027d use, with namedtuple.  But again, I didn\u0027t see the need really since there aren\u0027t multiple callers of this method.","commit_id":"50af0f1075eed2708e937610d72c3406eee82da7"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"a5420801ce35a6e935f78fe87a96f8dfa384a81d","unresolved":false,"context_lines":[{"line_number":408,"context_line":"            port\u0027s MAC address is not in that set."},{"line_number":409,"context_line":"        :raises nova.exception.PortInUse: If a requested port is already"},{"line_number":410,"context_line":"            attached to another instance."},{"line_number":411,"context_line":"        \"\"\""},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"        available_macs \u003d None"},{"line_number":414,"context_line":"        if hypervisor_macs is not None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"dac4157f_18d35c3a","line":411,"range":{"start_line":411,"start_character":8,"end_line":411,"end_character":11},"updated":"2015-04-19 23:25:32.000000000","message":"This doc comment is a work of art.","commit_id":"50af0f1075eed2708e937610d72c3406eee82da7"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"a3f5732923dd61af5fd5be07274b6b927e219485","unresolved":false,"context_lines":[{"line_number":420,"context_line":"        ports \u003d {}"},{"line_number":421,"context_line":"        net_ids \u003d []"},{"line_number":422,"context_line":"        ordered_networks \u003d []"},{"line_number":423,"context_line":"        if requested_networks:"},{"line_number":424,"context_line":"            for request in requested_networks:"},{"line_number":425,"context_line":""},{"line_number":426,"context_line":"                # Process a request to use a pre-existing neutron port."}],"source_content_type":"text/x-python","patch_set":2,"id":"7aaa499b_50227553","line":423,"updated":"2015-04-14 22:55:21.000000000","message":"perhaps it\u0027ll be better to reduce indents by \u0027if not ..: return ....\u0027 construction","commit_id":"50af0f1075eed2708e937610d72c3406eee82da7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2bbd70ba6b9accee71f5b4e9771ad9e2d628d198","unresolved":false,"context_lines":[{"line_number":420,"context_line":"        ports \u003d {}"},{"line_number":421,"context_line":"        net_ids \u003d []"},{"line_number":422,"context_line":"        ordered_networks \u003d []"},{"line_number":423,"context_line":"        if requested_networks:"},{"line_number":424,"context_line":"            for request in requested_networks:"},{"line_number":425,"context_line":""},{"line_number":426,"context_line":"                # Process a request to use a pre-existing neutron port."}],"source_content_type":"text/x-python","patch_set":2,"id":"7aaa499b_26656fe0","line":423,"in_reply_to":"7aaa499b_50227553","updated":"2015-04-15 00:06:06.000000000","message":"Maybe, but this isn\u0027t overly squashed because of the indents as it is and I tend to avoid negative logic when possible.","commit_id":"50af0f1075eed2708e937610d72c3406eee82da7"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"a7cc694f5f94e80011c572612b1e75ac024da089","unresolved":false,"context_lines":[{"line_number":439,"context_line":"                    # Make sure the port isn\u0027t already attached to another"},{"line_number":440,"context_line":"                    # instance."},{"line_number":441,"context_line":"                    if port.get(\u0027device_id\u0027):"},{"line_number":442,"context_line":"                        raise exception.PortInUse(port_id\u003drequest.port_id)"},{"line_number":443,"context_line":""},{"line_number":444,"context_line":"                    if hypervisor_macs is not None:"},{"line_number":445,"context_line":"                        if port[\u0027mac_address\u0027] not in hypervisor_macs:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aaa499b_4cd0fd53","line":442,"updated":"2015-04-11 13:15:08.000000000","message":"how about we create common port check function with line 1004? Then this can make sure we have consistent port check both at nova api and nova compute. But this also can be done in later patch.","commit_id":"50af0f1075eed2708e937610d72c3406eee82da7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2ec2c70c70227e2afff8c15de40a3e5c6b74866f","unresolved":false,"context_lines":[{"line_number":439,"context_line":"                    # Make sure the port isn\u0027t already attached to another"},{"line_number":440,"context_line":"                    # instance."},{"line_number":441,"context_line":"                    if port.get(\u0027device_id\u0027):"},{"line_number":442,"context_line":"                        raise exception.PortInUse(port_id\u003drequest.port_id)"},{"line_number":443,"context_line":""},{"line_number":444,"context_line":"                    if hypervisor_macs is not None:"},{"line_number":445,"context_line":"                        if port[\u0027mac_address\u0027] not in hypervisor_macs:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aaa499b_abdee70e","line":442,"in_reply_to":"7aaa499b_48ebe9b0","updated":"2015-04-15 02:09:38.000000000","message":"Eli, do you want to rebase your change on top of this since this is a refactor and shouldn\u0027t be any functionally different, whereas your change is functionally different and will require more scrutiny in review.","commit_id":"50af0f1075eed2708e937610d72c3406eee82da7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7ce431953e808afb02e9bf22628870d57f204b5f","unresolved":false,"context_lines":[{"line_number":439,"context_line":"                    # Make sure the port isn\u0027t already attached to another"},{"line_number":440,"context_line":"                    # instance."},{"line_number":441,"context_line":"                    if port.get(\u0027device_id\u0027):"},{"line_number":442,"context_line":"                        raise exception.PortInUse(port_id\u003drequest.port_id)"},{"line_number":443,"context_line":""},{"line_number":444,"context_line":"                    if hypervisor_macs is not None:"},{"line_number":445,"context_line":"                        if port[\u0027mac_address\u0027] not in hypervisor_macs:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aaa499b_ef021b6f","line":442,"in_reply_to":"7aaa499b_4cd0fd53","updated":"2015-04-11 18:19:20.000000000","message":"I\u0027d prefer to handle that in a later refactor to pull out common code into helper methods.  There is already a change related to that for showing ports:\n\nhttps://review.openstack.org/#/c/135020/","commit_id":"50af0f1075eed2708e937610d72c3406eee82da7"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"9e832f000561ca8befd8f1bafb9bfe3bd5339b3d","unresolved":false,"context_lines":[{"line_number":439,"context_line":"                    # Make sure the port isn\u0027t already attached to another"},{"line_number":440,"context_line":"                    # instance."},{"line_number":441,"context_line":"                    if port.get(\u0027device_id\u0027):"},{"line_number":442,"context_line":"                        raise exception.PortInUse(port_id\u003drequest.port_id)"},{"line_number":443,"context_line":""},{"line_number":444,"context_line":"                    if hypervisor_macs is not None:"},{"line_number":445,"context_line":"                        if port[\u0027mac_address\u0027] not in hypervisor_macs:"}],"source_content_type":"text/x-python","patch_set":2,"id":"dac4157f_78237806","line":442,"in_reply_to":"7aaa499b_abdee70e","updated":"2015-04-20 00:34:11.000000000","message":"hi ,matt, sure, I will rebase my patch. thanks","commit_id":"50af0f1075eed2708e937610d72c3406eee82da7"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"41e6c6e538821ed63a86b18844993e7944e4e543","unresolved":false,"context_lines":[{"line_number":439,"context_line":"                    # Make sure the port isn\u0027t already attached to another"},{"line_number":440,"context_line":"                    # instance."},{"line_number":441,"context_line":"                    if port.get(\u0027device_id\u0027):"},{"line_number":442,"context_line":"                        raise exception.PortInUse(port_id\u003drequest.port_id)"},{"line_number":443,"context_line":""},{"line_number":444,"context_line":"                    if hypervisor_macs is not None:"},{"line_number":445,"context_line":"                        if port[\u0027mac_address\u0027] not in hypervisor_macs:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aaa499b_48ebe9b0","line":442,"in_reply_to":"7aaa499b_ef021b6f","updated":"2015-04-15 01:14:10.000000000","message":"hi matt,\nI think we may need more check to validate the port before we use it.\nI\u0027v have a helper function _validate_port to do this.\nhttps://review.openstack.org/#/c/156112/","commit_id":"50af0f1075eed2708e937610d72c3406eee82da7"}]}
