[openstack-dev] [Neutron] validation of input against column-size specified in schema
Manish Godara
manishg at yahoo-inc.com
Wed Jun 25 04:26:28 UTC 2014
Hi,
Is there any way in current neutron codebase that can be used to validate
the length of a string attribute against the max column size specified in
the schema for that attribute.
E.g. , in models_v2.py
class Network(model_base.BASEV2, HasId, HasTenant):
"""Represents a v2 neutron network."""
name = sa.Column(sa.String(255))
...
And if I want to validate the 'name' before storing in db, then how can I
get the max allowable length given this definition? I don't see any such
validations being done in neutron for fields, so wondering how to do it.
Maybe it's there and I missed it.
Regards,
manish
More information about the OpenStack-dev
mailing list