Merge "Use DB field sizes instead of _MAX_LEN constants"
diff --git a/neutron/tests/tempest/api/test_metering_extensions.py b/neutron/tests/tempest/api/test_metering_extensions.py
index 7b03386..9bbcdce 100644
--- a/neutron/tests/tempest/api/test_metering_extensions.py
+++ b/neutron/tests/tempest/api/test_metering_extensions.py
@@ -12,13 +12,13 @@
# License for the specific language governing permissions and limitations
# under the License.
+from neutron_lib.db import constants as db_const
from tempest.lib.common.utils import data_utils
from tempest import test
-from neutron.api.v2 import attributes as attr
from neutron.tests.tempest.api import base
-LONG_NAME_OK = 'x' * (attr.NAME_MAX_LEN)
+LONG_NAME_OK = 'x' * db_const.NAME_FIELD_SIZE
class MeteringTestJSON(base.BaseAdminNetworkTest):
diff --git a/neutron/tests/tempest/api/test_metering_negative.py b/neutron/tests/tempest/api/test_metering_negative.py
index 39fdae8..dece9e4 100644
--- a/neutron/tests/tempest/api/test_metering_negative.py
+++ b/neutron/tests/tempest/api/test_metering_negative.py
@@ -12,13 +12,13 @@
# License for the specific language governing permissions and limitations
# under the License.
+from neutron_lib.db import constants as db_const
from tempest.lib import exceptions as lib_exc
from tempest import test
-from neutron.api.v2 import attributes as attr
from neutron.tests.tempest.api import base
-LONG_NAME_NG = 'x' * (attr.NAME_MAX_LEN + 1)
+LONG_NAME_NG = 'x' * (db_const.NAME_FIELD_SIZE + 1)
class MeteringNegativeTestJSON(base.BaseAdminNetworkTest):
diff --git a/neutron/tests/tempest/api/test_qos_negative.py b/neutron/tests/tempest/api/test_qos_negative.py
index bc3222a..5057c72 100644
--- a/neutron/tests/tempest/api/test_qos_negative.py
+++ b/neutron/tests/tempest/api/test_qos_negative.py
@@ -10,15 +10,15 @@
# License for the specific language governing permissions and limitations
# under the License.
+from neutron_lib.db import constants as db_const
from tempest.lib import exceptions as lib_exc
from tempest import test
-from neutron.api.v2 import attributes as attr
from neutron.tests.tempest.api import base
-LONG_NAME_NG = 'z' * (attr.NAME_MAX_LEN + 1)
-LONG_DESCRIPTION_NG = 'z' * (attr.LONG_DESCRIPTION_MAX_LEN + 1)
-LONG_TENANT_ID_NG = 'z' * (attr.TENANT_ID_MAX_LEN + 1)
+LONG_NAME_NG = 'z' * (db_const.NAME_FIELD_SIZE + 1)
+LONG_DESCRIPTION_NG = 'z' * (db_const.LONG_DESCRIPTION_FIELD_SIZE + 1)
+LONG_TENANT_ID_NG = 'z' * (db_const.PROJECT_ID_FIELD_SIZE + 1)
class QosNegativeTestJSON(base.BaseAdminNetworkTest):