This update is to drop six and all Python 2 support.
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
Change-Id: Ieda51e621ee0477893fd3a0a06e696620c0a8f95
TOSCA attributes can be explicit as part of the type definition
or can be used as implicit via property name. Handle missing
implicit attribute validation with get_attribute function.
Change-Id: I639d819dd55ee828600e6d78a59ab92c3c6e14c3
Closes-Bug: #1622573
Some of tests use different method of assertTrue(isinstance(A, B))
or assertEqual(type(A), B). The correct way is to use assertIsInstance(A, B)
provided by testtools
Change-Id: Id6f69e42bb933d37fab0ad0380fe238f81910070
Add validation for all parameters and modification related test cases:
1. Add property of required in Input class;
2. For all required inputs which have not default value, must
provide parameters when instantiated a template;
3. For all required inputs which have default value, may not provide
parameters when instantiated a template;
4. For all not required inputs, must process the logical of no
parameters in template design(may provide default value, const value, or
process case for none input).
bp: https://blueprints.launchpad.net/tosca-parser/+spec/tosca-input-validation
Change-Id: I5a4a4343f978f387f1b47d36b2210fbcfe7f1b28
Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
Add full suport to the optional requirement or capability name and the nested attribute name or index.
Also parent_type methond in capabilitytype has been modified to return a CapabilityTypeDef object instead of a string to be similar to other parent_type methods in StatefulEntityType objects.
Change-Id: I1bc9a95739c2e569f3ac1c0c8577db813060c17f
Related-Bug: 1539539
Create concat function to validat the concat function specified in the
template.
Change-Id: I25385f6c7555755b5a0cc6913b9fcedaf2559492
Partially-Implements: tosca-intrinsic-functions
Also solves a problem in the EntityType.get_value function that can modify the item definitions
Change-Id: Id65e6fef1d4f4ea96218541427df483609dca44d
Related-Bug: 1544873
Update error messages so they follow the same format.
Also, add i18n where it is missing, fix typo and grammatical
errors in messages, and fix vague messages so they are more
clear.
Change-Id: I06d29b4d8448f8c08fa199a316942f373b968d22
Closes-Bug: #1517271
Modify the exception handling in TOSCA Parser so that all possible
validation errors are captured during parsing (instead of stopping
the parsing when the first error is encountered) and reported when
parsing is done.
Reporting the line number of each error will be implemented in a
separate patch.
Change-Id: I032c371fe0a73cdf901599ed4ae113f9157d8a1b
Partially-Implements: blueprint tosca-tpl-cli-validator
Fix the issue with interface inputs described using intrinsic
functions, that produces an invalid HOT output. Also, include
necessary unit tests, and revert templates that were simplified
due to this issue..
This patch includes changes required in tosca-parser for
resolving the issue.
Change-Id: Iefde09d4633a1cadfe2c6b9ac28c58d2da79a37d
Partial-Bug: #1440247