Re: simple validation error

2017-11-27 Thread DeWayne Filppi
thx

On Nov 27, 2017 3:43 PM, "Tal Liron"  wrote:

It is a bug. I created this issue:
https://issues.apache.org/jira/browse/ARIA-411

For now, the workaround is to add a "primary" key under "implementation".

Also note that you must supply the "type" field for the interface
definition. So:

  T1:
derived_from: tosca.nodes.Root
interfaces:
  Standard:
type: tosca.interfaces.node.lifecycle.Standard
create:
  implementation:
primary: i1.sh

On Mon, Nov 27, 2017 at 5:28 PM, DeWayne Filppi  wrote:

> This should validate, no?
>
> tosca_definitions_version: tosca_simple_yaml_1_0
>
> imports:
>
>   - aria-1.0
>
>
> node_types:
>
>   T1:
> derived_from: tosca.nodes.Root
> interfaces:
>   Standard:
> create:
>   implementation: i1.sh
>
>   T2:
> derived_from: T1
> interfaces:
>   Standard:
> create:
>   implementation: i1.sh
>
>
> The content of 'i1.sh' doesn't matter.  The error is (Aria 0.1.1):
>
> AttributeError: 'LocatableString' object has no attribute 'iteritems'
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria/
> parser/consumption/consumer.py",
> line 70, in consume
> consumer.consume()
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria/
> parser/consumption/validation.py",
> line 30, in consume
> self.context.presentation.presenter._validate(self.context)
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria_
> extension_tosca/simple_v1_0/presenter.py",
> line 65, in _validate
> self.service_template._validate(context)
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria/parser/presentation/
> presentation.py",
> line 193, in _validate
> validate_known_fields(context, self)
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria/
> parser/presentation/utils.py",
> line 110, in validate_known_fields
> field.validate(presentation, context)
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria/
> parser/presentation/fields.py",
> line 409, in validate
> self.default_validate(presentation, context)
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria/
> parser/presentation/fields.py",
> line 524, in default_validate
> self.validate_value(value, context)
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria/
> parser/presentation/fields.py",
> line 540, in validate_value
> inner_value._validate(context)
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria_
> extension_tosca/simple_v1_0/types.py",
> line 655, in _validate
> self._get_interfaces(context)
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria/utils/caching.py",
> line 84, in __call__
> return_value = self.func(*args, **kwargs)
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria_
> extension_tosca/simple_v1_0/types.py",
> line 643, in _get_interfaces
> return FrozenDict(get_inherited_interface_definitions(context, self,
> 'node type'))
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria_
> extension_tosca/simple_v1_0/modeling/interfaces.py",
> line 127, in get_inherited_interface_definitions
> for_presentation=for_presentation)
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria_
> extension_tosca/simple_v1_0/modeling/interfaces.py",
> line 435, in merge_interface_definitions
> 'definition')
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria_
> extension_tosca/simple_v1_0/modeling/interfaces.py",
> line 425, in merge_interface_definition
> presentation, type_name)
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria_
> extension_tosca/simple_v1_0/modeling/interfaces.py",
> line 392, in merge_raw_operation_definitions
> presentation, type_name)
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria_
> extension_tosca/simple_v1_0/modeling/interfaces.py",
> line 364, in merge_raw_operation_definition
> deepcopy_with_locators(our_operation._raw['implementation']))
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria/
> utils/collections.py",
> line 232, in merge
> for key, value_b in dict_b.iteritems():
> Validation issues:
>   0: 'LocatableString' object has no attribute 'iteritems'
>  AttributeError: 'LocatableString' object has no attribute 'iteritems'
>


Re: simple validation error

2017-11-27 Thread Tal Liron
It is a bug. I created this issue:
https://issues.apache.org/jira/browse/ARIA-411

For now, the workaround is to add a "primary" key under "implementation".

Also note that you must supply the "type" field for the interface
definition. So:

  T1:
derived_from: tosca.nodes.Root
interfaces:
  Standard:
type: tosca.interfaces.node.lifecycle.Standard
create:
  implementation:
primary: i1.sh

On Mon, Nov 27, 2017 at 5:28 PM, DeWayne Filppi  wrote:

> This should validate, no?
>
> tosca_definitions_version: tosca_simple_yaml_1_0
>
> imports:
>
>   - aria-1.0
>
>
> node_types:
>
>   T1:
> derived_from: tosca.nodes.Root
> interfaces:
>   Standard:
> create:
>   implementation: i1.sh
>
>   T2:
> derived_from: T1
> interfaces:
>   Standard:
> create:
>   implementation: i1.sh
>
>
> The content of 'i1.sh' doesn't matter.  The error is (Aria 0.1.1):
>
> AttributeError: 'LocatableString' object has no attribute 'iteritems'
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria/
> parser/consumption/consumer.py",
> line 70, in consume
> consumer.consume()
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria/
> parser/consumption/validation.py",
> line 30, in consume
> self.context.presentation.presenter._validate(self.context)
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria_
> extension_tosca/simple_v1_0/presenter.py",
> line 65, in _validate
> self.service_template._validate(context)
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria/parser/presentation/
> presentation.py",
> line 193, in _validate
> validate_known_fields(context, self)
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria/
> parser/presentation/utils.py",
> line 110, in validate_known_fields
> field.validate(presentation, context)
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria/
> parser/presentation/fields.py",
> line 409, in validate
> self.default_validate(presentation, context)
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria/
> parser/presentation/fields.py",
> line 524, in default_validate
> self.validate_value(value, context)
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria/
> parser/presentation/fields.py",
> line 540, in validate_value
> inner_value._validate(context)
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria_
> extension_tosca/simple_v1_0/types.py",
> line 655, in _validate
> self._get_interfaces(context)
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria/utils/caching.py",
> line 84, in __call__
> return_value = self.func(*args, **kwargs)
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria_
> extension_tosca/simple_v1_0/types.py",
> line 643, in _get_interfaces
> return FrozenDict(get_inherited_interface_definitions(context, self,
> 'node type'))
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria_
> extension_tosca/simple_v1_0/modeling/interfaces.py",
> line 127, in get_inherited_interface_definitions
> for_presentation=for_presentation)
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria_
> extension_tosca/simple_v1_0/modeling/interfaces.py",
> line 435, in merge_interface_definitions
> 'definition')
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria_
> extension_tosca/simple_v1_0/modeling/interfaces.py",
> line 425, in merge_interface_definition
> presentation, type_name)
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria_
> extension_tosca/simple_v1_0/modeling/interfaces.py",
> line 392, in merge_raw_operation_definitions
> presentation, type_name)
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria_
> extension_tosca/simple_v1_0/modeling/interfaces.py",
> line 364, in merge_raw_operation_definition
> deepcopy_with_locators(our_operation._raw['implementation']))
>   File
> "/home/vagrant/venv/lib/python2.7/site-packages/aria/
> utils/collections.py",
> line 232, in merge
> for key, value_b in dict_b.iteritems():
> Validation issues:
>   0: 'LocatableString' object has no attribute 'iteritems'
>  AttributeError: 'LocatableString' object has no attribute 'iteritems'
>


simple validation error

2017-11-27 Thread DeWayne Filppi
This should validate, no?

tosca_definitions_version: tosca_simple_yaml_1_0

imports:

  - aria-1.0


node_types:

  T1:
derived_from: tosca.nodes.Root
interfaces:
  Standard:
create:
  implementation: i1.sh

  T2:
derived_from: T1
interfaces:
  Standard:
create:
  implementation: i1.sh


The content of 'i1.sh' doesn't matter.  The error is (Aria 0.1.1):

AttributeError: 'LocatableString' object has no attribute 'iteritems'
  File
"/home/vagrant/venv/lib/python2.7/site-packages/aria/parser/consumption/consumer.py",
line 70, in consume
consumer.consume()
  File
"/home/vagrant/venv/lib/python2.7/site-packages/aria/parser/consumption/validation.py",
line 30, in consume
self.context.presentation.presenter._validate(self.context)
  File
"/home/vagrant/venv/lib/python2.7/site-packages/aria_extension_tosca/simple_v1_0/presenter.py",
line 65, in _validate
self.service_template._validate(context)
  File
"/home/vagrant/venv/lib/python2.7/site-packages/aria/parser/presentation/presentation.py",
line 193, in _validate
validate_known_fields(context, self)
  File
"/home/vagrant/venv/lib/python2.7/site-packages/aria/parser/presentation/utils.py",
line 110, in validate_known_fields
field.validate(presentation, context)
  File
"/home/vagrant/venv/lib/python2.7/site-packages/aria/parser/presentation/fields.py",
line 409, in validate
self.default_validate(presentation, context)
  File
"/home/vagrant/venv/lib/python2.7/site-packages/aria/parser/presentation/fields.py",
line 524, in default_validate
self.validate_value(value, context)
  File
"/home/vagrant/venv/lib/python2.7/site-packages/aria/parser/presentation/fields.py",
line 540, in validate_value
inner_value._validate(context)
  File
"/home/vagrant/venv/lib/python2.7/site-packages/aria_extension_tosca/simple_v1_0/types.py",
line 655, in _validate
self._get_interfaces(context)
  File
"/home/vagrant/venv/lib/python2.7/site-packages/aria/utils/caching.py",
line 84, in __call__
return_value = self.func(*args, **kwargs)
  File
"/home/vagrant/venv/lib/python2.7/site-packages/aria_extension_tosca/simple_v1_0/types.py",
line 643, in _get_interfaces
return FrozenDict(get_inherited_interface_definitions(context, self,
'node type'))
  File
"/home/vagrant/venv/lib/python2.7/site-packages/aria_extension_tosca/simple_v1_0/modeling/interfaces.py",
line 127, in get_inherited_interface_definitions
for_presentation=for_presentation)
  File
"/home/vagrant/venv/lib/python2.7/site-packages/aria_extension_tosca/simple_v1_0/modeling/interfaces.py",
line 435, in merge_interface_definitions
'definition')
  File
"/home/vagrant/venv/lib/python2.7/site-packages/aria_extension_tosca/simple_v1_0/modeling/interfaces.py",
line 425, in merge_interface_definition
presentation, type_name)
  File
"/home/vagrant/venv/lib/python2.7/site-packages/aria_extension_tosca/simple_v1_0/modeling/interfaces.py",
line 392, in merge_raw_operation_definitions
presentation, type_name)
  File
"/home/vagrant/venv/lib/python2.7/site-packages/aria_extension_tosca/simple_v1_0/modeling/interfaces.py",
line 364, in merge_raw_operation_definition
deepcopy_with_locators(our_operation._raw['implementation']))
  File
"/home/vagrant/venv/lib/python2.7/site-packages/aria/utils/collections.py",
line 232, in merge
for key, value_b in dict_b.iteritems():
Validation issues:
  0: 'LocatableString' object has no attribute 'iteritems'
 AttributeError: 'LocatableString' object has no attribute 'iteritems'