NSXv3: Add test coverage for build_v3_tags_payload
Change-Id: I3ff0cb9371943436155f381a26c8b8d6a81aa129
This commit is contained in:
parent
80d78b4b17
commit
1d8d3f2d48
@ -31,6 +31,7 @@ import neutron.tests.unit.extensions.test_extraroute as test_ext_route
|
|||||||
import neutron.tests.unit.extensions.test_l3 as test_l3_plugin
|
import neutron.tests.unit.extensions.test_l3 as test_l3_plugin
|
||||||
import neutron.tests.unit.extensions.test_l3_ext_gw_mode as test_ext_gw_mode
|
import neutron.tests.unit.extensions.test_l3_ext_gw_mode as test_ext_gw_mode
|
||||||
import neutron.tests.unit.extensions.test_securitygroup as ext_sg
|
import neutron.tests.unit.extensions.test_securitygroup as ext_sg
|
||||||
|
from neutron import version
|
||||||
from vmware_nsx.neutron.plugins.vmware.common import utils
|
from vmware_nsx.neutron.plugins.vmware.common import utils
|
||||||
from vmware_nsx.neutron.plugins.vmware.nsxlib import v3 as nsxlib
|
from vmware_nsx.neutron.plugins.vmware.nsxlib import v3 as nsxlib
|
||||||
from vmware_nsx.neutron.plugins.vmware.nsxlib.v3 import dfw_api as firewall
|
from vmware_nsx.neutron.plugins.vmware.nsxlib.v3 import dfw_api as firewall
|
||||||
@ -246,3 +247,16 @@ class TestL3NatTestCase(L3NatTest,
|
|||||||
class ExtGwModeTestCase(L3NatTest,
|
class ExtGwModeTestCase(L3NatTest,
|
||||||
test_ext_gw_mode.ExtGwModeIntTestCase):
|
test_ext_gw_mode.ExtGwModeIntTestCase):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class TestNsxV3Utils(NsxPluginV3TestCase):
|
||||||
|
|
||||||
|
def test_build_v3_tags_payload(self):
|
||||||
|
result = utils.build_v3_tags_payload(
|
||||||
|
{'id': 'fake_id',
|
||||||
|
'tenant_id': 'fake_tenant_id'})
|
||||||
|
expected = [{'scope': 'neutron-id', 'tag': 'fake_id'},
|
||||||
|
{'scope': 'os-tid', 'tag': 'fake_tenant_id'},
|
||||||
|
{'scope': 'os-api-version',
|
||||||
|
'tag': version.version_info.release_string()}]
|
||||||
|
self.assertEqual(expected, result)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user