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

when converting TMOS to AS3, servers in the pool do not show their server names #91

Open kyleklabunde opened 2 years ago

kyleklabunde commented 2 years ago

Is your feature request related to a problem? Please describe.

I am frustrated when i use ACC Chariot to convert TMOS code into JSON in that the pool members are not broken out with their server names.

Describe the solution you'd like

It would be nice when you use the AS3 conversion that the server names are populated. THis saves time in having to find the server names to put a name to an IP address in the pool

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Additional context

this this:

"members": [
                        {
                            "addressDiscovery": "static",
                            "servicePort": 14231,
                            "servers": [
                                {
                                    "name": "host1",
                                    "address": "172.24.131.140"
                                }

                            ],
                            "shareNodes": true
                        },
                        {
                            "addressDiscovery": "static",
                            "servicePort": 16231,
                            "servers": [
                                {
                                    "name": "host2",
                                    "address": "172.24.131.141"
                                }

                            ],
                            "shareNodes": true
                        }

instead of this:

"members": [
                        {
                            "addressDiscovery": "static",
                            "servicePort": 389,
                            "serverAddresses": [
                                "172.24.131.144",
                                "172.24.131.145"
                            ],
                            "shareNodes": true
                        }
mdditt2000 commented 2 years ago

@kyleklabunde is the default behavior

"members": [
                        {
                            "addressDiscovery": "static",
                            "servicePort": 389,
                            "serverAddresses": [
                                "172.24.131.144",
                                "172.24.131.145"
                            ],
                            "shareNodes": true
                        }

If you use expanded mode in VScode after AS3 deployment you will get

"members": [
                        {
                            "addressDiscovery": "static",
                            "servicePort": 14231,
                            "servers": [
                                {
                                    "name": "host1",
                                    "address": "172.24.131.140"
                                }

                            ],
                            "shareNodes": true
                        },
                        {
                            "addressDiscovery": "static",
                            "servicePort": 16231,
                            "servers": [
                                {
                                    "name": "host2",
                                    "address": "172.24.131.141"
                                }

                            ],
                            "shareNodes": true
                        }

Can you give that a try?

kyleklabunde commented 2 years ago

what is expanded mode? i currently am having to manually make the change to the 2nd part.

DumpySquare commented 2 years ago

Hey @mdditt2000, I think @kyleklabunde is looking to get ACC to output the pool members with hostname and IP/port so that information is not lost in the as3 declaration. Without ACC capturing that information, it will never make it into the declaration. Kyle is adding this information manually.

mdditt2000 commented 2 years ago

Got it!! Let me look into this! Request was asked by @rjouhann before.

p-semenov-f5 commented 2 years ago

So that task can be solved only for 'static' nodes. No way to set name for 'fqdn' nodes.

AS3 has 'fqdnPrefix', but it will generate names like 'server_4example.com' instead of 'server_4' with host 'example.com'.

Do you require something for 'fqdn'?

sbarakett commented 2 weeks ago

same #106