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
Unknown Object (File)
Thu, Nov 14, 10:01
Unknown Object (File)
Thu, Nov 14, 07:50
Unknown Object (File)
Wed, Nov 13, 01:08
Unknown Object (File)
Tue, Nov 12, 19:14
Unknown Object (File)
Tue, Nov 12, 16:47
Unknown Object (File)
Mon, Nov 11, 12:28
Unknown Object (File)
Sun, Nov 10, 04:56
Unknown Object (File)
Wed, Nov 6, 12:40
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