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 14 forks source link

AS3 conversion missing monitor details and custom monitor #100

Open AnthonyF5 opened 1 year ago

AnthonyF5 commented 1 year ago

Environment

Summary

The output should include the monitor reference in the pool and the custom monitor used.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Convert following config to AS3:

    ltm virtual /Common/test {
    creation-time 2023-10-04:23:31:28
    destination /Common/0.0.0.0:443
    ip-protocol tcp
    last-modified-time 2023-10-04:23:31:28
    mask any
    pool /Common/test
    profiles {
        /Common/tcp { }
    }
    serverssl-use-sni disabled
    source 0.0.0.0/0
    translate-address enabled
    translate-port enabled
    }
    ltm pool /Common/test {
    members {
        /Common/10.1.1.59:443 {
            address 10.1.1.59
        }
    }
    monitor /Common/radisu_monitor
    }
    ltm node /Common/10.1.1.59 {
    address 10.1.1.59
    }
    ltm monitor radius-accounting /Common/radisu_monitor { 
    debug no
    defaults-from /Common/radius_accounting
    description "some description"
    interval 30
    nas-ip-address 10.10.10.10
    secret <removed>
    time-until-up 0
    timeout 31
    username any
    }
  2. Conversion missing the monitor sections:

    {
    "$schema": "https://raw.githubusercontent.com/F5Networks/f5-appsvcs-extension/master/schema/latest/as3-schema.json",
    "class": "AS3",
    "declaration": {
        "class": "ADC",
        "schemaVersion": "3.37.0",
        "id": "urn:uuid:f48fbb5c-6aae-4614-ba2b-a1c06ce072d7",
        "label": "Converted Declaration",
        "remark": "Generated by Automation Config Converter",
        "Common": {
            "class": "Tenant",
            "Shared": {
                "class": "Application",
                "template": "shared",
                "virtual_test_dup": {
                    "layer4": "tcp",
                    "pool": "pool_test_dup",
                    "translateServerAddress": true,
                    "translateServerPort": true,
                    "class": "Service_TCP",
                    "profileTCP": {
                        "bigip": "/Common/tcp"
                    },
                    "virtualAddresses": [
                        "0.0.0.0/0"
                    ],
                    "virtualPort": 443,
                    "snat": "none"
                },
                "pool_test_dup": {
                    "members": [
                        {
                            "addressDiscovery": "static",
                            "servicePort": 443,
                            "serverAddresses": [
                                "10.1.1.59"
                            ],
                            "shareNodes": true
                        }
                    ],
                    "class": "Pool"
                }
            }
        }
    }
    }

Output terminal in vscode:

[2023-10-05T11:38:01.695Z] [INFO]: f5.chariot.convertAS3 called
27 [2023-10-05T11:38:01.696Z] [INFO]: f5.chariot.convertAS3 text found
28 [2023-10-05T11:38:01.699Z] [INFO]: ACC METADATA undefined
29 [2023-10-05T11:38:01.789Z] [INFO]: f5 atc schema injected

Expected Behavior

Expected the monitor to be created and referenced in the output.

Actual Behavior

QKview extract and then a AS3 conversion of the virtual server using vscode chariot extension the custom monitor is not generated or the reference to it.