)]}'
{"bgpvpn_dashboard/dashboards/project/bgpvpn/forms.py":[{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"c3f8211ff92cc4581b65b5697e7e1d3ce4dd3ab6","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    def handle(self, request, data):"},{"line_number":56,"context_line":"        params \u003d {}"},{"line_number":57,"context_line":"        for key in bgpvpn_common.RT_FORMAT_ATTRIBUTES:"},{"line_number":58,"context_line":"            if data.get(key):"},{"line_number":59,"context_line":"                if policy.check("},{"line_number":60,"context_line":"                        ((\"networking-bgpvpn\", \"update_bgpvpn:%s\" % key),),"},{"line_number":61,"context_line":"                        request):"},{"line_number":62,"context_line":"                    params[key] \u003d bgpvpn_common.format_rt(data[key])"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_948d7033","line":59,"range":{"start_line":58,"start_character":8,"end_line":59,"end_character":27},"updated":"2017-07-20 14:58:34.000000000","message":"can be combined into one \u0027if\u0027 statement","commit_id":"e9d848354caf6596ec66d6802722937654c50b0f"},{"author":{"_account_id":21800,"name":"Cedric Savignan","email":"cedric.savignan@orange.com","username":"csavignan"},"change_message_id":"a8395d7409d4cbc04bb95b9f5aa4228f21caddbe","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    def handle(self, request, data):"},{"line_number":56,"context_line":"        params \u003d {}"},{"line_number":57,"context_line":"        for key in bgpvpn_common.RT_FORMAT_ATTRIBUTES:"},{"line_number":58,"context_line":"            if data.get(key):"},{"line_number":59,"context_line":"                if policy.check("},{"line_number":60,"context_line":"                        ((\"networking-bgpvpn\", \"update_bgpvpn:%s\" % key),),"},{"line_number":61,"context_line":"                        request):"},{"line_number":62,"context_line":"                    params[key] \u003d bgpvpn_common.format_rt(data[key])"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_ebf6def9","line":59,"range":{"start_line":58,"start_character":8,"end_line":59,"end_character":27},"in_reply_to":"1f1a1f67_948d7033","updated":"2017-07-21 13:09:04.000000000","message":"Done","commit_id":"e9d848354caf6596ec66d6802722937654c50b0f"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"c3f8211ff92cc4581b65b5697e7e1d3ce4dd3ab6","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        for key in bgpvpn_common.RT_FORMAT_ATTRIBUTES:"},{"line_number":58,"context_line":"            if data.get(key):"},{"line_number":59,"context_line":"                if policy.check("},{"line_number":60,"context_line":"                        ((\"networking-bgpvpn\", \"update_bgpvpn:%s\" % key),),"},{"line_number":61,"context_line":"                        request):"},{"line_number":62,"context_line":"                    params[key] \u003d bgpvpn_common.format_rt(data[key])"},{"line_number":63,"context_line":"                del data[key]"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_d472c849","line":60,"range":{"start_line":60,"start_character":48,"end_line":60,"end_character":54},"updated":"2017-07-20 14:58:34.000000000","message":"hmmm.... shouldn\u0027t this be \u0027create\u0027 if handling a POST request ?","commit_id":"e9d848354caf6596ec66d6802722937654c50b0f"},{"author":{"_account_id":21800,"name":"Cedric Savignan","email":"cedric.savignan@orange.com","username":"csavignan"},"change_message_id":"a8395d7409d4cbc04bb95b9f5aa4228f21caddbe","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        for key in bgpvpn_common.RT_FORMAT_ATTRIBUTES:"},{"line_number":58,"context_line":"            if data.get(key):"},{"line_number":59,"context_line":"                if policy.check("},{"line_number":60,"context_line":"                        ((\"networking-bgpvpn\", \"update_bgpvpn:%s\" % key),),"},{"line_number":61,"context_line":"                        request):"},{"line_number":62,"context_line":"                    params[key] \u003d bgpvpn_common.format_rt(data[key])"},{"line_number":63,"context_line":"                del data[key]"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_cbdb227b","line":60,"range":{"start_line":60,"start_character":48,"end_line":60,"end_character":54},"in_reply_to":"1f1a1f67_d472c849","updated":"2017-07-21 13:09:04.000000000","message":"Done","commit_id":"e9d848354caf6596ec66d6802722937654c50b0f"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"c3f8211ff92cc4581b65b5697e7e1d3ce4dd3ab6","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            if self.action \u003d\u003d \u0027update\u0027:"},{"line_number":67,"context_line":"                # if tenant user, tenant_id field doesn\u0027t exist"},{"line_number":68,"context_line":"                if policy.check("},{"line_number":69,"context_line":"                        ((\"networking-bgpvpn\", \"get_bgpvpn:tenant_id\"),),"},{"line_number":70,"context_line":"                        request) and data.get(\u0027tenant_id\u0027):"},{"line_number":71,"context_line":"                    attributes \u003d (\u0027bgpvpn_id\u0027, \u0027type\u0027, \u0027tenant_id\u0027)"},{"line_number":72,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_d4a768a7","line":69,"range":{"start_line":69,"start_character":48,"end_line":69,"end_character":51},"updated":"2017-07-20 14:58:34.000000000","message":"shouldn\u0027t this be \u0027update\u0027 ?","commit_id":"e9d848354caf6596ec66d6802722937654c50b0f"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"3ce1ee1ce5c43b23a1a4686016504fe8e94dbc4f","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            if self.action \u003d\u003d \u0027update\u0027:"},{"line_number":67,"context_line":"                # if tenant user, tenant_id field doesn\u0027t exist"},{"line_number":68,"context_line":"                if policy.check("},{"line_number":69,"context_line":"                        ((\"networking-bgpvpn\", \"get_bgpvpn:tenant_id\"),),"},{"line_number":70,"context_line":"                        request) and data.get(\u0027tenant_id\u0027):"},{"line_number":71,"context_line":"                    attributes \u003d (\u0027bgpvpn_id\u0027, \u0027type\u0027, \u0027tenant_id\u0027)"},{"line_number":72,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf3e73b7_8652ba66","line":69,"range":{"start_line":69,"start_character":48,"end_line":69,"end_character":51},"in_reply_to":"1f1a1f67_4b04b2c6","updated":"2017-08-08 07:57:33.000000000","message":"If you really want to check whether the user is admin or not, independently of what the user is allowed to by the policies files, then you probably don\u0027t want to do a policy.check here.","commit_id":"e9d848354caf6596ec66d6802722937654c50b0f"},{"author":{"_account_id":21800,"name":"Cedric Savignan","email":"cedric.savignan@orange.com","username":"csavignan"},"change_message_id":"a8395d7409d4cbc04bb95b9f5aa4228f21caddbe","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            if self.action \u003d\u003d \u0027update\u0027:"},{"line_number":67,"context_line":"                # if tenant user, tenant_id field doesn\u0027t exist"},{"line_number":68,"context_line":"                if policy.check("},{"line_number":69,"context_line":"                        ((\"networking-bgpvpn\", \"get_bgpvpn:tenant_id\"),),"},{"line_number":70,"context_line":"                        request) and data.get(\u0027tenant_id\u0027):"},{"line_number":71,"context_line":"                    attributes \u003d (\u0027bgpvpn_id\u0027, \u0027type\u0027, \u0027tenant_id\u0027)"},{"line_number":72,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_4b04b2c6","line":69,"range":{"start_line":69,"start_character":48,"end_line":69,"end_character":51},"in_reply_to":"1f1a1f67_d4a768a7","updated":"2017-07-21 13:09:04.000000000","message":"I don\u0027t know really which rule I should used because I don\u0027t get the tenant_id and I don\u0027t neither update the tenant_id.\nI just whant to check when the user is admin if tenant_id field  exist. In this case it mean admin user use the update form from admin section and the request doesn\u0027t need to have the tenant_id attribute in its data because it\u0027s a read only attribute. So tenant_id attribute is removed from data.","commit_id":"e9d848354caf6596ec66d6802722937654c50b0f"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"30708815c9ce015fbcee3e6c76a2d1935a01d923","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        try:"},{"line_number":66,"context_line":"            if self.action \u003d\u003d \u0027update\u0027:"},{"line_number":67,"context_line":"                # if tenant user, tenant_id field doesn\u0027t exist"},{"line_number":68,"context_line":"                if policy.check("},{"line_number":69,"context_line":"                        ((\"networking-bgpvpn\", \"get_bgpvpn:tenant_id\"),),"},{"line_number":70,"context_line":"                        request) and data.get(\u0027tenant_id\u0027):"},{"line_number":71,"context_line":"                    attributes \u003d (\u0027bgpvpn_id\u0027, \u0027type\u0027, \u0027tenant_id\u0027)"},{"line_number":72,"context_line":"                else:"},{"line_number":73,"context_line":"                    attributes \u003d (\u0027bgpvpn_id\u0027, \u0027type\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf3e73b7_669236f9","line":70,"range":{"start_line":68,"start_character":19,"end_line":70,"end_character":32},"updated":"2017-08-07 15:58:33.000000000","message":"See my comment on PS2, it seems like the original code is fine, right ?","commit_id":"f282c846390999450a7fd1ead2d17aebb7abf756"},{"author":{"_account_id":21800,"name":"Cedric Savignan","email":"cedric.savignan@orange.com","username":"csavignan"},"change_message_id":"a331f7c0d54d076b065065353e1b8b4d82d6d625","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        try:"},{"line_number":66,"context_line":"            if self.action \u003d\u003d \u0027update\u0027:"},{"line_number":67,"context_line":"                # if tenant user, tenant_id field doesn\u0027t exist"},{"line_number":68,"context_line":"                if policy.check("},{"line_number":69,"context_line":"                        ((\"networking-bgpvpn\", \"get_bgpvpn:tenant_id\"),),"},{"line_number":70,"context_line":"                        request) and data.get(\u0027tenant_id\u0027):"},{"line_number":71,"context_line":"                    attributes \u003d (\u0027bgpvpn_id\u0027, \u0027type\u0027, \u0027tenant_id\u0027)"},{"line_number":72,"context_line":"                else:"},{"line_number":73,"context_line":"                    attributes \u003d (\u0027bgpvpn_id\u0027, \u0027type\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_e409a031","line":70,"range":{"start_line":68,"start_character":19,"end_line":70,"end_character":32},"in_reply_to":"bf3e73b7_669236f9","updated":"2017-08-08 08:07:55.000000000","message":"Done","commit_id":"f282c846390999450a7fd1ead2d17aebb7abf756"}],"doc/source/user/horizon.rst":[{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"ccb49d328f35f2183322da3d71f1f0d65b483173","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"   cp \u003cnetworking-bgpvpn\u003e/bgpvpn_dashboard/enabled/_[0-9]*.py \u003chorizon\u003e/openstack_dashboard/local/enabled/"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"Configure the policy file for BGPBPN dashboard in OpenStack Dashboard ``local_settings.py``."},{"line_number":46,"context_line":"``\u003cnetworking-bgpvpn-config-dir\u003e`` is a directory which contains configurations for"},{"line_number":47,"context_line":"BGPVPN dashboard and the location varies across distributions or deployments."},{"line_number":48,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"7f515b1d_40eb2fdb","line":45,"range":{"start_line":45,"start_character":33,"end_line":45,"end_character":36},"updated":"2017-09-27 08:48:51.000000000","message":"typo: VPN","commit_id":"1b1a5ce85d34278fdb5ef60b2ba88a5c339baf71"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"cfd9d49a83e797f44597cd73cb0c5e467740e770","unresolved":false,"context_lines":[{"line_number":43,"context_line":"   cp \u003cnetworking-bgpvpn\u003e/bgpvpn_dashboard/enabled/_[0-9]*.py \u003chorizon\u003e/openstack_dashboard/local/enabled/"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"Configure the policy file for BGPVPN dashboard in OpenStack Dashboard ``local_settings.py``."},{"line_number":46,"context_line":"``\u003cnetworking-bgpvpn-config-dir\u003e`` is a directory which contains configurations for"},{"line_number":47,"context_line":"BGPVPN dashboard and the location varies across distributions or deployments."},{"line_number":48,"context_line":""},{"line_number":49,"context_line":".. code-block:: python"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7f515b1d_3956f007","line":46,"range":{"start_line":46,"start_character":3,"end_line":46,"end_character":31},"updated":"2017-09-29 13:30:35.000000000","message":"\u003cbgpvpn-dashboard-dir\u003e","commit_id":"ecac3165e875f63dcbe1b0b9c8f55979d8e34efd"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"cfd9d49a83e797f44597cd73cb0c5e467740e770","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":".. code-block:: python"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"   POLICY_FILES[\u0027 networking-bgpvpn\u0027] \u003d \u0027\u003cnetworking-bgpvpn-config-dir\u003e/bgpvpn_dashboard/etc/bgpvpn-horizon.conf\u0027"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":".. note::"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-rst","patch_set":10,"id":"7f515b1d_d9ac7cee","line":51,"range":{"start_line":51,"start_character":42,"end_line":51,"end_character":70},"updated":"2017-09-29 13:30:35.000000000","message":"\u003cbgpvpn-dashboard-dir\u003e/etc/bgpvpn-horizon.conf\n\nand add\n\n  \u003cbgpvpn-dashboard-dir\u003c can be found with: ``dirname $(python -c \u0027import bgpvpn_dashboard as _; print _.__file__\u0027)``","commit_id":"ecac3165e875f63dcbe1b0b9c8f55979d8e34efd"}],"etc/neutron/policy.d/bgpvpn-horizon.conf":[{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"c5730339a36f733dc15d3aafbf195191ed7b79b3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"7f515b1d_c57b7125","updated":"2017-09-29 09:04:26.000000000","message":"We can\u0027t put this file here, or it will be read be neutron automatically and conflict/overlap with the other one.\n\nThe better is I think to put the file under a bgpvpn_dashboard/etc directory.  This will also help from a packaging standpoint.","commit_id":"7486fe77d9d1d7123097905fe125abfda6d0d22c"}],"etc/neutron/policy.d/bgpvpn.conf":[{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"30708815c9ce015fbcee3e6c76a2d1935a01d923","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    \"admin_or_owner\": \"rule:context_is_admin or tenant_id:%(tenant_id)s\","},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"    \"create_bgpvpn\": \"rule:admin_only\","},{"line_number":7,"context_line":"    \"create_bgpvpn:route_targets\": \"rule:admin_only\","},{"line_number":8,"context_line":"    \"create_bgpvpn:import_targets\": \"rule:admin_only\","},{"line_number":9,"context_line":"    \"create_bgpvpn:export_targets\": \"rule:admin_only\","},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"    \"get_bgpvpn\": \"rule:admin_or_owner\","},{"line_number":12,"context_line":"    \"get_bgpvpn:tenant_id\": \"rule:admin_only\","}],"source_content_type":"text/plain","patch_set":3,"id":"bf3e73b7_06bdaab6","line":9,"range":{"start_line":7,"start_character":0,"end_line":9,"end_character":54},"updated":"2017-08-07 15:58:33.000000000","message":"As said in a comment, these lines should not be necessary: anything not specified at the attribute level defaults to what is specified at the attribute level, so it is (or should be) useless to specify the same thing for these attributes as what is specified for the resource on line 6.","commit_id":"f282c846390999450a7fd1ead2d17aebb7abf756"},{"author":{"_account_id":21800,"name":"Cedric Savignan","email":"cedric.savignan@orange.com","username":"csavignan"},"change_message_id":"a331f7c0d54d076b065065353e1b8b4d82d6d625","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    \"admin_or_owner\": \"rule:context_is_admin or tenant_id:%(tenant_id)s\","},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"    \"create_bgpvpn\": \"rule:admin_only\","},{"line_number":7,"context_line":"    \"create_bgpvpn:route_targets\": \"rule:admin_only\","},{"line_number":8,"context_line":"    \"create_bgpvpn:import_targets\": \"rule:admin_only\","},{"line_number":9,"context_line":"    \"create_bgpvpn:export_targets\": \"rule:admin_only\","},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"    \"get_bgpvpn\": \"rule:admin_or_owner\","},{"line_number":12,"context_line":"    \"get_bgpvpn:tenant_id\": \"rule:admin_only\","}],"source_content_type":"text/plain","patch_set":3,"id":"9f436f4f_c4ab3c73","line":9,"range":{"start_line":7,"start_character":0,"end_line":9,"end_character":54},"in_reply_to":"bf3e73b7_06bdaab6","updated":"2017-08-08 08:07:55.000000000","message":"Done","commit_id":"f282c846390999450a7fd1ead2d17aebb7abf756"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"acb155ba170f8ac517b1aba425ea24cf340a7beb","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"context_is_admin\":  \"role:admin\","},{"line_number":3,"context_line":"    \"admin_only\": \"rule:context_is_admin\","},{"line_number":4,"context_line":"    \"admin_or_owner\": \"rule:context_is_admin or tenant_id:%(tenant_id)s\","},{"line_number":5,"context_line":""}],"source_content_type":"text/plain","patch_set":7,"id":"7f515b1d_4cf80848","line":2,"range":{"start_line":2,"start_character":0,"end_line":2,"end_character":38},"updated":"2017-09-27 12:08:15.000000000","message":"This is the only modification in the gerrit that actually directly relates to neutron, so this maybe the thing causing the bug that we see.\n\nCan you try removing only this line ?\n\n(related question: why do you need to add this line ? context_is_admin is already defined in neutron\u0027s policy.json)","commit_id":"1b1a5ce85d34278fdb5ef60b2ba88a5c339baf71"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"92388c146cdb0165d7495694f1f0e7d55cdd2911","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"context_is_admin\":  \"role:admin\","},{"line_number":3,"context_line":"    \"admin_only\": \"rule:context_is_admin\","},{"line_number":4,"context_line":"    \"admin_or_owner\": \"rule:context_is_admin or tenant_id:%(tenant_id)s\","},{"line_number":5,"context_line":""}],"source_content_type":"text/plain","patch_set":7,"id":"7f515b1d_67a63a56","line":2,"range":{"start_line":2,"start_character":0,"end_line":2,"end_character":38},"in_reply_to":"7f515b1d_0797863c","updated":"2017-09-27 13:43:53.000000000","message":"Ok.\n\nIf this ends up being the cause for the bug, then the fix would consist in having a disctint file for consumption by horizon.","commit_id":"1b1a5ce85d34278fdb5ef60b2ba88a5c339baf71"},{"author":{"_account_id":21800,"name":"Cedric Savignan","email":"cedric.savignan@orange.com","username":"csavignan"},"change_message_id":"926cb36f719face29d45d3bf25afb0f4b9867a79","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"context_is_admin\":  \"role:admin\","},{"line_number":3,"context_line":"    \"admin_only\": \"rule:context_is_admin\","},{"line_number":4,"context_line":"    \"admin_or_owner\": \"rule:context_is_admin or tenant_id:%(tenant_id)s\","},{"line_number":5,"context_line":""}],"source_content_type":"text/plain","patch_set":7,"id":"7f515b1d_e71fcd58","line":2,"range":{"start_line":2,"start_character":0,"end_line":2,"end_character":38},"in_reply_to":"7f515b1d_4cf80848","updated":"2017-09-27 12:17:19.000000000","message":"Without this line policy.check() method concerning networking-bgpvpn doesn\u0027t work when user is admin.","commit_id":"1b1a5ce85d34278fdb5ef60b2ba88a5c339baf71"},{"author":{"_account_id":21800,"name":"Cedric Savignan","email":"cedric.savignan@orange.com","username":"csavignan"},"change_message_id":"9d9f5ee71922ec4053b403072355a6088e4c0cd6","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"context_is_admin\":  \"role:admin\","},{"line_number":3,"context_line":"    \"admin_only\": \"rule:context_is_admin\","},{"line_number":4,"context_line":"    \"admin_or_owner\": \"rule:context_is_admin or tenant_id:%(tenant_id)s\","},{"line_number":5,"context_line":""}],"source_content_type":"text/plain","patch_set":7,"id":"7f515b1d_8ae49d3d","line":2,"range":{"start_line":2,"start_character":0,"end_line":2,"end_character":38},"in_reply_to":"7f515b1d_67a63a56","updated":"2017-09-27 13:50:43.000000000","message":"I seen when I add this line that fwaas-dashboard have the same line.\nhttps://github.com/openstack/neutron-fwaas-dashboard/blob/master/etc/neutron-fwaas-policy.json","commit_id":"1b1a5ce85d34278fdb5ef60b2ba88a5c339baf71"},{"author":{"_account_id":21800,"name":"Cedric Savignan","email":"cedric.savignan@orange.com","username":"csavignan"},"change_message_id":"d8f322fec5ec59a84b5fc4780cac26ca4b422d89","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"context_is_admin\":  \"role:admin\","},{"line_number":3,"context_line":"    \"admin_only\": \"rule:context_is_admin\","},{"line_number":4,"context_line":"    \"admin_or_owner\": \"rule:context_is_admin or tenant_id:%(tenant_id)s\","},{"line_number":5,"context_line":""}],"source_content_type":"text/plain","patch_set":7,"id":"7f515b1d_0797863c","line":2,"range":{"start_line":2,"start_character":0,"end_line":2,"end_character":38},"in_reply_to":"7f515b1d_e71fcd58","updated":"2017-09-27 13:37:21.000000000","message":"Maybe it can answer to your question from the change https://review.openstack.org/#/c/482849/\n        Hi Akihiro Motoki. Do you know why I have this warning ?\n        WARNING:oslo_policy.policy:Policies [u\u0027admin_only\u0027,\n        u\u0027admin_or_owner\u0027] reference a rule that is not defined\n        It\u0027s when I use for example policy.check(((\"networking-bgpvpn\",\n        \"get_bgpvpn:tenant_id\"),), request)\n\n    I think you just copied policy.json from networking-bgpvpn project.The warning comes from the difference in how the policy framework\n    is supported in neutron and horizon.In neutron case, neutron use policy.d config option and loads all\n    policy files and merge them in the code, so the rule admin_or_owner\n    defined in policy.json in the neutron repo is used.On the other hand, in the horizon implementation, each policy file\n    must be a complete file, so you need to add some rules used by\n    networking-bgpvpn policy.json like \u0027admin_or_owner\u0027 rule. \n    neutorn-fwaas-dashboard does similar thing [1]. This is the current\n    situation and this might be one of possible improvements in the\n    horizon side.[1] https://github.com/openstack/neutron-fwaas-dashboard/blob/master/etc/neutron-fwaas-policy.json\n\nYes. Thanks. I needed to add \"context_is_admin\":  \"role:admin\" in the policies file.","commit_id":"1b1a5ce85d34278fdb5ef60b2ba88a5c339baf71"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"4749311fc0b9828c14fb90a6fffe26b2cb842916","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"context_is_admin\":  \"role:admin\","},{"line_number":3,"context_line":"    \"admin_only\": \"rule:context_is_admin\","},{"line_number":4,"context_line":"    \"admin_or_owner\": \"rule:context_is_admin or tenant_id:%(tenant_id)s\","},{"line_number":5,"context_line":""}],"source_content_type":"text/plain","patch_set":7,"id":"7f515b1d_27084590","line":2,"range":{"start_line":2,"start_character":0,"end_line":2,"end_character":38},"in_reply_to":"7f515b1d_e71fcd58","updated":"2017-09-27 12:41:22.000000000","message":"Surprising, because context_is_admin is defined in neutron_oplicy.json that it already in policy files...","commit_id":"1b1a5ce85d34278fdb5ef60b2ba88a5c339baf71"}]}
