ansible-collection-netscaleradc icon indicating copy to clipboard operation
ansible-collection-netscaleradc copied to clipboard

[FEATURE REQUEST] Cannot use * as Port in citrix_adc_servicegroup

Open pbptaker opened this issue 3 years ago • 1 comments

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

The module citrix_adc_servicegroup (perhaps citrix_adc_lb_vserver as well) does not accept an asterisk (*) as argument (which is a non-int value) for the port parameter.

We are using dynamic listeners (using a listenpolicy: CLIENT.TCP.DSTPORT.BETWEEN(51000, 51999) on our LB, having * on the servicegroups server binding). This means that I cannot use ansible to create my LB if I'm not wrong The module citrix_adc_servicegroup (perhaps citrix_adc_lb_vserver as well) does not accept an asterisk (*) as argument (which is a non-int value).

Describe the solution you'd like A clear and concise description of what you want to happen. I would like to have a possibiliy to use * as Port

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered. Not yet seen any alternatives despite to create the config manually

Additional context Add any other context or screenshots about the feature request here.

neither port: "*" nor port: * are working.

  • name: Setup TEST-SVC-TCP servicegroup delegate_to: localhost citrix_adc_servicegroup: nsip: "{{ nsip }}" nitro_user: "{{ nitro_user }}" nitro_pass: "{{ nitro_pass }}" validate_certs: no state: present servicegroupname: TEST-SVC-TCP servicetype: TCP servicemembers: mode: exact attributes: - servername: dummyserver port: "*" usip: True svrtimeout: 3300 monitor_name_svc: ping

fatal: [server -> localhost]: FAILED! => {"changed": false, "msg": "argument 'port' is of type <class 'str'> found in 'servicemembers -> attributes'. and we were unable to convert to int: <class 'str'> cannot be converted to an int"}

pbptaker avatar Aug 18 '22 06:08 pbptaker

Use port number 65535 for wildcards / '*' on both service groups and load-balancing virtual servers. This results in the GUI showing '*'. Just a case of incomplete documentation.

The Nitro API returns int 65535 for '*', so there's no point in making changes in citrix_adc_lb_vserver.py to be able to specify strings and to cast the returned port number as a string in 'def lbvserver_identical(self):', which I've tried and which led me to 65535 ;)

thomas-biesmans avatar Sep 28 '22 13:09 thomas-biesmans

thanks for letting me know. br pbptaker

pbptaker avatar Dec 12 '22 12:12 pbptaker

Thank you @thomas-biesmans for helping @pbptaker . We truly appreciate it.

@pbptaker this is also documented in our docs below:

image

https://github.com/citrix/citrix-adc-ansible-modules/blob/master/docs/modules/citrix_adc_servicegroup_module.rst

There was a minor markdown formatting rendering error in the docs, which I fixed today.

sumanth-lingappa avatar Dec 13 '22 03:12 sumanth-lingappa