Uploaded image for project: 'Ansible Cloud Automation'
  1. Ansible Cloud Automation
  2. ACA-2030

Incorrect handling of missing 'rules' parameter in appliance_networking_firewall_inbound module in vmware_rest

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False

      Bug Description:
      The appliance_networking_firewall_inbound module in the vmware_rest collection does not set the failed flag to True when a required parameter, such as rules, is missing. Instead, it only returns a message (msg) indicating the missing argument, which can cause tests or playbooks to incorrectly pass when they should fail.


      Expected Result:
      When the rules parameter is not provided:

      • The failed flag should be set to True.
      • The module should return a meaningful error message like: "missing required arguments: rules".
      • Playbook execution should stop at this task, and the task should be marked as failed.

      Example expected output:

       

      mandatory_rule_check: 
        changed: false 
        failed: true 
        msg: "missing required arguments: rules" 
      

      {{}}


      Actual Result:
      When the rules parameter is not provided:

      • The failed flag is incorrectly set to False.
      • The module only returns the message: "missing required arguments: rules".
      • Playbook execution continues past this task, causing incorrect behavior in automated workflows.

      Example actual output:

      mandatory_rule_check: 
        changed: false 
        failed: false 
        msg: "missing required arguments: rules"

      Steps to Reproduce:

      1. Run a playbook using the appliance_networking_firewall_inbound module without specifying the rules parameter.
      2. Observe the task result.

              rh-ee-mimorenc Mike Morency
              prabinov Polina Rabinovich
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: