Merge "Define VIF_TYPE_DVS in vmware-nsx repo"

This commit is contained in:
Jenkins 2015-08-27 01:33:01 +00:00 committed by Gerrit Code Review
commit 4913fab018
4 changed files with 9 additions and 3 deletions

View File

@ -38,3 +38,6 @@ ROUTER_TYPE_TIER0 = "TIER0"
ROUTER_TYPE_TIER1 = "TIER1"
ROUTER_TYPES = [ROUTER_TYPE_TIER0, ROUTER_TYPE_TIER1]
# L2 agent vif type
VIF_TYPE_DVS = 'dvs'

View File

@ -42,6 +42,7 @@ from neutron.plugins.common import utils
from vmware_nsx.neutron.plugins import vmware
from vmware_nsx.neutron.plugins.vmware.common import config # noqa
from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc
from vmware_nsx.neutron.plugins.vmware.common import nsx_constants
from vmware_nsx.neutron.plugins.vmware.common import utils as c_utils
from vmware_nsx.neutron.plugins.vmware.dbexts import db as nsx_db
from vmware_nsx.neutron.plugins.vmware import dhcpmeta_modes
@ -84,7 +85,7 @@ class NsxDvsV2(addr_pair_db.AllowedAddressPairsMixin,
# Common driver code
self.base_binding_dict = {
pbin.VIF_TYPE: pbin.VIF_TYPE_DVS,
pbin.VIF_TYPE: nsx_constants.VIF_TYPE_DVS,
pbin.VIF_DETAILS: {
# TODO(rkukura): Replace with new VIF security details
pbin.CAP_PORT_FILTER:

View File

@ -54,6 +54,7 @@ from vmware_nsx.neutron.plugins import vmware
from vmware_nsx.neutron.plugins.vmware.common import config # noqa
from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc
from vmware_nsx.neutron.plugins.vmware.common import locking
from vmware_nsx.neutron.plugins.vmware.common import nsx_constants
from vmware_nsx.neutron.plugins.vmware.common import utils as c_utils
from vmware_nsx.neutron.plugins.vmware.dbexts import (
routertype as rt_rtr)
@ -117,7 +118,7 @@ class NsxVPluginV2(agents_db.AgentDbMixin,
self.base_binding_dict = {
pbin.VNIC_TYPE: pbin.VNIC_NORMAL,
pbin.VIF_TYPE: pbin.VIF_TYPE_DVS,
pbin.VIF_TYPE: nsx_constants.VIF_TYPE_DVS,
pbin.VIF_DETAILS: {
# TODO(rkukura): Replace with new VIF security details
pbin.CAP_PORT_FILTER:

View File

@ -45,6 +45,7 @@ from oslo_utils import uuidutils
import six
import webob.exc
from vmware_nsx.neutron.plugins.vmware.common import nsx_constants
from vmware_nsx.neutron.plugins.vmware.dbexts import nsxv_db
from vmware_nsx.neutron.plugins.vmware.extensions import (
routertype as router_type)
@ -317,7 +318,7 @@ class TestPortsV2(NsxVPluginV2TestCase,
test_bindings.PortBindingsHostTestCaseMixin,
test_bindings.PortBindingsVnicTestCaseMixin):
VIF_TYPE = portbindings.VIF_TYPE_DVS
VIF_TYPE = nsx_constants.VIF_TYPE_DVS
HAS_PORT_FILTER = True
def test_create_port_json(self):