feat: Introduce --no-default-rules flag, deprecate --create-rules
This PR addresses the issue in #446
In here, I,
- Added a new
--no-default-rulesflag to control default firewall rule creation. - Marked
--create-rulesas deprecated but kept for backward compatibility. - Added a deprecation warning for
--create-rulesusage. - Error out when both the flags are used simultaneously.
- Updated the documentation to reflect the changes.
Why deprecate --create-rules flag ?
If we see the documentation, it seems --create-rules was introduced to give users a way to create firewalls without any default firewall rules set.
But, now that we have --no-default-rules flag, deprecating (not removing) --create-rules I feel is the obvious next step here.
Note: when a flag is deprecated, It continues to function but does not show up in help or usage messages.
Result:
- Firewall correctly created with default rules without
--create-rulesflag
2.When we use --create-rules flag, a warning message flashes, but default rule still gets created as before.
- Backward compatibility not getting affected:
- Firewall correctly getting created with
--no-default-rules
- No firewall rules applied with
--no-default-rulesflag
- Error out when both flags are used:
- Updated Documentation
Hi @uzaxirr,
This PR is ready for review. Whenever you have a moment, could you please take a look at it?
Thank you!
@fulviodenza are you free to give it a look? Many thanks for all your availability