)]}'
{"neutron/tests/unit/conf/policies/test_floatingip.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"def13542ee12e0d02e27c15b0629403c9296b743","unresolved":true,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def test_create_floatingip(self):"},{"line_number":41,"context_line":"        self.assertTrue("},{"line_number":42,"context_line":"            policy.enforce(self.context, \"create_floatingip\", self.target))"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def test_create_floatingip_with_ip_address(self):"},{"line_number":45,"context_line":"        self.assertTrue("}],"source_content_type":"text/x-python","patch_set":3,"id":"74d926aa_7cbf5d54","line":42,"updated":"2021-04-09 15:33:53.000000000","message":"Similar comment here as in the patch for routers. I would have expected this to fail because scope_types doesn\u0027t contain \u0027system\u0027 [0], which should be getting raised here [1].\n\n[0] https://github.com/openstack/neutron/blob/master/neutron/conf/policies/floatingip.py#L36\n[1] https://opendev.org/openstack/oslo.policy/src/branch/master/oslo_policy/policy.py#L1037","commit_id":"10411d786b549eeeda54e29f8581d97a8dd1a85e"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"261f3df7e715e320df045fd62bc415b3422aa4e7","unresolved":true,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def test_create_floatingip(self):"},{"line_number":41,"context_line":"        self.assertTrue("},{"line_number":42,"context_line":"            policy.enforce(self.context, \"create_floatingip\", self.target))"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def test_create_floatingip_with_ip_address(self):"},{"line_number":45,"context_line":"        self.assertTrue("}],"source_content_type":"text/x-python","patch_set":3,"id":"d7b9751b_adec5a7b","line":42,"in_reply_to":"74d926aa_7cbf5d54","updated":"2021-04-12 11:52:29.000000000","message":"It\u0027s probably passing because context in this test is created with system_scope\u003d\u0027all\u0027: https://github.com/openstack/neutron/blob/master/neutron/tests/unit/conf/policies/base.py#L46 - should we change it?\n\nAnd also I think that this should be changed so I proposed https://review.opendev.org/c/openstack/neutron/+/785858","commit_id":"10411d786b549eeeda54e29f8581d97a8dd1a85e"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"f4c18449dc97afc6c36244f59d1be9eb55df4b3e","unresolved":true,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def test_create_floatingip(self):"},{"line_number":41,"context_line":"        self.assertTrue("},{"line_number":42,"context_line":"            policy.enforce(self.context, \"create_floatingip\", self.target))"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def test_create_floatingip_with_ip_address(self):"},{"line_number":45,"context_line":"        self.assertTrue("}],"source_content_type":"text/x-python","patch_set":3,"id":"f4c06914_86f7173f","line":42,"in_reply_to":"bf3d0975_4d544df2","updated":"2021-04-12 20:58:35.000000000","message":"I opened a bug for this in oslo.policy.\n\nhttps://bugs.launchpad.net/oslo.policy/+bug/1923503","commit_id":"10411d786b549eeeda54e29f8581d97a8dd1a85e"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"4d176e22c8065eea0a15c3098cc19e060bd8b6f2","unresolved":true,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def test_create_floatingip(self):"},{"line_number":41,"context_line":"        self.assertTrue("},{"line_number":42,"context_line":"            policy.enforce(self.context, \"create_floatingip\", self.target))"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def test_create_floatingip_with_ip_address(self):"},{"line_number":45,"context_line":"        self.assertTrue("}],"source_content_type":"text/x-python","patch_set":3,"id":"bf3d0975_4d544df2","line":42,"in_reply_to":"d7b9751b_adec5a7b","updated":"2021-04-12 19:30:56.000000000","message":"I debugged this locally and I don\u0027t think scope_types is actually being checked because rule:create_floatingip is an instance of oslo_policy._checks.RuleCheck, which is handled first [0]. The else case is what actually handles enforcing scope [1].\n\nWe might need to patch oslo.policy to handle enforcing scope in that if/else statement so that it\u0027s done consistently.\n\n[0] https://opendev.org/openstack/oslo.policy/src/branch/master/oslo_policy/policy.py#L997-L1006\n[1] https://opendev.org/openstack/oslo.policy/src/branch/master/oslo_policy/policy.py#L1033-L1039","commit_id":"10411d786b549eeeda54e29f8581d97a8dd1a85e"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"b1600b203f24e2c8719d128d399a1c2dfe54168d","unresolved":true,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def test_create_floatingip(self):"},{"line_number":41,"context_line":"        self.assertTrue("},{"line_number":42,"context_line":"            policy.enforce(self.context, \"create_floatingip\", self.target))"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def test_create_floatingip_with_ip_address(self):"},{"line_number":45,"context_line":"        self.assertTrue("}],"source_content_type":"text/x-python","patch_set":3,"id":"e83cd9ba_4dc394c5","line":42,"in_reply_to":"f4c06914_86f7173f","updated":"2021-04-15 07:09:56.000000000","message":"Thx","commit_id":"10411d786b549eeeda54e29f8581d97a8dd1a85e"}]}
