Uploaded image for project: 'Service Design and Creation'
  1. Service Design and Creation
  2. SDC-4222

Fix behaviour when validation of property constraints

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • London Release
    • Kohn Release
    • None
    • None

      When a type likeĀ 

      org.openecomp.datatypes.heat.network.neutron.Subnet has several properties (complex type), some of them having constraints, some others without constraints, properties like the following:

      enable_dhcp:
        type: boolean
        description: Set to true if DHCP is enabled and false if DHCP is disabled
        required: false
        default: true
        status: supported

      are not validated properly. When adding some input of this type, without providing any value for this property (enable_dhcp), a validation error is thrown saying that a boolean value should be provided.
      But actually, the field is not required, and it has a default value (true), so in this case no validation error should be thrown, either because the property is not required, or if it was, it should get its default value when no value is specified for it.

      Also, constraint evaluation on list/map properties doesnt validate constraints related to legth/size of the collection itself (see attached image)

            franciscovila franciscovila
            franciscovila franciscovila
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: