f5devcentral / vscode-f5-flipper

Exploring Citrix/NetScaler configs
Apache License 2.0
9 stars 4 forks source link

[RFE] Include Pool Member Service Port in conversion / AS3 file generation #42

Closed samualblair closed 2 months ago

samualblair commented 4 months ago

Is your feature request related to a problem? Please describe. Currently, when AS3 Conversions are run, the service Port (port associated with a pool member) is not created in the AS3 file. This seems to be the situation for all conversions, so not specific to any NS configuration, always occurs.

This generally should be available in the source NS.conf file, and when not found for a given pool member I would expect this could be assumed to be the same as the virtual port used (LB Port used).

It is worth noting that in the VS Code Generator Screen for 'Fast Template' the Service port does show as present, so perhaps this is a FAST template issue?

Describe the solution you'd like It would be good to have NS.conf parsed and input into AS3 file with this information. Not sure of current cause, but assume it is one of: 1) Failed/Lack of parsing 2) Failed/Lack of mapping 3) Limitation of FAST template

Describe alternatives you've considered For now, workarounds are to manually verify and add, or use external scripting tools to parse and add.

Additional context

Source NS.conf file has information such as:

add lb vserver lb_example SSL 192.0.1.1 443 -persistenceType SOURCEIP -cltTimeout 180
bind lb vserver lb_example lb_example.svc
bind serviceGroup lb_example.svc SERVER22 443
add server SERVER22 192.0.2.2 -comment "EXAMPLE BACKEND SERVER"

An AS3 conversion ends up with pool section looking something like:

    "pool_lb_example": {
      "members": [
        {
          "serverAddresses": [
            "192.0.2.2"
          ],
          "shareNodes": true
        }
      ],
      "class": "Pool",
      "loadBalancingMode": "least-connections-member",
      "monitors": [
        "https"
      ]
    }

When it should look more like this (note servicePort):

    "pool_lb_example": {
      "members": [
        {
          "serverAddresses": [
            "192.0.2.2"
          ],
          "shareNodes": true,
          "servicePort": 443
        }
      ],
      "class": "Pool",
      "loadBalancingMode": "least-connections-member",
      "monitors": [
        "https"
      ]
    }
DumpySquare commented 2 months ago

Hey @samualblair, I think we have this in the latest round of fast templates. I will be working on the next release to include these soon

DumpySquare commented 2 months ago

I confirmed that we are parsing the details from the ns configs and through the ns2fast mutations. Final step is to update fast templates to read those new params, which as indicated in the last comment, will be updated for the next release