You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ariatosca.apache.org by AviaE <gi...@git.apache.org> on 2017/06/01 16:25:11 UTC

[GitHub] incubator-ariatosca pull request #142: ARIA 180 convert parameter to one to ...

GitHub user AviaE opened a pull request:

    https://github.com/apache/incubator-ariatosca/pull/142

    ARIA 180 convert parameter to one to many

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/incubator-ariatosca ARIA-180-convert-parameter-to-one-to-many

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-ariatosca/pull/142.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #142
    
----
commit 74cc94eeeb8d113994e7104477d4a7bcd78fc3d6
Author: Avia Efrat <av...@gigaspaces.com>
Date:   2017-05-21T13:28:30Z

    add output model

commit 3943ad0b921001ff8f7110618975f16264e1cff0
Author: Avia Efrat <av...@gigaspaces.com>
Date:   2017-05-21T17:10:50Z

    Add input model

commit fceceb7dfcb7466d7f150dd7c3962bef73758cdf
Author: Avia Efrat <av...@gigaspaces.com>
Date:   2017-05-22T09:05:30Z

    Add property model

commit 05d2b2a0b162076228db334ce33e57b91790e048
Author: Avia Efrat <av...@gigaspaces.com>
Date:   2017-05-24T11:53:20Z

    Add output many-to-one relationships
    
    To service template and service.

commit b0d251f43aed556db505fbc552c94ba105345482
Author: Avia Efrat <av...@gigaspaces.com>
Date:   2017-05-24T13:16:37Z

    Add input many-to-one relationships
    
    To service template, service, interface template, interface, operation
    template, operation, execution, task.

commit 3e562785ce389d2f9d748729a96115cad7f19def
Author: Avia Efrat <av...@gigaspaces.com>
Date:   2017-05-24T14:59:27Z

    Add property many-to-one relationships
    
    To:
    node template, node,
    group template, group,
    policy template, policy,
    relationship template, relationship,
    capability template, capability,
    artifact template, artifact.

commit 93c01b9e672f5588b0a5dfeca0e060086d19df2d
Author: Avia Efrat <av...@gigaspaces.com>
Date:   2017-05-24T22:04:11Z

    Add attribute model and attribute many-to-one relationships
    
    To node template and node.

commit fdda7573bd82154c621860826523031afa70e9f1
Author: Avia Efrat <av...@gigaspaces.com>
Date:   2017-05-25T16:40:35Z

    Clean up the code

commit b7d2df00e27b911f8bda89af3af05ce2cc2b446d
Author: Avia Efrat <av...@gigaspaces.com>
Date:   2017-06-01T14:09:22Z

    Add Argument and Configuration models

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #142: ARIA 180 convert parameter to one to ...

Posted by AviaE <gi...@git.apache.org>.
Github user AviaE commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/142#discussion_r120004929
  
    --- Diff: tests/storage/test_model_storage.py ---
    @@ -107,7 +107,11 @@ def test_application_storage_factory():
         assert storage.plugin
         assert storage.task
     
    -    assert storage.parameter
    +    assert storage.input
    +    assert storage.output
    +    assert storage.property
    +    assert storage.attribute
    +
         assert storage.type
         assert storage.metadata
     
    --- End diff --
    
    Add tests for `as_x`, `_create_parameter`, and model tests.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #142: ARIA 180 convert parameter to one to ...

Posted by AviaE <gi...@git.apache.org>.
Github user AviaE commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/142#discussion_r120004780
  
    --- Diff: tests/mock/models.py ---
    @@ -278,11 +278,19 @@ def create_plugin_specification(name='test_plugin', version='0.1'):
         )
     
     
    -def create_parameter(name, value):
    -    p = models.Parameter()
    +def _create_parameter(name, value, model_class):
    +    p = model_class()
    --- End diff --
    
    we can just use `model_cls.wrap`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #142: ARIA 180 convert parameter to one to ...

Posted by AviaE <gi...@git.apache.org>.
Github user AviaE commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/142#discussion_r120003928
  
    --- Diff: aria/modeling/service_common.py ---
    @@ -18,218 +18,285 @@
     from sqlalchemy import (
         Column,
         Text,
    -    PickleType
     )
     from sqlalchemy.ext.declarative import declared_attr
     
     from ..parser.consumption import ConsumptionContext
    -from ..utils import (collections, formatting, console, caching)
    --- End diff --
    
    Fix according to ARIA style guide


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #142: ARIA 180 convert parameter to one to ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-ariatosca/pull/142


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #142: ARIA 180 convert parameter to one to ...

Posted by AviaE <gi...@git.apache.org>.
Github user AviaE commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/142#discussion_r119667468
  
    --- Diff: aria/modeling/mixins.py ---
    @@ -140,3 +144,211 @@ class TemplateModelMixin(InstanceModelMixin):
     
         def instantiate(self, container):
             raise NotImplementedError
    +
    +
    +class ParameterMixin(TemplateModelMixin, caching.HasCachedMethods):
    +    """
    +    Represents a typed value. The value can contain nested intrinsic functions.
    +
    +    This model can be used as the ``container_holder`` argument for :func:`functions.evaluate`.
    +
    +    :ivar name: Name
    +    :vartype name: basestring
    +    :ivar type_name: Type name
    +    :vartype type_name: basestring
    +    :ivar value: Value
    +    :ivar description: Description
    +    :vartype description: basestring
    +    """
    +
    +    __tablename__ = 'parameter'
    +
    +    name = Column(Text)
    +    type_name = Column(Text)
    +    description = Column(Text)
    +    _value = Column(PickleType)
    +
    +    @property
    +    def value(self):
    +        value = self._value
    +        if value is not None:
    +            evaluation = functions.evaluate(value, self)
    +            if evaluation is not None:
    +                value = evaluation.value
    +        return value
    +
    +    @value.setter
    +    def value(self, value):
    +        self._value = value
    +
    +    @property
    +    @caching.cachedmethod
    +    def owner(self):
    +        """
    +        The sole owner of this parameter, which is another model that relates to it.
    +
    +        *All* parameters should have an owner model. In case this property method fails to find
    +        it, it will raise a ValueError, which should signify an abnormal, orphaned parameter.
    +        """
    +
    +        # Find first non-null relationship
    +        for the_relationship in self.__mapper__.relationships:
    +            v = getattr(self, the_relationship.key)
    +            if v:
    +                return v
    +
    +        raise ValueError('orphaned {class_name}: does not have an owner: {name}'.format(
    +            class_name=type(self).__name__, name=self.name))
    +
    +    @property
    +    @caching.cachedmethod
    +    def container(self): # pylint: disable=too-many-return-statements,too-many-branches
    +        """
    +        The logical container for this parameter, which would be another model: service, node,
    +        group, or policy (or their templates).
    +
    +        The logical container is equivalent to the ``SELF`` keyword used by intrinsic functions in
    +        TOSCA.
    +
    +        *All* parameters should have a container model. In case this property method fails to find
    +        it, it will raise a ValueError, which should signify an abnormal, orphaned parameter.
    +        """
    +
    +        from . import models
    +
    +        container = self.owner
    +
    +        # Extract interface from operation
    +        if isinstance(container, models.Operation):
    +            container = container.interface
    +        elif isinstance(container, models.OperationTemplate):
    +            container = container.interface_template
    +
    +        # Extract from other models
    +        if isinstance(container, models.Interface):
    +            container = container.node or container.group or container.relationship
    +        elif isinstance(container, models.InterfaceTemplate):
    +            container = container.node_template or container.group_template \
    +                        or container.relationship_template
    +        elif isinstance(container, models.Capability) or isinstance(container, models.Artifact):
    +            container = container.node
    +        elif isinstance(container, models.CapabilityTemplate) \
    +                or isinstance(container, models.ArtifactTemplate):
    +            container = container.node_template
    +        elif isinstance(container, models.Task):
    +            container = container.actor
    +
    +        # Extract node from relationship
    +        if isinstance(container, models.Relationship):
    +            container = container.source_node
    +        elif isinstance(container, models.RelationshipTemplate):
    +            container = container.requirement_template.node_template
    +
    +        if container is not None:
    +            return container
    +
    +        raise ValueError('orphaned parameter: does not have a container: {0}'.format(self.name))
    +
    +    @property
    +    @caching.cachedmethod
    +    def service(self):
    +        """
    +        The :class:`Service` containing this parameter, or None if not contained in a service.
    +        """
    +
    +        from . import models
    +        container = self.container
    +        if isinstance(container, models.Service):
    +            return container
    +        elif hasattr(container, 'service'):
    +            return container.service
    +        return None
    +
    +    @property
    +    @caching.cachedmethod
    +    def service_template(self):
    +        """
    +        The :class:`ServiceTemplate` containing this parameter, or None if not contained in a
    +        service template.
    +        """
    +
    +        from . import models
    +        container = self.container
    +        if isinstance(container, models.ServiceTemplate):
    +            return container
    +        elif hasattr(container, 'service_template'):
    +            return container.service_template
    +        return None
    +
    +    @property
    +    def as_raw(self):
    +        return collections.OrderedDict((
    +            ('name', self.name),
    +            ('type_name', self.type_name),
    +            ('value', self.value),
    +            ('description', self.description)))
    +
    +    def instantiate(self, container):
    +        return self.__class__(name=self.name,  # pylint: disable=unexpected-keyword-arg
    +                              type_name=self.type_name,
    +                              _value=self._value,
    +                              description=self.description)
    +
    +    def coerce_values(self, report_issues):
    +        value = self._value
    +        if value is not None:
    +            evaluation = functions.evaluate(value, self, report_issues)
    +            if (evaluation is not None) and evaluation.final:
    +                # A final evaluation can safely replace the existing value
    +                self._value = evaluation.value
    +
    +    def dump(self):
    +        context = ConsumptionContext.get_thread_local()
    +        if self.type_name is not None:
    +            console.puts('{0}: {1} ({2})'.format(
    +                context.style.property(self.name),
    +                context.style.literal(formatting.as_raw(self.value)),
    +                context.style.type(self.type_name)))
    +        else:
    +            console.puts('{0}: {1}'.format(
    +                context.style.property(self.name),
    +                context.style.literal(formatting.as_raw(self.value))))
    +        if self.description:
    +            console.puts(context.style.meta(self.description))
    +
    +    @property
    +    def unwrapped(self):
    +        return self.name, self.value
    +
    +    @classmethod
    +    def wrap(cls, name, value, description=None):
    +        """
    +        Wraps an arbitrary value as a parameter. The type will be guessed via introspection.
    +
    +        For primitive types, we will prefer their TOSCA aliases. See the `TOSCA Simple Profile v1.0
    +        cos01 specification <http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01
    +        /TOSCA-Simple-Profile-YAML-v1.0-cos01.html#_Toc373867862>`__
    +
    +        :param name: Parameter name
    +        :type name: basestring
    +        :param value: Parameter value
    +        :param description: Description (optional)
    +        :type description: basestring
    +        """
    +
    +        type_name = canonical_type_name(value)
    +        if type_name is None:
    +            type_name = full_type_name(value)
    +        return cls(name=name,  # pylint: disable=unexpected-keyword-arg
    +                   type_name=type_name,
    +                   value=value,
    +                   description=description)
    +
    +    def as_other_parameter_model(self, other_model_cls):
    --- End diff --
    
    Maybe reverse the direction of creating the instance:
    e.g, the Argument class will get an Input instance, and return an Argument instance, similarly to 'alternative constructor' via classmethod.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #142: ARIA 180 convert parameter to one to ...

Posted by AviaE <gi...@git.apache.org>.
Github user AviaE commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/142#discussion_r120004728
  
    --- Diff: extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py ---
    @@ -570,22 +578,23 @@ def added_all():
                             container.children.append(model)
     
     
    -def create_parameter_models_from_values(properties, source_properties):
    +def create_parameter_models_from_values(properties, source_properties, model_class=None):
    +
         if source_properties:
             for property_name, prop in source_properties.iteritems():
    -            properties[property_name] = Parameter(name=property_name, # pylint: disable=unexpected-keyword-arg
    -                                                  type_name=prop.type,
    -                                                  value=prop.value,
    -                                                  description=prop.description)
    +            properties[property_name] = model_class(name=property_name, # pylint: disable=unexpected-keyword-arg
    +                                                    type_name=prop.type,
    +                                                    value=prop.value,
    +                                                    description=prop.description)
     
     
     def create_parameter_models_from_assignments(properties, source_properties):
    --- End diff --
    
    Decide if this is a general function for Parameters, or a specific function for Properties.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #142: ARIA 180 convert parameter to one to ...

Posted by AviaE <gi...@git.apache.org>.
Github user AviaE commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/142#discussion_r120004996
  
    --- Diff: aria/modeling/mixins.py ---
    @@ -140,3 +144,211 @@ class TemplateModelMixin(InstanceModelMixin):
     
         def instantiate(self, container):
             raise NotImplementedError
    +
    +
    +class ParameterMixin(TemplateModelMixin, caching.HasCachedMethods):
    +    """
    +    Represents a typed value. The value can contain nested intrinsic functions.
    +
    +    This model can be used as the ``container_holder`` argument for :func:`functions.evaluate`.
    +
    +    :ivar name: Name
    +    :vartype name: basestring
    +    :ivar type_name: Type name
    +    :vartype type_name: basestring
    +    :ivar value: Value
    +    :ivar description: Description
    +    :vartype description: basestring
    +    """
    +
    +    __tablename__ = 'parameter'
    +
    +    name = Column(Text)
    +    type_name = Column(Text)
    +    description = Column(Text)
    +    _value = Column(PickleType)
    +
    +    @property
    +    def value(self):
    +        value = self._value
    +        if value is not None:
    +            evaluation = functions.evaluate(value, self)
    +            if evaluation is not None:
    +                value = evaluation.value
    +        return value
    +
    +    @value.setter
    +    def value(self, value):
    +        self._value = value
    +
    +    @property
    +    @caching.cachedmethod
    +    def owner(self):
    +        """
    +        The sole owner of this parameter, which is another model that relates to it.
    +
    +        *All* parameters should have an owner model. In case this property method fails to find
    +        it, it will raise a ValueError, which should signify an abnormal, orphaned parameter.
    +        """
    +
    +        # Find first non-null relationship
    +        for the_relationship in self.__mapper__.relationships:
    +            v = getattr(self, the_relationship.key)
    +            if v:
    +                return v
    +
    +        raise ValueError('orphaned {class_name}: does not have an owner: {name}'.format(
    +            class_name=type(self).__name__, name=self.name))
    +
    +    @property
    +    @caching.cachedmethod
    +    def container(self): # pylint: disable=too-many-return-statements,too-many-branches
    +        """
    +        The logical container for this parameter, which would be another model: service, node,
    +        group, or policy (or their templates).
    +
    +        The logical container is equivalent to the ``SELF`` keyword used by intrinsic functions in
    +        TOSCA.
    +
    +        *All* parameters should have a container model. In case this property method fails to find
    +        it, it will raise a ValueError, which should signify an abnormal, orphaned parameter.
    +        """
    +
    +        from . import models
    +
    +        container = self.owner
    +
    +        # Extract interface from operation
    +        if isinstance(container, models.Operation):
    +            container = container.interface
    +        elif isinstance(container, models.OperationTemplate):
    +            container = container.interface_template
    +
    +        # Extract from other models
    +        if isinstance(container, models.Interface):
    +            container = container.node or container.group or container.relationship
    +        elif isinstance(container, models.InterfaceTemplate):
    +            container = container.node_template or container.group_template \
    +                        or container.relationship_template
    +        elif isinstance(container, models.Capability) or isinstance(container, models.Artifact):
    +            container = container.node
    +        elif isinstance(container, models.CapabilityTemplate) \
    +                or isinstance(container, models.ArtifactTemplate):
    +            container = container.node_template
    +        elif isinstance(container, models.Task):
    +            container = container.actor
    +
    +        # Extract node from relationship
    +        if isinstance(container, models.Relationship):
    +            container = container.source_node
    +        elif isinstance(container, models.RelationshipTemplate):
    +            container = container.requirement_template.node_template
    +
    +        if container is not None:
    +            return container
    +
    +        raise ValueError('orphaned parameter: does not have a container: {0}'.format(self.name))
    +
    +    @property
    +    @caching.cachedmethod
    +    def service(self):
    +        """
    +        The :class:`Service` containing this parameter, or None if not contained in a service.
    +        """
    +
    +        from . import models
    +        container = self.container
    +        if isinstance(container, models.Service):
    +            return container
    +        elif hasattr(container, 'service'):
    +            return container.service
    +        return None
    +
    +    @property
    +    @caching.cachedmethod
    +    def service_template(self):
    +        """
    +        The :class:`ServiceTemplate` containing this parameter, or None if not contained in a
    +        service template.
    +        """
    +
    +        from . import models
    +        container = self.container
    +        if isinstance(container, models.ServiceTemplate):
    +            return container
    +        elif hasattr(container, 'service_template'):
    +            return container.service_template
    +        return None
    +
    +    @property
    +    def as_raw(self):
    +        return collections.OrderedDict((
    +            ('name', self.name),
    +            ('type_name', self.type_name),
    +            ('value', self.value),
    +            ('description', self.description)))
    +
    +    def instantiate(self, container):
    +        return self.__class__(name=self.name,  # pylint: disable=unexpected-keyword-arg
    +                              type_name=self.type_name,
    +                              _value=self._value,
    +                              description=self.description)
    +
    +    def coerce_values(self, report_issues):
    +        value = self._value
    +        if value is not None:
    +            evaluation = functions.evaluate(value, self, report_issues)
    +            if (evaluation is not None) and evaluation.final:
    +                # A final evaluation can safely replace the existing value
    +                self._value = evaluation.value
    +
    +    def dump(self):
    +        context = ConsumptionContext.get_thread_local()
    +        if self.type_name is not None:
    +            console.puts('{0}: {1} ({2})'.format(
    +                context.style.property(self.name),
    +                context.style.literal(formatting.as_raw(self.value)),
    +                context.style.type(self.type_name)))
    +        else:
    +            console.puts('{0}: {1}'.format(
    +                context.style.property(self.name),
    +                context.style.literal(formatting.as_raw(self.value))))
    +        if self.description:
    +            console.puts(context.style.meta(self.description))
    +
    +    @property
    +    def unwrapped(self):
    +        return self.name, self.value
    +
    +    @classmethod
    +    def wrap(cls, name, value, description=None):
    +        """
    +        Wraps an arbitrary value as a parameter. The type will be guessed via introspection.
    +
    +        For primitive types, we will prefer their TOSCA aliases. See the `TOSCA Simple Profile v1.0
    +        cos01 specification <http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01
    +        /TOSCA-Simple-Profile-YAML-v1.0-cos01.html#_Toc373867862>`__
    +
    +        :param name: Parameter name
    +        :type name: basestring
    +        :param value: Parameter value
    +        :param description: Description (optional)
    +        :type description: basestring
    +        """
    +
    +        type_name = canonical_type_name(value)
    +        if type_name is None:
    +            type_name = full_type_name(value)
    +        return cls(name=name,  # pylint: disable=unexpected-keyword-arg
    +                   type_name=type_name,
    +                   value=value,
    +                   description=description)
    +
    +    def as_other_parameter_model(self, other_model_cls):
    --- End diff --
    
    We decided on keeping this mechanism as is.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #142: ARIA 180 convert parameter to one to ...

Posted by AviaE <gi...@git.apache.org>.
Github user AviaE commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/142#discussion_r120004550
  
    --- Diff: extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py ---
    @@ -570,22 +578,23 @@ def added_all():
                             container.children.append(model)
     
     
    -def create_parameter_models_from_values(properties, source_properties):
    +def create_parameter_models_from_values(properties, source_properties, model_class=None):
    --- End diff --
    
    Why is `model_class` None?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #142: ARIA 180 convert parameter to one to ...

Posted by AviaE <gi...@git.apache.org>.
Github user AviaE commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/142#discussion_r120004759
  
    --- Diff: tests/mock/models.py ---
    @@ -278,11 +278,19 @@ def create_plugin_specification(name='test_plugin', version='0.1'):
         )
     
     
    -def create_parameter(name, value):
    -    p = models.Parameter()
    +def _create_parameter(name, value, model_class):
    --- End diff --
    
    model_cls


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #142: ARIA 180 convert parameter to one to ...

Posted by AviaE <gi...@git.apache.org>.
Github user AviaE commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/142#discussion_r120004528
  
    --- Diff: extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py ---
    @@ -94,9 +95,11 @@ def create_service_template_model(context): # pylint: disable=too-many-locals,to
         topology_template = context.presentation.get('service_template', 'topology_template')
         if topology_template is not None:
             create_parameter_models_from_values(model.inputs,
    -                                            topology_template._get_input_values(context))
    +                                            topology_template._get_input_values(context),
    +                                            model_class=Input)
    --- End diff --
    
    change to `model_cls`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---