)]}'
{"glance/api/policy.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"939f832ddc5f02b1bc0a3aa1abf87272e99002bf","unresolved":true,"context_lines":[{"line_number":814,"context_line":"            property_proxy_kwargs\u003dproxy_kwargs)"},{"line_number":815,"context_line":""},{"line_number":816,"context_line":"    def get(self, namespace, property_name):"},{"line_number":817,"context_line":"        if namespace:"},{"line_number":818,"context_line":"            target \u003d _build_namespace_target(namespace)"},{"line_number":819,"context_line":"        else:"},{"line_number":820,"context_line":"            # noop the tenancy check and filter the response instead"},{"line_number":821,"context_line":"            target \u003d {\u0027project_id\u0027: self.context.project_id}"},{"line_number":822,"context_line":""},{"line_number":823,"context_line":"        self.policy.enforce(self.context, \u0027get_metadef_property\u0027, target)"},{"line_number":824,"context_line":"        return super(MetadefPropertyRepoProxy, self).get("}],"source_content_type":"text/x-python","patch_set":2,"id":"c69af653_27d47a68","line":821,"range":{"start_line":817,"start_character":8,"end_line":821,"end_character":60},"updated":"2021-07-23 17:44:29.000000000","message":"Ditto same as object patch, this else will never be executed as namespace is required argument and possibly never be None","commit_id":"e284c9db15ce0badfa661856eb1495dc55317f89"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"54a61973aa029eb74c6865d2aa9e22c1bf0d7e34","unresolved":true,"context_lines":[{"line_number":751,"context_line":"        return super(MetadefResourceTypeRepoProxy, self).list(*args, **kwargs)"},{"line_number":752,"context_line":""},{"line_number":753,"context_line":"    def get(self, *args, **kwargs):"},{"line_number":754,"context_line":"        # FIXME(pdeore): Modify db layer to avoid fetching namespace again"},{"line_number":755,"context_line":"        # if valid namespace object is passed from here."},{"line_number":756,"context_line":"        namespace \u003d kwargs.pop(\u0027namespace\u0027, None)"},{"line_number":757,"context_line":"        if namespace:"}],"source_content_type":"text/x-python","patch_set":5,"id":"83666ea9_e5570609","line":754,"updated":"2021-07-29 12:34:30.000000000","message":"As per comment [1], this get method is called only from show property API not from resource type API.\nHence this get method modified here to build the target from namespace object for policy enforcement and to avoid db trip.\n\nhttps://review.opendev.org/c/openstack/glance/+/802055/4/glance/api/v2/metadef_properties.py#96","commit_id":"f5c4f1ce46951b7c30da801a691096be89250276"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"96dd523e0b376f26beded7d8d442c5c81e71938a","unresolved":true,"context_lines":[{"line_number":762,"context_line":"            target \u003d {\u0027project_id\u0027: self.context.project_id}"},{"line_number":763,"context_line":""},{"line_number":764,"context_line":"        self.policy.enforce(self.context, \u0027get_metadef_resource_type\u0027, target)"},{"line_number":765,"context_line":"        return super(MetadefResourceTypeRepoProxy, self).get(*args, namespace)"},{"line_number":766,"context_line":""},{"line_number":767,"context_line":"    def add(self, resource_type):"},{"line_number":768,"context_line":"        self.policy.enforce(self.context,"}],"source_content_type":"text/x-python","patch_set":5,"id":"468c6117_b4a6f3db","line":765,"range":{"start_line":765,"start_character":68,"end_line":765,"end_character":77},"updated":"2021-07-29 16:23:47.000000000","message":"I never seen passing positional argument after *args and wondering why Pep8 don\u0027t have a check to catch this.\n\nI think standard wise it should be (namespace, *args)","commit_id":"f5c4f1ce46951b7c30da801a691096be89250276"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"6c7735415c66e97d835e353cbebfc4fbad0af27a","unresolved":false,"context_lines":[{"line_number":762,"context_line":"            target \u003d {\u0027project_id\u0027: self.context.project_id}"},{"line_number":763,"context_line":""},{"line_number":764,"context_line":"        self.policy.enforce(self.context, \u0027get_metadef_resource_type\u0027, target)"},{"line_number":765,"context_line":"        return super(MetadefResourceTypeRepoProxy, self).get(*args, namespace)"},{"line_number":766,"context_line":""},{"line_number":767,"context_line":"    def add(self, resource_type):"},{"line_number":768,"context_line":"        self.policy.enforce(self.context,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3d2172a6_d36ed86b","line":765,"range":{"start_line":765,"start_character":68,"end_line":765,"end_character":77},"in_reply_to":"468c6117_b4a6f3db","updated":"2021-08-03 09:02:52.000000000","message":"Ack","commit_id":"f5c4f1ce46951b7c30da801a691096be89250276"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"2202b8e5e2f9eefe00c60ad152ee368bbf5ac216","unresolved":true,"context_lines":[{"line_number":739,"context_line":"        target \u003d {}"},{"line_number":740,"context_line":"        if namespace:"},{"line_number":741,"context_line":"            target.update(_build_namespace_target(namespace))"},{"line_number":742,"context_line":"            namespace \u003d namespace.namespace"},{"line_number":743,"context_line":"        try:"},{"line_number":744,"context_line":"            self.policy.enforce("},{"line_number":745,"context_line":"                self.context, action, target)"}],"source_content_type":"text/x-python","patch_set":7,"id":"02b10988_da06cddf","line":742,"range":{"start_line":742,"start_character":12,"end_line":742,"end_character":43},"updated":"2021-08-03 05:57:41.000000000","message":"don\u0027t do this here, this method is strictly for enforcing action only!","commit_id":"13fff0895a3e304e44fac5dcc2ab776fd9dffb34"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"6c7735415c66e97d835e353cbebfc4fbad0af27a","unresolved":false,"context_lines":[{"line_number":739,"context_line":"        target \u003d {}"},{"line_number":740,"context_line":"        if namespace:"},{"line_number":741,"context_line":"            target.update(_build_namespace_target(namespace))"},{"line_number":742,"context_line":"            namespace \u003d namespace.namespace"},{"line_number":743,"context_line":"        try:"},{"line_number":744,"context_line":"            self.policy.enforce("},{"line_number":745,"context_line":"                self.context, action, target)"}],"source_content_type":"text/x-python","patch_set":7,"id":"f6f4a9e2_4841f983","line":742,"range":{"start_line":742,"start_character":12,"end_line":742,"end_character":43},"in_reply_to":"02b10988_da06cddf","updated":"2021-08-03 09:02:52.000000000","message":"Ack","commit_id":"13fff0895a3e304e44fac5dcc2ab776fd9dffb34"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"2202b8e5e2f9eefe00c60ad152ee368bbf5ac216","unresolved":true,"context_lines":[{"line_number":823,"context_line":""},{"line_number":824,"context_line":"    def get(self, namespace, property_name):"},{"line_number":825,"context_line":"        target \u003d {}"},{"line_number":826,"context_line":"        if not isinstance(namespace, str):"},{"line_number":827,"context_line":"            target.update(_build_namespace_target(namespace))"},{"line_number":828,"context_line":"            namespace \u003d namespace.namespace"},{"line_number":829,"context_line":"        try:"},{"line_number":830,"context_line":"            self.policy.enforce(self.context, \u0027get_metadef_property\u0027, target)"},{"line_number":831,"context_line":"        except exception.Forbidden:"}],"source_content_type":"text/x-python","patch_set":7,"id":"12453e22_7e607f54","line":828,"range":{"start_line":826,"start_character":8,"end_line":828,"end_character":43},"updated":"2021-08-03 05:57:41.000000000","message":"from where you are expecting this as string, because from controller I can see you are passing object to each call of get method.","commit_id":"13fff0895a3e304e44fac5dcc2ab776fd9dffb34"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"6c7735415c66e97d835e353cbebfc4fbad0af27a","unresolved":true,"context_lines":[{"line_number":823,"context_line":""},{"line_number":824,"context_line":"    def get(self, namespace, property_name):"},{"line_number":825,"context_line":"        target \u003d {}"},{"line_number":826,"context_line":"        if not isinstance(namespace, str):"},{"line_number":827,"context_line":"            target.update(_build_namespace_target(namespace))"},{"line_number":828,"context_line":"            namespace \u003d namespace.namespace"},{"line_number":829,"context_line":"        try:"},{"line_number":830,"context_line":"            self.policy.enforce(self.context, \u0027get_metadef_property\u0027, target)"},{"line_number":831,"context_line":"        except exception.Forbidden:"}],"source_content_type":"text/x-python","patch_set":7,"id":"4b79a16e_d15c52aa","line":828,"range":{"start_line":826,"start_character":8,"end_line":828,"end_character":43},"in_reply_to":"12453e22_7e607f54","updated":"2021-08-03 09:02:52.000000000","message":"ohh!! I missed to remove this check.","commit_id":"13fff0895a3e304e44fac5dcc2ab776fd9dffb34"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"83e4d7d3d1ccce1bb08e0475ac9c7fdbe361c621","unresolved":true,"context_lines":[{"line_number":764,"context_line":"    def get(self, *args, namespace\u003dNone, **kwargs):"},{"line_number":765,"context_line":"        # NOTE (pdeore): This method is called only from show property API"},{"line_number":766,"context_line":"        self._enforce_action(namespace, \u0027get_metadef_resource_type\u0027)"},{"line_number":767,"context_line":"        return super(MetadefResourceTypeRepoProxy, self).get(*args, **kwargs)"},{"line_number":768,"context_line":""},{"line_number":769,"context_line":"    def add(self, resource_type):"},{"line_number":770,"context_line":"        self.policy.enforce(self.context,"}],"source_content_type":"text/x-python","patch_set":8,"id":"57e99cbe_ea173fdd","side":"PARENT","line":767,"range":{"start_line":767,"start_character":68,"end_line":767,"end_character":76},"updated":"2021-08-03 09:25:30.000000000","message":"any reason to remove this?","commit_id":"a2fb137f03858c8a2161e7b86b3b076b0208fd44"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"4d157a72cf68fae1ca0b044a1a8578eceea31b66","unresolved":true,"context_lines":[{"line_number":764,"context_line":"    def get(self, *args, namespace\u003dNone, **kwargs):"},{"line_number":765,"context_line":"        # NOTE (pdeore): This method is called only from show property API"},{"line_number":766,"context_line":"        self._enforce_action(namespace, \u0027get_metadef_resource_type\u0027)"},{"line_number":767,"context_line":"        return super(MetadefResourceTypeRepoProxy, self).get(*args, **kwargs)"},{"line_number":768,"context_line":""},{"line_number":769,"context_line":"    def add(self, resource_type):"},{"line_number":770,"context_line":"        self.policy.enforce(self.context,"}],"source_content_type":"text/x-python","patch_set":8,"id":"304c5cff_e2cf4c90","side":"PARENT","line":767,"range":{"start_line":767,"start_character":68,"end_line":767,"end_character":76},"in_reply_to":"57e99cbe_ea173fdd","updated":"2021-08-03 11:24:14.000000000","message":"hmm..should not have removed this...\nRe adding..","commit_id":"a2fb137f03858c8a2161e7b86b3b076b0208fd44"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"83e4d7d3d1ccce1bb08e0475ac9c7fdbe361c621","unresolved":true,"context_lines":[{"line_number":823,"context_line":""},{"line_number":824,"context_line":"    def get(self, namespace, property_name):"},{"line_number":825,"context_line":"        target \u003d {}"},{"line_number":826,"context_line":"        if namespace:"},{"line_number":827,"context_line":"            target.update(_build_namespace_target(namespace))"},{"line_number":828,"context_line":"            namespace \u003d namespace.namespace"},{"line_number":829,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5fde6e2e_c4782408","line":826,"range":{"start_line":826,"start_character":8,"end_line":826,"end_character":21},"updated":"2021-08-03 09:25:30.000000000","message":"ditto, same comment as parent patch.","commit_id":"8e405642e97c01d9649477c93b44b3d8bc8e41b5"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"4d157a72cf68fae1ca0b044a1a8578eceea31b66","unresolved":false,"context_lines":[{"line_number":823,"context_line":""},{"line_number":824,"context_line":"    def get(self, namespace, property_name):"},{"line_number":825,"context_line":"        target \u003d {}"},{"line_number":826,"context_line":"        if namespace:"},{"line_number":827,"context_line":"            target.update(_build_namespace_target(namespace))"},{"line_number":828,"context_line":"            namespace \u003d namespace.namespace"},{"line_number":829,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"8d94228a_18bb2c92","line":826,"range":{"start_line":826,"start_character":8,"end_line":826,"end_character":21},"in_reply_to":"5fde6e2e_c4782408","updated":"2021-08-03 11:24:14.000000000","message":"Done","commit_id":"8e405642e97c01d9649477c93b44b3d8bc8e41b5"}],"glance/api/v2/metadef_properties.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"939f832ddc5f02b1bc0a3aa1abf87272e99002bf","unresolved":true,"context_lines":[{"line_number":67,"context_line":"            namespace_obj \u003d ns_repo.get(namespace)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"            filters \u003d dict()"},{"line_number":70,"context_line":"            filters[\u0027namespace\u0027] \u003d namespace"},{"line_number":71,"context_line":"            prop_repo \u003d self.gateway.get_metadef_property_repo(req.context)"},{"line_number":72,"context_line":"            db_properties \u003d prop_repo.list("},{"line_number":73,"context_line":"                filters\u003dfilters, namespace\u003dnamespace_obj)"}],"source_content_type":"text/x-python","patch_set":2,"id":"65d16fbd_d7b812cd","line":70,"range":{"start_line":70,"start_character":35,"end_line":70,"end_character":44},"updated":"2021-07-23 17:44:29.000000000","message":"nit: namespace_obj.namespace","commit_id":"e284c9db15ce0badfa661856eb1495dc55317f89"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"939f832ddc5f02b1bc0a3aa1abf87272e99002bf","unresolved":true,"context_lines":[{"line_number":144,"context_line":"            raise webob.exc.HTTPInternalServerError()"},{"line_number":145,"context_line":"        return self._to_model(new_property_type)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def update(self, req, namespace, property_name, property_type):"},{"line_number":148,"context_line":"        prop_repo \u003d self.gateway.get_metadef_property_repo(req.context)"},{"line_number":149,"context_line":"        try:"},{"line_number":150,"context_line":"            ns_repo \u003d self.gateway.get_metadef_namespace_repo(req.context)"}],"source_content_type":"text/x-python","patch_set":2,"id":"99318573_8d639529","line":147,"range":{"start_line":147,"start_character":8,"end_line":147,"end_character":14},"updated":"2021-07-23 17:44:29.000000000","message":"changes to update and delete can be avoided as these are admin only calls and we aren\u0027t changing these policies.","commit_id":"e284c9db15ce0badfa661856eb1495dc55317f89"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"a63d3268198ce622e216ee1c9e9ffa361db62d01","unresolved":true,"context_lines":[{"line_number":93,"context_line":"            if filters and filters[\u0027resource_type\u0027]:"},{"line_number":94,"context_line":"                rs_repo \u003d self.gateway.get_metadef_resource_type_repo("},{"line_number":95,"context_line":"                    req.context)"},{"line_number":96,"context_line":"                db_resource_type \u003d rs_repo.get(filters[\u0027resource_type\u0027],"},{"line_number":97,"context_line":"                                               namespace)"},{"line_number":98,"context_line":"                prefix \u003d db_resource_type.prefix"},{"line_number":99,"context_line":"                if prefix and property_name.startswith(prefix):"}],"source_content_type":"text/x-python","patch_set":4,"id":"2103ab21_99d3a6d9","line":96,"range":{"start_line":96,"start_character":35,"end_line":96,"end_character":46},"updated":"2021-07-27 08:32:58.000000000","message":"As per this change [1] your get method now can accept the object so could you please check that passing object here at line 97 could possible save your db trip?\n\nhttps://review.opendev.org/c/openstack/glance/+/799671/20/glance/api/policy.py#742","commit_id":"91eccd8b543ff735743ba2c211d4bf8f714aa165"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"54a61973aa029eb74c6865d2aa9e22c1bf0d7e34","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            if filters and filters[\u0027resource_type\u0027]:"},{"line_number":94,"context_line":"                rs_repo \u003d self.gateway.get_metadef_resource_type_repo("},{"line_number":95,"context_line":"                    req.context)"},{"line_number":96,"context_line":"                db_resource_type \u003d rs_repo.get(filters[\u0027resource_type\u0027],"},{"line_number":97,"context_line":"                                               namespace)"},{"line_number":98,"context_line":"                prefix \u003d db_resource_type.prefix"},{"line_number":99,"context_line":"                if prefix and property_name.startswith(prefix):"}],"source_content_type":"text/x-python","patch_set":4,"id":"216f9c71_b640e78a","line":96,"range":{"start_line":96,"start_character":35,"end_line":96,"end_character":46},"in_reply_to":"2103ab21_99d3a6d9","updated":"2021-07-29 12:34:30.000000000","message":"Done","commit_id":"91eccd8b543ff735743ba2c211d4bf8f714aa165"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"2202b8e5e2f9eefe00c60ad152ee368bbf5ac216","unresolved":true,"context_lines":[{"line_number":84,"context_line":"    def show(self, req, namespace, property_name, filters\u003dNone):"},{"line_number":85,"context_line":"        try:"},{"line_number":86,"context_line":"            ns_repo \u003d self.gateway.get_metadef_namespace_repo(req.context)"},{"line_number":87,"context_line":"            namespace_obj \u003d ns_repo.get(namespace)"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"            if filters and filters[\u0027resource_type\u0027]:"},{"line_number":90,"context_line":"                rs_repo \u003d self.gateway.get_metadef_resource_type_repo("}],"source_content_type":"text/x-python","patch_set":7,"id":"e3a4346b_539cf220","line":87,"range":{"start_line":87,"start_character":12,"end_line":87,"end_character":1},"updated":"2021-08-03 05:57:41.000000000","message":"you need to catch forbidden here and raise not found","commit_id":"13fff0895a3e304e44fac5dcc2ab776fd9dffb34"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"6c7735415c66e97d835e353cbebfc4fbad0af27a","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    def show(self, req, namespace, property_name, filters\u003dNone):"},{"line_number":85,"context_line":"        try:"},{"line_number":86,"context_line":"            ns_repo \u003d self.gateway.get_metadef_namespace_repo(req.context)"},{"line_number":87,"context_line":"            namespace_obj \u003d ns_repo.get(namespace)"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"            if filters and filters[\u0027resource_type\u0027]:"},{"line_number":90,"context_line":"                rs_repo \u003d self.gateway.get_metadef_resource_type_repo("}],"source_content_type":"text/x-python","patch_set":7,"id":"499531fe_6347a614","line":87,"range":{"start_line":87,"start_character":12,"end_line":87,"end_character":1},"in_reply_to":"e3a4346b_539cf220","updated":"2021-08-03 09:02:52.000000000","message":"Done","commit_id":"13fff0895a3e304e44fac5dcc2ab776fd9dffb34"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"83e4d7d3d1ccce1bb08e0475ac9c7fdbe361c621","unresolved":true,"context_lines":[{"line_number":87,"context_line":"                ns_repo \u003d self.gateway.get_metadef_namespace_repo(req.context)"},{"line_number":88,"context_line":"                namespace_obj \u003d ns_repo.get(namespace)"},{"line_number":89,"context_line":"            except exception.Forbidden as e:"},{"line_number":90,"context_line":"                raise exception.NotFound(e.msg)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"            if filters and filters[\u0027resource_type\u0027]:"},{"line_number":93,"context_line":"                rs_repo \u003d self.gateway.get_metadef_resource_type_repo("}],"source_content_type":"text/x-python","patch_set":8,"id":"923f9db1_894729ec","line":90,"range":{"start_line":90,"start_character":16,"end_line":90,"end_character":47},"updated":"2021-08-03 09:25:30.000000000","message":"ditto, Note will be beneficial here.","commit_id":"8e405642e97c01d9649477c93b44b3d8bc8e41b5"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"4d157a72cf68fae1ca0b044a1a8578eceea31b66","unresolved":false,"context_lines":[{"line_number":87,"context_line":"                ns_repo \u003d self.gateway.get_metadef_namespace_repo(req.context)"},{"line_number":88,"context_line":"                namespace_obj \u003d ns_repo.get(namespace)"},{"line_number":89,"context_line":"            except exception.Forbidden as e:"},{"line_number":90,"context_line":"                raise exception.NotFound(e.msg)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"            if filters and filters[\u0027resource_type\u0027]:"},{"line_number":93,"context_line":"                rs_repo \u003d self.gateway.get_metadef_resource_type_repo("}],"source_content_type":"text/x-python","patch_set":8,"id":"586cd7da_f53f2496","line":90,"range":{"start_line":90,"start_character":16,"end_line":90,"end_character":47},"in_reply_to":"923f9db1_894729ec","updated":"2021-08-03 11:24:14.000000000","message":"Done","commit_id":"8e405642e97c01d9649477c93b44b3d8bc8e41b5"}],"glance/db/__init__.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"2202b8e5e2f9eefe00c60ad152ee368bbf5ac216","unresolved":true,"context_lines":[{"line_number":671,"context_line":"            self._format_resource_type_to_db(resource_type)"},{"line_number":672,"context_line":"        )"},{"line_number":673,"context_line":""},{"line_number":674,"context_line":"    def get(self, namespace, resource_type):"},{"line_number":675,"context_line":"        namespace_entity \u003d self.meta_namespace_repo.get(namespace)"},{"line_number":676,"context_line":"        db_resource_type \u003d ("},{"line_number":677,"context_line":"            self.db_api."}],"source_content_type":"text/x-python","patch_set":7,"id":"a1f48cdd_c1a2ee38","line":674,"range":{"start_line":674,"start_character":4,"end_line":674,"end_character":44},"updated":"2021-08-03 05:57:41.000000000","message":"Its not good to change db API method\u0027s syntax.","commit_id":"13fff0895a3e304e44fac5dcc2ab776fd9dffb34"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"6c7735415c66e97d835e353cbebfc4fbad0af27a","unresolved":false,"context_lines":[{"line_number":671,"context_line":"            self._format_resource_type_to_db(resource_type)"},{"line_number":672,"context_line":"        )"},{"line_number":673,"context_line":""},{"line_number":674,"context_line":"    def get(self, namespace, resource_type):"},{"line_number":675,"context_line":"        namespace_entity \u003d self.meta_namespace_repo.get(namespace)"},{"line_number":676,"context_line":"        db_resource_type \u003d ("},{"line_number":677,"context_line":"            self.db_api."}],"source_content_type":"text/x-python","patch_set":7,"id":"7f095fcc_4c554b61","line":674,"range":{"start_line":674,"start_character":4,"end_line":674,"end_character":44},"in_reply_to":"a1f48cdd_c1a2ee38","updated":"2021-08-03 09:02:52.000000000","message":"Ack","commit_id":"13fff0895a3e304e44fac5dcc2ab776fd9dffb34"}],"glance/policies/metadef.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"a63d3268198ce622e216ee1c9e9ffa361db62d01","unresolved":true,"context_lines":[{"line_number":85,"context_line":"        ],"},{"line_number":86,"context_line":"    ),"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":89,"context_line":"        name\u003d\"get_metadef_object\","},{"line_number":90,"context_line":"        check_str\u003dbase.ADMIN_OR_PROJECT_READER_GET_NAMESPACE,"},{"line_number":91,"context_line":"        scope_types\u003d[\u0027system\u0027, \u0027project\u0027],"},{"line_number":92,"context_line":"        description\u003d\"Get a specific object from a namespace.\","},{"line_number":93,"context_line":"        operations\u003d["},{"line_number":94,"context_line":"            {\u0027path\u0027: \u0027/v2/metadefs/namespaces/{namespace_name}/objects\u0027"},{"line_number":95,"context_line":"                     \u0027/{object_name}\u0027,"},{"line_number":96,"context_line":"             \u0027method\u0027: \u0027GET\u0027}"},{"line_number":97,"context_line":"        ],"},{"line_number":98,"context_line":"        deprecated_rule\u003dpolicy.DeprecatedRule("},{"line_number":99,"context_line":"            name\u003d\"get_metadef_object\", check_str\u003d\"rule:metadef_default\","},{"line_number":100,"context_line":"            deprecated_reason\u003dDEPRECATED_REASON,"},{"line_number":101,"context_line":"            deprecated_since\u003dversionutils.deprecated.WALLABY"},{"line_number":102,"context_line":"        ),"},{"line_number":103,"context_line":"    ),"},{"line_number":104,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":105,"context_line":"        name\u003d\"get_metadef_objects\","},{"line_number":106,"context_line":"        check_str\u003dbase.ADMIN_OR_PROJECT_READER_GET_NAMESPACE,"},{"line_number":107,"context_line":"        scope_types\u003d[\u0027system\u0027, \u0027project\u0027],"},{"line_number":108,"context_line":"        description\u003d\"Get objects from a namespace.\","},{"line_number":109,"context_line":"        operations\u003d["},{"line_number":110,"context_line":"            {\u0027path\u0027: \u0027/v2/metadefs/namespaces/{namespace_name}/objects\u0027,"},{"line_number":111,"context_line":"             \u0027method\u0027: \u0027GET\u0027}"},{"line_number":112,"context_line":"        ],"},{"line_number":113,"context_line":"        deprecated_rule\u003dpolicy.DeprecatedRule("},{"line_number":114,"context_line":"            name\u003d\"get_metadef_objects\", check_str\u003d\"rule:metadef_default\","},{"line_number":115,"context_line":"            deprecated_reason\u003dDEPRECATED_REASON,"},{"line_number":116,"context_line":"            deprecated_since\u003dversionutils.deprecated.WALLABY"},{"line_number":117,"context_line":"        ),"},{"line_number":118,"context_line":"    ),"},{"line_number":119,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":120,"context_line":"        name\u003d\"modify_metadef_object\","},{"line_number":121,"context_line":"        check_str\u003d\"rule:metadef_admin\","},{"line_number":122,"context_line":"        scope_types\u003d[\u0027system\u0027, \u0027project\u0027],"},{"line_number":123,"context_line":"        description\u003d\"Update an object within a namespace.\","},{"line_number":124,"context_line":"        operations\u003d["},{"line_number":125,"context_line":"            {\u0027path\u0027: \u0027/v2/metadefs/namespaces/{namespace_name}/objects\u0027"},{"line_number":126,"context_line":"                     \u0027/{object_name}\u0027,"},{"line_number":127,"context_line":"             \u0027method\u0027: \u0027PUT\u0027}"},{"line_number":128,"context_line":"        ],"},{"line_number":129,"context_line":"    ),"},{"line_number":130,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":131,"context_line":"        name\u003d\"add_metadef_object\","},{"line_number":132,"context_line":"        check_str\u003d\"rule:metadef_admin\","},{"line_number":133,"context_line":"        scope_types\u003d[\u0027system\u0027, \u0027project\u0027],"},{"line_number":134,"context_line":"        description\u003d\"Create an object within a namespace.\","},{"line_number":135,"context_line":"        operations\u003d["},{"line_number":136,"context_line":"            {\u0027path\u0027: \u0027/v2/metadefs/namespaces/{namespace_name}/objects\u0027,"},{"line_number":137,"context_line":"             \u0027method\u0027: \u0027POST\u0027}"},{"line_number":138,"context_line":"        ],"},{"line_number":139,"context_line":"    ),"},{"line_number":140,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":141,"context_line":"        name\u003d\"delete_metadef_object\","},{"line_number":142,"context_line":"        check_str\u003d\"rule:metadef_admin\","},{"line_number":143,"context_line":"        scope_types\u003d[\u0027system\u0027, \u0027project\u0027],"},{"line_number":144,"context_line":"        description\u003d\"Delete an object within a namespace.\","},{"line_number":145,"context_line":"        operations\u003d["},{"line_number":146,"context_line":"            {\u0027path\u0027: \u0027/v2/metadefs/namespaces/{namespace_name}/objects\u0027"},{"line_number":147,"context_line":"                     \u0027/{object_name}\u0027,"},{"line_number":148,"context_line":"             \u0027method\u0027: \u0027DELETE\u0027}"},{"line_number":149,"context_line":"        ],"},{"line_number":150,"context_line":"    ),"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    # Resource types list need not to have any restriction"},{"line_number":153,"context_line":"    # since its not related to namespace"}],"source_content_type":"text/x-python","patch_set":4,"id":"a6f3962a_51d2cfcf","line":150,"range":{"start_line":88,"start_character":4,"end_line":150,"end_character":6},"updated":"2021-07-27 08:32:58.000000000","message":"This is properties related change, So why I am seeing object related policy changes here?","commit_id":"91eccd8b543ff735743ba2c211d4bf8f714aa165"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"0779a0578e75ce05af300544bac05500be05bd31","unresolved":true,"context_lines":[{"line_number":218,"context_line":"    ),"},{"line_number":219,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":220,"context_line":"        name\u003d\"modify_metadef_property\","},{"line_number":221,"context_line":"        check_str\u003d\"rule:metadef_admin\","},{"line_number":222,"context_line":"        scope_types\u003d[\u0027system\u0027, \u0027project\u0027],"},{"line_number":223,"context_line":"        description\u003d\"Update meta definition property.\","},{"line_number":224,"context_line":"        operations\u003d["}],"source_content_type":"text/x-python","patch_set":10,"id":"a69a26a7_e51f2310","line":221,"range":{"start_line":221,"start_character":19,"end_line":221,"end_character":37},"updated":"2021-08-18 20:40:52.000000000","message":"Same comment here as in the previous patch.","commit_id":"068deeea149405799c032857ee83cbe1f75c87a1"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"acd920691116123fb32970479069867db46bb531","unresolved":true,"context_lines":[{"line_number":206,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":207,"context_line":"        name\u003d\"get_metadef_property\","},{"line_number":208,"context_line":"        check_str\u003dbase.ADMIN_OR_PROJECT_READER_GET_NAMESPACE,"},{"line_number":209,"context_line":"        scope_types\u003d[\u0027system\u0027, \u0027project\u0027],"},{"line_number":210,"context_line":"        description\u003d\"Get a specific meta definition property.\","},{"line_number":211,"context_line":"        operations\u003d["},{"line_number":212,"context_line":"            {\u0027path\u0027: \u0027/v2/metadefs/namespaces/{namespace_name}/properties\u0027"}],"source_content_type":"text/x-python","patch_set":18,"id":"1876f2c3_cfe265d8","line":209,"range":{"start_line":209,"start_character":32,"end_line":209,"end_character":39},"updated":"2021-09-02 20:32:37.000000000","message":"This applies to all metadef APIs and policies, but this will eventually go away once glance can consume a system-scoped token, yeah?","commit_id":"3554e7c393b1fe03d27af8c11806734961bd84dd"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c4c84a03c080c62379af75dcc351c5633965ef73","unresolved":true,"context_lines":[{"line_number":206,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":207,"context_line":"        name\u003d\"get_metadef_property\","},{"line_number":208,"context_line":"        check_str\u003dbase.ADMIN_OR_PROJECT_READER_GET_NAMESPACE,"},{"line_number":209,"context_line":"        scope_types\u003d[\u0027system\u0027, \u0027project\u0027],"},{"line_number":210,"context_line":"        description\u003d\"Get a specific meta definition property.\","},{"line_number":211,"context_line":"        operations\u003d["},{"line_number":212,"context_line":"            {\u0027path\u0027: \u0027/v2/metadefs/namespaces/{namespace_name}/properties\u0027"}],"source_content_type":"text/x-python","patch_set":18,"id":"f6a7d51b_38cc3752","line":209,"range":{"start_line":209,"start_character":32,"end_line":209,"end_character":39},"in_reply_to":"1876f2c3_cfe265d8","updated":"2021-09-02 20:59:32.000000000","message":"Not for get, because all regular users need to be able to list the public namespaces (and all the related objects), AFAIK. For the update operations, I think system-only, yeah.","commit_id":"3554e7c393b1fe03d27af8c11806734961bd84dd"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"1e1c8565f912b35df0b8234cb952cd0bcf51950d","unresolved":true,"context_lines":[{"line_number":206,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":207,"context_line":"        name\u003d\"get_metadef_property\","},{"line_number":208,"context_line":"        check_str\u003dbase.ADMIN_OR_PROJECT_READER_GET_NAMESPACE,"},{"line_number":209,"context_line":"        scope_types\u003d[\u0027system\u0027, \u0027project\u0027],"},{"line_number":210,"context_line":"        description\u003d\"Get a specific meta definition property.\","},{"line_number":211,"context_line":"        operations\u003d["},{"line_number":212,"context_line":"            {\u0027path\u0027: \u0027/v2/metadefs/namespaces/{namespace_name}/properties\u0027"}],"source_content_type":"text/x-python","patch_set":18,"id":"20206164_64749a9c","line":209,"range":{"start_line":209,"start_character":32,"end_line":209,"end_character":39},"in_reply_to":"f6a7d51b_38cc3752","updated":"2021-09-02 21:08:26.000000000","message":"Oh - right. So get_metadef_property and get_metadef_properties will remain project-scoped long term and [modify|add|remove]_metadef_property will be system-scope only?","commit_id":"3554e7c393b1fe03d27af8c11806734961bd84dd"}],"glance/tests/functional/v2/test_metadef_properties.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"a63d3268198ce622e216ee1c9e9ffa361db62d01","unresolved":true,"context_lines":[{"line_number":249,"context_line":"            self.assertEqual(http.CREATED, response.status_code)"},{"line_number":250,"context_line":"            property_returned \u003d jsonutils.loads(response.text)"},{"line_number":251,"context_line":"            property_with_namespace \u003d {}"},{"line_number":252,"context_line":"            property_with_namespace[\u0027namespace\u0027] \u003d namespace"},{"line_number":253,"context_line":"            property_with_namespace[\u0027property\u0027] \u003d property_returned"},{"line_number":254,"context_line":"            properties.append(property_with_namespace)"},{"line_number":255,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ef24445e_c6703efe","line":252,"range":{"start_line":252,"start_character":12,"end_line":252,"end_character":60},"updated":"2021-07-27 08:32:58.000000000","message":"ditto as per comment of resource_types and object patch","commit_id":"91eccd8b543ff735743ba2c211d4bf8f714aa165"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"c0dd45303483195167e2c9f9d67a1fb03079ad72","unresolved":true,"context_lines":[{"line_number":293,"context_line":"        tenant1_properties \u003d self._create_properties(tenant1_namespaces)"},{"line_number":294,"context_line":"        tenant2_properties \u003d self._create_properties(tenant2_namespaces)"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"        def _check_object_access(properties, tenant):"},{"line_number":297,"context_line":"            for prop in properties:"},{"line_number":298,"context_line":"                for namespace, property_name in prop.items():"},{"line_number":299,"context_line":"                    path \u003d \\"}],"source_content_type":"text/x-python","patch_set":16,"id":"a18207f9_d86f0ae2","line":296,"range":{"start_line":296,"start_character":12,"end_line":296,"end_character":32},"updated":"2021-09-02 08:58:29.000000000","message":"this should be _check_properties_access","commit_id":"90e281e2b25096ba0f5f188c0c142a3ee11d697e"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"633a2d45ed8722c4a94e0eed3c27ec6853906487","unresolved":true,"context_lines":[{"line_number":299,"context_line":"                    path \u003d \\"},{"line_number":300,"context_line":"                        self._url(\u0027/v2/metadefs/namespaces/%s/properties/%s\u0027 %"},{"line_number":301,"context_line":"                                  (namespace, property_name))"},{"line_number":302,"context_line":"                    headers \u003d self._headers("},{"line_number":303,"context_line":"                        {\u0027content-type\u0027: \u0027application/json\u0027,"},{"line_number":304,"context_line":"                         \u0027X-Tenant-Id\u0027: tenant,"},{"line_number":305,"context_line":"                         \u0027X-Roles\u0027: \u0027reader,member\u0027})"},{"line_number":306,"context_line":"                    response \u003d requests.get(path, headers\u003dheaders)"},{"line_number":307,"context_line":"                    if namespace.split(\u0027_\u0027)[1] \u003d\u003d \u0027public\u0027:"},{"line_number":308,"context_line":"                        self.assertEqual(http.OK, response.status_code)"}],"source_content_type":"text/x-python","patch_set":17,"id":"b3db55dc_32249765","line":305,"range":{"start_line":302,"start_character":20,"end_line":305,"end_character":53},"updated":"2021-09-02 09:38:36.000000000","message":"this can be moved before line 297 to avoid multiple calls with same return values","commit_id":"0289c27c44f90bffe7c86bd768403374f0d67a5b"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"17a019bbb1297a9fbab50a95975b1abbf929502c","unresolved":false,"context_lines":[{"line_number":299,"context_line":"                    path \u003d \\"},{"line_number":300,"context_line":"                        self._url(\u0027/v2/metadefs/namespaces/%s/properties/%s\u0027 %"},{"line_number":301,"context_line":"                                  (namespace, property_name))"},{"line_number":302,"context_line":"                    headers \u003d self._headers("},{"line_number":303,"context_line":"                        {\u0027content-type\u0027: \u0027application/json\u0027,"},{"line_number":304,"context_line":"                         \u0027X-Tenant-Id\u0027: tenant,"},{"line_number":305,"context_line":"                         \u0027X-Roles\u0027: \u0027reader,member\u0027})"},{"line_number":306,"context_line":"                    response \u003d requests.get(path, headers\u003dheaders)"},{"line_number":307,"context_line":"                    if namespace.split(\u0027_\u0027)[1] \u003d\u003d \u0027public\u0027:"},{"line_number":308,"context_line":"                        self.assertEqual(http.OK, response.status_code)"}],"source_content_type":"text/x-python","patch_set":17,"id":"f02b591e_5fb5acc0","line":305,"range":{"start_line":302,"start_character":20,"end_line":305,"end_character":53},"in_reply_to":"b3db55dc_32249765","updated":"2021-09-02 12:18:10.000000000","message":"Done","commit_id":"0289c27c44f90bffe7c86bd768403374f0d67a5b"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"633a2d45ed8722c4a94e0eed3c27ec6853906487","unresolved":true,"context_lines":[{"line_number":362,"context_line":"                self.assertEqual(http.NO_CONTENT, response.status_code)"},{"line_number":363,"context_line":""},{"line_number":364,"context_line":"                # Deleted property should not be exist"},{"line_number":365,"context_line":"                response \u003d requests.get(path, headers\u003dself._headers())"},{"line_number":366,"context_line":"                self.assertEqual(http.NOT_FOUND, response.status_code)"}],"source_content_type":"text/x-python","patch_set":17,"id":"c25e9ba3_b5d7390c","line":365,"range":{"start_line":365,"start_character":54,"end_line":365,"end_character":69},"updated":"2021-09-02 09:38:36.000000000","message":"use headers defined at line 356","commit_id":"0289c27c44f90bffe7c86bd768403374f0d67a5b"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"17a019bbb1297a9fbab50a95975b1abbf929502c","unresolved":false,"context_lines":[{"line_number":362,"context_line":"                self.assertEqual(http.NO_CONTENT, response.status_code)"},{"line_number":363,"context_line":""},{"line_number":364,"context_line":"                # Deleted property should not be exist"},{"line_number":365,"context_line":"                response \u003d requests.get(path, headers\u003dself._headers())"},{"line_number":366,"context_line":"                self.assertEqual(http.NOT_FOUND, response.status_code)"}],"source_content_type":"text/x-python","patch_set":17,"id":"6901c8e3_9c9dafb4","line":365,"range":{"start_line":365,"start_character":54,"end_line":365,"end_character":69},"in_reply_to":"c25e9ba3_b5d7390c","updated":"2021-09-02 12:18:10.000000000","message":"Done","commit_id":"0289c27c44f90bffe7c86bd768403374f0d67a5b"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"acd920691116123fb32970479069867db46bb531","unresolved":true,"context_lines":[{"line_number":302,"context_line":"                    path \u003d \\"},{"line_number":303,"context_line":"                        self._url(\u0027/v2/metadefs/namespaces/%s/properties/%s\u0027 %"},{"line_number":304,"context_line":"                                  (namespace, property_name))"},{"line_number":305,"context_line":"                    headers \u003d headers"},{"line_number":306,"context_line":"                    response \u003d requests.get(path, headers\u003dheaders)"},{"line_number":307,"context_line":"                    if namespace.split(\u0027_\u0027)[1] \u003d\u003d \u0027public\u0027:"},{"line_number":308,"context_line":"                        self.assertEqual(http.OK, response.status_code)"}],"source_content_type":"text/x-python","patch_set":18,"id":"05fbdd7e_e4fbb125","line":305,"range":{"start_line":305,"start_character":20,"end_line":305,"end_character":37},"updated":"2021-09-02 20:32:37.000000000","message":"I think this can be removed in a subsequent patch.","commit_id":"3554e7c393b1fe03d27af8c11806734961bd84dd"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"cfa7d2bd6a724c7a9af8c627fcef0267b4a88740","unresolved":true,"context_lines":[{"line_number":302,"context_line":"                    path \u003d \\"},{"line_number":303,"context_line":"                        self._url(\u0027/v2/metadefs/namespaces/%s/properties/%s\u0027 %"},{"line_number":304,"context_line":"                                  (namespace, property_name))"},{"line_number":305,"context_line":"                    headers \u003d headers"},{"line_number":306,"context_line":"                    response \u003d requests.get(path, headers\u003dheaders)"},{"line_number":307,"context_line":"                    if namespace.split(\u0027_\u0027)[1] \u003d\u003d \u0027public\u0027:"},{"line_number":308,"context_line":"                        self.assertEqual(http.OK, response.status_code)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a79ef73_02c0eb6c","line":305,"range":{"start_line":305,"start_character":20,"end_line":305,"end_character":37},"in_reply_to":"05fbdd7e_e4fbb125","updated":"2021-09-02 20:57:59.000000000","message":"Aw man, I missed this one. Caught a different one a few patches up :)","commit_id":"3554e7c393b1fe03d27af8c11806734961bd84dd"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"acd920691116123fb32970479069867db46bb531","unresolved":true,"context_lines":[{"line_number":317,"context_line":"        # cannot access properties of private namespace of Tenant 1"},{"line_number":318,"context_line":"        _check_properties_access(tenant1_properties, TENANT2)"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        # Update properties with admin and non admin role"},{"line_number":321,"context_line":"        total_properties \u003d tenant1_properties + tenant2_properties"},{"line_number":322,"context_line":"        for prop in total_properties:"},{"line_number":323,"context_line":"            for namespace, property_name in prop.items():"}],"source_content_type":"text/x-python","patch_set":18,"id":"9c79a08d_8011e368","line":320,"updated":"2021-09-02 20:32:37.000000000","message":"I don\u0027t think we have anything here testing GET /v2/metadefs/namespaces/%{namespace}s/properties do we?\n\nFor example, I know TENANT1 can\u0027t view TENANT2\u0027s private namespace, but can they view properties of TENANT2\u0027s private namespace?","commit_id":"3554e7c393b1fe03d27af8c11806734961bd84dd"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"a7d19cffb9b48870fb49f953e13b56366b6be310","unresolved":true,"context_lines":[{"line_number":317,"context_line":"        # cannot access properties of private namespace of Tenant 1"},{"line_number":318,"context_line":"        _check_properties_access(tenant1_properties, TENANT2)"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        # Update properties with admin and non admin role"},{"line_number":321,"context_line":"        total_properties \u003d tenant1_properties + tenant2_properties"},{"line_number":322,"context_line":"        for prop in total_properties:"},{"line_number":323,"context_line":"            for namespace, property_name in prop.items():"}],"source_content_type":"text/x-python","patch_set":18,"id":"48c9ad9f_00107f68","line":320,"in_reply_to":"0f506c54_9139f51c","updated":"2021-09-02 21:19:14.000000000","message":"I disabled the get_metadef_properties policy entirely and the test still passed (unless I\u0027m doing something wrong).\n\nhttps://paste.opendev.org/raw/808556/","commit_id":"3554e7c393b1fe03d27af8c11806734961bd84dd"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ff69cfeb772072d78b3074feff740e8f9fecee39","unresolved":true,"context_lines":[{"line_number":317,"context_line":"        # cannot access properties of private namespace of Tenant 1"},{"line_number":318,"context_line":"        _check_properties_access(tenant1_properties, TENANT2)"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        # Update properties with admin and non admin role"},{"line_number":321,"context_line":"        total_properties \u003d tenant1_properties + tenant2_properties"},{"line_number":322,"context_line":"        for prop in total_properties:"},{"line_number":323,"context_line":"            for namespace, property_name in prop.items():"}],"source_content_type":"text/x-python","patch_set":18,"id":"309796ef_a2494001","line":320,"in_reply_to":"48c9ad9f_00107f68","updated":"2021-09-02 21:39:04.000000000","message":"Ok - Dan helped me find the right tox env to use. But it looks like we\u0027re still missing a case:\n\nhttps://paste.opendev.org/raw/808560/","commit_id":"3554e7c393b1fe03d27af8c11806734961bd84dd"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"cfa7d2bd6a724c7a9af8c627fcef0267b4a88740","unresolved":true,"context_lines":[{"line_number":317,"context_line":"        # cannot access properties of private namespace of Tenant 1"},{"line_number":318,"context_line":"        _check_properties_access(tenant1_properties, TENANT2)"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        # Update properties with admin and non admin role"},{"line_number":321,"context_line":"        total_properties \u003d tenant1_properties + tenant2_properties"},{"line_number":322,"context_line":"        for prop in total_properties:"},{"line_number":323,"context_line":"            for namespace, property_name in prop.items():"}],"source_content_type":"text/x-python","patch_set":18,"id":"e3829233_07b41ee4","line":320,"in_reply_to":"9c79a08d_8011e368","updated":"2021-09-02 20:57:59.000000000","message":"Isn\u0027t that done in L314 and L318? We list them all and assert OK or NOT_FOUND depending on ownership and public-ness.","commit_id":"3554e7c393b1fe03d27af8c11806734961bd84dd"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"1e1c8565f912b35df0b8234cb952cd0bcf51950d","unresolved":true,"context_lines":[{"line_number":317,"context_line":"        # cannot access properties of private namespace of Tenant 1"},{"line_number":318,"context_line":"        _check_properties_access(tenant1_properties, TENANT2)"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        # Update properties with admin and non admin role"},{"line_number":321,"context_line":"        total_properties \u003d tenant1_properties + tenant2_properties"},{"line_number":322,"context_line":"        for prop in total_properties:"},{"line_number":323,"context_line":"            for namespace, property_name in prop.items():"}],"source_content_type":"text/x-python","patch_set":18,"id":"0f506c54_9139f51c","line":320,"in_reply_to":"e3829233_07b41ee4","updated":"2021-09-02 21:08:26.000000000","message":"It looks like _check_properties_access is exercising get_metadef_property. I was checking to see if something exercised get_metadef_properties, which should be this code?\n\nhttps://github.com/openstack/glance/blob/master/glance/api/v2/metadef_properties.py#L77-L83","commit_id":"3554e7c393b1fe03d27af8c11806734961bd84dd"}]}
