Quota Management and Enforcement
Neutron API中大多的resource都需要quota limits。
Neutron API暴露出一个extension 来管理quota,Quota limits are enforced at the API layer,
Plugin and ML2 drivers唯一例外是subnet_allocation[1] extension。
不支持per user and 多租户嵌套。
High Level View
主要组件:
- The Quota API extension;
- The Quota Engine.
quota driver:
- neutron.db.quota.driver.DbQuotaDriver
- neutron.quota.ConfDriver
The latter driver is however deprecated.
Quota Management
和其他Neutron extensions不同,它 有自己的own controller class [3].
其中_update_attributes只被调用一次,它会动态的更新Neutron’s resource attribute map [4]
driver operations包括:
- delete_tenant_quota, which simply removes all entries from the ‘quotas’ table for a given tenant identifier;
- update_quota_limit, which adds or updates an entry in the ‘quotas’ tenant for a given tenant identifier and a given resource name;
- _get_quotas, which fetches limits for a set of resource and a given tenant identifier
- _get_all_quotas, which behaves like _get_quotas, but for all tenants.
Resource Usage Info
- CountableResource
- TrackedResource
Quota Enforcement
- 通过count方法得到当前资源的usages.
- 通过 _get_tenant_quotas 得到租户的quota.
- usages减去expired reservations .
- 计算可用资源,与请求资源对比.
Setting up Resource Tracking for a Plugin
@resource_registry.tracked_resources(network=models_v2.Network,
port=models_v2.Port, subnet=models_v2.Subnet, subnetpool=models_v2.SubnetPool)
| [1] | Subnet allocation extension:http://git.openstack.org/cgit/openstack/neutron/tree/neutron/extensions/subnetallocation.py |
| [2] | DB Quota driver class:http://git.openstack.org/cgit/openstack/neutron/tree/neutron/db/quota_db.py#n33 |
| [3] | Quota API extension controller:http://git.openstack.org/cgit/openstack/neutron/tree/neutron/extensions/quotasv2.py#n40 |
| [4] | Neutron resource attribute map:http://git.openstack.org/cgit/openstack/neutron/tree/neutron/api/v2/attributes.py#n639 |
| [5] | Base controller class:http://git.openstack.org/cgit/openstack/neutron/tree/neutron/api/v2/base.py#n50 |
| [6] | http://lists.openstack.org/pipermail/openstack-dev/2015-February/057534.html |
Quota Management and Enforcement的更多相关文章
- neutron 的 quota design
发现, cinder, nova 制实现了, CountableResource. 只有nuetron实现了 TrackedResource 和 CountableResource. I read u ...
- Taking A Fresh Look At What Open Source API Management Architecture Is Available
http://apievangelist.com/2014/10/05/taking-a-fresh-look-at-what-open-source-api-management-architect ...
- [转] Quality Of Service In OpenStack
http://tropicaldevel.wordpress.com/2013/07/15/quality-of-service-in-openstack/ In this post I will b ...
- mmcrfs
mmcrfs command Creates a GPFS™ file system. Synopsis mmcrfs Device {"DiskDesc[;DiskDesc...]&quo ...
- 什么是Istio
本文主要是对Istio Prelim 1.0(https://preliminary.istio.io/docs/)的翻译 Istio:一种开放式平台,用于连接,管理和保护微服务. Istio提供了一 ...
- windows7命令帮助大全
有关某个命令的详细信息,请键入 HELP 命令名ASSOC 显示或修改文件扩展名关联.ATTRIB 显示或更改文件属性.BREAK 设置或清除扩展式 CTRL+C 检查.BCDEDIT 设置启动数据库 ...
- HBase 数据模型(Data Model)
HBase Data Model--HBase 数据模型(翻译) 在HBase中,数据是存储在有行有列的表格中.这是与关系型数据库重复的术语,并不是有用的类比.相反,HBase可以被认为是一个多维度的 ...
- Linux下Mongodb安装和启动配置
1.下载安装包 wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.8.2.tgz 下载完成后解压缩压缩包 tar zxf mongod ...
- Hadoop 之Mong DB 之CentOS 6 使用 yum 安装MongoDB及服务器端配置
安装MongoDB的方法有很多种,可以源代码安装,在Centos也可以用yum源安装的方法.由于MongoDB更新得比较快,我比较喜欢用yum源安装的方法.64位Centos下的安装步骤如下: 1.准 ...
随机推荐
- Junit 内部解密之一: Test + TestCase + TestSuite
转自:http://blog.sina.com.cn/s/blog_6cf812be0100wbhq.html nterface: Test 整个测试的的基础接口 Method 1: abstract ...
- web开发中比较常用的html标签
作为一名web开发人员,总结了一下经常用到的html标签,如下:<html> <head> <!--meta头标签 表示页面三秒后跳转到新浪页面--> <me ...
- HUAWEI HiAI亮相Droidcon柏林2018开发者峰会 开启HiAI海外生态
柏林时间6月25日到27日,华为HiAI亮相Droidcon柏林2018开发者峰会,有1200多位海外开发者参加了此次峰会,来自HUAWEI HiAI领域的多名专家携手Prisma和金山WPS,以“E ...
- [效果不错] nginx 高并发参数配置及linux内核参数优化,完整的内核优化设置。PHP-FPM高负载解决办法。
背景:对vps小资源的实践中对,https://justwinit.cn/post/7536/ 的再优化,再实践,再优化,特别是Nginx,PHP,内核: 零)Nginx: error_log /da ...
- ios 即时通讯 xmpp
[iPhone高级] 基于XMPP的IOS聊天客户端程序(XMPP服务器架构) http://blog.csdn.NET/kangx6/article/details/7739828 [iPhone高 ...
- Mysql的学习研究
2017年5月16日11:26:17 从今天开始过一遍数据库的基础教程,加油!!!!! 看了之后对一些基础知识有了理解,加油... 笔记: 2017年5月16日11:35:46mysql的基础教程1. ...
- urllib库利用cookie实现模拟登录慕课网
思路 1.首先在网页中使用账户和密码名登录慕课网 2.其次再分析请求头,如下图所示,获取到请求URL,并提取出cookie信息,保存到本地 3.最后在代码中构造请求头,使用urllib.request ...
- C语言合并两个集合(L,L1) 将L1中不在L中的元素插入到L线性表中
void main(){ Sqlist L,L1; InitList(&L); InitList(&L1); ListInsert(&L, 1, 2); ListInsert( ...
- 安装PyTorch 0.4.0
https://blog.csdn.net/sunqiande88/article/details/80085569 https://blog.csdn.net/xiangxianghehe/arti ...
- Python 基本数据类型和序列类型
python 3.6.4 中,有9种数据类型: int, float, bool, complex, list, tuple, string, set, dict (1).int 整型,不可变 (2) ...