ariatosca-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AviaE <...@git.apache.org>
Subject [GitHub] incubator-ariatosca pull request #142: ARIA 180 convert parameter to one to ...
Date Sun, 04 Jun 2017 09:36:35 GMT
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.
---

Mime
View raw message