f5devcentral / f5-corkscrew

TMOS parser and application extractor
Apache License 2.0
13 stars 3 forks source link

[RFE] dns/gslb - provide all possible destinations as array #29

Closed DumpySquare closed 1 year ago

DumpySquare commented 1 year ago

To simplify the output a little, it might be really convenient to provide a list of all possible destinations in the gslb output below

{
    "fqdn": "portal.benlab.io_a_pool",
    "partition": "/Common/",
    "type": "a",
    "pools": [
        {
            "name": "/Common/portal.benlab.io_a_pool",
            "order": "0",
            "type": "a",
            "fallback-mode": "fallback-ip",
            "fallback-ip": "75.55.157.193",
            "members": [
                {
                    "server": "/Common/coreltm01_02",
                    "vs": "/Common/sslvpn_tcp443_vs",
                    "member-order": "0",
                    "destination": "192.168.200.10:443"
                }
            ]
        }
    ],
    "lines": [
        "gtm wideip a /Common/benlab.io {\n    pools {\n        /Common/portal.benlab.io_a_pool {\n            order 0\n        }\n    }\n}",
        "gtm pool a /Common/portal.benlab.io_a_pool { \n    fallback-ip 75.55.157.193\n    fallback-mode fallback-ip\n    members {\n        /Common/coreltm01_02:/Common/sslvpn_tcp443_vs {\n            member-order 0\n        }\n    }\n }",
        "gtm server /Common/coreltm01_02 { \n    datacenter /Common/home_dc\n    devices {\n        coreltm01 {\n            addresses {\n                1.1.1.1 {\n                    translation 2.2.2.2\n                }\n                10.200.30.5 { }\n            }\n        }\n        coreltm02 {\n            addresses {\n                10.200.30.6 { }\n            }\n        }\n    }\n    monitor /Common/bigip\n    product bigip\n    virtual-server-discovery enabled\n    virtual-servers {\n        /Common/bigiq.benlab.io_t443_vs {\n            destination 10.200.244.15:443\n        }\n        /Common/dns_listener_coreltm2_tcp53_vs {\n            destination 192.168.200.8:53\n        }\n        /Common/dns_listener_coreltm2_udp53_vs {\n            destination 192.168.200.8:53\n        }\n        /Common/ipv6_listener {\n            destination 2001:db8:200::7.53\n        }\n        /Common/russ.app/russ_iqdash_t80_vs {\n            destination 192.168.200.160:80\n        }\n        /Common/sslvpn_tcp80_vs {\n            destination 192.168.200.10:80\n        }\n        /Common/sslvpn_tcp443_vs {\n            destination 192.168.200.10:443\n        }\n        /Common/test_listener_u53_vs {\n            destination 192.168.200.7:53\n        }\n        /Sample_01/A1/serviceMain {\n            destination 10.44.1.10:80\n        }\n        /com-load/Shared/loadhost-chd.openapi.starbucks.com_80 {\n            destination 10.12.20.110:80\n        }\n        /com-load/Shared/loadhost-chd.openapi.starbucks.com_443 {\n            destination 10.12.20.110:443\n        }\n        /core1_epic_01/epic/serviceMain {\n            destination 10.0.1.10:80\n        }\n        /core1_pizza_02/pizza/serviceMain {\n            destination 10.0.2.10:80\n        }\n        /external_proxy/extProxy/extExplicit_proxy_t8888_vs {\n            destination 192.168.200.11:8888\n        }\n        /hue-infra/hue-up/hue-up.benlab.io_t80_vs {\n            destination 192.168.200.29:80\n        }\n        /hue-infra/hue-up/hue-up.benlab.io_t443_vs {\n            destination 192.168.200.29:443\n        }\n        /iqt1/iqt1/serviceMain {\n            destination 192.168.200.164:443\n        }\n        /iqt1/iqt1/serviceMain-Redirect- {\n            destination 192.168.200.164:80\n        }\n        /nas-infra/nas01/nas01_t0_vs {\n            destination 192.168.200.27:0\n        }\n        /ntp-infra/ntp_vip/ntp_u123_vs {\n            destination 192.168.200.9:123\n        }\n        /sap/main/ssl_bridge_443_vs {\n            destination 172.24.82.67:443\n        }\n        /sap/main/ssl_bridge_443_vs-Redirect- {\n            destination 172.24.82.67:80\n        }\n        /tenant_1/Shared/app1_443_vs {\n            destination 172.24.80.163:443\n        }\n        /tenant_2/app_2/app2_443_vs {\n            destination 172.24.80.217:443\n        }\n        /tenant_2/app_2/app2_443_vs-Redirect- {\n            destination 172.24.80.217:80\n        }\n        /tenn1/app1/app1_t80_vs {\n            destination 192.168.1.21:80\n        }\n        /tenn1/app1/app1_t443_vs {\n            destination 192.168.1.21:443\n        }\n        /vcenter-infra/vcenter/vcenter.benlab.io_t443_vs {\n            destination 192.168.200.50:443\n        }\n        test1 {\n            depends-on {\n                /Common/coreltm01_02:/Common/bigiq.benlab.io_t443_vs { }\n            }\n            destination 5.5.5.5:555\n            monitor /Common/bigip\n            translation-address 6.6.6.6\n            translation-port 666\n        }\n    }\n }"
    ]
}
DumpySquare commented 1 year ago

this is going to be important for identifying fqdns with no real working config

DumpySquare commented 1 year ago

implemented in v1.1.0

{
    "fqdn": "devCloud01.benlab.io",
    "partition": "/Common/",
    "type": "a",
    "pools": [
        {
            "name": "/Common/devCloud01.benlab.io_pool",
            "order": "0",
            "type": "a",
            "load-balancing-mode": "fallback-ip",
            "fallback-mode": "fallback-ip",
            "fallback-ip": "10.200.244.110"
        }
    ],
    "lines": [
        "gtm wideip a /Common/devCloud01.benlab.io {\n    pools {\n        /Common/devCloud01.benlab.io_pool {\n            order 0\n        }\n    }\n}",
        "gtm pool a /Common/devCloud01.benlab.io_pool { \n    fallback-ip 10.200.244.110\n    fallback-mode fallback-ip\n    load-balancing-mode fallback-ip\n }"
    ],
    "allPossibleDestinations": [
        "10.200.244.110"
    ]
}