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.准 ...
随机推荐
- webpack 功能大全 【环境配置】
1. webpack简介 webpack 是一个模块打包工具.它使得模块相互依赖并且可构建等价于这些模块的静态资源.相比于已经存在的模块打包器(module bundler),webpack的开发动机 ...
- PriorityBlockingQueue优先队列的二叉堆实现
转载请注明原创地址http://www.cnblogs.com/dongxiao-yang/p/6293807.html java.util.concurrent.PriorityBlockingQu ...
- pip或者anacnda安装opencv以及opencv-contrib
一条命令就可以搞定: pip install opencv-contrib-python opencv-python 或者: pip install opencv-contrib-python== ...
- freemarker 开始时间与当前时间进行比较
<#if startTime?datetime lt .now?datetime>:年月日时分秒比较 <#if startTime?date lt .now?date>:年月日 ...
- UVA 10209
10209 - Is This Integration ? #include <stdio.h> #include <math.h> /* */ //多次错误都是因为我将PI定 ...
- ubuntu 16.04查询文件安装目录
dpkg -L filename dpkg -l | grep filename whereis filename find / -name filename
- GitHub 寻宝指南
GitHub 寻宝指南 寻找 Demo 技术栈的关键字搜索,并按更新时间进行排序 生命有限 ,如若是每次我们尝试一个新的技术,总得自己编写一个个 Demo.编写多个 Demo,都得花去个半天八小时的时 ...
- PHP-Socket-阻塞与非阻塞,同步与异步概念的理解
1. 概念理解 在进行网络编程时,我们常常见到同步(Sync)/异步(Async),阻塞(Block)/非阻塞(Unblock)四种调用方式:同步: 所谓同步,就是在发出一个功能调用时,在没 ...
- JVM调优- 学习笔记(转)
http://blog.csdn.net/fenglibing/article/details/6321453 GC学习笔记 这是我公司同事的GC学习笔记,写得蛮详细的,由浅入深,循序渐进,让人一看就 ...
- keil中使用Astyle格式化你的代码的方法2篇合
关于Astyle Astyle 的全称是Artistic Style的简称,是一个开源的源代码格式化工具,可以对C,C++,C#以及Java等编程语言的源代码进行缩进.格式化.美化.Home Page ...