Constraints validation failed in tosca-parser if the value passed as input parameter in tosca-template

Bug #1815755 reported by Niraj Singh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
TOSCA Parser
New
Undecided
Unassigned

Bug Description

While creating VNFD in tacker if any VDU property value in tosca-template is defined as input param and there is some constraints defined on it then tosca-parser failed at [1].

Example:

      Tosca-template
      ===============

     VDU1:
      type: tosca.nodes.nfv.VDU.Tacker
      properties:
        image: cirros-0.4.0-x86_64-disk
        flavor: { get_input: flavor }
        reservation_metadata:
          resource_type: { get_input: resource_type }
          id: { get_input: server_group_id }

 Constraints defined as below:

 /tacker_nfv_defs.yaml:
 ======================

  node_types:
    ...
    reservation_metadata:
   type: tosca.datatypes.tacker.VduReservationMetadata
   required: false

 /tacker_defs.yaml:
 ==================

  datatypes:
    ...
    tosca.datatypes.tacker.VduReservationMetadata:
     properties:
    resource_type:
      type: string
      required: true
      constraints:
     - valid_values: [ physical_host, virtual_instance ]
    id:
      type: string
      required: true

[1] https://github.com/openstack/tosca-parser/blob/master/toscaparser/elements/constraints.py#L186

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.