)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f6970f27cd05bbf81d9c2605e5a2e5d52331989e","unresolved":false,"context_lines":[{"line_number":7,"context_line":"network: make nova to handle port_security_enabled\u003dFalse"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In somes cases we need to have network without any security rules"},{"line_number":10,"context_line":"applied, unforutnatly nova does not provide way to remove l3"},{"line_number":11,"context_line":"assignements and always at least expose the default security group."},{"line_number":12,"context_line":"This commit updates code to clear security groups applied to the"},{"line_number":13,"context_line":"network when option port_security_enabled\u003dFalse is activated on the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"1af94dfe_cb2a212c","line":10,"updated":"2016-03-16 20:16:19.000000000","message":"s/unforutnatly/unfortunately/","commit_id":"fa6730915257c7bae0961c6c6066f57c148035ae"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f6970f27cd05bbf81d9c2605e5a2e5d52331989e","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In somes cases we need to have network without any security rules"},{"line_number":10,"context_line":"applied, unforutnatly nova does not provide way to remove l3"},{"line_number":11,"context_line":"assignements and always at least expose the default security group."},{"line_number":12,"context_line":"This commit updates code to clear security groups applied to the"},{"line_number":13,"context_line":"network when option port_security_enabled\u003dFalse is activated on the"},{"line_number":14,"context_line":"network."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"1af94dfe_2b22a552","line":11,"updated":"2016-03-16 20:16:19.000000000","message":"s/assignements/assignments/\ns/expose/exposes/","commit_id":"fa6730915257c7bae0961c6c6066f57c148035ae"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"19280d67010515d2c44e9ca5c3c9687c827889c8","unresolved":false,"context_lines":[{"line_number":7,"context_line":"network: make nova to handle port_security_enabled\u003dFalse"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In somes cases we need to have network without any security rules"},{"line_number":10,"context_line":"applied, unforutnatly nova does not provide way to remove l3"},{"line_number":11,"context_line":"assignements and always at least expose the default security group."},{"line_number":12,"context_line":"This commit updates code to clear security groups applied to the"},{"line_number":13,"context_line":"network when option port_security_enabled\u003dFalse is activated on the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"ba0121b8_9408872f","line":10,"range":{"start_line":10,"start_character":9,"end_line":10,"end_character":21},"updated":"2016-04-03 06:52:02.000000000","message":"typo","commit_id":"ee111796e0426cb043a3c0d5bec639a1290c2c38"}],"nova/network/neutronv2/api.py":[{"author":{"_account_id":8157,"name":"Bertrand LALLAU","email":"bertrand.lallau@gmail.com","username":"blallau"},"change_message_id":"e8a67a5b49ef010bb66068aab292b61363935c04","unresolved":false,"context_lines":[{"line_number":624,"context_line":"            # security groups so a subnet should have to be specified"},{"line_number":625,"context_line":"            # to the network."},{"line_number":626,"context_line":"            # - When network define \u0027port_security_enabled\u0027 it means"},{"line_number":627,"context_line":"            # we do not want any security rules applied to that"},{"line_number":628,"context_line":"            # network + anti-spoof rules."},{"line_number":629,"context_line":"            port_security_enabled \u003d network.get(\u0027port_security_enabled\u0027, True)"},{"line_number":630,"context_line":"            apply_secgroups_ids \u003d security_group_ids"},{"line_number":631,"context_line":"            if not port_security_enabled:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_f7c53b8e","line":628,"range":{"start_line":627,"start_character":14,"end_line":628,"end_character":41},"updated":"2016-03-02 16:37:58.000000000","message":"We do not want any security or anti-spoof rules applied to that network.","commit_id":"93b0366bd4d9b367c4eca6df604670f3c347aa30"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"0a1f13a7b12954730dded26cbd87ef8d897c9ecd","unresolved":false,"context_lines":[{"line_number":625,"context_line":"            # to the network."},{"line_number":626,"context_line":"            # - When network define \u0027port_security_enabled\u0027 it means"},{"line_number":627,"context_line":"            # we do not want any security rules applied to that"},{"line_number":628,"context_line":"            # network + anti-spoof rules."},{"line_number":629,"context_line":"            port_security_enabled \u003d network.get(\u0027port_security_enabled\u0027, True)"},{"line_number":630,"context_line":"            apply_secgroups_ids \u003d security_group_ids"},{"line_number":631,"context_line":"            if not port_security_enabled:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_e942ec66","line":628,"in_reply_to":"7af24918_f7c53b8e","updated":"2016-03-04 16:46:22.000000000","message":"Done","commit_id":"93b0366bd4d9b367c4eca6df604670f3c347aa30"},{"author":{"_account_id":8157,"name":"Bertrand LALLAU","email":"bertrand.lallau@gmail.com","username":"blallau"},"change_message_id":"e8a67a5b49ef010bb66068aab292b61363935c04","unresolved":false,"context_lines":[{"line_number":626,"context_line":"            # - When network define \u0027port_security_enabled\u0027 it means"},{"line_number":627,"context_line":"            # we do not want any security rules applied to that"},{"line_number":628,"context_line":"            # network + anti-spoof rules."},{"line_number":629,"context_line":"            port_security_enabled \u003d network.get(\u0027port_security_enabled\u0027, True)"},{"line_number":630,"context_line":"            apply_secgroups_ids \u003d security_group_ids"},{"line_number":631,"context_line":"            if not port_security_enabled:"},{"line_number":632,"context_line":"                apply_secgroups_ids \u003d None"},{"line_number":633,"context_line":""},{"line_number":634,"context_line":"            # If security groups are requested on an instance then the"},{"line_number":635,"context_line":"            # network must has a subnet associated with it. Some plugins"}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_d7ac7f37","line":632,"range":{"start_line":629,"start_character":0,"end_line":632,"end_character":42},"updated":"2016-03-02 16:37:58.000000000","message":"apply_secgroups_ids \u003d security_group_ids if network.get(\u0027port_security_enabled\u0027,\n                                                         True) else None","commit_id":"93b0366bd4d9b367c4eca6df604670f3c347aa30"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"0a1f13a7b12954730dded26cbd87ef8d897c9ecd","unresolved":false,"context_lines":[{"line_number":629,"context_line":"            port_security_enabled \u003d network.get(\u0027port_security_enabled\u0027, True)"},{"line_number":630,"context_line":"            apply_secgroups_ids \u003d security_group_ids"},{"line_number":631,"context_line":"            if not port_security_enabled:"},{"line_number":632,"context_line":"                apply_secgroups_ids \u003d None"},{"line_number":633,"context_line":""},{"line_number":634,"context_line":"            # If security groups are requested on an instance then the"},{"line_number":635,"context_line":"            # network must has a subnet associated with it. Some plugins"}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_e46cd1d1","line":632,"in_reply_to":"7af24918_d7ac7f37","updated":"2016-03-04 16:46:22.000000000","message":"See my comment line 642","commit_id":"93b0366bd4d9b367c4eca6df604670f3c347aa30"},{"author":{"_account_id":18152,"name":"Benoît Knecht","email":"benoit.knecht@fsfe.org","username":"byte"},"change_message_id":"d2b280238e2972717d8a17ad7ac0ea49ad15a3bb","unresolved":false,"context_lines":[{"line_number":639,"context_line":"            # is not found."},{"line_number":640,"context_line":"            elif (security_groups and not ("},{"line_number":641,"context_line":"                    network[\u0027subnets\u0027]"},{"line_number":642,"context_line":"                    and port_security_enabled)):"},{"line_number":643,"context_line":"                raise exception.SecurityGroupCannotBeApplied()"},{"line_number":644,"context_line":""},{"line_number":645,"context_line":"            request.network_id \u003d network[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_3e709771","line":642,"range":{"start_line":642,"start_character":24,"end_line":642,"end_character":45},"updated":"2016-03-04 13:47:14.000000000","message":"This will always be True at this point, so you can drop it from the condition.","commit_id":"93b0366bd4d9b367c4eca6df604670f3c347aa30"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"0a1f13a7b12954730dded26cbd87ef8d897c9ecd","unresolved":false,"context_lines":[{"line_number":639,"context_line":"            # is not found."},{"line_number":640,"context_line":"            elif (security_groups and not ("},{"line_number":641,"context_line":"                    network[\u0027subnets\u0027]"},{"line_number":642,"context_line":"                    and port_security_enabled)):"},{"line_number":643,"context_line":"                raise exception.SecurityGroupCannotBeApplied()"},{"line_number":644,"context_line":""},{"line_number":645,"context_line":"            request.network_id \u003d network[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_2444f947","line":642,"in_reply_to":"7af24918_3e709771","updated":"2016-03-04 16:46:22.000000000","message":"Some changes are in progress to add possibility to removes l3 assignments and the always associated \u0027default\u0027 security group. So I prefer to keep the code like that even if that can seems to be redundant","commit_id":"93b0366bd4d9b367c4eca6df604670f3c347aa30"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"ca7d3717b95d513361a76b11c393585f462fdf67","unresolved":false,"context_lines":[{"line_number":627,"context_line":"            # we do not want any security or anti-spoof rules applied to that"},{"line_number":628,"context_line":"            # network."},{"line_number":629,"context_line":"            port_security_enabled \u003d network.get(\u0027port_security_enabled\u0027, True)"},{"line_number":630,"context_line":"            apply_secgroups_ids \u003d security_group_ids"},{"line_number":631,"context_line":"            if not port_security_enabled:"},{"line_number":632,"context_line":"                apply_secgroups_ids \u003d None"},{"line_number":633,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5aef4532_fa096485","line":630,"updated":"2016-03-09 18:16:09.000000000","message":"apply_secgroup_ids \u003d None if not port_security_enabled else security_group_ids\n\nThen you can remove L631 and L632.","commit_id":"e8b1f52828769df3ed986193aa2bad3d0690c23b"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"b0a81ccb0653d84230400b9e870eba28605ac29d","unresolved":false,"context_lines":[{"line_number":637,"context_line":"            # \u0027port_security_enabled\u0027 to be True for security groups."},{"line_number":638,"context_line":"            # That is why True is returned if \u0027port_security_enabled\u0027"},{"line_number":639,"context_line":"            # is not found."},{"line_number":640,"context_line":"            elif (security_groups and not ("},{"line_number":641,"context_line":"                    network[\u0027subnets\u0027]"},{"line_number":642,"context_line":"                    and port_security_enabled)):"},{"line_number":643,"context_line":"                raise exception.SecurityGroupCannotBeApplied()"}],"source_content_type":"text/x-python","patch_set":3,"id":"5aef4532_ba4b5c86","line":640,"updated":"2016-03-09 18:19:58.000000000","message":"I also don\u0027t like how you made this conditional an else if statement, where there\u0027s quite a bit of stuff in between the if statement it\u0027s joined to, up on L631. Hard to follow when reading the code.","commit_id":"e8b1f52828769df3ed986193aa2bad3d0690c23b"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"5ad04b4920088b1e1547449ee98128814cc3198c","unresolved":false,"context_lines":[{"line_number":641,"context_line":"                    network[\u0027subnets\u0027]"},{"line_number":642,"context_line":"                    and port_security_enabled)):"},{"line_number":643,"context_line":"                raise exception.SecurityGroupCannotBeApplied()"},{"line_number":644,"context_line":"            request.network_id \u003d network[\u0027id\u0027]"},{"line_number":645,"context_line":"            zone \u003d \u0027compute:%s\u0027 % instance.availability_zone"},{"line_number":646,"context_line":"            port_req_body \u003d {\u0027port\u0027: {\u0027device_id\u0027: instance.uuid,"},{"line_number":647,"context_line":"                                      \u0027device_owner\u0027: zone}}"}],"source_content_type":"text/x-python","patch_set":3,"id":"5aef4532_fa0fa436","line":644,"updated":"2016-03-09 18:21:41.000000000","message":"Where does this end up being used?","commit_id":"e8b1f52828769df3ed986193aa2bad3d0690c23b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2cac775a9c81948b94330f9403ae6cd05f4ee35b","unresolved":false,"context_lines":[{"line_number":641,"context_line":"                    network[\u0027subnets\u0027]"},{"line_number":642,"context_line":"                    and port_security_enabled)):"},{"line_number":643,"context_line":"                raise exception.SecurityGroupCannotBeApplied()"},{"line_number":644,"context_line":"            request.network_id \u003d network[\u0027id\u0027]"},{"line_number":645,"context_line":"            zone \u003d \u0027compute:%s\u0027 % instance.availability_zone"},{"line_number":646,"context_line":"            port_req_body \u003d {\u0027port\u0027: {\u0027device_id\u0027: instance.uuid,"},{"line_number":647,"context_line":"                                      \u0027device_owner\u0027: zone}}"}],"source_content_type":"text/x-python","patch_set":3,"id":"5aef4532_52014b37","line":644,"in_reply_to":"5aef4532_fa0fa436","updated":"2016-03-10 02:41:32.000000000","message":"Yeah this is redundant with L614.","commit_id":"e8b1f52828769df3ed986193aa2bad3d0690c23b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"887d80920f4d5680836fb905173eb18e02b7e47e","unresolved":false,"context_lines":[{"line_number":624,"context_line":"                continue"},{"line_number":625,"context_line":""},{"line_number":626,"context_line":"            nets_in_requested_order.append(network)"},{"line_number":627,"context_line":"            # - Currently Nova always return at least the \"default\""},{"line_number":628,"context_line":"            # security groups so a subnet should have to be specified"},{"line_number":629,"context_line":"            # to the network."},{"line_number":630,"context_line":"            # - When network defines \u0027port_security_enabled\u0027 it means"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba0121b8_b8e203d3","line":627,"range":{"start_line":627,"start_character":16,"end_line":627,"end_character":44},"updated":"2016-04-01 15:24:21.000000000","message":"This is a bit confusing, are you talking about the REST API returning the \u0027default\u0027 security group when creating the server, in the response. Or are you talking about the Nova API always passing at least \u0027default\u0027 to the network API when allocating the network? I think it\u0027s the latter, and if so, we should clarify this comment.","commit_id":"4f7b6f18366037110ce29e4c6458faef4a79c79a"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"f5abfcd1260f3e7b48ac2556d06339a9993bf2d8","unresolved":false,"context_lines":[{"line_number":624,"context_line":"                continue"},{"line_number":625,"context_line":""},{"line_number":626,"context_line":"            nets_in_requested_order.append(network)"},{"line_number":627,"context_line":"            # - Currently Nova always return at least the \"default\""},{"line_number":628,"context_line":"            # security groups so a subnet should have to be specified"},{"line_number":629,"context_line":"            # to the network."},{"line_number":630,"context_line":"            # - When network defines \u0027port_security_enabled\u0027 it means"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba0121b8_f36f7cc1","line":627,"in_reply_to":"ba0121b8_b8e203d3","updated":"2016-04-01 15:34:32.000000000","message":"Yes it\u0027s not clear at all... I will fix that","commit_id":"4f7b6f18366037110ce29e4c6458faef4a79c79a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"887d80920f4d5680836fb905173eb18e02b7e47e","unresolved":false,"context_lines":[{"line_number":627,"context_line":"            # - Currently Nova always return at least the \"default\""},{"line_number":628,"context_line":"            # security groups so a subnet should have to be specified"},{"line_number":629,"context_line":"            # to the network."},{"line_number":630,"context_line":"            # - When network defines \u0027port_security_enabled\u0027 it means"},{"line_number":631,"context_line":"            # we do not want any security or anti-spoof rules applied to that"},{"line_number":632,"context_line":"            # network."},{"line_number":633,"context_line":"            port_security_enabled \u003d network.get(\u0027port_security_enabled\u0027, True)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba0121b8_3838b3d2","line":630,"range":{"start_line":630,"start_character":38,"end_line":630,"end_character":59},"updated":"2016-04-01 15:24:21.000000000","message":"port_security_enabled\u003dFalse","commit_id":"4f7b6f18366037110ce29e4c6458faef4a79c79a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5bdf468aa60c58520e16df082f09cc3498180ce8","unresolved":false,"context_lines":[{"line_number":631,"context_line":"            # we do not want any security or anti-spoof rules applied to that"},{"line_number":632,"context_line":"            # network."},{"line_number":633,"context_line":"            port_security_enabled \u003d network.get(\u0027port_security_enabled\u0027, True)"},{"line_number":634,"context_line":"            apply_secgroups_ids \u003d security_group_ids"},{"line_number":635,"context_line":"            if not port_security_enabled:"},{"line_number":636,"context_line":"                apply_secgroups_ids \u003d None"},{"line_number":637,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa0719c6_2a4996d0","line":634,"range":{"start_line":634,"start_character":34,"end_line":634,"end_character":52},"updated":"2016-03-24 12:56:50.000000000","message":"So if no security groups were provided in the server create request, the compute API adds the \u0027default\u0027 group, which should be the only thing in here. But if the network.port_security_enabled value is False, we don\u0027t want to try and apply security groups to the port, neutron raises an exception (if I\u0027m understanding your reply).\n\nHowever, that doesn\u0027t change the fact that we still return the \u0027default\u0027 security group in the REST API response when using neutron. That\u0027s what ftersin\u0027s change was trying to address. What am I missing? I think that at least needs to be called out in the commit message since we\u0027re giving a false response if we say the default security group is applied to the server when it\u0027s not.","commit_id":"4f7b6f18366037110ce29e4c6458faef4a79c79a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"32e205742d08f723f9bfaedfa58004345c0b95ac","unresolved":false,"context_lines":[{"line_number":631,"context_line":"            # we do not want any security or anti-spoof rules applied to that"},{"line_number":632,"context_line":"            # network."},{"line_number":633,"context_line":"            port_security_enabled \u003d network.get(\u0027port_security_enabled\u0027, True)"},{"line_number":634,"context_line":"            apply_secgroups_ids \u003d security_group_ids"},{"line_number":635,"context_line":"            if not port_security_enabled:"},{"line_number":636,"context_line":"                apply_secgroups_ids \u003d None"},{"line_number":637,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa0719c6_aa82c6c5","line":634,"range":{"start_line":634,"start_character":34,"end_line":634,"end_character":52},"in_reply_to":"fa0719c6_2a4996d0","updated":"2016-03-24 12:57:20.000000000","message":"This REST API response I mean:\n\nhttps://github.com/openstack/nova/blob/master/nova/api/openstack/compute/security_groups.py#L469","commit_id":"4f7b6f18366037110ce29e4c6458faef4a79c79a"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"bcd51730117e80c1a6b747efff03d9a8ed545aad","unresolved":false,"context_lines":[{"line_number":631,"context_line":"            # we do not want any security or anti-spoof rules applied to that"},{"line_number":632,"context_line":"            # network."},{"line_number":633,"context_line":"            port_security_enabled \u003d network.get(\u0027port_security_enabled\u0027, True)"},{"line_number":634,"context_line":"            apply_secgroups_ids \u003d security_group_ids"},{"line_number":635,"context_line":"            if not port_security_enabled:"},{"line_number":636,"context_line":"                apply_secgroups_ids \u003d None"},{"line_number":637,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa0719c6_9d810efe","line":634,"in_reply_to":"fa0719c6_aa82c6c5","updated":"2016-03-24 13:10:07.000000000","message":"No no, because that condition:\n\n  servers[0][ATTRIBUTE_NAME] \u003d req_obj[\u0027server\u0027].get(\n                    ATTRIBUTE_NAME, [{\u0027name\u0027: \u0027default\u0027}])\n\nOnly happen during POST request (which is to set a security group)","commit_id":"4f7b6f18366037110ce29e4c6458faef4a79c79a"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"19280d67010515d2c44e9ca5c3c9687c827889c8","unresolved":false,"context_lines":[{"line_number":624,"context_line":"                continue"},{"line_number":625,"context_line":""},{"line_number":626,"context_line":"            nets_in_requested_order.append(network)"},{"line_number":627,"context_line":"            # Currently Nova always passing at least \u0027default\u0027"},{"line_number":628,"context_line":"            # security group to the network API when allocating"},{"line_number":629,"context_line":"            # networks. When network defines"},{"line_number":630,"context_line":"            # \u0027port_security_enabled\u003dFalse\u0027 it means we do not want"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba0121b8_274cef75","line":627,"updated":"2016-04-03 06:52:02.000000000","message":"lines 627 - 637 should be done after line 662 - they are only relevant when a neutron port needs to be created","commit_id":"ee111796e0426cb043a3c0d5bec639a1290c2c38"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"97be62ab549b9626615babad07dd0ac679457389","unresolved":false,"context_lines":[{"line_number":624,"context_line":"                continue"},{"line_number":625,"context_line":""},{"line_number":626,"context_line":"            nets_in_requested_order.append(network)"},{"line_number":627,"context_line":"            # Currently Nova always passing at least \u0027default\u0027"},{"line_number":628,"context_line":"            # security group to the network API when allocating"},{"line_number":629,"context_line":"            # networks. When network defines"},{"line_number":630,"context_line":"            # \u0027port_security_enabled\u003dFalse\u0027 it means we do not want"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a061dce_a900dfab","line":627,"in_reply_to":"9a061dce_0303b174","updated":"2016-04-04 13:02:04.000000000","message":"John, So I wanted to keep that part because in future we may may want to have a network without L3 (some bps related) (so without security groups) and from lines 644 we are doing a verification in context where port_security_enabled\u003dTrue - So in that context if security_groups and no subnets we want to stop the process.\n\nGary, We can\u0027t really do that without to change the conditions which I prefer to avoid.","commit_id":"ee111796e0426cb043a3c0d5bec639a1290c2c38"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"dbc03d48f47c7da9d96ed73bb80d62ac97690d09","unresolved":false,"context_lines":[{"line_number":624,"context_line":"                continue"},{"line_number":625,"context_line":""},{"line_number":626,"context_line":"            nets_in_requested_order.append(network)"},{"line_number":627,"context_line":"            # Currently Nova always passing at least \u0027default\u0027"},{"line_number":628,"context_line":"            # security group to the network API when allocating"},{"line_number":629,"context_line":"            # networks. When network defines"},{"line_number":630,"context_line":"            # \u0027port_security_enabled\u003dFalse\u0027 it means we do not want"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a061dce_0303b174","line":627,"in_reply_to":"ba0121b8_274cef75","updated":"2016-04-04 10:50:19.000000000","message":"But what about skipping lines 644 to 647, and needing the updated value for apply_securitygroups_ids on line 662? It seems like this has to live here really.","commit_id":"ee111796e0426cb043a3c0d5bec639a1290c2c38"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"19280d67010515d2c44e9ca5c3c9687c827889c8","unresolved":false,"context_lines":[{"line_number":628,"context_line":"            # security group to the network API when allocating"},{"line_number":629,"context_line":"            # networks. When network defines"},{"line_number":630,"context_line":"            # \u0027port_security_enabled\u003dFalse\u0027 it means we do not want"},{"line_number":631,"context_line":"            # any security rules applied to the ports created from that"},{"line_number":632,"context_line":"            # network."},{"line_number":633,"context_line":"            port_security_enabled \u003d network.get(\u0027port_security_enabled\u0027, True)"},{"line_number":634,"context_line":"            apply_secgroups_ids \u003d security_group_ids"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba0121b8_470da336","line":631,"range":{"start_line":631,"start_character":62,"end_line":631,"end_character":66},"updated":"2016-04-03 06:52:02.000000000","message":"on","commit_id":"ee111796e0426cb043a3c0d5bec639a1290c2c38"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"19280d67010515d2c44e9ca5c3c9687c827889c8","unresolved":false,"context_lines":[{"line_number":629,"context_line":"            # networks. When network defines"},{"line_number":630,"context_line":"            # \u0027port_security_enabled\u003dFalse\u0027 it means we do not want"},{"line_number":631,"context_line":"            # any security rules applied to the ports created from that"},{"line_number":632,"context_line":"            # network."},{"line_number":633,"context_line":"            port_security_enabled \u003d network.get(\u0027port_security_enabled\u0027, True)"},{"line_number":634,"context_line":"            apply_secgroups_ids \u003d security_group_ids"},{"line_number":635,"context_line":"            if not port_security_enabled:"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba0121b8_27250fae","line":632,"updated":"2016-04-03 06:52:02.000000000","message":"i think that this comment is misleading and that if the tenant creates a port and passes that port to nova then this may not hold. but maybe that is orthogonal to what we are trying to do here","commit_id":"ee111796e0426cb043a3c0d5bec639a1290c2c38"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7526d41bb0bd82fde6901bb76226005674ede6e3","unresolved":false,"context_lines":[{"line_number":629,"context_line":"            # networks. When network defines"},{"line_number":630,"context_line":"            # \u0027port_security_enabled\u003dFalse\u0027 it means we do not want"},{"line_number":631,"context_line":"            # any security rules applied to the ports created from that"},{"line_number":632,"context_line":"            # network."},{"line_number":633,"context_line":"            port_security_enabled \u003d network.get(\u0027port_security_enabled\u0027, True)"},{"line_number":634,"context_line":"            apply_secgroups_ids \u003d security_group_ids"},{"line_number":635,"context_line":"            if not port_security_enabled:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a061dce_59a1ffa8","line":632,"in_reply_to":"9a061dce_1425a5aa","updated":"2016-04-04 17:48:40.000000000","message":"I assume what John and Gary mean is what Gary said before, which is we only need this logic to create apply_secgroups_ids when nova is going to create the port. If the port was provided by the user when creating the server, then we don\u0027t care about security groups, since those were already handled when creating the port with neutron. So we could move this in the else block right above where we call self._create_port.","commit_id":"ee111796e0426cb043a3c0d5bec639a1290c2c38"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"97be62ab549b9626615babad07dd0ac679457389","unresolved":false,"context_lines":[{"line_number":629,"context_line":"            # networks. When network defines"},{"line_number":630,"context_line":"            # \u0027port_security_enabled\u003dFalse\u0027 it means we do not want"},{"line_number":631,"context_line":"            # any security rules applied to the ports created from that"},{"line_number":632,"context_line":"            # network."},{"line_number":633,"context_line":"            port_security_enabled \u003d network.get(\u0027port_security_enabled\u0027, True)"},{"line_number":634,"context_line":"            apply_secgroups_ids \u003d security_group_ids"},{"line_number":635,"context_line":"            if not port_security_enabled:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a061dce_1425a5aa","line":632,"in_reply_to":"9a061dce_c364194b","updated":"2016-04-04 13:02:04.000000000","message":"Gary, I thought that was obvious we are in case where Nova is asked to create port of a network. But I can try to be more specific yes, If you have any example of good phrasing that could help me a lot.\n\nJohn, Can you elaborate what do you mean by more precise in the scope ? What do you want me to add or change ?","commit_id":"ee111796e0426cb043a3c0d5bec639a1290c2c38"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"dbc03d48f47c7da9d96ed73bb80d62ac97690d09","unresolved":false,"context_lines":[{"line_number":629,"context_line":"            # networks. When network defines"},{"line_number":630,"context_line":"            # \u0027port_security_enabled\u003dFalse\u0027 it means we do not want"},{"line_number":631,"context_line":"            # any security rules applied to the ports created from that"},{"line_number":632,"context_line":"            # network."},{"line_number":633,"context_line":"            port_security_enabled \u003d network.get(\u0027port_security_enabled\u0027, True)"},{"line_number":634,"context_line":"            apply_secgroups_ids \u003d security_group_ids"},{"line_number":635,"context_line":"            if not port_security_enabled:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a061dce_c364194b","line":632,"in_reply_to":"ba0121b8_27250fae","updated":"2016-04-04 10:50:19.000000000","message":"I guess we could be more precise here on the scope.","commit_id":"ee111796e0426cb043a3c0d5bec639a1290c2c38"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7526d41bb0bd82fde6901bb76226005674ede6e3","unresolved":false,"context_lines":[{"line_number":630,"context_line":"            # \u0027port_security_enabled\u003dFalse\u0027 it means we do not want"},{"line_number":631,"context_line":"            # any security rules applied to the ports created from that"},{"line_number":632,"context_line":"            # network."},{"line_number":633,"context_line":"            port_security_enabled \u003d network.get(\u0027port_security_enabled\u0027, True)"},{"line_number":634,"context_line":"            apply_secgroups_ids \u003d security_group_ids"},{"line_number":635,"context_line":"            if not port_security_enabled:"},{"line_number":636,"context_line":"                apply_secgroups_ids \u003d None"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a061dce_598f3f23","line":633,"range":{"start_line":633,"start_character":12,"end_line":633,"end_character":78},"updated":"2016-04-04 17:48:40.000000000","message":"Pull this common code out doesn\u0027t hurt.","commit_id":"ee111796e0426cb043a3c0d5bec639a1290c2c38"},{"author":{"_account_id":9423,"name":"Roey Chen","email":"roeyc@vmware.com","username":"roeyc"},"change_message_id":"f829a9a045260f1cc77a010185931264bbd3255e","unresolved":false,"context_lines":[{"line_number":630,"context_line":"            # \u0027port_security_enabled\u003dFalse\u0027 it means we do not want"},{"line_number":631,"context_line":"            # any security rules applied to the ports created from that"},{"line_number":632,"context_line":"            # network."},{"line_number":633,"context_line":"            port_security_enabled \u003d network.get(\u0027port_security_enabled\u0027, True)"},{"line_number":634,"context_line":"            apply_secgroups_ids \u003d security_group_ids"},{"line_number":635,"context_line":"            if not port_security_enabled:"},{"line_number":636,"context_line":"                apply_secgroups_ids \u003d None"},{"line_number":637,"context_line":""},{"line_number":638,"context_line":"            # If security groups are requested on an instance then the"},{"line_number":639,"context_line":"            # network must has a subnet associated with it. Some plugins"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a061dce_a28f28cb","line":636,"range":{"start_line":633,"start_character":12,"end_line":636,"end_character":42},"updated":"2016-04-05 09:57:14.000000000","message":"I\u0027m not sure this is the best we can do, if a user boots an instance on network with port-security disabled but did specify security-groups (e.g - nova boot ... --security-groups SG1,SG2 VM1), an exception should be raised, but instead this will carry on the request and will boot the instance with no security-groups at all.\n\nIMO, the best and immediate fix will be in the lines of https://review.openstack.org/#/c/278369/5/nova/network/neutronv2/api.py","commit_id":"ee111796e0426cb043a3c0d5bec639a1290c2c38"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"5e558ff46f30b58fa35b5d11644602cff11ba2a1","unresolved":false,"context_lines":[{"line_number":633,"context_line":"            port_security_enabled \u003d network.get(\u0027port_security_enabled\u0027, True)"},{"line_number":634,"context_line":"            apply_secgroups_ids \u003d security_group_ids"},{"line_number":635,"context_line":"            if not port_security_enabled:"},{"line_number":636,"context_line":"                apply_secgroups_ids \u003d None"},{"line_number":637,"context_line":""},{"line_number":638,"context_line":"            # If security groups are requested on an instance then the"},{"line_number":639,"context_line":"            # network must has a subnet associated with it. Some plugins"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a061dce_d4f3f29c","line":636,"in_reply_to":"9a061dce_a28f28cb","updated":"2016-04-05 11:42:16.000000000","message":"Hum You made a good point.\n\nSo Nova API is passing a \u0027default\u0027 security groups, that is the basic implementation and we should to deal with. Neutron already handles that case and pass a \u0027default\u0027 security group when we create ports from networks. So we can probably update the implementation to let Neutron deal with the default security group.\n\nYour fix is interesting but a bit hacky, we should not relay that part (removing default security) in a private method also some checks still need to be done for example if network does not define subnets, Neutron can\u0027t apply the default security group.","commit_id":"ee111796e0426cb043a3c0d5bec639a1290c2c38"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1fe495004401a922db9c8b62718df6ac5536025a","unresolved":false,"context_lines":[{"line_number":646,"context_line":"                # Neutron can\u0027t apply security groups to a port for a"},{"line_number":647,"context_line":"                # network without L3 assignements."},{"line_number":648,"context_line":"                raise exception.SecurityGroupCannotBeApplied()"},{"line_number":649,"context_line":"            elif not port_security_enabled and security_group_ids:"},{"line_number":650,"context_line":"                # We don\u0027t want to apply security groups on port for a"},{"line_number":651,"context_line":"                # network defined with \u0027port_security_enabled\u003dFalse\u0027."},{"line_number":652,"context_line":"                raise exception.SecurityGroupCannotBeApplied()"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a061dce_f7b9ce7a","line":649,"updated":"2016-04-05 14:16:20.000000000","message":"I think the conditionals here would be cleaner if we did this instead:\n\n    if port_security_enabled:\n        if not network.get(\u0027subnets\u0027):\n            raise exception.SecurityGroupCannotBeApplied()\n    else:\n        if security_group_ids:\n            raise exception.SecurityGroupCannotBeApplied()\n\nOR, go all out with the mega conditional since the exception is the same, but this is harder to read:\n\n  if ((port_security_enabled and not network.get(\u0027subnets\u0027)) or\n        (not port_security_enabled and security_group_ids)):\n     raise exception.SecurityGroupCannotBeApplied()\n\nGiven the already confusing conditional logic in this overall allocate method, I prefer the first option for clarity.","commit_id":"5dde7a0d03b3cc1e7eac9854792aca5a88160559"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b79831bdf4b6c80c960bd1a16cd6ff2e4bf66880","unresolved":false,"context_lines":[{"line_number":649,"context_line":"            elif not port_security_enabled and security_group_ids:"},{"line_number":650,"context_line":"                # We don\u0027t want to apply security groups on port for a"},{"line_number":651,"context_line":"                # network defined with \u0027port_security_enabled\u003dFalse\u0027."},{"line_number":652,"context_line":"                raise exception.SecurityGroupCannotBeApplied()"},{"line_number":653,"context_line":""},{"line_number":654,"context_line":"            zone \u003d \u0027compute:%s\u0027 % instance.availability_zone"},{"line_number":655,"context_line":"            port_req_body \u003d {\u0027port\u0027: {\u0027device_id\u0027: instance.uuid,"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a061dce_9a3517dc","line":652,"range":{"start_line":652,"start_character":16,"end_line":652,"end_character":62},"updated":"2016-04-05 14:17:55.000000000","message":"I don\u0027t see a unit test for this case.","commit_id":"5dde7a0d03b3cc1e7eac9854792aca5a88160559"},{"author":{"_account_id":9423,"name":"Roey Chen","email":"roeyc@vmware.com","username":"roeyc"},"change_message_id":"d53952ca45ab60bfedaa6a8b53c9d1938ba1bacd","unresolved":false,"context_lines":[{"line_number":467,"context_line":"        creating ports so it\u0027s not necessary to specify it to the"},{"line_number":468,"context_line":"        request."},{"line_number":469,"context_line":"        \"\"\""},{"line_number":470,"context_line":"        if DEFAULT_SECGROUP in security_groups:"},{"line_number":471,"context_line":"            security_groups.remove(DEFAULT_SECGROUP)"},{"line_number":472,"context_line":"        return security_groups"},{"line_number":473,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"9a061dce_ad435941","line":470,"range":{"start_line":470,"start_character":10,"end_line":470,"end_character":47},"updated":"2016-04-06 09:49:16.000000000","message":"I think that the desired logic is:\n\nif security_groups \u003d\u003d [DEFAULT_SECGROUP]:\n    ...\n\notherwise, the user may request \u0027default\u0027 + CUSTOM_SG, but will end up with the \u0027default\u0027 only.","commit_id":"67b49d32c9444f1a8407a9d349dae4aee5e99b57"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"00460335dcf0f5f4240317bd8de7cd27b529a272","unresolved":false,"context_lines":[{"line_number":467,"context_line":"        creating ports so it\u0027s not necessary to specify it to the"},{"line_number":468,"context_line":"        request."},{"line_number":469,"context_line":"        \"\"\""},{"line_number":470,"context_line":"        if DEFAULT_SECGROUP in security_groups:"},{"line_number":471,"context_line":"            security_groups.remove(DEFAULT_SECGROUP)"},{"line_number":472,"context_line":"        return security_groups"},{"line_number":473,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"9a061dce_3e823bc9","line":470,"in_reply_to":"9a061dce_2ee25a2f","updated":"2016-04-08 13:47:49.000000000","message":"I think what Roey was saying was if the user specifies a custom security group, nova API doesn\u0027t add the \u0027default\u0027 security group, so DEFAULT_SECGROUP wouldn\u0027t be in security_groups in that case. If you don\u0027t specify a custom security group, then nova API adds \u0027default\u0027 in which case:\n\n if security_groups \u003d\u003d [DEFAULT_SECGROUP]:\n\nWould be fine.\n\nHowever, I like the way the code is written, it\u0027s not making assumptions about what the nova API code is doing, it\u0027s just serving a general purpose and should work either way.","commit_id":"67b49d32c9444f1a8407a9d349dae4aee5e99b57"},{"author":{"_account_id":9423,"name":"Roey Chen","email":"roeyc@vmware.com","username":"roeyc"},"change_message_id":"ac96159b0c92fe7d598729de528ced27838f20f7","unresolved":false,"context_lines":[{"line_number":467,"context_line":"        creating ports so it\u0027s not necessary to specify it to the"},{"line_number":468,"context_line":"        request."},{"line_number":469,"context_line":"        \"\"\""},{"line_number":470,"context_line":"        if DEFAULT_SECGROUP in security_groups:"},{"line_number":471,"context_line":"            security_groups.remove(DEFAULT_SECGROUP)"},{"line_number":472,"context_line":"        return security_groups"},{"line_number":473,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"9a061dce_e6b8b477","line":470,"in_reply_to":"9a061dce_5a9d04bb","updated":"2016-04-06 17:54:35.000000000","message":"No, the result should be \u0027default\u0027 + CUSTOM_SG, I believe that if len(security_groups) \u003e 1 then each security-group is explicitly requested by the client.\nonly when no security-group is specified, nova will add \u0027default\u0027.","commit_id":"67b49d32c9444f1a8407a9d349dae4aee5e99b57"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"44b3612e953322db715ece9ba81d220bca5b6670","unresolved":false,"context_lines":[{"line_number":467,"context_line":"        creating ports so it\u0027s not necessary to specify it to the"},{"line_number":468,"context_line":"        request."},{"line_number":469,"context_line":"        \"\"\""},{"line_number":470,"context_line":"        if DEFAULT_SECGROUP in security_groups:"},{"line_number":471,"context_line":"            security_groups.remove(DEFAULT_SECGROUP)"},{"line_number":472,"context_line":"        return security_groups"},{"line_number":473,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"9a061dce_2ee25a2f","line":470,"in_reply_to":"9a061dce_922f5787","updated":"2016-04-07 11:28:56.000000000","message":"Ok So I have verified with master and we have well the same behavior here.","commit_id":"67b49d32c9444f1a8407a9d349dae4aee5e99b57"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"dbb98342bfd860bd062145f7a13fa5cc0ae20e17","unresolved":false,"context_lines":[{"line_number":467,"context_line":"        creating ports so it\u0027s not necessary to specify it to the"},{"line_number":468,"context_line":"        request."},{"line_number":469,"context_line":"        \"\"\""},{"line_number":470,"context_line":"        if DEFAULT_SECGROUP in security_groups:"},{"line_number":471,"context_line":"            security_groups.remove(DEFAULT_SECGROUP)"},{"line_number":472,"context_line":"        return security_groups"},{"line_number":473,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"9a061dce_5a9d04bb","line":470,"in_reply_to":"9a061dce_ad435941","updated":"2016-04-06 13:20:39.000000000","message":"Not sure to see what you mean here, this code is removing \u0027default\u0027, so user request \u0027default\u0027 + CUSTOM_SG the result should be CUSTOM_SG. am I right ?","commit_id":"67b49d32c9444f1a8407a9d349dae4aee5e99b57"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"09b82572f84ec0fa7f982ba5a033ed78c91e6493","unresolved":false,"context_lines":[{"line_number":467,"context_line":"        creating ports so it\u0027s not necessary to specify it to the"},{"line_number":468,"context_line":"        request."},{"line_number":469,"context_line":"        \"\"\""},{"line_number":470,"context_line":"        if DEFAULT_SECGROUP in security_groups:"},{"line_number":471,"context_line":"            security_groups.remove(DEFAULT_SECGROUP)"},{"line_number":472,"context_line":"        return security_groups"},{"line_number":473,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"9a061dce_922f5787","line":470,"in_reply_to":"9a061dce_e6b8b477","updated":"2016-04-07 07:46:01.000000000","message":"That is not what we want, please see the doctext of this method, if it\u0027s not clear I can style update it.\n\nWe want to let Neutron handles security groups if no security groups is passed to the request Neutron will add a default one automatically, if user specify security groups so they will be passed to Neutron.\n\nDo you think that change the current behavior ?","commit_id":"67b49d32c9444f1a8407a9d349dae4aee5e99b57"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"29f5de427e579b83ef2ddc015d1c4141ceb897dd","unresolved":false,"context_lines":[{"line_number":652,"context_line":"                    # We don\u0027t want to apply security groups on port"},{"line_number":653,"context_line":"                    # for a network defined with"},{"line_number":654,"context_line":"                    # \u0027port_security_enabled\u003dFalse\u0027."},{"line_number":655,"context_line":"                    raise exception.SecurityGroupCannotBeApplied()"},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"            zone \u003d \u0027compute:%s\u0027 % instance.availability_zone"},{"line_number":658,"context_line":"            port_req_body \u003d {\u0027port\u0027: {\u0027device_id\u0027: instance.uuid,"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a061dce_3e4671bf","line":655,"updated":"2016-04-05 17:39:07.000000000","message":"I\u0027m still not sure we have a unit test for this, the case where network.port_security_enabled \u003d\u003d False and we requested a non-default security group.","commit_id":"67b49d32c9444f1a8407a9d349dae4aee5e99b57"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"dbb98342bfd860bd062145f7a13fa5cc0ae20e17","unresolved":false,"context_lines":[{"line_number":652,"context_line":"                    # We don\u0027t want to apply security groups on port"},{"line_number":653,"context_line":"                    # for a network defined with"},{"line_number":654,"context_line":"                    # \u0027port_security_enabled\u003dFalse\u0027."},{"line_number":655,"context_line":"                    raise exception.SecurityGroupCannotBeApplied()"},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"            zone \u003d \u0027compute:%s\u0027 % instance.availability_zone"},{"line_number":658,"context_line":"            port_req_body \u003d {\u0027port\u0027: {\u0027device_id\u0027: instance.uuid,"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a061dce_9a079c17","line":655,"in_reply_to":"9a061dce_3e4671bf","updated":"2016-04-06 13:20:39.000000000","message":"No you are right, my mistake...","commit_id":"67b49d32c9444f1a8407a9d349dae4aee5e99b57"},{"author":{"_account_id":9423,"name":"Roey Chen","email":"roeyc@vmware.com","username":"roeyc"},"change_message_id":"a2833734359ec5d6efe5f236d8a005af40f98656","unresolved":false,"context_lines":[{"line_number":610,"context_line":"                continue"},{"line_number":611,"context_line":""},{"line_number":612,"context_line":"            nets_in_requested_order.append(network)"},{"line_number":613,"context_line":"            # If security groups are requested on an instance then the"},{"line_number":614,"context_line":"            # network must has a subnet associated with it. Some plugins"},{"line_number":615,"context_line":"            # implement the port-security extension which requires"},{"line_number":616,"context_line":"            # \u0027port_security_enabled\u0027 to be True for security groups."},{"line_number":617,"context_line":"            # That is why True is returned if \u0027port_security_enabled\u0027"},{"line_number":618,"context_line":"            # is not found."},{"line_number":619,"context_line":"            if (security_groups and not ("},{"line_number":620,"context_line":"                    network[\u0027subnets\u0027]"},{"line_number":621,"context_line":"                    and network.get(\u0027port_security_enabled\u0027, True))):"},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"                raise exception.SecurityGroupCannotBeApplied()"},{"line_number":624,"context_line":"            zone \u003d \u0027compute:%s\u0027 % instance.availability_zone"},{"line_number":625,"context_line":"            port_req_body \u003d {\u0027port\u0027: {\u0027device_id\u0027: instance.uuid,"},{"line_number":626,"context_line":"                                      \u0027device_owner\u0027: zone}}"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a18252c_13b89f29","side":"PARENT","line":623,"range":{"start_line":613,"start_character":12,"end_line":623,"end_character":62},"updated":"2016-04-14 09:25:52.000000000","message":"This block of code should work as expected, you shouldn\u0027t change anything here IMO.","commit_id":"db851200d37083929dfdc3b190bd025d7f9617a2"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"82ade5af33b52c4c9a4ce7eec64aeaed5fd1b688","unresolved":false,"context_lines":[{"line_number":620,"context_line":"                    network[\u0027subnets\u0027]"},{"line_number":621,"context_line":"                    and network.get(\u0027port_security_enabled\u0027, True))):"},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"                raise exception.SecurityGroupCannotBeApplied()"},{"line_number":624,"context_line":"            zone \u003d \u0027compute:%s\u0027 % instance.availability_zone"},{"line_number":625,"context_line":"            port_req_body \u003d {\u0027port\u0027: {\u0027device_id\u0027: instance.uuid,"},{"line_number":626,"context_line":"                                      \u0027device_owner\u0027: zone}}"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a18252c_7f80acc0","side":"PARENT","line":623,"in_reply_to":"5a18252c_13b89f29","updated":"2016-04-14 12:01:36.000000000","message":"It\u0027s the same as line 623 to 630.","commit_id":"db851200d37083929dfdc3b190bd025d7f9617a2"},{"author":{"_account_id":9423,"name":"Roey Chen","email":"roeyc@vmware.com","username":"roeyc"},"change_message_id":"a2833734359ec5d6efe5f236d8a005af40f98656","unresolved":false,"context_lines":[{"line_number":626,"context_line":"            nets_in_requested_order.append(network)"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"            port_security_enabled \u003d network.get(\u0027port_security_enabled\u0027, True)"},{"line_number":629,"context_line":"            if port_security_enabled:"},{"line_number":630,"context_line":"                if not network.get(\u0027subnets\u0027):"},{"line_number":631,"context_line":"                    # Neutron can\u0027t apply security groups to a port"},{"line_number":632,"context_line":"                    # for a network without L3 assignements."},{"line_number":633,"context_line":"                    raise exception.SecurityGroupCannotBeApplied()"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a18252c_332ddb95","line":630,"range":{"start_line":629,"start_character":12,"end_line":630,"end_character":46},"updated":"2016-04-14 09:25:52.000000000","message":"The logic here is not the same as it used to be - \none should be able to create a vm on a network without any subnets (unless explicitly requested to have security-groups).","commit_id":"d5ae7f02b362ad08d45bd943628e485b4d0aedee"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"82ade5af33b52c4c9a4ce7eec64aeaed5fd1b688","unresolved":false,"context_lines":[{"line_number":627,"context_line":""},{"line_number":628,"context_line":"            port_security_enabled \u003d network.get(\u0027port_security_enabled\u0027, True)"},{"line_number":629,"context_line":"            if port_security_enabled:"},{"line_number":630,"context_line":"                if not network.get(\u0027subnets\u0027):"},{"line_number":631,"context_line":"                    # Neutron can\u0027t apply security groups to a port"},{"line_number":632,"context_line":"                    # for a network without L3 assignements."},{"line_number":633,"context_line":"                    raise exception.SecurityGroupCannotBeApplied()"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a18252c_725463fe","line":630,"in_reply_to":"5a18252c_332ddb95","updated":"2016-04-14 12:01:36.000000000","message":"No logic is the same, It was not possible to create a VM without subnet before, Nova API always provides at least the default security groups.","commit_id":"d5ae7f02b362ad08d45bd943628e485b4d0aedee"},{"author":{"_account_id":9423,"name":"Roey Chen","email":"roeyc@vmware.com","username":"roeyc"},"change_message_id":"a06fca3116c6cc5239ebfe5776e373f29871b8ff","unresolved":false,"context_lines":[{"line_number":627,"context_line":""},{"line_number":628,"context_line":"            port_security_enabled \u003d network.get(\u0027port_security_enabled\u0027, True)"},{"line_number":629,"context_line":"            if port_security_enabled:"},{"line_number":630,"context_line":"                if not network.get(\u0027subnets\u0027):"},{"line_number":631,"context_line":"                    # Neutron can\u0027t apply security groups to a port"},{"line_number":632,"context_line":"                    # for a network without L3 assignements."},{"line_number":633,"context_line":"                    raise exception.SecurityGroupCannotBeApplied()"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a18252c_ef11a105","line":630,"in_reply_to":"5a18252c_725463fe","updated":"2016-04-14 13:31:19.000000000","message":"this is one of the bugs this patch goal is to fix: \nhttps://bugs.launchpad.net/nova/+bug/1304409\n\nright?","commit_id":"d5ae7f02b362ad08d45bd943628e485b4d0aedee"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"94e87accacbedd67aa5e9753e501bcda0704d05d","unresolved":false,"context_lines":[{"line_number":627,"context_line":""},{"line_number":628,"context_line":"            port_security_enabled \u003d network.get(\u0027port_security_enabled\u0027, True)"},{"line_number":629,"context_line":"            if port_security_enabled:"},{"line_number":630,"context_line":"                if not network.get(\u0027subnets\u0027):"},{"line_number":631,"context_line":"                    # Neutron can\u0027t apply security groups to a port"},{"line_number":632,"context_line":"                    # for a network without L3 assignements."},{"line_number":633,"context_line":"                    raise exception.SecurityGroupCannotBeApplied()"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a18252c_cbb650f8","line":630,"in_reply_to":"5a18252c_95c2bbe7","updated":"2016-04-14 15:31:46.000000000","message":"The commit message says this is related to bug 1304409 though.","commit_id":"d5ae7f02b362ad08d45bd943628e485b4d0aedee"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"b22f30954a68b87c115cde727558b65e29639c10","unresolved":false,"context_lines":[{"line_number":627,"context_line":""},{"line_number":628,"context_line":"            port_security_enabled \u003d network.get(\u0027port_security_enabled\u0027, True)"},{"line_number":629,"context_line":"            if port_security_enabled:"},{"line_number":630,"context_line":"                if not network.get(\u0027subnets\u0027):"},{"line_number":631,"context_line":"                    # Neutron can\u0027t apply security groups to a port"},{"line_number":632,"context_line":"                    # for a network without L3 assignements."},{"line_number":633,"context_line":"                    raise exception.SecurityGroupCannotBeApplied()"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a18252c_8b1e186e","line":630,"in_reply_to":"5a18252c_cbb650f8","updated":"2016-04-14 15:40:37.000000000","message":"Yes it\u0027s related, it\u0027s on the same part of code and working on the same resources. I think that the point of this tag. To make in relation people working closely on something.","commit_id":"d5ae7f02b362ad08d45bd943628e485b4d0aedee"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"e7214d901cc5f13856afda77e8e131e43a37124d","unresolved":false,"context_lines":[{"line_number":627,"context_line":""},{"line_number":628,"context_line":"            port_security_enabled \u003d network.get(\u0027port_security_enabled\u0027, True)"},{"line_number":629,"context_line":"            if port_security_enabled:"},{"line_number":630,"context_line":"                if not network.get(\u0027subnets\u0027):"},{"line_number":631,"context_line":"                    # Neutron can\u0027t apply security groups to a port"},{"line_number":632,"context_line":"                    # for a network without L3 assignements."},{"line_number":633,"context_line":"                    raise exception.SecurityGroupCannotBeApplied()"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a18252c_95c2bbe7","line":630,"in_reply_to":"5a18252c_ef11a105","updated":"2016-04-14 15:22:37.000000000","message":"No, https://bugs.launchpad.net/nova/+bug/1460630","commit_id":"d5ae7f02b362ad08d45bd943628e485b4d0aedee"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b02b29e6695c1e41b62bbc15afc79f357a45e36d","unresolved":false,"context_lines":[{"line_number":629,"context_line":"            if port_security_enabled:"},{"line_number":630,"context_line":"                if not network.get(\u0027subnets\u0027):"},{"line_number":631,"context_line":"                    # Neutron can\u0027t apply security groups to a port"},{"line_number":632,"context_line":"                    # for a network without L3 assignements."},{"line_number":633,"context_line":"                    raise exception.SecurityGroupCannotBeApplied()"},{"line_number":634,"context_line":"            else:"},{"line_number":635,"context_line":"                if security_group_ids:"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a18252c_fae5fd37","line":632,"updated":"2016-04-14 06:22:43.000000000","message":"i am not sure that this comment is 100% correct. What if there are two provate neutron networks and there is a neutron router between them? This is where the security groups can be applied","commit_id":"d5ae7f02b362ad08d45bd943628e485b4d0aedee"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6e14e0f1d0e5542f0eeaa8d50bdcf339826dfe57","unresolved":false,"context_lines":[{"line_number":629,"context_line":"            if port_security_enabled:"},{"line_number":630,"context_line":"                if not network.get(\u0027subnets\u0027):"},{"line_number":631,"context_line":"                    # Neutron can\u0027t apply security groups to a port"},{"line_number":632,"context_line":"                    # for a network without L3 assignements."},{"line_number":633,"context_line":"                    raise exception.SecurityGroupCannotBeApplied()"},{"line_number":634,"context_line":"            else:"},{"line_number":635,"context_line":"                if security_group_ids:"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a18252c_4b536039","line":632,"in_reply_to":"5a18252c_fae5fd37","updated":"2016-04-14 15:38:12.000000000","message":"Gary, wouldn\u0027t that be something we aren\u0027t handling anyway regardless of this change?","commit_id":"d5ae7f02b362ad08d45bd943628e485b4d0aedee"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"bb7ede5d0bc8815b0e2e03fd8e9061328f069865","unresolved":false,"context_lines":[{"line_number":632,"context_line":"                    # for a network without L3 assignements."},{"line_number":633,"context_line":"                    raise exception.SecurityGroupCannotBeApplied()"},{"line_number":634,"context_line":"            else:"},{"line_number":635,"context_line":"                if security_group_ids:"},{"line_number":636,"context_line":"                    # We don\u0027t want to apply security groups on port"},{"line_number":637,"context_line":"                    # for a network defined with"},{"line_number":638,"context_line":"                    # \u0027port_security_enabled\u003dFalse\u0027."}],"source_content_type":"text/x-python","patch_set":16,"id":"5a18252c_cc73387f","line":635,"updated":"2016-04-13 22:33:53.000000000","message":"Shouldn\u0027t this be outside all of the security group logic L629 - L639? That is, the first branch can raise SecurityGroupCannotBeApplied even when no security groups were specified. Or are we stepping ahead knowing neutron will attempt to apply the default group after this because port_security_enabled?","commit_id":"d5ae7f02b362ad08d45bd943628e485b4d0aedee"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"a83d6ec9f33f84a8193de3b27adc6e5ba17a4af9","unresolved":false,"context_lines":[{"line_number":632,"context_line":"                    # for a network without L3 assignements."},{"line_number":633,"context_line":"                    raise exception.SecurityGroupCannotBeApplied()"},{"line_number":634,"context_line":"            else:"},{"line_number":635,"context_line":"                if security_group_ids:"},{"line_number":636,"context_line":"                    # We don\u0027t want to apply security groups on port"},{"line_number":637,"context_line":"                    # for a network defined with"},{"line_number":638,"context_line":"                    # \u0027port_security_enabled\u003dFalse\u0027."}],"source_content_type":"text/x-python","patch_set":16,"id":"5a18252c_2be09bf9","line":635,"in_reply_to":"5a18252c_0b8848c4","updated":"2016-04-14 19:48:55.000000000","message":"I guess I\u0027m somewhat surprised we\u0027re doing all of this logic to predict whether or not neutron will fail to apply security groups instead of just letting the \"create port\" call succeed or fail. In IRC we guess it\u0027s this way in order to raise a more fine-grained exception.","commit_id":"d5ae7f02b362ad08d45bd943628e485b4d0aedee"},{"author":{"_account_id":9423,"name":"Roey Chen","email":"roeyc@vmware.com","username":"roeyc"},"change_message_id":"dff7cd41882f25a4faf7e4b206d9b06013bc11ca","unresolved":false,"context_lines":[{"line_number":632,"context_line":"                    # for a network without L3 assignements."},{"line_number":633,"context_line":"                    raise exception.SecurityGroupCannotBeApplied()"},{"line_number":634,"context_line":"            else:"},{"line_number":635,"context_line":"                if security_group_ids:"},{"line_number":636,"context_line":"                    # We don\u0027t want to apply security groups on port"},{"line_number":637,"context_line":"                    # for a network defined with"},{"line_number":638,"context_line":"                    # \u0027port_security_enabled\u003dFalse\u0027."}],"source_content_type":"text/x-python","patch_set":16,"id":"5a18252c_3680fff6","line":635,"in_reply_to":"5a18252c_0b8848c4","updated":"2016-04-14 19:59:53.000000000","message":"Ok, I see that now, Thanks.","commit_id":"d5ae7f02b362ad08d45bd943628e485b4d0aedee"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"a83d6ec9f33f84a8193de3b27adc6e5ba17a4af9","unresolved":false,"context_lines":[{"line_number":632,"context_line":"                    # for a network without L3 assignements."},{"line_number":633,"context_line":"                    raise exception.SecurityGroupCannotBeApplied()"},{"line_number":634,"context_line":"            else:"},{"line_number":635,"context_line":"                if security_group_ids:"},{"line_number":636,"context_line":"                    # We don\u0027t want to apply security groups on port"},{"line_number":637,"context_line":"                    # for a network defined with"},{"line_number":638,"context_line":"                    # \u0027port_security_enabled\u003dFalse\u0027."}],"source_content_type":"text/x-python","patch_set":16,"id":"5a18252c_e369a7fa","line":635,"in_reply_to":"5a18252c_35e3f534","updated":"2016-04-14 19:48:55.000000000","message":"Sahid, thanks. I wanted to make sure I understand this is all a prediction based on \"what we know neutron is going to do based on X or Y\" whereas before we were the ones adding the default group in this code.","commit_id":"d5ae7f02b362ad08d45bd943628e485b4d0aedee"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"5ab98372aa7051e9b77ad2dbc2b9816809a833eb","unresolved":false,"context_lines":[{"line_number":632,"context_line":"                    # for a network without L3 assignements."},{"line_number":633,"context_line":"                    raise exception.SecurityGroupCannotBeApplied()"},{"line_number":634,"context_line":"            else:"},{"line_number":635,"context_line":"                if security_group_ids:"},{"line_number":636,"context_line":"                    # We don\u0027t want to apply security groups on port"},{"line_number":637,"context_line":"                    # for a network defined with"},{"line_number":638,"context_line":"                    # \u0027port_security_enabled\u003dFalse\u0027."}],"source_content_type":"text/x-python","patch_set":16,"id":"5a18252c_55f031c9","line":635,"in_reply_to":"5a18252c_35e3f534","updated":"2016-04-14 12:03:22.000000000","message":"port_security_enabled\u003dFalse","commit_id":"d5ae7f02b362ad08d45bd943628e485b4d0aedee"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"e7214d901cc5f13856afda77e8e131e43a37124d","unresolved":false,"context_lines":[{"line_number":632,"context_line":"                    # for a network without L3 assignements."},{"line_number":633,"context_line":"                    raise exception.SecurityGroupCannotBeApplied()"},{"line_number":634,"context_line":"            else:"},{"line_number":635,"context_line":"                if security_group_ids:"},{"line_number":636,"context_line":"                    # We don\u0027t want to apply security groups on port"},{"line_number":637,"context_line":"                    # for a network defined with"},{"line_number":638,"context_line":"                    # \u0027port_security_enabled\u003dFalse\u0027."}],"source_content_type":"text/x-python","patch_set":16,"id":"5a18252c_88a1fefa","line":635,"in_reply_to":"5a18252c_4fc6d59a","updated":"2016-04-14 15:22:37.000000000","message":"So in *THAT* case \u0027port-securty-enabled\u003dTrue\u0027 we will be in the block line 629 to 633, no exception will be raised since network must have a subnet in order for Neutron to have created that port. Please guys read the code...","commit_id":"d5ae7f02b362ad08d45bd943628e485b4d0aedee"},{"author":{"_account_id":9423,"name":"Roey Chen","email":"roeyc@vmware.com","username":"roeyc"},"change_message_id":"a06fca3116c6cc5239ebfe5776e373f29871b8ff","unresolved":false,"context_lines":[{"line_number":632,"context_line":"                    # for a network without L3 assignements."},{"line_number":633,"context_line":"                    raise exception.SecurityGroupCannotBeApplied()"},{"line_number":634,"context_line":"            else:"},{"line_number":635,"context_line":"                if security_group_ids:"},{"line_number":636,"context_line":"                    # We don\u0027t want to apply security groups on port"},{"line_number":637,"context_line":"                    # for a network defined with"},{"line_number":638,"context_line":"                    # \u0027port_security_enabled\u003dFalse\u0027."}],"source_content_type":"text/x-python","patch_set":16,"id":"5a18252c_4fc6d59a","line":635,"in_reply_to":"5a18252c_55f031c9","updated":"2016-04-14 13:31:19.000000000","message":"this is not true, user can do - neutron port-create --no-security-groups.\nhaving port-security-enabled\u003dTrue does not mean you must have security-groups.","commit_id":"d5ae7f02b362ad08d45bd943628e485b4d0aedee"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6e14e0f1d0e5542f0eeaa8d50bdcf339826dfe57","unresolved":false,"context_lines":[{"line_number":632,"context_line":"                    # for a network without L3 assignements."},{"line_number":633,"context_line":"                    raise exception.SecurityGroupCannotBeApplied()"},{"line_number":634,"context_line":"            else:"},{"line_number":635,"context_line":"                if security_group_ids:"},{"line_number":636,"context_line":"                    # We don\u0027t want to apply security groups on port"},{"line_number":637,"context_line":"                    # for a network defined with"},{"line_number":638,"context_line":"                    # \u0027port_security_enabled\u003dFalse\u0027."}],"source_content_type":"text/x-python","patch_set":16,"id":"5a18252c_0b8848c4","line":635,"in_reply_to":"5a18252c_88a1fefa","updated":"2016-04-14 15:38:12.000000000","message":"And if the network has port_security_enabled\u003dTrue and the port was pre-created in neutron without security groups, and then provided to nova during the server create request, I don\u0027t think it matters since below we don\u0027t try to apply security groups to the port at all, only when nova is creating a new port do we apply the security groups (if there are any).","commit_id":"d5ae7f02b362ad08d45bd943628e485b4d0aedee"},{"author":{"_account_id":9423,"name":"Roey Chen","email":"roeyc@vmware.com","username":"roeyc"},"change_message_id":"a2833734359ec5d6efe5f236d8a005af40f98656","unresolved":false,"context_lines":[{"line_number":632,"context_line":"                    # for a network without L3 assignements."},{"line_number":633,"context_line":"                    raise exception.SecurityGroupCannotBeApplied()"},{"line_number":634,"context_line":"            else:"},{"line_number":635,"context_line":"                if security_group_ids:"},{"line_number":636,"context_line":"                    # We don\u0027t want to apply security groups on port"},{"line_number":637,"context_line":"                    # for a network defined with"},{"line_number":638,"context_line":"                    # \u0027port_security_enabled\u003dFalse\u0027."}],"source_content_type":"text/x-python","patch_set":16,"id":"5a18252c_d3e907e8","line":635,"in_reply_to":"5a18252c_cc73387f","updated":"2016-04-14 09:25:52.000000000","message":"+1. though neutron will not try to apply a default security-group if the port was already created with no security-group.","commit_id":"d5ae7f02b362ad08d45bd943628e485b4d0aedee"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"82ade5af33b52c4c9a4ce7eec64aeaed5fd1b688","unresolved":false,"context_lines":[{"line_number":632,"context_line":"                    # for a network without L3 assignements."},{"line_number":633,"context_line":"                    raise exception.SecurityGroupCannotBeApplied()"},{"line_number":634,"context_line":"            else:"},{"line_number":635,"context_line":"                if security_group_ids:"},{"line_number":636,"context_line":"                    # We don\u0027t want to apply security groups on port"},{"line_number":637,"context_line":"                    # for a network defined with"},{"line_number":638,"context_line":"                    # \u0027port_security_enabled\u003dFalse\u0027."}],"source_content_type":"text/x-python","patch_set":16,"id":"5a18252c_35e3f534","line":635,"in_reply_to":"5a18252c_cc73387f","updated":"2016-04-14 12:01:36.000000000","message":"Melanie, yes Neutron will apply a default security groups in case where port_security_enabled, please see comment 450.\n\nRoey, So if the port is created we no security groups that means the network is defined as port_security_enabled...","commit_id":"d5ae7f02b362ad08d45bd943628e485b4d0aedee"}],"nova/tests/unit/network/test_neutronv2.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"f7cf8ae9c23297f97a039ecb91f7d529a2b2dc81","unresolved":false,"context_lines":[{"line_number":204,"context_line":"                         \u0027info_cache\u0027: {\u0027network_info\u0027: []},"},{"line_number":205,"context_line":"                         \u0027security_groups\u0027: []}"},{"line_number":206,"context_line":"        self.nets1 \u003d [{\u0027id\u0027: \u0027my_netid1\u0027,"},{"line_number":207,"context_line":"                       \u0027name\u0027: \u0027my_netname1\u0027,"},{"line_number":208,"context_line":"                       \u0027subnets\u0027: [\u0027mysubnid1\u0027],"},{"line_number":209,"context_line":"                       \u0027tenant_id\u0027: \u0027my_tenantid\u0027}]"},{"line_number":210,"context_line":"        self.nets2 \u003d []"}],"source_content_type":"text/x-python","patch_set":1,"id":"bae84128_b03cd293","line":207,"range":{"start_line":207,"start_character":22,"end_line":207,"end_character":23},"updated":"2016-02-24 15:39:36.000000000","message":"Is this just a whitespace change? if so then pls drop it","commit_id":"93b0366bd4d9b367c4eca6df604670f3c347aa30"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"f7cf8ae9c23297f97a039ecb91f7d529a2b2dc81","unresolved":false,"context_lines":[{"line_number":247,"context_line":"                      \u0027subnets\u0027: [\u0027mysubnid1\u0027],"},{"line_number":248,"context_line":"                      \u0027tenant_id\u0027: \u0027my_tenantid\u0027,"},{"line_number":249,"context_line":"                      \u0027dns_domain\u0027: \u0027my-domain.org.\u0027}]"},{"line_number":250,"context_line":"        self.nets12 \u003d [{\u0027id\u0027: \u0027net_id1\u0027,"},{"line_number":251,"context_line":"                        \u0027name\u0027: \u0027net_name11\u0027,"},{"line_number":252,"context_line":"                        \u0027subnets\u0027: [\u0027mysubnid1\u0027],"},{"line_number":253,"context_line":"                        \u0027port_security_enabled\u0027: True}]"}],"source_content_type":"text/x-python","patch_set":1,"id":"bae84128_b065f245","line":250,"range":{"start_line":250,"start_character":13,"end_line":250,"end_character":19},"updated":"2016-02-24 15:39:36.000000000","message":"So it would be really good to test the security groups get cleaned out as well on False","commit_id":"93b0366bd4d9b367c4eca6df604670f3c347aa30"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1c3d03f97e38d65f15a6ff603dc8d94b6a89ca1b","unresolved":false,"context_lines":[{"line_number":4237,"context_line":"            objects.NetworkRequest(network_id\u003d\u0027net2\u0027)])"},{"line_number":4238,"context_line":""},{"line_number":4239,"context_line":"        instance \u003d objects.Instance("},{"line_number":4240,"context_line":"            project_id\u003d1, availability_zone\u003d\u0027nova\u0027, uuid\u003d\u0027uuid1\u0027)"},{"line_number":4241,"context_line":"        secgroups \u003d [\u0027default\u0027]"},{"line_number":4242,"context_line":""},{"line_number":4243,"context_line":"        mock_process_requested_networks.return_value \u003d ["}],"source_content_type":"text/x-python","patch_set":9,"id":"ba0121b8_aff0f467","line":4240,"range":{"start_line":4240,"start_character":58,"end_line":4240,"end_character":63},"updated":"2016-04-01 18:13:03.000000000","message":"ditto for instance uuid","commit_id":"5007fd27872f28353523c9934cd0453ea341021c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1c3d03f97e38d65f15a6ff603dc8d94b6a89ca1b","unresolved":false,"context_lines":[{"line_number":4237,"context_line":"            objects.NetworkRequest(network_id\u003d\u0027net2\u0027)])"},{"line_number":4238,"context_line":""},{"line_number":4239,"context_line":"        instance \u003d objects.Instance("},{"line_number":4240,"context_line":"            project_id\u003d1, availability_zone\u003d\u0027nova\u0027, uuid\u003d\u0027uuid1\u0027)"},{"line_number":4241,"context_line":"        secgroups \u003d [\u0027default\u0027]"},{"line_number":4242,"context_line":""},{"line_number":4243,"context_line":"        mock_process_requested_networks.return_value \u003d ["}],"source_content_type":"text/x-python","patch_set":9,"id":"ba0121b8_4fdf98d5","line":4240,"range":{"start_line":4240,"start_character":23,"end_line":4240,"end_character":24},"updated":"2016-04-01 18:13:03.000000000","message":"nit: would be good to use a real uuid here since at some point that\u0027s a thing we\u0027re going to be enforcing I think, but this is OK.","commit_id":"5007fd27872f28353523c9934cd0453ea341021c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1c3d03f97e38d65f15a6ff603dc8d94b6a89ca1b","unresolved":false,"context_lines":[{"line_number":4247,"context_line":""},{"line_number":4248,"context_line":"        api \u003d neutronapi.API()"},{"line_number":4249,"context_line":"        api.allocate_for_instance("},{"line_number":4250,"context_line":"            \u0027context\u0027, instance, requested_networks\u003donets,"},{"line_number":4251,"context_line":"            security_groups\u003dsecgroups)"},{"line_number":4252,"context_line":""},{"line_number":4253,"context_line":"        mock_process_security_groups.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":9,"id":"ba0121b8_0f000033","line":4250,"range":{"start_line":4250,"start_character":12,"end_line":4250,"end_character":21},"updated":"2016-04-01 18:13:03.000000000","message":"nit: use a real context, or a mock.sentinel.context.","commit_id":"5007fd27872f28353523c9934cd0453ea341021c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1c3d03f97e38d65f15a6ff603dc8d94b6a89ca1b","unresolved":false,"context_lines":[{"line_number":4255,"context_line":"        mock_create_port.assert_has_calls(["},{"line_number":4256,"context_line":"            mock.call("},{"line_number":4257,"context_line":"                mock.ANY, instance,"},{"line_number":4258,"context_line":"                u\u0027net1\u0027, {\u0027port\u0027:"},{"line_number":4259,"context_line":"                          {\u0027device_owner\u0027: u\u0027compute:nova\u0027,"},{"line_number":4260,"context_line":"                           \u0027device_id\u0027: \u0027uuid1\u0027}},"},{"line_number":4261,"context_line":"                None, [\u0027secgroup-uuid\u0027], [], None),"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba0121b8_cf45686f","line":4258,"range":{"start_line":4258,"start_character":16,"end_line":4258,"end_character":23},"updated":"2016-04-01 18:13:03.000000000","message":"I\u0027m not sure why this is unicode but apparently it\u0027s fine.","commit_id":"5007fd27872f28353523c9934cd0453ea341021c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"19280d67010515d2c44e9ca5c3c9687c827889c8","unresolved":false,"context_lines":[{"line_number":4236,"context_line":"            objects.NetworkRequest(network_id\u003d\u0027net1\u0027),"},{"line_number":4237,"context_line":"            objects.NetworkRequest(network_id\u003d\u0027net2\u0027)])"},{"line_number":4238,"context_line":""},{"line_number":4239,"context_line":"        instance \u003d objects.Instance("},{"line_number":4240,"context_line":"            project_id\u003d1, availability_zone\u003d\u0027nova\u0027, uuid\u003d\u0027uuid1\u0027)"},{"line_number":4241,"context_line":"        secgroups \u003d [\u0027default\u0027]"},{"line_number":4242,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"ba0121b8_475be32e","line":4239,"updated":"2016-04-03 06:52:02.000000000","message":"why not use the fake instance object here?","commit_id":"ee111796e0426cb043a3c0d5bec639a1290c2c38"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"cc6d5c15f155f7961fa45f8818930a402dcbfc59","unresolved":false,"context_lines":[{"line_number":4291,"context_line":""},{"line_number":4292,"context_line":"class TestNeutronPortSecurity(test.NoDBTestCase):"},{"line_number":4293,"context_line":""},{"line_number":4294,"context_line":"    @mock.patch.object(neutronapi.API, \u0027get_instance_nw_info\u0027)"},{"line_number":4295,"context_line":"    @mock.patch.object(neutronapi.API, \u0027_update_port_dns_name\u0027)"},{"line_number":4296,"context_line":"    @mock.patch.object(neutronapi.API, \u0027_create_port\u0027)"},{"line_number":4297,"context_line":"    @mock.patch.object(neutronapi.API, \u0027_populate_neutron_extension_values\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a061dce_fa8e98ce","line":4294,"updated":"2016-04-06 13:30:31.000000000","message":"I didn\u0027t factorize that part of mock, that\u0027d be to pass anyway mocked methods to and probably make the tests more complicated just to save some lines.","commit_id":"71ac5d2dcc0935328d60f1a0d2e7567c1d70384e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ba2372c03c980258fdd3b1076effc047acacba8b","unresolved":false,"context_lines":[{"line_number":4335,"context_line":"            security_groups\u003dsecgroups)"},{"line_number":4336,"context_line":""},{"line_number":4337,"context_line":"        mock_process_security_groups.assert_called_once_with("},{"line_number":4338,"context_line":"            instance, mock.ANY, secgroups)"},{"line_number":4339,"context_line":"        mock_create_port.assert_has_calls(["},{"line_number":4340,"context_line":"            mock.call("},{"line_number":4341,"context_line":"                mock.ANY, instance,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a061dce_1203eb0e","line":4338,"range":{"start_line":4338,"start_character":32,"end_line":4338,"end_character":41},"updated":"2016-04-08 13:59:02.000000000","message":"Shouldn\u0027t secgroups be an empty list when it\u0027s passed to _process_security_groups because we \u0027cleaned\u0027 it first by removing the \u0027default\u0027 security group?\n\nOhh, it is an empty list because the clean method mutates it.\n\nThis would be more clear to me if it assert that [] was passed in.\n\nFor example, let\u0027s say I changed the clean method to not mutate the security_groups formal parameter passed by reference, but stored that in a local variable, removed \u0027default\u0027 from the local variable and then returned that, this test would fail.","commit_id":"71ac5d2dcc0935328d60f1a0d2e7567c1d70384e"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"81fc88c3520c58a70fbe6a40edc8f5a22b57f02b","unresolved":false,"context_lines":[{"line_number":4335,"context_line":"            security_groups\u003dsecgroups)"},{"line_number":4336,"context_line":""},{"line_number":4337,"context_line":"        mock_process_security_groups.assert_called_once_with("},{"line_number":4338,"context_line":"            instance, mock.ANY, secgroups)"},{"line_number":4339,"context_line":"        mock_create_port.assert_has_calls(["},{"line_number":4340,"context_line":"            mock.call("},{"line_number":4341,"context_line":"                mock.ANY, instance,"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a1b2928_9ef9cf50","line":4338,"in_reply_to":"9a061dce_1203eb0e","updated":"2016-04-11 11:26:53.000000000","message":"Yes you made a good point, to be honest I think i did not pay attention of this.","commit_id":"71ac5d2dcc0935328d60f1a0d2e7567c1d70384e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ba2372c03c980258fdd3b1076effc047acacba8b","unresolved":false,"context_lines":[{"line_number":4395,"context_line":"            security_groups\u003dsecgroups)"},{"line_number":4396,"context_line":""},{"line_number":4397,"context_line":"        mock_process_security_groups.assert_called_once_with("},{"line_number":4398,"context_line":"            instance, mock.ANY, secgroups)"},{"line_number":4399,"context_line":"        mock_create_port.assert_has_calls(["},{"line_number":4400,"context_line":"            mock.call("},{"line_number":4401,"context_line":"                mock.ANY, instance,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a061dce_7257c7ca","line":4398,"range":{"start_line":4398,"start_character":32,"end_line":4398,"end_character":41},"updated":"2016-04-08 13:59:02.000000000","message":"Please use [] here as noted above.","commit_id":"71ac5d2dcc0935328d60f1a0d2e7567c1d70384e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a72d786e756c2cc5b11d34225becca62d42852c3","unresolved":false,"context_lines":[{"line_number":4395,"context_line":"            security_groups\u003dsecgroups)"},{"line_number":4396,"context_line":""},{"line_number":4397,"context_line":"        mock_process_security_groups.assert_called_once_with("},{"line_number":4398,"context_line":"            instance, mock.ANY, secgroups)"},{"line_number":4399,"context_line":"        mock_create_port.assert_has_calls(["},{"line_number":4400,"context_line":"            mock.call("},{"line_number":4401,"context_line":"                mock.ANY, instance,"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a18252c_f221bc4e","line":4398,"in_reply_to":"7a1b2928_1ea49f55","updated":"2016-04-13 17:58:07.000000000","message":"Yeah, good point. See how it\u0027s easy to miss? :)","commit_id":"71ac5d2dcc0935328d60f1a0d2e7567c1d70384e"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"81fc88c3520c58a70fbe6a40edc8f5a22b57f02b","unresolved":false,"context_lines":[{"line_number":4395,"context_line":"            security_groups\u003dsecgroups)"},{"line_number":4396,"context_line":""},{"line_number":4397,"context_line":"        mock_process_security_groups.assert_called_once_with("},{"line_number":4398,"context_line":"            instance, mock.ANY, secgroups)"},{"line_number":4399,"context_line":"        mock_create_port.assert_has_calls(["},{"line_number":4400,"context_line":"            mock.call("},{"line_number":4401,"context_line":"                mock.ANY, instance,"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a1b2928_1ea49f55","line":4398,"in_reply_to":"9a061dce_7257c7ca","updated":"2016-04-11 11:26:53.000000000","message":"Yes but that\u0027d be [\u0027secgrp1\u0027,  \u0027secgrp2\u0027]","commit_id":"71ac5d2dcc0935328d60f1a0d2e7567c1d70384e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ba2372c03c980258fdd3b1076effc047acacba8b","unresolved":false,"context_lines":[{"line_number":4454,"context_line":"            security_groups\u003dsecgroups)"},{"line_number":4455,"context_line":""},{"line_number":4456,"context_line":"        mock_process_security_groups.assert_called_once_with("},{"line_number":4457,"context_line":"            instance, mock.ANY, secgroups)"},{"line_number":4458,"context_line":"        mock_create_port.assert_has_calls(["},{"line_number":4459,"context_line":"            mock.call("},{"line_number":4460,"context_line":"                mock.ANY, instance,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a061dce_12092bde","line":4457,"range":{"start_line":4457,"start_character":32,"end_line":4457,"end_character":41},"updated":"2016-04-08 13:59:02.000000000","message":"[]","commit_id":"71ac5d2dcc0935328d60f1a0d2e7567c1d70384e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ba2372c03c980258fdd3b1076effc047acacba8b","unresolved":false,"context_lines":[{"line_number":4482,"context_line":"    def test_port_security_disabled_and_security_groups_requested("},{"line_number":4483,"context_line":"            self, mock_get_client, mock_has_port_binding_extension,"},{"line_number":4484,"context_line":"            mock_process_requested_networks, mock_get_available_networks,"},{"line_number":4485,"context_line":"            mock_process_security_groups, mock_check_external_network_attach,"},{"line_number":4486,"context_line":"            mock_populate_neutron_extension_values, mock_create_port,"},{"line_number":4487,"context_line":"            mock_update_port_dns_name, mock_get_instance_nw_info):"},{"line_number":4488,"context_line":"        nets \u003d ["}],"source_content_type":"text/x-python","patch_set":14,"id":"9a061dce_b2e67f14","line":4485,"range":{"start_line":4485,"start_character":12,"end_line":4485,"end_character":40},"updated":"2016-04-08 13:59:02.000000000","message":"Can we add an assertion on this please to make sure it\u0027s called with the \u0027cleaned\u0027 list of security groups?","commit_id":"71ac5d2dcc0935328d60f1a0d2e7567c1d70384e"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"81fc88c3520c58a70fbe6a40edc8f5a22b57f02b","unresolved":false,"context_lines":[{"line_number":4482,"context_line":"    def test_port_security_disabled_and_security_groups_requested("},{"line_number":4483,"context_line":"            self, mock_get_client, mock_has_port_binding_extension,"},{"line_number":4484,"context_line":"            mock_process_requested_networks, mock_get_available_networks,"},{"line_number":4485,"context_line":"            mock_process_security_groups, mock_check_external_network_attach,"},{"line_number":4486,"context_line":"            mock_populate_neutron_extension_values, mock_create_port,"},{"line_number":4487,"context_line":"            mock_update_port_dns_name, mock_get_instance_nw_info):"},{"line_number":4488,"context_line":"        nets \u003d ["}],"source_content_type":"text/x-python","patch_set":14,"id":"7a1b2928_79e7ad12","line":4485,"in_reply_to":"9a061dce_b2e67f14","updated":"2016-04-11 11:26:53.000000000","message":"Sure, that makes sense.","commit_id":"71ac5d2dcc0935328d60f1a0d2e7567c1d70384e"},{"author":{"_account_id":9423,"name":"Roey Chen","email":"roeyc@vmware.com","username":"roeyc"},"change_message_id":"e9772b4ef1ca99fafd1f12a9f5cdc10701836fce","unresolved":false,"context_lines":[{"line_number":4288,"context_line":"    def test_get_client_for_admin_context_with_id(self):"},{"line_number":4289,"context_line":"        self._test_get_client_for_admin(use_id\u003dTrue, admin_context\u003dTrue)"},{"line_number":4290,"context_line":""},{"line_number":4291,"context_line":""},{"line_number":4292,"context_line":"class TestNeutronPortSecurity(test.NoDBTestCase):"},{"line_number":4293,"context_line":""},{"line_number":4294,"context_line":"    @mock.patch.object(neutronapi.API, \u0027get_instance_nw_info\u0027)"},{"line_number":4295,"context_line":"    @mock.patch.object(neutronapi.API, \u0027_update_port_dns_name\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a1b2928_81232b05","line":4292,"range":{"start_line":4291,"start_character":0,"end_line":4292,"end_character":29},"updated":"2016-04-12 07:17:48.000000000","message":"nit: It would be cleaner if you could extract the duplicate code to single method and calling it with the specific test params.","commit_id":"f607e59434a5f85bda287f9f91de2a6e35140444"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0e3ee03a46c3afc857476bddb2f35495fd866295","unresolved":false,"context_lines":[{"line_number":4325,"context_line":"        secgroups \u003d [\u0027default\u0027]  # Nova API provides the \u0027default\u0027"},{"line_number":4326,"context_line":""},{"line_number":4327,"context_line":"        mock_process_requested_networks.return_value \u003d ["},{"line_number":4328,"context_line":"            None, [\u0027net1\u0027, \u0027net2\u0027], onets, []]"},{"line_number":4329,"context_line":"        mock_get_available_networks.return_value \u003d nets"},{"line_number":4330,"context_line":"        mock_process_security_groups.return_value \u003d []"},{"line_number":4331,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"5a18252c_9202086e","line":4328,"range":{"start_line":4328,"start_character":43,"end_line":4328,"end_character":45},"updated":"2016-04-13 18:04:09.000000000","message":"Technically this would be None for available_macs since none are passed in to allocate_for_instance.","commit_id":"f607e59434a5f85bda287f9f91de2a6e35140444"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0e3ee03a46c3afc857476bddb2f35495fd866295","unresolved":false,"context_lines":[{"line_number":4384,"context_line":"        secgroups \u003d [\u0027default\u0027, \u0027secgrp1\u0027, \u0027secgrp2\u0027]"},{"line_number":4385,"context_line":""},{"line_number":4386,"context_line":"        mock_process_requested_networks.return_value \u003d ["},{"line_number":4387,"context_line":"            None, [\u0027net1\u0027, \u0027net2\u0027], onets, []]"},{"line_number":4388,"context_line":"        mock_get_available_networks.return_value \u003d nets"},{"line_number":4389,"context_line":"        mock_process_security_groups.return_value \u003d [\u0027secgrp-uuid1\u0027,"},{"line_number":4390,"context_line":"                                                     \u0027secgrp-uuid2\u0027]"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a18252c_f2f9bc81","line":4387,"range":{"start_line":4387,"start_character":43,"end_line":4387,"end_character":45},"updated":"2016-04-13 18:04:09.000000000","message":"Technically this is None.","commit_id":"f607e59434a5f85bda287f9f91de2a6e35140444"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0e3ee03a46c3afc857476bddb2f35495fd866295","unresolved":false,"context_lines":[{"line_number":4444,"context_line":"        secgroups \u003d [\u0027default\u0027]  # Nova API provides the \u0027default\u0027"},{"line_number":4445,"context_line":""},{"line_number":4446,"context_line":"        mock_process_requested_networks.return_value \u003d ["},{"line_number":4447,"context_line":"            None, [\u0027net1\u0027, \u0027net2\u0027], onets, []]"},{"line_number":4448,"context_line":"        mock_get_available_networks.return_value \u003d nets"},{"line_number":4449,"context_line":"        mock_process_security_groups.return_value \u003d []"},{"line_number":4450,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"5a18252c_12ef18b1","line":4447,"range":{"start_line":4447,"start_character":43,"end_line":4447,"end_character":45},"updated":"2016-04-13 18:04:09.000000000","message":"Technically None.","commit_id":"f607e59434a5f85bda287f9f91de2a6e35140444"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0e3ee03a46c3afc857476bddb2f35495fd866295","unresolved":false,"context_lines":[{"line_number":4503,"context_line":"        secgroups \u003d [\u0027default\u0027, \u0027secgrp1\u0027, \u0027secgrp2\u0027]"},{"line_number":4504,"context_line":""},{"line_number":4505,"context_line":"        mock_process_requested_networks.return_value \u003d ["},{"line_number":4506,"context_line":"            None, [\u0027net1\u0027, \u0027net2\u0027], onets, [\u0027secgrp1\u0027, \u0027secgrp1\u0027]]"},{"line_number":4507,"context_line":"        mock_get_available_networks.return_value \u003d nets"},{"line_number":4508,"context_line":"        mock_process_security_groups.return_value \u003d [\u0027secgrp-uuid1\u0027,"},{"line_number":4509,"context_line":"                                                     \u0027secgrp-uuid2\u0027]"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a18252c_92396844","line":4506,"range":{"start_line":4506,"start_character":43,"end_line":4506,"end_character":65},"updated":"2016-04-13 18:04:09.000000000","message":"This would be None, _process_requested_networks returns a 4-item tuple and the last item is available MACs, not security groups.","commit_id":"f607e59434a5f85bda287f9f91de2a6e35140444"}],"releasenotes/notes/known-issue-on-api-1efca45440136f3e.yaml":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c0651bed92e34aa7856720ef548d3122c41fe031","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"issues:"},{"line_number":3,"context_line":"  - When using Neutron extension \u0027port_security\u0027 and booting an"},{"line_number":4,"context_line":"    instance on a network with \u0027port_security_enabled\u003dFalse\u0027 The Nova"},{"line_number":5,"context_line":"    API response says there is a \u0027default\u0027 security group attached to"},{"line_number":6,"context_line":"    the instance which is false. However when listing security groups"},{"line_number":7,"context_line":"    for the instance there are none listed."}],"source_content_type":"text/x-yaml","patch_set":9,"id":"ba0121b8_c8a3a6b0","line":4,"range":{"start_line":4,"start_character":61,"end_line":4,"end_character":64},"updated":"2016-04-01 16:12:24.000000000","message":"the","commit_id":"5007fd27872f28353523c9934cd0453ea341021c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c0651bed92e34aa7856720ef548d3122c41fe031","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - When using Neutron extension \u0027port_security\u0027 and booting an"},{"line_number":4,"context_line":"    instance on a network with \u0027port_security_enabled\u003dFalse\u0027 The Nova"},{"line_number":5,"context_line":"    API response says there is a \u0027default\u0027 security group attached to"},{"line_number":6,"context_line":"    the instance which is false. However when listing security groups"},{"line_number":7,"context_line":"    for the instance there are none listed."}],"source_content_type":"text/x-yaml","patch_set":9,"id":"ba0121b8_889ece60","line":6,"range":{"start_line":6,"start_character":26,"end_line":6,"end_character":31},"updated":"2016-04-01 16:12:24.000000000","message":"incorrect","commit_id":"5007fd27872f28353523c9934cd0453ea341021c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c0651bed92e34aa7856720ef548d3122c41fe031","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    instance on a network with \u0027port_security_enabled\u003dFalse\u0027 The Nova"},{"line_number":5,"context_line":"    API response says there is a \u0027default\u0027 security group attached to"},{"line_number":6,"context_line":"    the instance which is false. However when listing security groups"},{"line_number":7,"context_line":"    for the instance there are none listed."}],"source_content_type":"text/x-yaml","patch_set":9,"id":"ba0121b8_c891e648","line":7,"range":{"start_line":7,"start_character":31,"end_line":7,"end_character":42},"updated":"2016-04-01 16:12:24.000000000","message":"\u0027there are none listed, which is correct.\u0027","commit_id":"5007fd27872f28353523c9934cd0453ea341021c"}]}
