summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-01-14 11:53:02 +0000
committerGerrit Code Review <review@openstack.org>2013-01-14 11:53:02 +0000
commit86c1ace54fee26297b2a2a276cd84e79a11dea63 (patch)
treeb90d98f0c6e1b462d83d36ed512599f38c58216b
parentfec8e361720fe5dee37dc9356918854e9881891c (diff)
parent67cd497f6a140b1295cd34f138a3d797680a9ef1 (diff)
downloadnova-86c1ace54fee26297b2a2a276cd84e79a11dea63.tar.gz
nova-86c1ace54fee26297b2a2a276cd84e79a11dea63.tar.xz
nova-86c1ace54fee26297b2a2a276cd84e79a11dea63.zip
Merge "Add some constants to the network model for drivers to use"
-rw-r--r--nova/network/model.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/nova/network/model.py b/nova/network/model.py
index dcee68f8c..f0a5d9d89 100644
--- a/nova/network/model.py
+++ b/nova/network/model.py
@@ -25,6 +25,17 @@ def ensure_string_keys(d):
# http://bugs.python.org/issue4978
return dict([(str(k), v) for k, v in d.iteritems()])
+# Constants for the 'vif_type' field in VIF class
+VIF_TYPE_OVS = 'ovs'
+VIF_TYPE_BRIDGE = 'bridge'
+VIF_TYPE_802_QBG = '802.1qbg'
+VIF_TYPE_802_QBH = '802.1qbh'
+VIF_TYPE_OTHER = 'other'
+
+# Constant for max length of 'bridge' in Network class
+# Chosen to match max Linux NIC name length
+BRIDGE_NAME_LEN = 14
+
class Model(dict):
"""Defines some necessary structures for most of the network models."""