Quantum 数据库增加新表
来源:互联网 发布:怎么网络报警 编辑:程序博客网 时间:2024/05/22 05:23
本文地址:http://blog.csdn.net/spch2008/article/details/9011321
1. 创建代码ovs_qos_db.py
'''Created on 2013-6-3@author: spch2008'''from sqlalchemy import Column, Integer, Stringfrom sqlalchemy.orm import excfrom quantum.db.models_v2 import model_baseclass QoSPortBinding(model_base.BASEV2): __tablename__ = 'ovs_qos_port_binding' port_id = Column(String(20), primary_key=True) qos_id = Column(String(20), primary_key=True) def __init__(self, port_id, qos_id): self.port_id = port_id self.qos_id = qos_id def __repr__(self): return "<QoSPortBinding(%s, %s, %s)>" % (self.port_id, self.qos_id)
将代码置于/usr/share/pyshared/quantum/plugins/openvswitch# 中
2. 引入该模块
在/usr/share/pyshared/quantum/plugins/openvswitch#下的ovs_db_v2.py中,导入上述模块
from quantum.plugins.openvswitch import ovs_qos_db
3. 创建软连接
/usr/lib/python2.7/dist-packages/quantum/plugins/openvswitch# ln -s ../../../../../../share/pyshared/quantum/plugins/openvswitch/ovs_qos_db.py ovs_qos_db.py
4. 重启quantum-server
service quantum-server restart
- Quantum 数据库增加新表
- Quantum
- MFC数据库操作 - 增加新记录
- django models 增加字段(或新表)后如何同步到数据库
- Oracle数据库增加表空间
- [Oracle]增加数据库表空间
- 数据库表的增加数据
- 增加两个数据库权限(查看定义,执行)到一个新的数据库角色
- ubuntu增加新分区
- linux 增加新硬盘
- android 增加新按键
- 增加datanode新节点
- 增加新模块错误
- android 增加新按键
- 红黑树增加新节点
- xenserver增加新硬盘
- vs2010增加新菜单
- C# DataGridView连接数据库,通过textBox更新数据库(解决绑定数据库后无法增加新行)
- 第14周C++上机报告(定义抽象基类Shape)
- js实现页面跳转的几种方式
- JavaScript事件传播(冒泡机制)
- HTML Head Meta
- http协议详解
- Quantum 数据库增加新表
- receivemail.example.php
- xdebug php 调试
- OpenCV中cvResize函数图象放缩
- source insight快捷键及使用技巧
- Convert Sorted List to Binary Search Tree
- Win7摄像头在哪
- c#多线程创建
- onBlur事件与onfocus事件(js)