diff options
author | shangxdy <shang.xiaodong@zte.com.cn> | 2016-07-08 15:15:00 +0800 |
---|---|---|
committer | shangxdy <shang.xiaodong@zte.com.cn> | 2016-07-10 00:38:59 +0800 |
commit | 0997552722dc4845a854e0e6f8d7f18058e26380 (patch) | |
tree | b90d1e808bb326612211ba56b3b941516493398d /tosca2heat/tosca-parser/toscaparser/elements/constraints.py | |
parent | 7fe3011a67a239f7dc04153c54eaff78ef967eaf (diff) |
Synchronise the openstack bugs
When run unittests through tox, some test cases are always error,
the errors are already done in openstack community, so it's
necessary to synchronise the fixes.
Change-Id: Ib29078e6cc138a474e89c6a2cc90ad7a1db1bb46
JIRA: PARSER-63
Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
Diffstat (limited to 'tosca2heat/tosca-parser/toscaparser/elements/constraints.py')
-rw-r--r-- | tosca2heat/tosca-parser/toscaparser/elements/constraints.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/elements/constraints.py b/tosca2heat/tosca-parser/toscaparser/elements/constraints.py index 9883da3..8594b85 100644 --- a/tosca2heat/tosca-parser/toscaparser/elements/constraints.py +++ b/tosca2heat/tosca-parser/toscaparser/elements/constraints.py @@ -18,6 +18,7 @@ import toscaparser from toscaparser.common.exception import ExceptionCollector from toscaparser.common.exception import InvalidSchemaError from toscaparser.common.exception import ValidationError +from toscaparser.elements.portspectype import PortSpec from toscaparser.elements import scalarunit from toscaparser.utils.gettextutils import _ @@ -36,12 +37,12 @@ class Schema(collections.Mapping): INTEGER, STRING, BOOLEAN, FLOAT, RANGE, NUMBER, TIMESTAMP, LIST, MAP, SCALAR_UNIT_SIZE, SCALAR_UNIT_FREQUENCY, SCALAR_UNIT_TIME, - PORTDEF, VERSION + VERSION, PORTDEF, PORTSPEC ) = ( 'integer', 'string', 'boolean', 'float', 'range', 'number', 'timestamp', 'list', 'map', 'scalar-unit.size', 'scalar-unit.frequency', 'scalar-unit.time', - 'PortDef', 'version' + 'version', 'PortDef', PortSpec.SHORTNAME ) SCALAR_UNIT_SIZE_DEFAULT = 'B' @@ -127,8 +128,6 @@ class Constraint(object): 'less_or_equal', 'in_range', 'valid_values', 'length', 'min_length', 'max_length', 'pattern') - UNBOUNDED = 'UNBOUNDED' - def __new__(cls, property_name, property_type, constraint): if cls is not Constraint: return super(Constraint, cls).__new__(cls) @@ -370,6 +369,7 @@ class InRange(Constraint): Constrains a property or parameter to a value in range of (inclusive) the two values declared. """ + UNBOUNDED = 'UNBOUNDED' constraint_key = Constraint.IN_RANGE |