)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"2fd3cf4aae27379a0ab4d40cbf5ca67c26960833","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     jessegler \u003cjess.egler@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-07-17 18:15:31 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Adds the following tests for create_network:"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"\u0027create_network:is_default\u0027"},{"line_number":10,"context_line":"\u0027create_network:provider:physical_network\u0027"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5f7c97a3_0fe0bdf7","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":44},"updated":"2018-07-18 01:46:55.000000000","message":"This should be refactored to have a better commit message like: \"Add create_network tests for missing policy actions\"","commit_id":"5e0bf09af3bf4a86461c05ebb985e2cb8e9f761c"}],"patrole_tempest_plugin/tests/api/network/test_networks_rbac.py":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"8a9fd23a746c8cf8255e463a2e91b476efba9eb3","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                                        \"create_network:is_default\"],"},{"line_number":105,"context_line":"                                 expected_error_codes\u003d[403, 403])"},{"line_number":106,"context_line":"    @decorators.idempotent_id(\u002728602661-5ac7-407e-b739-e393f619f5e3\u0027)"},{"line_number":107,"context_line":"    def test_create_network_is_default(self):"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        \"\"\"Create Is Default Network Test"},{"line_number":110,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_cb771e3b","line":107,"updated":"2018-07-17 20:49:03.000000000","message":"For Member I see this:\n\n- test_create_network_is_default: Expecting 403 to be raised for policy name: create_network:is_default wrapper /opt/stack/patrole/patrole_tempest_plugin/rbac_rule_validation.py:178\n- 2018-07-17 19:55:55.874 8228 INFO tempest.lib.common.rest_client [req-a6232dfd-ec9d-408d-a63f-7904c6d68936 ] Request (NetworksRbacTest:test_create_network_is_default): 403 POST https://10.210.67.128:9696/v2.0/networks 0.222s\n\nSo this looks correct in the sense that the expected workflow is happening.","commit_id":"7de9c46068b6fe0bacaa35b2f44daaacd4b9d720"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"8a9fd23a746c8cf8255e463a2e91b476efba9eb3","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        RBAC test for the neutron create_network:is_default policy"},{"line_number":112,"context_line":"        \"\"\""},{"line_number":113,"context_line":"        with self.rbac_utils.override_role(self):"},{"line_number":114,"context_line":"            exc \u003d self.assertRaises(lib_exc.Conflict,"},{"line_number":115,"context_line":"                                    self._create_network,"},{"line_number":116,"context_line":"                                    is_default\u003dTrue)"},{"line_number":117,"context_line":"            self.assertIn(\u0027A default external network already exists\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_2bb572d0","line":114,"range":{"start_line":114,"start_character":44,"end_line":114,"end_character":52},"updated":"2018-07-17 20:49:03.000000000","message":"Is a default network always available? Otherwise this necessarily isn\u0027t true.","commit_id":"7de9c46068b6fe0bacaa35b2f44daaacd4b9d720"},{"author":{"_account_id":23140,"name":"Jess Egler","email":"jess.egler@gmail.com","username":"jessegler"},"change_message_id":"2e55ff69c397767fd566c37206120cff0a73f60d","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        RBAC test for the neutron create_network:is_default policy"},{"line_number":112,"context_line":"        \"\"\""},{"line_number":113,"context_line":"        with self.rbac_utils.override_role(self):"},{"line_number":114,"context_line":"            exc \u003d self.assertRaises(lib_exc.Conflict,"},{"line_number":115,"context_line":"                                    self._create_network,"},{"line_number":116,"context_line":"                                    is_default\u003dTrue)"},{"line_number":117,"context_line":"            self.assertIn(\u0027A default external network already exists\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_89d36d5f","line":114,"range":{"start_line":114,"start_character":44,"end_line":114,"end_character":52},"in_reply_to":"5f7c97a3_2bb572d0","updated":"2018-07-17 23:09:07.000000000","message":"I thought so, but it turns out you\u0027re correct. Will fix.","commit_id":"7de9c46068b6fe0bacaa35b2f44daaacd4b9d720"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"8a9fd23a746c8cf8255e463a2e91b476efba9eb3","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        \"\"\""},{"line_number":162,"context_line":"        try:"},{"line_number":163,"context_line":"            with self.rbac_utils.override_role(self):"},{"line_number":164,"context_line":"                self._create_network(provider_physical_network\u003d\u0027provider\u0027,"},{"line_number":165,"context_line":"                                     provider_network_type\u003d\u0027flat\u0027)"},{"line_number":166,"context_line":"        except lib_exc.BadRequest as exc:"},{"line_number":167,"context_line":"            # There probably won\u0027t be a physical network called \u0027provider\u0027, but"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_6bbe0ab0","line":164,"range":{"start_line":164,"start_character":64,"end_line":164,"end_character":72},"updated":"2018-07-17 20:49:03.000000000","message":"Why not use an existing network? Fishing for BadRequests isn\u0027t ideal.","commit_id":"7de9c46068b6fe0bacaa35b2f44daaacd4b9d720"},{"author":{"_account_id":23140,"name":"Jess Egler","email":"jess.egler@gmail.com","username":"jessegler"},"change_message_id":"4bebe1c18c694aeadea9caaba5c933b2f4594e14","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        \"\"\""},{"line_number":162,"context_line":"        try:"},{"line_number":163,"context_line":"            with self.rbac_utils.override_role(self):"},{"line_number":164,"context_line":"                self._create_network(provider_physical_network\u003d\u0027provider\u0027,"},{"line_number":165,"context_line":"                                     provider_network_type\u003d\u0027flat\u0027)"},{"line_number":166,"context_line":"        except lib_exc.BadRequest as exc:"},{"line_number":167,"context_line":"            # There probably won\u0027t be a physical network called \u0027provider\u0027, but"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_4911d55b","line":164,"range":{"start_line":164,"start_character":64,"end_line":164,"end_character":72},"in_reply_to":"5f7c97a3_692a912f","updated":"2018-07-17 23:55:51.000000000","message":"Ah that makes sense. We should fail in the assertIn on 169 if we get a bad request for any other reason than \u0027provider\u0027 isn\u0027t a valid physical network, so we should be OK.\n\nThere\u0027s no way to create physical networks though the api. You can only do it in the config files.","commit_id":"7de9c46068b6fe0bacaa35b2f44daaacd4b9d720"},{"author":{"_account_id":23140,"name":"Jess Egler","email":"jess.egler@gmail.com","username":"jessegler"},"change_message_id":"2e55ff69c397767fd566c37206120cff0a73f60d","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        \"\"\""},{"line_number":162,"context_line":"        try:"},{"line_number":163,"context_line":"            with self.rbac_utils.override_role(self):"},{"line_number":164,"context_line":"                self._create_network(provider_physical_network\u003d\u0027provider\u0027,"},{"line_number":165,"context_line":"                                     provider_network_type\u003d\u0027flat\u0027)"},{"line_number":166,"context_line":"        except lib_exc.BadRequest as exc:"},{"line_number":167,"context_line":"            # There probably won\u0027t be a physical network called \u0027provider\u0027, but"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_81dca771","line":164,"range":{"start_line":164,"start_character":64,"end_line":164,"end_character":72},"in_reply_to":"5f7c97a3_6bbe0ab0","updated":"2018-07-17 23:09:07.000000000","message":"Two things:\n\n1. This is an RBAC test, so we should only be concerned whether I\u0027m allowed to do something, not whether the parameters I\u0027m passing are sensible. :)\n\n2. That being said, as far as I know, there\u0027s no way for OpenStack to list the actual physical network interfaces available on the hardware. You can list what neutron networks are using a particular physical network, but you can\u0027t determine what physical networks exist.","commit_id":"7de9c46068b6fe0bacaa35b2f44daaacd4b9d720"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"4ebaf786ca8bee2a6f5a0055854a7379ac1502ef","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        \"\"\""},{"line_number":162,"context_line":"        try:"},{"line_number":163,"context_line":"            with self.rbac_utils.override_role(self):"},{"line_number":164,"context_line":"                self._create_network(provider_physical_network\u003d\u0027provider\u0027,"},{"line_number":165,"context_line":"                                     provider_network_type\u003d\u0027flat\u0027)"},{"line_number":166,"context_line":"        except lib_exc.BadRequest as exc:"},{"line_number":167,"context_line":"            # There probably won\u0027t be a physical network called \u0027provider\u0027, but"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_692a912f","line":164,"range":{"start_line":164,"start_character":64,"end_line":164,"end_character":72},"in_reply_to":"5f7c97a3_81dca771","updated":"2018-07-17 23:18:54.000000000","message":"re: this is RBAC test so we shouldn\u0027t concern ourselves with passing sensible parameters. This is something I agree with 90%, 10% disagree out of caution.\n\nReason why is because we want to ensure that the policy is indeed getting enforced prior to a 400. For complex workflows we might get into a situation where we write a bad test, so Neutron very early earn throws a 400, during some schema validation or something (for example Nova does some schema validation in the decorator before it calls the API code itself) before the policy check happens.\n\nSo as a general rule we try to avoid coercing a 400, even if it does make testing easier and faster, because we get into a situation where we need to go into logs to ensure the negative workflow is behaving correctly. It also requires inspecting the code server-side to make sure we understand the workflow prior to writing the test, which is typically not the case with Tempest (where you can usually rely on API documentation alone).\n\nIn this case if there is no way to do the testing (for example because of for example evacuate server being dangerous to test) then we allow this behavior. I think in this case this is OK, provided we can\u0027t create a physical network prior to testing the scenario here.","commit_id":"7de9c46068b6fe0bacaa35b2f44daaacd4b9d720"},{"author":{"_account_id":17896,"name":"Rick Bartra","email":"rickbartra@microsoft.com","username":"rb560u"},"change_message_id":"eaa479a07140ebd7f885a16573751012a681ccc3","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyrightt 2017 AT\u0026T Corporation."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_9a0b9f7a","line":1,"range":{"start_line":1,"start_character":11,"end_line":1,"end_character":12},"updated":"2018-07-18 14:02:55.000000000","message":"nit: Copyright","commit_id":"5e0bf09af3bf4a86461c05ebb985e2cb8e9f761c"}]}
