)]}'
{"neutron/tests/unit/conf/policies/test_network.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"6ad5a5687145e231c0113c7819bf9be850905269","unresolved":true,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    def setUp(self):"},{"line_number":25,"context_line":"        super(NetworkAPITestCase, self).setUp()"},{"line_number":26,"context_line":"        self.target \u003d {\u0027project_id\u0027: self.project_id}"},{"line_number":27,"context_line":"        self.alt_target \u003d {\u0027project_id\u0027: self.alt_project_id}"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5cade1ba_0f3eaa3a","line":26,"updated":"2021-04-08 22:04:21.000000000","message":"All networks are project-owned resources, right? Is there ever a case where a network *won\u0027t* have a project_id attribute.","commit_id":"bde437e6d3328bf7b36c496cda5501176cf32975"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"a9b260b7bd305cab2a291be5d7ad2f549bac27a2","unresolved":true,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    def setUp(self):"},{"line_number":25,"context_line":"        super(NetworkAPITestCase, self).setUp()"},{"line_number":26,"context_line":"        self.target \u003d {\u0027project_id\u0027: self.project_id}"},{"line_number":27,"context_line":"        self.alt_target \u003d {\u0027project_id\u0027: self.alt_project_id}"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"f9d304c4_f73fac82","line":26,"in_reply_to":"5cade1ba_0f3eaa3a","updated":"2021-04-12 14:38:25.000000000","message":"no, it always have some project_id","commit_id":"bde437e6d3328bf7b36c496cda5501176cf32975"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"6ad5a5687145e231c0113c7819bf9be850905269","unresolved":true,"context_lines":[{"line_number":37,"context_line":"        self.assertTrue("},{"line_number":38,"context_line":"            policy.enforce(self.context, \u0027create_network\u0027, self.target))"},{"line_number":39,"context_line":"        self.assertTrue("},{"line_number":40,"context_line":"            policy.enforce(self.context, \u0027create_network\u0027, self.alt_target))"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def test_create_network_shared(self):"},{"line_number":43,"context_line":"        self.assertTrue("}],"source_content_type":"text/x-python","patch_set":1,"id":"65a2c9fd_84715cd5","line":40,"updated":"2021-04-08 22:04:21.000000000","message":"It looks like system-admins are able to create networks on behalf of projects, yeah?\n\nWe were talking about similar interactions with nova (e.g., a system-administrator rebooting an instance).\n\nJust FYI - we have a session slated for the PTG to discuss how we should handle things like this across services if you\u0027re interested. We could probably hold an impromptu session early so that it doesn\u0027t slow you down though.\n\nhttps://etherpad.opendev.org/p/policy-popup-xena-ptg","commit_id":"bde437e6d3328bf7b36c496cda5501176cf32975"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"a9b260b7bd305cab2a291be5d7ad2f549bac27a2","unresolved":true,"context_lines":[{"line_number":37,"context_line":"        self.assertTrue("},{"line_number":38,"context_line":"            policy.enforce(self.context, \u0027create_network\u0027, self.target))"},{"line_number":39,"context_line":"        self.assertTrue("},{"line_number":40,"context_line":"            policy.enforce(self.context, \u0027create_network\u0027, self.alt_target))"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def test_create_network_shared(self):"},{"line_number":43,"context_line":"        self.assertTrue("}],"source_content_type":"text/x-python","patch_set":1,"id":"875ceafd_72669f22","line":40,"in_reply_to":"65a2c9fd_84715cd5","updated":"2021-04-12 14:38:25.000000000","message":"I plan to attend that session","commit_id":"bde437e6d3328bf7b36c496cda5501176cf32975"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"6ef387e6fd5aa12cca7771a2f1083b19fdf2f7e7","unresolved":true,"context_lines":[{"line_number":37,"context_line":"        self.assertTrue("},{"line_number":38,"context_line":"            policy.enforce(self.context, \u0027create_network\u0027, self.target))"},{"line_number":39,"context_line":"        self.assertTrue("},{"line_number":40,"context_line":"            policy.enforce(self.context, \u0027create_network\u0027, self.alt_target))"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def test_create_network_shared(self):"},{"line_number":43,"context_line":"        self.assertTrue("}],"source_content_type":"text/x-python","patch_set":1,"id":"77bea2f7_512faadb","line":40,"in_reply_to":"875ceafd_72669f22","updated":"2021-04-12 18:38:11.000000000","message":"Awesome - we plan to tackle that topic on Thursday, April 22nd @ 15:00 UTC in Mitaka.","commit_id":"bde437e6d3328bf7b36c496cda5501176cf32975"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"6ad5a5687145e231c0113c7819bf9be850905269","unresolved":true,"context_lines":[{"line_number":518,"context_line":""},{"line_number":519,"context_line":"    def test_create_network(self):"},{"line_number":520,"context_line":"        self.assertTrue("},{"line_number":521,"context_line":"            policy.enforce(self.context, \u0027create_network\u0027, self.target))"},{"line_number":522,"context_line":"        self.assertRaises("},{"line_number":523,"context_line":"            base_policy.PolicyNotAuthorized,"},{"line_number":524,"context_line":"            policy.enforce,"}],"source_content_type":"text/x-python","patch_set":1,"id":"fce9a08b_2c64f792","line":521,"range":{"start_line":521,"start_character":59,"end_line":521,"end_character":70},"updated":"2021-04-08 22:04:21.000000000","message":"It would be nice to ensure this target is always consistent with the target the neutron API builds.\n\nIs that something we should consider for unit testing or is that something neutron would rather exercise with full protection testing using tempest?","commit_id":"bde437e6d3328bf7b36c496cda5501176cf32975"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"a9b260b7bd305cab2a291be5d7ad2f549bac27a2","unresolved":true,"context_lines":[{"line_number":518,"context_line":""},{"line_number":519,"context_line":"    def test_create_network(self):"},{"line_number":520,"context_line":"        self.assertTrue("},{"line_number":521,"context_line":"            policy.enforce(self.context, \u0027create_network\u0027, self.target))"},{"line_number":522,"context_line":"        self.assertRaises("},{"line_number":523,"context_line":"            base_policy.PolicyNotAuthorized,"},{"line_number":524,"context_line":"            policy.enforce,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1d46bedc_7a0b406d","line":521,"range":{"start_line":521,"start_character":59,"end_line":521,"end_character":70},"in_reply_to":"fce9a08b_2c64f792","updated":"2021-04-12 14:38:25.000000000","message":"For unit testing I think that enough would be to have tenant_id in the target. I don\u0027t know any other attributes which are really used in enforce() function.\nMaybe in some tempest API tests which should test it end-to-end with passing some specific attributes and check how policies works with it.","commit_id":"bde437e6d3328bf7b36c496cda5501176cf32975"}]}
