f5devcentral / f5-automation-config-converter

Convert BIG-IP configs to AS3 and DO declarations
https://clouddocs.f5.com/products/extensions/f5-automation-config-converter/latest/
Apache License 2.0
35 stars 13 forks source link

Policy_Endpoint class missing "type" property #31

Closed frslater closed 3 years ago

frslater commented 3 years ago

Environment

Summary

When an ltm policy is converted, the required "type" property is sometimes missing in the resulting declaration.

Steps To Reproduce

Steps to reproduce the behavior: Convert following config:

ltm policy /Common/xyz {
    controls { asm }
    requires { http }
    rules {
        default {
            actions {
                0 {
                    asm
                    enable
                    policy /Common/abc
                }
            }
        }
    }
    strategy /Common/first-match
}
asm policy /Common/abc {
    active
    encoding utf-8
    policy-template POLICY_TEMPLATE_FUNDAMENTAL
}

Actual Behavior

            "xyz": {
                "rules": [
                    {
                        "name": "default",
                        "actions": [
                            {
                                "event": "request",
                                "enabled": true
                            }
                        ]
                    }
                ],
                "strategy": "first-match",
                "class": "Endpoint_Policy"
         }

Posting this to AS3 results in a validation error because the "type" property is missing.

Expected Behavior

The result should instead be:

            "xyz": {
                "rules": [
                    {
                        "name": "default",
                        "actions": [
                            {
                                "event": "request",
                                "type": "waf",
                                "enabled": true
                            }
                        ]
                    }
                ],
                "strategy": "first-match",
                "class": "Endpoint_Policy"
         }
v-zhuravlev-f5 commented 3 years ago

Charon-303 Jira issue created to track it.

mdditt2000 commented 3 years ago

Issue solved and merged. Closing issue