Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Condition in virtual server python part of module is wrong and should be removed #1

Open
iden83 opened this issue Oct 6, 2022 · 0 comments

Comments

@iden83
Copy link

iden83 commented Oct 6, 2022

Condition in virtual server python part of module (lines 264-267) is wrong and should be removed:

https://github.com/fortinet-ansible-dev/ansible-galaxy-fortiadc-collection/blob/galaxy/1.0.1/plugins/modules/fadcos_virtual_server.py#L264

There are conditions evaluated:

if module.params['traffic_group'] and module.params['traffic_group'] != data['traffic-group']:
    data['traffic-group'] = module.params['traffic_group']
    res = True
if module.params['traffic_group'] and module.params['traffic_group'] != data['traffic-log']:
    data['traffic-log'] = module.params['traffic_group']
    res = True
if module.params['traffic_log'] and module.params['traffic_log'] != data['traffic-log']:
    data['traffic-log'] = module.params['traffic_log']
    res = True

1st condition "traffic-group" evaluation is proper.
2nd condition evaluation is wrong - looks like combination between 1st and 3rd hence it's redundant and shall be removed.
3rd condition "traffic-log" evaluation is proper.

In our project to properly interact with FortiADC device updates we are manually remove those lines from the module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant