f191f32a72
This patch adds the following classes for API parameter validation: IntegerType * Value range validation (minimum, maximum) StringType * String length validation (min_length, max_length) * Allowed string (pattern): e.g. should contain [a-zA-Z0-9_.- ] only. IPv4AddressType * String format validation for IPv4 IPv6AddressType * String format validation for IPv6 UuidType * String format validation for UUID Partially implements blueprint nova-api-validation-fw Closes-Bug: 1245795 Change-Id: I5aead6c51b74464681e4ac41fa2a9c66c09adab2
28 lines
536 B
Python
28 lines
536 B
Python
from setuptools import setup
|
|
import sys
|
|
|
|
if sys.version_info[:2] <= (2, 5):
|
|
webob_version = ' <= 1.1.1'
|
|
elif sys.version_info[:2] >= (3, 0):
|
|
webob_version = ' >= 1.2.2'
|
|
else:
|
|
webob_version = ''
|
|
|
|
install_requires = [
|
|
'six',
|
|
'simplegeneric',
|
|
'WebOb' + webob_version
|
|
]
|
|
|
|
if sys.version_info[:2] <= (2, 6):
|
|
install_requires += ('ordereddict',)
|
|
|
|
if sys.version_info[:2] < (3, 3):
|
|
install_requires += ('ipaddr',)
|
|
|
|
setup(
|
|
setup_requires=['pbr>=0.5.21'],
|
|
install_requires=install_requires,
|
|
pbr=True
|
|
)
|