vmware-nsx/quantum/plugins/cisco/db/ucs_models_v2.py
Ivan Kolodyazhny f7ae63c6f5 Remove unsused imports in the plugins package
Config imports are needed for correct init
quota_db is required to make sure quota database model at the proper timing

Change-Id: I885ed1f673cfc4c6331818ad68e2a505f7d69188
2013-01-13 14:16:43 +02:00

52 lines
1.9 KiB
Python

# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012, Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# @author: Rohit Agarwalla, Cisco Systems, Inc.
from sqlalchemy import Column, Integer, String
from quantum.db.model_base import BASEV2 as BASE
from quantum.plugins.cisco.db.network_models_v2 import L2NetworkBase
class PortBinding(BASE, L2NetworkBase):
"""Represents Port binding to device interface"""
__tablename__ = 'port_bindings'
id = Column(Integer, primary_key=True, autoincrement=True)
port_id = Column(String(255), nullable=False)
blade_intf_dn = Column(String(255), nullable=False)
portprofile_name = Column(String(255))
vlan_name = Column(String(255))
vlan_id = Column(Integer)
qos = Column(String(255))
tenant_id = Column(String(255))
instance_id = Column(String(255))
vif_id = Column(String(255))
def __init__(self, port_id, blade_intf_dn, portprofile_name,
vlan_name, vlan_id, qos):
self.port_id = port_id
self.blade_intf_dn = blade_intf_dn
self.portprofile_name = portprofile_name
self.vlan_name = vlan_name
self.vlan_id = vlan_id
self.qos = qos
def __repr__(self):
return "<PortProfile Binding(%s,%s,%s,%s,%s,%s)>" % (
self.port_id, self.blade_intf_dn, self.portprofile_name,
self.vlan_name, self.vlan_id, self.qos)