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

netdog: Add networkd devices and builders for config #3220

Merged
merged 7 commits into from
Jul 11, 2023

Commits on Jun 15, 2023

  1. Configuration menu
    Copy the full SHA
    e388c86 View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2023

  1. Configuration menu
    Copy the full SHA
    27cdbb7 View commit details
    Browse the repository at this point in the history
  2. netdog: Add methods to network/netdev config to write to file

    This commit adds adds constants for the networkd config directory, file
    prefix.  Network and netdev config each get an associated constant for
    the file extension, and each gain a method `write_config_file()` that
    writes an appropriately named file to the proper path.
    zmrow committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    92a4b6a View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2023

  1. netdog: Add systemd-networkd devices

    This commit adds a module that contains the structs representing the
    network devices we currently configure: interfaces, bonds, and vlans.
    These structures are meant to contain the latest versions of all the
    underlying config.
    zmrow committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    1294f6e View commit details
    Browse the repository at this point in the history
  2. netdog: Derive Deserialize for networkd devices for unit test only

    This commit adds attributes to the networkd device structs to derive
    Deserialize to enable unit testing.  Since we never directly deserialize
    into these device structs during normal use, gating the Deserialize
    implementation behind the test attribute keeps the binary size a bit
    smaller for "normal" builds.
    zmrow committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    af496ac View commit details
    Browse the repository at this point in the history
  3. netdog: Add builder for networkd NetDevConfig

    This commit adds a buidler for the systemd-networkd NetDevConfig struct.
    The builder contains the logic to translate the structures deserialized
    from `net.toml` into NetDev structures representing systemd-networkd
    .netdev files.  Since NetDevConfig will be created for bonds and vlans
    (and potentially more later), using a builder centralizes the logic to
    avoid duplication.  Use a builder also means methods can be limited
    based on the type of device being built, providing safety at development
    time.
    zmrow committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    86c8d44 View commit details
    Browse the repository at this point in the history
  4. netdog: Add builder for networkd NetworkConfig

    This commit adds a builder for the systemd-networkd NetworkConfig
    struct.  The builder contains the logic to translate the structures
    deserialized from `net.toml` into NetworkConfig structures representing
    systemd-networkd .network files.  Since NetworkConfig will be created
    for interfaces, bonds, and vlans (and potentially more later), using a
    builder centralizes the logic to avoid duplication.  Using a builder
    also means methods can limited based on the type of device being built,
    providing safety at development time.
    zmrow committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    e1b4e28 View commit details
    Browse the repository at this point in the history