)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"d6c5393c7011cda6971eb992fd33b3c1d76ef5c8","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Gary Kotton \u003cgkotton@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-03-04 10:25:13 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Show default configuration Qoutas"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Fixes bug 1144076"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAN3%2F%2F%2Fj8%3D","line":7,"updated":"2013-03-04 10:52:39.000000000","message":"qoutas -\u003e quotas","commit_id":"17ef5afb90534350f77df8814a7b2672e8dca0e4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"42427463365b33bfa7ab2bd365c3ed8915391281","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Gary Kotton \u003cgkotton@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-03-04 10:25:13 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Show default configuration Qoutas"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Fixes bug 1144076"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAN3%2F%2F%2FgY%3D","line":7,"in_reply_to":"AAAAN3%2F%2F%2Fj8%3D","updated":"2013-03-04 11:57:15.000000000","message":"Done","commit_id":"17ef5afb90534350f77df8814a7b2672e8dca0e4"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"72954c1cc0751955a219e9f93ba470a62b10157b","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Fixes bug 1144076"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"The patch set shows the defualt quotas that exist in"},{"line_number":12,"context_line":"the configuration file. This is iff the DB_QUOTA_DRIVER"},{"line_number":13,"context_line":"is not configured. In the case the user is required"},{"line_number":14,"context_line":"to update the configuration file and restart the service."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAN3%2F%2F%2Fjk%3D","line":12,"updated":"2013-03-04 11:06:46.000000000","message":"iff -\u003e if","commit_id":"17ef5afb90534350f77df8814a7b2672e8dca0e4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"42427463365b33bfa7ab2bd365c3ed8915391281","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Fixes bug 1144076"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"The patch set shows the defualt quotas that exist in"},{"line_number":12,"context_line":"the configuration file. This is iff the DB_QUOTA_DRIVER"},{"line_number":13,"context_line":"is not configured. In the case the user is required"},{"line_number":14,"context_line":"to update the configuration file and restart the service."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAN3%2F%2F%2FgU%3D","line":12,"in_reply_to":"AAAAN3%2F%2F%2Fjk%3D","updated":"2013-03-04 11:57:15.000000000","message":"Done","commit_id":"17ef5afb90534350f77df8814a7b2672e8dca0e4"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"d6c5393c7011cda6971eb992fd33b3c1d76ef5c8","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"The patch set shows the defualt quotas that exist in"},{"line_number":12,"context_line":"the configuration file. This is iff the DB_QUOTA_DRIVER"},{"line_number":13,"context_line":"is not configured. In the case the user is required"},{"line_number":14,"context_line":"to update the configuration file and restart the service."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I5517c0215e8cfa71453ee38c34d8249e74346fdf"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAN3%2F%2F%2Fj4%3D","line":13,"updated":"2013-03-04 10:52:39.000000000","message":"the -\u003e this?","commit_id":"17ef5afb90534350f77df8814a7b2672e8dca0e4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"42427463365b33bfa7ab2bd365c3ed8915391281","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"The patch set shows the defualt quotas that exist in"},{"line_number":12,"context_line":"the configuration file. This is iff the DB_QUOTA_DRIVER"},{"line_number":13,"context_line":"is not configured. In the case the user is required"},{"line_number":14,"context_line":"to update the configuration file and restart the service."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I5517c0215e8cfa71453ee38c34d8249e74346fdf"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAN3%2F%2F%2FgQ%3D","line":13,"in_reply_to":"AAAAN3%2F%2F%2Fj4%3D","updated":"2013-03-04 11:57:15.000000000","message":"Done","commit_id":"17ef5afb90534350f77df8814a7b2672e8dca0e4"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"d6c5393c7011cda6971eb992fd33b3c1d76ef5c8","unresolved":false,"context_lines":[{"line_number":11,"context_line":"The patch set shows the defualt quotas that exist in"},{"line_number":12,"context_line":"the configuration file. This is iff the DB_QUOTA_DRIVER"},{"line_number":13,"context_line":"is not configured. In the case the user is required"},{"line_number":14,"context_line":"to update the configuration file and restart the service."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I5517c0215e8cfa71453ee38c34d8249e74346fdf"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAN3%2F%2F%2Fj0%3D","line":14,"updated":"2013-03-04 10:52:39.000000000","message":"one could also think of doing an override of the cfg options....","commit_id":"17ef5afb90534350f77df8814a7b2672e8dca0e4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"42427463365b33bfa7ab2bd365c3ed8915391281","unresolved":false,"context_lines":[{"line_number":11,"context_line":"The patch set shows the defualt quotas that exist in"},{"line_number":12,"context_line":"the configuration file. This is iff the DB_QUOTA_DRIVER"},{"line_number":13,"context_line":"is not configured. In the case the user is required"},{"line_number":14,"context_line":"to update the configuration file and restart the service."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I5517c0215e8cfa71453ee38c34d8249e74346fdf"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAN3%2F%2F%2FgI%3D","line":14,"in_reply_to":"AAAAN3%2F%2F%2Fj0%3D","updated":"2013-03-04 11:57:15.000000000","message":"i was once told that this is forbidden and that the values for the configuration file should be treated as read only.\nit would nonetheless be nice if they would be updated in the configuration file :)","commit_id":"17ef5afb90534350f77df8814a7b2672e8dca0e4"}],"quantum/extensions/quotasv2.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"d6c5393c7011cda6971eb992fd33b3c1d76ef5c8","unresolved":false,"context_lines":[{"line_number":158,"context_line":"    def check_env(self):"},{"line_number":159,"context_line":"        if cfg.CONF.QUOTAS.quota_driver !\u003d DB_QUOTA_DRIVER:"},{"line_number":160,"context_line":"            msg \u003d _(\u0027Quota driver %s is needed.\u0027) % DB_QUOTA_DRIVER"},{"line_number":161,"context_line":"            raise exceptions.InvalidExtenstionEnv(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAN3%2F%2F%2Fk8%3D","side":"PARENT","line":161,"updated":"2013-03-04 10:50:41.000000000","message":"perhaps we should fix this typo... (or remove the exception  if it\u0027s not used anywhere else)","commit_id":"ed665dc9ba814829df601f555b8a5b0900259c1c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"42427463365b33bfa7ab2bd365c3ed8915391281","unresolved":false,"context_lines":[{"line_number":158,"context_line":"    def check_env(self):"},{"line_number":159,"context_line":"        if cfg.CONF.QUOTAS.quota_driver !\u003d DB_QUOTA_DRIVER:"},{"line_number":160,"context_line":"            msg \u003d _(\u0027Quota driver %s is needed.\u0027) % DB_QUOTA_DRIVER"},{"line_number":161,"context_line":"            raise exceptions.InvalidExtenstionEnv(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAN3%2F%2F%2Fg8%3D","side":"PARENT","line":161,"in_reply_to":"AAAAN3%2F%2F%2Fk8%3D","updated":"2013-03-04 11:57:15.000000000","message":"The exception is used by the security groups. I will fix the typo in a separate patch","commit_id":"ed665dc9ba814829df601f555b8a5b0900259c1c"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"d6c5393c7011cda6971eb992fd33b3c1d76ef5c8","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        self._resource_name \u003d RESOURCE_NAME"},{"line_number":50,"context_line":"        self._plugin \u003d plugin"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _get_quotas(self, request, tenant_id):"},{"line_number":53,"context_line":"        resources \u003d {}"},{"line_number":54,"context_line":"        for key, value in cfg.CONF.QUOTAS.items():"},{"line_number":55,"context_line":"            if (isinstance(value, int) and key.startswith(\u0027quota_\u0027)):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAN3%2F%2F%2FlI%3D","line":52,"updated":"2013-03-04 10:50:41.000000000","message":"tenant_id is (understandably) unused","commit_id":"17ef5afb90534350f77df8814a7b2672e8dca0e4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"42427463365b33bfa7ab2bd365c3ed8915391281","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        self._resource_name \u003d RESOURCE_NAME"},{"line_number":50,"context_line":"        self._plugin \u003d plugin"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _get_quotas(self, request, tenant_id):"},{"line_number":53,"context_line":"        resources \u003d {}"},{"line_number":54,"context_line":"        for key, value in cfg.CONF.QUOTAS.items():"},{"line_number":55,"context_line":"            if (isinstance(value, int) and key.startswith(\u0027quota_\u0027)):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAN3%2F%2F%2Fh4%3D","line":52,"in_reply_to":"AAAAN3%2F%2F%2FlI%3D","updated":"2013-03-04 11:57:15.000000000","message":"Done","commit_id":"17ef5afb90534350f77df8814a7b2672e8dca0e4"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"72954c1cc0751955a219e9f93ba470a62b10157b","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        raise webob.exc.HTTPForbidden()"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def index(self, request):"},{"line_number":63,"context_line":"        raise webob.exc.HTTPForbidden()"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def tenant(self, request):"},{"line_number":66,"context_line":"        \"\"\"Retrieve the tenant info in context.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAN3%2F%2F%2FjQ%3D","line":63,"updated":"2013-03-04 11:06:46.000000000","message":"In the case of per-tenant quota, index() returns an empty list if all tenants have the default value of quotas. It would be better to keep the same behavior across the quota drivers rather than return Forbidden.","commit_id":"17ef5afb90534350f77df8814a7b2672e8dca0e4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"42427463365b33bfa7ab2bd365c3ed8915391281","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        raise webob.exc.HTTPForbidden()"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def index(self, request):"},{"line_number":63,"context_line":"        raise webob.exc.HTTPForbidden()"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def tenant(self, request):"},{"line_number":66,"context_line":"        \"\"\"Retrieve the tenant info in context.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAN3%2F%2F%2Fg0%3D","line":63,"in_reply_to":"AAAAN3%2F%2F%2FjQ%3D","updated":"2013-03-04 11:57:15.000000000","message":"Done","commit_id":"17ef5afb90534350f77df8814a7b2672e8dca0e4"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"d6c5393c7011cda6971eb992fd33b3c1d76ef5c8","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    def index(self, request):"},{"line_number":63,"context_line":"        raise webob.exc.HTTPForbidden()"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def tenant(self, request):"},{"line_number":66,"context_line":"        \"\"\"Retrieve the tenant info in context.\"\"\""},{"line_number":67,"context_line":"        context \u003d request.context"},{"line_number":68,"context_line":"        if not context.tenant_id:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAN3%2F%2F%2FlA%3D","line":65,"updated":"2013-03-04 10:50:41.000000000","message":"where is this method invoked?","commit_id":"17ef5afb90534350f77df8814a7b2672e8dca0e4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"42427463365b33bfa7ab2bd365c3ed8915391281","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    def index(self, request):"},{"line_number":63,"context_line":"        raise webob.exc.HTTPForbidden()"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def tenant(self, request):"},{"line_number":66,"context_line":"        \"\"\"Retrieve the tenant info in context.\"\"\""},{"line_number":67,"context_line":"        context \u003d request.context"},{"line_number":68,"context_line":"        if not context.tenant_id:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAN3%2F%2F%2FhY%3D","line":65,"in_reply_to":"AAAAN3%2F%2F%2FlA%3D","updated":"2013-03-04 11:57:15.000000000","message":"the wsgi invokes the tenant method. \nThe trace is below:\n  File \"/usr/lib/python2.7/site-packages/eventlet/wsgi.py\", line 382, in handle_one_response\n    result \u003d self.application(self.environ, start_response)\n  File \"/usr/lib/python2.7/site-packages/paste/urlmap.py\", line 203, in __call__\n    return app(environ, start_response)\n  File \"/opt/stack/python-keystoneclient/keystoneclient/middleware/auth_token.py\", line 349, in __call__\n    return self.app(env, start_response)\n  File \"/usr/lib/python2.7/site-packages/webob/dec.py\", line 144, in __call__\n    return resp(environ, start_response)\n  File \"/usr/lib/python2.7/site-packages/webob/dec.py\", line 144, in __call__\n    return resp(environ, start_response)\n  File \"/usr/lib/python2.7/site-packages/routes/middleware.py\", line 131, in __call__\n    response \u003d self.app(environ, start_response)\n  File \"/usr/lib/python2.7/site-packages/webob/dec.py\", line 144, in __call__\n    return resp(environ, start_response)\n  File \"/usr/lib/python2.7/site-packages/webob/dec.py\", line 130, in __call__\n    resp \u003d self.call_func(req, *args, **self.kwargs)\n  File \"/usr/lib/python2.7/site-packages/webob/dec.py\", line 195, in call_func\n    return self.func(req, *args, **kwargs)\n  File \"/opt/stack/quantum/quantum/wsgi.py\", line 1005, in __call__\n    method \u003d getattr(self, action)","commit_id":"17ef5afb90534350f77df8814a7b2672e8dca0e4"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"d6c5393c7011cda6971eb992fd33b3c1d76ef5c8","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        context \u003d request.context"},{"line_number":74,"context_line":"        tenant_id \u003d id"},{"line_number":75,"context_line":"        if not tenant_id:"},{"line_number":76,"context_line":"            raise webob.exc.HTTPBadRequest(\u0027invalid tenant\u0027)"},{"line_number":77,"context_line":"        if (tenant_id !\u003d context.tenant_id and"},{"line_number":78,"context_line":"            not context.is_admin):"},{"line_number":79,"context_line":"            raise webob.exc.HTTPForbidden()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAN3%2F%2F%2FlE%3D","line":76,"updated":"2013-03-04 10:50:41.000000000","message":"We just need to check that the request is issued within an admin context. Checking for tenant_id does not look really useful, as we\u0027re always returning values from the CFG file","commit_id":"17ef5afb90534350f77df8814a7b2672e8dca0e4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"42427463365b33bfa7ab2bd365c3ed8915391281","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        context \u003d request.context"},{"line_number":74,"context_line":"        tenant_id \u003d id"},{"line_number":75,"context_line":"        if not tenant_id:"},{"line_number":76,"context_line":"            raise webob.exc.HTTPBadRequest(\u0027invalid tenant\u0027)"},{"line_number":77,"context_line":"        if (tenant_id !\u003d context.tenant_id and"},{"line_number":78,"context_line":"            not context.is_admin):"},{"line_number":79,"context_line":"            raise webob.exc.HTTPForbidden()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAN3%2F%2F%2Fhc%3D","line":76,"in_reply_to":"AAAAN3%2F%2F%2FlE%3D","updated":"2013-03-04 11:57:15.000000000","message":"Done","commit_id":"17ef5afb90534350f77df8814a7b2672e8dca0e4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"977db847b603b28c003a3e1c6f3bd1cd5f9949c5","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _get_quotas(self):"},{"line_number":53,"context_line":"        resources \u003d {}"},{"line_number":54,"context_line":"        for key, value in cfg.CONF.QUOTAS.items():"},{"line_number":55,"context_line":"            if (isinstance(value, int) and key.startswith(\u0027quota_\u0027)):"},{"line_number":56,"context_line":"                resources.update({key: value})"},{"line_number":57,"context_line":"        return resources"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAN3%2F%2F%2FcM%3D","line":54,"updated":"2013-03-04 13:16:01.000000000","message":"besides the cfg.CONF.QUOTAS.items, we support define quotas on-demand:\nplease see quota.QUOTAS.register_resource_by_name(resource_name)  in extensions/l3.py","commit_id":"d7cd5a5f8463a9fc59b11427912ffd5cc0849e5a"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _get_quotas(self):"},{"line_number":53,"context_line":"        resources \u003d {}"},{"line_number":54,"context_line":"        for key, value in cfg.CONF.QUOTAS.items():"},{"line_number":55,"context_line":"            if (isinstance(value, int) and key.startswith(\u0027quota_\u0027)):"},{"line_number":56,"context_line":"                resources.update({key: value})"},{"line_number":57,"context_line":"        return resources"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAN3%2F%2F%2FXI%3D","line":54,"in_reply_to":"AAAAN3%2F%2F%2FcM%3D","updated":"2013-03-04 14:12:03.000000000","message":"ok. i think that i understand you here. i\u0027ll update accordingly.","commit_id":"d7cd5a5f8463a9fc59b11427912ffd5cc0849e5a"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"977db847b603b28c003a3e1c6f3bd1cd5f9949c5","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        if not context.is_admin:"},{"line_number":65,"context_line":"            raise webob.exc.HTTPForbidden()"},{"line_number":66,"context_line":"        return {self._resource_name + \"s\":"},{"line_number":67,"context_line":"                [self._get_quotas()]}"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def tenant(self, request):"},{"line_number":70,"context_line":"        \"\"\"Retrieve the tenant info in context.\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAN3%2F%2F%2FcY%3D","line":67,"updated":"2013-03-04 13:16:01.000000000","message":"Index is used to list quotas of that tenants whose quotas are redefined.","commit_id":"d7cd5a5f8463a9fc59b11427912ffd5cc0849e5a"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":64,"context_line":"        if not context.is_admin:"},{"line_number":65,"context_line":"            raise webob.exc.HTTPForbidden()"},{"line_number":66,"context_line":"        return {self._resource_name + \"s\":"},{"line_number":67,"context_line":"                [self._get_quotas()]}"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def tenant(self, request):"},{"line_number":70,"context_line":"        \"\"\"Retrieve the tenant info in context.\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAN3%2F%2F%2FXA%3D","line":67,"in_reply_to":"AAAAN3%2F%2F%2FcY%3D","updated":"2013-03-04 14:12:03.000000000","message":"what do you suggest that we return here? my understanding was that this is used for listing the quotas per tenant (which is unchanged)","commit_id":"d7cd5a5f8463a9fc59b11427912ffd5cc0849e5a"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"977db847b603b28c003a3e1c6f3bd1cd5f9949c5","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            not context.is_admin):"},{"line_number":81,"context_line":"            raise webob.exc.HTTPForbidden()"},{"line_number":82,"context_line":"        return {self._resource_name:"},{"line_number":83,"context_line":"                self._get_quotas()}"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def delete(self, request, id):"},{"line_number":86,"context_line":"        raise webob.exc.HTTPForbidden()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAN3%2F%2F%2FcI%3D","line":83,"updated":"2013-03-04 13:16:01.000000000","message":"we can use show to show the default quotas for every tenant.","commit_id":"d7cd5a5f8463a9fc59b11427912ffd5cc0849e5a"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":80,"context_line":"            not context.is_admin):"},{"line_number":81,"context_line":"            raise webob.exc.HTTPForbidden()"},{"line_number":82,"context_line":"        return {self._resource_name:"},{"line_number":83,"context_line":"                self._get_quotas()}"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def delete(self, request, id):"},{"line_number":86,"context_line":"        raise webob.exc.HTTPForbidden()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAN3%2F%2F%2FW8%3D","line":83,"in_reply_to":"AAAAN3%2F%2F%2FcI%3D","updated":"2013-03-04 14:12:03.000000000","message":"with the configuration quotas this is the same for each tenant. no?","commit_id":"d7cd5a5f8463a9fc59b11427912ffd5cc0849e5a"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"af1cbc5aa5d896eec4663d99254ad41e727093f6","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        return quotas"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def create(self, request, body\u003dNone):"},{"line_number":60,"context_line":"        raise webob.exc.HTTPForbidden()"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def index(self, request):"},{"line_number":63,"context_line":"        context \u003d request.context"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAN3%2F%2F%2BQg%3D","line":60,"updated":"2013-03-04 22:15:43.000000000","message":"I found QuotaSetsController.create raise NonImplementedError, AgentPluginBase.create_agent raise BadRequest. They are same case, I think we should use same exception. \n\nI +1 for BadRequest.\n\nAny thought?","commit_id":"0b54c503d772ca26c24aacff76d567048bc26086"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"af1cbc5aa5d896eec4663d99254ad41e727093f6","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        return quotas"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def create(self, request, body\u003dNone):"},{"line_number":60,"context_line":"        raise webob.exc.HTTPForbidden()"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def index(self, request):"},{"line_number":63,"context_line":"        context \u003d request.context"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAN3%2F%2F9uk%3D","line":60,"in_reply_to":"AAAAN3%2F%2F%2BLM%3D","updated":"2013-03-05 03:39:25.000000000","message":"it make sense, I send a patch for QuotaSetsController.create and AgentPluginBase.create_agent","commit_id":"0b54c503d772ca26c24aacff76d567048bc26086"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":57,"context_line":"        return quotas"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def create(self, request, body\u003dNone):"},{"line_number":60,"context_line":"        raise webob.exc.HTTPForbidden()"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def index(self, request):"},{"line_number":63,"context_line":"        context \u003d request.context"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAN3%2F%2F%2BLM%3D","line":60,"in_reply_to":"AAAAN3%2F%2F%2BQg%3D","updated":"2013-03-04 23:22:01.000000000","message":"My only concern with a 400 error is that typically tells the client they can correct their request and try again.  In this case, there\u0027s nothing to fix.  I think 403 Forbidden or possibly 409 Conflict since the resource is not modifiable.  403 feels the most correct.","commit_id":"0b54c503d772ca26c24aacff76d567048bc26086"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":57,"context_line":"        return quotas"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def create(self, request, body\u003dNone):"},{"line_number":60,"context_line":"        raise webob.exc.HTTPForbidden()"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def index(self, request):"},{"line_number":63,"context_line":"        context \u003d request.context"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAN3%2F%2F9G0%3D","line":60,"in_reply_to":"AAAAN3%2F%2F9H4%3D","updated":"2013-03-05 12:44:05.000000000","message":"I don\u0027t agree with changing the status code. It is a  severe compatible issue.","commit_id":"0b54c503d772ca26c24aacff76d567048bc26086"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":57,"context_line":"        return quotas"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def create(self, request, body\u003dNone):"},{"line_number":60,"context_line":"        raise webob.exc.HTTPForbidden()"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def index(self, request):"},{"line_number":63,"context_line":"        context \u003d request.context"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAN3%2F%2F9H4%3D","line":60,"in_reply_to":"AAAAN3%2F%2F9kg%3D","updated":"2013-03-05 12:22:02.000000000","message":"I agree too. When some operation is disallowed by API policy, Forbidden seems to be a best choice.","commit_id":"0b54c503d772ca26c24aacff76d567048bc26086"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":57,"context_line":"        return quotas"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def create(self, request, body\u003dNone):"},{"line_number":60,"context_line":"        raise webob.exc.HTTPForbidden()"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def index(self, request):"},{"line_number":63,"context_line":"        context \u003d request.context"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAN3%2F%2F9kg%3D","line":60,"in_reply_to":"AAAAN3%2F%2F9uk%3D","updated":"2013-03-05 06:29:09.000000000","message":"I agree Forbidden feels like the best answer here","commit_id":"0b54c503d772ca26c24aacff76d567048bc26086"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    @classmethod"},{"line_number":169,"context_line":"    def get_name(cls):"},{"line_number":170,"context_line":"        return \"Quotas for each tenant\""},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    @classmethod"},{"line_number":173,"context_line":"    def get_alias(cls):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAN3%2F%2F9Hs%3D","line":170,"updated":"2013-03-05 12:22:02.000000000","message":"Quota extension is no longer an extension for per-tenant quota feature. It would be better to change it.\n\n\"Quota management support\"","commit_id":"0b54c503d772ca26c24aacff76d567048bc26086"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":176,"context_line":"    @classmethod"},{"line_number":177,"context_line":"    def get_description(cls):"},{"line_number":178,"context_line":"        return (\"Expose functions for cloud admin to update quotas \""},{"line_number":179,"context_line":"                \"for each tenant\")"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    @classmethod"},{"line_number":182,"context_line":"    def get_namespace(cls):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAN3%2F%2F9Hg%3D","line":179,"updated":"2013-03-05 12:22:02.000000000","message":"Ditto","commit_id":"0b54c503d772ca26c24aacff76d567048bc26086"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":57,"context_line":"        return quotas"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def create(self, request, body\u003dNone):"},{"line_number":60,"context_line":"        raise webob.exc.HTTPNotImplemented()"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def index(self, request):"},{"line_number":63,"context_line":"        context \u003d request.context"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAN3%2F%2F9FE%3D","line":60,"updated":"2013-03-05 13:07:41.000000000","message":"http://docs.openstack.org/api/openstack-network/2.0/content/quotas_ext.html\nwe don\u0027t document this method before, so update it as most of us agree.","commit_id":"88312e01b26fe9ac46b0732178face0a96317725"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    @classmethod"},{"line_number":177,"context_line":"    def get_description(cls):"},{"line_number":178,"context_line":"        return \"Expose functions for cloud admin to manage quotas\""},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    @classmethod"},{"line_number":181,"context_line":"    def get_namespace(cls):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAN3%2F%2F9F4%3D","line":178,"updated":"2013-03-05 12:55:55.000000000","message":"since we are change it, how about changing cloud admin since all other users can view quota too.","commit_id":"88312e01b26fe9ac46b0732178face0a96317725"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"af1cbc5aa5d896eec4663d99254ad41e727093f6","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        if not context.is_admin:"},{"line_number":65,"context_line":"            raise webob.exc.HTTPForbidden()"},{"line_number":66,"context_line":"        return {self._resource_name + \"s\":"},{"line_number":67,"context_line":"                [self._get_quotas()]}"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def tenant(self, request):"},{"line_number":70,"context_line":"        \"\"\"Retrieve the tenant info in context.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAN3%2F%2F9CM%3D","line":67,"updated":"2013-03-05 13:29:01.000000000","message":"This still different with QuotaSetsController. it won\u0027t return any items with default value.\n\nAnd this response isn\u0027t include tenant_id field but QuotaSetsController have.\n\nQuotaSetsController\u0027s response:\n{\"quotas\": [{\"security_group_rule\": 100, \"subnet\": 10, \"tenant_id\": \"20bd52ff3e1b40039c312395b04683cf\", \"network\": 100, \"floatingip\": 50, \"security_group\": 10, \"router\": 10, \"port\": 50}]}\n\nQuotaCfgController\u0027s response:\n{\"quotas\": [{\"subnet\": 10, \"network\": 10, \"floatingip\": 50, \"security_group_rule\": 100, \"security_group\": 10, \"router\": 10, \"port\": 50}]}\n\nI prefer just return {\u0027quotas\u0027: []} at here","commit_id":"d79076647dcb4bc23f28af7a136cf8b74f5cc604"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":64,"context_line":"        if not context.is_admin:"},{"line_number":65,"context_line":"            raise webob.exc.HTTPForbidden()"},{"line_number":66,"context_line":"        return {self._resource_name + \"s\":"},{"line_number":67,"context_line":"                [self._get_quotas()]}"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def tenant(self, request):"},{"line_number":70,"context_line":"        \"\"\"Retrieve the tenant info in context.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAN3%2F%2F9BA%3D","line":67,"in_reply_to":"AAAAN3%2F%2F9CM%3D","updated":"2013-03-05 13:32:12.000000000","message":"Done","commit_id":"d79076647dcb4bc23f28af7a136cf8b74f5cc604"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"af1cbc5aa5d896eec4663d99254ad41e727093f6","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            not context.is_admin):"},{"line_number":81,"context_line":"            raise webob.exc.HTTPForbidden()"},{"line_number":82,"context_line":"        return {self._resource_name:"},{"line_number":83,"context_line":"                self._get_quotas()}"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def delete(self, request, id):"},{"line_number":86,"context_line":"        raise webob.exc.HTTPForbidden()"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAN3%2F%2F9BQ%3D","line":83,"updated":"2013-03-05 13:29:01.000000000","message":"And this isn\u0027t include tenant_id field too. Although this value same for each tenant. But for keep same with QuotaSetsController, I prefer add tenant_id field","commit_id":"d79076647dcb4bc23f28af7a136cf8b74f5cc604"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"af1cbc5aa5d896eec4663d99254ad41e727093f6","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            not context.is_admin):"},{"line_number":81,"context_line":"            raise webob.exc.HTTPForbidden()"},{"line_number":82,"context_line":"        return {self._resource_name:"},{"line_number":83,"context_line":"                self._get_quotas()}"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def delete(self, request, id):"},{"line_number":86,"context_line":"        raise webob.exc.HTTPForbidden()"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAN3%2F%2F8%2FU%3D","line":83,"in_reply_to":"AAAAN3%2F%2F9A4%3D","updated":"2013-03-05 13:50:33.000000000","message":"my bad, please ignore this one.","commit_id":"d79076647dcb4bc23f28af7a136cf8b74f5cc604"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":80,"context_line":"            not context.is_admin):"},{"line_number":81,"context_line":"            raise webob.exc.HTTPForbidden()"},{"line_number":82,"context_line":"        return {self._resource_name:"},{"line_number":83,"context_line":"                self._get_quotas()}"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def delete(self, request, id):"},{"line_number":86,"context_line":"        raise webob.exc.HTTPForbidden()"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAN3%2F%2F9A4%3D","line":83,"in_reply_to":"AAAAN3%2F%2F9BQ%3D","updated":"2013-03-05 13:32:12.000000000","message":"Done","commit_id":"d79076647dcb4bc23f28af7a136cf8b74f5cc604"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":63,"context_line":"        context \u003d request.context"},{"line_number":64,"context_line":"        if not context.is_admin:"},{"line_number":65,"context_line":"            raise webob.exc.HTTPForbidden()"},{"line_number":66,"context_line":"        return {\u0027quotas\u0027: []}"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def tenant(self, request):"},{"line_number":69,"context_line":"        \"\"\"Retrieve the tenant info in context.\"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAN3%2F%2F84c%3D","line":66,"updated":"2013-03-05 14:46:49.000000000","message":"RESOURCE_COLLECTION may be used in place of \u0027quotas\u0027","commit_id":"02802d29c08f60068a9b9ccd4f9e509a5b4b0a22"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":63,"context_line":"        context \u003d request.context"},{"line_number":64,"context_line":"        if not context.is_admin:"},{"line_number":65,"context_line":"            raise webob.exc.HTTPForbidden()"},{"line_number":66,"context_line":"        return {\u0027quotas\u0027: []}"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def tenant(self, request):"},{"line_number":69,"context_line":"        \"\"\"Retrieve the tenant info in context.\"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAN3%2F%2F8Zw%3D","line":66,"in_reply_to":"AAAAN3%2F%2F84c%3D","updated":"2013-03-05 17:45:32.000000000","message":"Done","commit_id":"02802d29c08f60068a9b9ccd4f9e509a5b4b0a22"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":57,"context_line":"        return quotas"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def create(self, request, body\u003dNone):"},{"line_number":60,"context_line":"        raise webob.exc.HTTPForbidden()"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def index(self, request):"},{"line_number":63,"context_line":"        context \u003d request.context"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAN3%2F%2F7eI%3D","line":60,"updated":"2013-03-06 02:04:21.000000000","message":"I\u0027m curious why you chose forbidden and not NotImplemented.  To me, forbidden implies that if you have more privileges (e.g., are an admin), this call could do something useful.","commit_id":"8d95daea3555b9da5a91287e5809bf901296f073"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"af1cbc5aa5d896eec4663d99254ad41e727093f6","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        return quotas"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def create(self, request, body\u003dNone):"},{"line_number":60,"context_line":"        raise webob.exc.HTTPForbidden()"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def index(self, request):"},{"line_number":63,"context_line":"        context \u003d request.context"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAN3%2F%2F7Lk%3D","line":60,"in_reply_to":"AAAAN3%2F%2F7N4%3D","updated":"2013-03-06 07:46:08.000000000","message":"NotImplemented looks like doesn\u0027t appropriate after reading the NotImplemented descritpion. The description as below:\n\nThe server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.\n\nIn the last word, said \u0027is not capable of supporting it for any resource\u0027 \n\nWhat I understand was If we raise NotImplemented, means we didn\u0027t support POST method for any resource, not only Quota.\n\nIs right?","commit_id":"8d95daea3555b9da5a91287e5809bf901296f073"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":57,"context_line":"        return quotas"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def create(self, request, body\u003dNone):"},{"line_number":60,"context_line":"        raise webob.exc.HTTPForbidden()"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def index(self, request):"},{"line_number":63,"context_line":"        context \u003d request.context"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAN3%2F%2F7N4%3D","line":60,"in_reply_to":"AAAAN3%2F%2F7eI%3D","updated":"2013-03-06 07:12:01.000000000","message":"This was discussed in patch set 5. The consensus was to use Forbidden.","commit_id":"8d95daea3555b9da5a91287e5809bf901296f073"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":63,"context_line":"        context \u003d request.context"},{"line_number":64,"context_line":"        if not context.is_admin:"},{"line_number":65,"context_line":"            raise webob.exc.HTTPForbidden()"},{"line_number":66,"context_line":"        return {RESOURCE_COLLECTION: []}"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def tenant(self, request):"},{"line_number":69,"context_line":"        \"\"\"Retrieve the tenant info in context.\"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAN3%2F%2F7dg%3D","line":66,"updated":"2013-03-06 02:04:21.000000000","message":"this seems a bit odd as it never returns anything useful.   I\u0027m assuming the corresponding call below returns one entry per-tenant?  I guess in our case, we don\u0027t know the tenant-ids.   I wonder if it makes more sense to raise a NotImplemented here.","commit_id":"8d95daea3555b9da5a91287e5809bf901296f073"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":63,"context_line":"        context \u003d request.context"},{"line_number":64,"context_line":"        if not context.is_admin:"},{"line_number":65,"context_line":"            raise webob.exc.HTTPForbidden()"},{"line_number":66,"context_line":"        return {RESOURCE_COLLECTION: []}"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def tenant(self, request):"},{"line_number":69,"context_line":"        \"\"\"Retrieve the tenant info in context.\"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAN3%2F%2F7No%3D","line":66,"in_reply_to":"AAAAN3%2F%2F7dg%3D","updated":"2013-03-06 07:12:01.000000000","message":"I agree with you that this is odd. This method returns only those quotas which are not the default - hence the empty array. This is to be compatibility with the DB support.","commit_id":"8d95daea3555b9da5a91287e5809bf901296f073"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":70,"context_line":"        context \u003d request.context"},{"line_number":71,"context_line":"        if not context.tenant_id:"},{"line_number":72,"context_line":"            raise webob.exc.HTTPBadRequest(\u0027invalid tenant\u0027)"},{"line_number":73,"context_line":"        return {\u0027tenant\u0027: {\u0027tenant_id\u0027: context.tenant_id}}"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def show(self, request, id):"},{"line_number":76,"context_line":"        context \u003d request.context"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAN3%2F%2F7d8%3D","line":73,"updated":"2013-03-06 02:04:21.000000000","message":"where is this used?","commit_id":"8d95daea3555b9da5a91287e5809bf901296f073"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":70,"context_line":"        context \u003d request.context"},{"line_number":71,"context_line":"        if not context.tenant_id:"},{"line_number":72,"context_line":"            raise webob.exc.HTTPBadRequest(\u0027invalid tenant\u0027)"},{"line_number":73,"context_line":"        return {\u0027tenant\u0027: {\u0027tenant_id\u0027: context.tenant_id}}"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def show(self, request, id):"},{"line_number":76,"context_line":"        context \u003d request.context"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAN3%2F%2F7Nk%3D","line":73,"in_reply_to":"AAAAN3%2F%2F7d8%3D","updated":"2013-03-06 07:12:01.000000000","message":"This is invoked by the wsgi calling code. Without it it does not work.","commit_id":"8d95daea3555b9da5a91287e5809bf901296f073"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":79,"context_line":"            not context.is_admin):"},{"line_number":80,"context_line":"            raise webob.exc.HTTPForbidden()"},{"line_number":81,"context_line":"        return {self._resource_name:"},{"line_number":82,"context_line":"                self._get_quotas()}"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def delete(self, request, id):"},{"line_number":85,"context_line":"        raise webob.exc.HTTPForbidden()"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAN3%2F%2F7dI%3D","line":82,"updated":"2013-03-06 02:04:21.000000000","message":"this is basically the same as show() below, right?  That makes me wonder if instead of creating a separate Controller, we should instead just create a \"driver\" using the existing framework below that raises NotImplemented in most cases, but returns data from cfg on show()","commit_id":"8d95daea3555b9da5a91287e5809bf901296f073"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":79,"context_line":"            not context.is_admin):"},{"line_number":80,"context_line":"            raise webob.exc.HTTPForbidden()"},{"line_number":81,"context_line":"        return {self._resource_name:"},{"line_number":82,"context_line":"                self._get_quotas()}"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def delete(self, request, id):"},{"line_number":85,"context_line":"        raise webob.exc.HTTPForbidden()"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAN3%2F%2F7Nc%3D","line":82,"in_reply_to":"AAAAN3%2F%2F7dI%3D","updated":"2013-03-06 07:12:01.000000000","message":"Yes, this too is an option - I\u0027ll see if it is possible. It just seemed like too much effort for something so trivial.","commit_id":"8d95daea3555b9da5a91287e5809bf901296f073"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":85,"context_line":"        raise webob.exc.HTTPForbidden()"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def update(self, request, id):"},{"line_number":88,"context_line":"        raise webob.exc.HTTPForbidden()"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"class QuotaSetsController(wsgi.Controller):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAN3%2F%2F7eA%3D","line":88,"updated":"2013-03-06 02:04:21.000000000","message":"same question about forbidden vs. not implemented.","commit_id":"8d95daea3555b9da5a91287e5809bf901296f073"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":85,"context_line":"        raise webob.exc.HTTPForbidden()"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def update(self, request, id):"},{"line_number":88,"context_line":"        raise webob.exc.HTTPForbidden()"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"class QuotaSetsController(wsgi.Controller):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAN3%2F%2F7Ng%3D","line":88,"in_reply_to":"AAAAN3%2F%2F7eA%3D","updated":"2013-03-06 07:12:01.000000000","message":"In this case the user is actually forbidden to update via the CLI - the changes are driven via the configuration file. If an when openstack enables a user to update a configuration variable real time then we can make use of this.","commit_id":"8d95daea3555b9da5a91287e5809bf901296f073"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"af1cbc5aa5d896eec4663d99254ad41e727093f6","unresolved":false,"context_lines":[{"line_number":43,"context_line":"                                 \u0027is_visible\u0027: True}"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"class CfgQuotaDriver(object):"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    @staticmethod"},{"line_number":49,"context_line":"    def get_tenant_quotas(context, resources, tenant_id):"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAN3%2F%2F65o%3D","line":46,"updated":"2013-03-06 12:59:27.000000000","message":"We have cfg driver at \u0027quota.ConfDriver\u0027, Can add those method to that class.","commit_id":"bc8d6995289bacccd01fd39a4b5b057051dc3c32"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":43,"context_line":"                                 \u0027is_visible\u0027: True}"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"class CfgQuotaDriver(object):"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    @staticmethod"},{"line_number":49,"context_line":"    def get_tenant_quotas(context, resources, tenant_id):"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAN3%2F%2F6js%3D","line":46,"in_reply_to":"AAAAN3%2F%2F65A%3D","updated":"2013-03-06 17:05:59.000000000","message":"I don\u0027t think we need to update quantum.conf.\n\nI have another thought that it is better to merge CfgQuotaDriver and ConfDriver in quota.py.\nAlthough names of both classes contains \"Driver\", the roles of quota_driver and CfgQuotaDriver are different. quota_driver providers \"limit_check\" method to check quota for a resources and CfgQuotaDriver implements quota extensions methods to respond API calls. On the other hand QuotaDbDriver plays both roles. From the point of view of symmetry, all quota_drivers should provide same set of methods.","commit_id":"bc8d6995289bacccd01fd39a4b5b057051dc3c32"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":43,"context_line":"                                 \u0027is_visible\u0027: True}"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"class CfgQuotaDriver(object):"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    @staticmethod"},{"line_number":49,"context_line":"    def get_tenant_quotas(context, resources, tenant_id):"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAN3%2F%2F6as%3D","line":46,"in_reply_to":"AAAAN3%2F%2F65o%3D","updated":"2013-03-06 19:11:36.000000000","message":"Done","commit_id":"bc8d6995289bacccd01fd39a4b5b057051dc3c32"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":43,"context_line":"                                 \u0027is_visible\u0027: True}"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"class CfgQuotaDriver(object):"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    @staticmethod"},{"line_number":49,"context_line":"    def get_tenant_quotas(context, resources, tenant_id):"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAN3%2F%2F65A%3D","line":46,"in_reply_to":"AAAAN3%2F%2F65o%3D","updated":"2013-03-06 13:22:05.000000000","message":"do you want me to add these to the https://github.com/openstack/quantum/blob/master/quantum/quota.py#L55?\nI think that this is a bit messy and this way it is cleaner. What do you think?","commit_id":"bc8d6995289bacccd01fd39a4b5b057051dc3c32"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":43,"context_line":"                                 \u0027is_visible\u0027: True}"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"class CfgQuotaDriver(object):"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    @staticmethod"},{"line_number":49,"context_line":"    def get_tenant_quotas(context, resources, tenant_id):"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAN3%2F%2F6ao%3D","line":46,"in_reply_to":"AAAAN3%2F%2F6js%3D","updated":"2013-03-06 19:11:36.000000000","message":"Done","commit_id":"bc8d6995289bacccd01fd39a4b5b057051dc3c32"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"class CfgQuotaDriver(object):"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    @staticmethod"},{"line_number":49,"context_line":"    def get_tenant_quotas(context, resources, tenant_id):"},{"line_number":50,"context_line":"        quotas \u003d {}"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAN3%2F%2F6ac%3D","line":47,"updated":"2013-03-06 19:11:36.000000000","message":"hope that this address your concern - took a while for the penny to drop.","commit_id":"bc8d6995289bacccd01fd39a4b5b057051dc3c32"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"class CfgQuotaDriver(object):"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    @staticmethod"},{"line_number":49,"context_line":"    def get_tenant_quotas(context, resources, tenant_id):"},{"line_number":50,"context_line":"        quotas \u003d {}"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAN3%2F%2F5cM%3D","line":47,"in_reply_to":"AAAAN3%2F%2F6ac%3D","updated":"2013-03-07 05:56:47.000000000","message":"Thanks Gary, Patch set 13 is exactly same as what I see.","commit_id":"bc8d6995289bacccd01fd39a4b5b057051dc3c32"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"af1cbc5aa5d896eec4663d99254ad41e727093f6","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    def _get_body(self, request):"},{"line_number":57,"context_line":"        body \u003d self._deserialize(request.body,"},{"line_number":58,"context_line":"                                 request.best_match_content_type())"},{"line_number":59,"context_line":"        if self._update_extended_attributes:"},{"line_number":60,"context_line":"            self._update_attributes()"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        attr_info \u003d EXTENDED_ATTRIBUTES_2_0[RESOURCE_COLLECTION]"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAN3%2F%2F5VI%3D","line":59,"updated":"2013-03-07 07:51:09.000000000","message":"I prefer move this line into _update_attributes. But My patch will delete _get_body. So let me do this when I rebase my patch.","commit_id":"603e3b78fe840fd486692c691d4032ce9472b499"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":56,"context_line":"    def _get_body(self, request):"},{"line_number":57,"context_line":"        body \u003d self._deserialize(request.body,"},{"line_number":58,"context_line":"                                 request.best_match_content_type())"},{"line_number":59,"context_line":"        if self._update_extended_attributes:"},{"line_number":60,"context_line":"            self._update_attributes()"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        attr_info \u003d EXTENDED_ATTRIBUTES_2_0[RESOURCE_COLLECTION]"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAN3%2F%2F5Uw%3D","line":59,"in_reply_to":"AAAAN3%2F%2F5VI%3D","updated":"2013-03-07 08:00:17.000000000","message":"ok. thanks!","commit_id":"603e3b78fe840fd486692c691d4032ce9472b499"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":56,"context_line":"    def _get_body(self, request):"},{"line_number":57,"context_line":"        body \u003d self._deserialize(request.body,"},{"line_number":58,"context_line":"                                 request.best_match_content_type())"},{"line_number":59,"context_line":"        if self._update_extended_attributes:"},{"line_number":60,"context_line":"            self._update_attributes()"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        attr_info \u003d EXTENDED_ATTRIBUTES_2_0[RESOURCE_COLLECTION]"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAN3%2F%2F5TI%3D","line":59,"in_reply_to":"AAAAN3%2F%2F5VI%3D","updated":"2013-03-07 08:51:21.000000000","message":"why move the if into function? it will reduce one function call.","commit_id":"603e3b78fe840fd486692c691d4032ce9472b499"}],"quantum/tests/unit/test_quota_per_tenant_ext.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":269,"context_line":"    def test_show_quotas_with_admin(self):"},{"line_number":270,"context_line":"        tenant_id \u003d \u0027tenant_id1\u0027"},{"line_number":271,"context_line":"        env \u003d {\u0027quantum.context\u0027: context.Context(\u0027\u0027, tenant_id + \u00272\u0027,"},{"line_number":272,"context_line":"                                                  is_admin\u003dTrue)}"},{"line_number":273,"context_line":"        res \u003d self.api.get(_get_path(\u0027quotas\u0027, id\u003dtenant_id, fmt\u003dself.fmt),"},{"line_number":274,"context_line":"                           extra_environ\u003denv)"},{"line_number":275,"context_line":"        self.assertEqual(200, res.status_int)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAN3%2F%2F83g%3D","line":272,"updated":"2013-03-05 14:46:49.000000000","message":"I think the default behaviour if run in an admin context if you pass no env to the methods in self.api","commit_id":"02802d29c08f60068a9b9ccd4f9e509a5b4b0a22"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":269,"context_line":"    def test_show_quotas_with_admin(self):"},{"line_number":270,"context_line":"        tenant_id \u003d \u0027tenant_id1\u0027"},{"line_number":271,"context_line":"        env \u003d {\u0027quantum.context\u0027: context.Context(\u0027\u0027, tenant_id + \u00272\u0027,"},{"line_number":272,"context_line":"                                                  is_admin\u003dTrue)}"},{"line_number":273,"context_line":"        res \u003d self.api.get(_get_path(\u0027quotas\u0027, id\u003dtenant_id, fmt\u003dself.fmt),"},{"line_number":274,"context_line":"                           extra_environ\u003denv)"},{"line_number":275,"context_line":"        self.assertEqual(200, res.status_int)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAN3%2F%2F8X8%3D","line":272,"in_reply_to":"AAAAN3%2F%2F83g%3D","updated":"2013-03-05 17:45:32.000000000","message":"this is to test that admin can view another tenant.\nnot sure i understand your comment.","commit_id":"02802d29c08f60068a9b9ccd4f9e509a5b4b0a22"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":285,"context_line":"    def test_update_quotas_forbiddeb(self):"},{"line_number":286,"context_line":"        tenant_id \u003d \u0027tenant_id1\u0027"},{"line_number":287,"context_line":"        env \u003d {\u0027quantum.context\u0027: context.Context(\u0027\u0027, tenant_id + \u00272\u0027,"},{"line_number":288,"context_line":"                                                  is_admin\u003dTrue)}"},{"line_number":289,"context_line":"        quotas \u003d {\u0027quota\u0027: {\u0027network\u0027: 100}}"},{"line_number":290,"context_line":"        res \u003d self.api.put(_get_path(\u0027quotas\u0027, id\u003dtenant_id, fmt\u003dself.fmt),"},{"line_number":291,"context_line":"                           self.serialize(quotas), extra_environ\u003denv,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAN3%2F%2F84U%3D","line":288,"updated":"2013-03-05 14:46:49.000000000","message":"setting env for this these and the one below is probably unnecessary","commit_id":"02802d29c08f60068a9b9ccd4f9e509a5b4b0a22"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":285,"context_line":"    def test_update_quotas_forbiddeb(self):"},{"line_number":286,"context_line":"        tenant_id \u003d \u0027tenant_id1\u0027"},{"line_number":287,"context_line":"        env \u003d {\u0027quantum.context\u0027: context.Context(\u0027\u0027, tenant_id + \u00272\u0027,"},{"line_number":288,"context_line":"                                                  is_admin\u003dTrue)}"},{"line_number":289,"context_line":"        quotas \u003d {\u0027quota\u0027: {\u0027network\u0027: 100}}"},{"line_number":290,"context_line":"        res \u003d self.api.put(_get_path(\u0027quotas\u0027, id\u003dtenant_id, fmt\u003dself.fmt),"},{"line_number":291,"context_line":"                           self.serialize(quotas), extra_environ\u003denv,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAN3%2F%2F8YQ%3D","line":288,"in_reply_to":"AAAAN3%2F%2F84U%3D","updated":"2013-03-05 17:45:32.000000000","message":"Done","commit_id":"02802d29c08f60068a9b9ccd4f9e509a5b4b0a22"}]}
