Page MenuHomeDevCentral

Compute CIDR prefix from netmask for RHEL network scripts
ClosedPublic

Authored by dereckson on Mar 5 2022, 10:56.
Tags
None
Referenced Files
F3618378: D2568.diff
Thu, Oct 3, 04:27
F3617707: D2568.id6487.diff
Thu, Oct 3, 00:37
F3615194: D2568.diff
Wed, Oct 2, 12:47
Unknown Object (File)
Sun, Sep 29, 07:31
Unknown Object (File)
Mon, Sep 23, 01:53
Unknown Object (File)
Wed, Sep 18, 15:44
Unknown Object (File)
Sat, Sep 14, 12:08
Unknown Object (File)
Sat, Sep 14, 12:08
Subscribers
None

Details

Summary

The network scripts use a CIDR notation like PREFIX=24
instead of a netmask notation.

Salt offers a cidr_to_ipv4_netmask but not the other way
around, so a new network execution module is offered.

This is a follow-up for f9dbdab3b579.

Test Plan

Unit tests are provided for network module

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson created this revision.

Remove fix to Rust tests from this change

Allow to detect netmask in the configuration is invalid

network is already the name of an execution module:
https://docs.saltproject.io/en/latest/ref/modules/all/salt.modules.network.html

Probably cool to rename it, even if Salt is happy to let us replace modules like that.

Avoid to shadow network execution module

This revision is now accepted and ready to land.Mar 7 2022, 19:31