From d552e8c409a0923774e6e5ed25e397ed245fe0d2 Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Sun, 6 Nov 2016 01:17:03 -0800 Subject: [PATCH] Use L3 constant from neutron lib This replaces the neutron constant L3_ROUTER_NAT This is relevant from neutron-lib 1.0.0 Change-Id: I29ae40a18e4eda82079753b78334e834b183973c --- vmware_nsx/plugins/nsx_v/plugin.py | 2 +- vmware_nsx/tests/unit/nsx_v/test_plugin.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vmware_nsx/plugins/nsx_v/plugin.py b/vmware_nsx/plugins/nsx_v/plugin.py index ed0f54a783..2153f85bad 100644 --- a/vmware_nsx/plugins/nsx_v/plugin.py +++ b/vmware_nsx/plugins/nsx_v/plugin.py @@ -2241,7 +2241,7 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin, fl_db = flavors_plugin.FlavorsPlugin.get_flavor( flv_plugin, context, flavor_id) - if fl_db['service_type'] != plugin_const.L3_ROUTER_NAT: + if fl_db['service_type'] != constants.L3: raise flavors.InvalidFlavorServiceType( service_type=fl_db['service_type']) diff --git a/vmware_nsx/tests/unit/nsx_v/test_plugin.py b/vmware_nsx/tests/unit/nsx_v/test_plugin.py index 698b4c2e63..46f0822c7d 100644 --- a/vmware_nsx/tests/unit/nsx_v/test_plugin.py +++ b/vmware_nsx/tests/unit/nsx_v/test_plugin.py @@ -4813,7 +4813,7 @@ class TestRouterFlavorTestCase(extension.ExtensionTestCase, if create_az is not None: router_data['availability_zone_hints'] = [create_az] - flavor_data = {'service_type': plugin_const.L3_ROUTER_NAT, + flavor_data = {'service_type': constants.L3, 'enabled': True, 'service_profiles': ['profile_id']} @@ -4910,7 +4910,7 @@ class TestRouterFlavorTestCase(extension.ExtensionTestCase, if create_az is not None: router_data['availability_zone_hints'] = [create_az] - flavor_data = {'service_type': plugin_const.L3_ROUTER_NAT, + flavor_data = {'service_type': constants.L3, 'enabled': True, 'service_profiles': ['profile_id']}