don't validate required property of policies

Bug #1903233 reported by Ayumu Ueha
This bug affects 1 person
Affects Status Importance Assigned to Milestone
TOSCA Parser
In Progress
Ayumu Ueha

Bug Description

Tosca-parser validates the required parameter for node_template but does not
validate the required property of the policy like node_template.
In the case of policies it should also be verified in the same way.

I confirmed the action of tosca-parser if the required parameter of policies is missing.

1. edit `toscaparser/tests/data/policies/test_tosca_nfv_multiple_policies.yaml`
        - SP1:
            type: tosca.policies.tacker.Scaling
            targets: [VDU1]
              #increment: 1 // comment out increment (this is defined "required: true")
              cooldown: 120
              min_instances: 1
              max_instances: 2
              default_instances: 1

2. exec `tosca-parser --template-file=toscaparser/tests/data/policies/test_tosca_nfv_multiple_policies.yaml`

It should error such as following, but it is not occur any errors.
    MissingRequiredFieldError: "properties" of template "SP1" is missing required field "['increment']".

In case of node_templates, the following error is occured.
    The input "toscaparser/tests/data/policies/test_tosca_nfv_multiple_policies.yaml" failed validation with the
    following error(s):

            MissingRequiredFieldError: "properties" of template "VDU1" is missing required field "['image']".

Revision history for this message
Ayumu Ueha (ueha) wrote :
Changed in tosca-parser:
assignee: nobody → Ayumu Ueha (ueha)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tosca-parser 2.3.0

This issue was fixed in the openstack/tosca-parser 2.3.0 release.

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.