suse-edge / nm-configurator

NetworkManager configuration tool
Apache License 2.0
7 stars 3 forks source link

Validate desired network states #10

Closed atanasdinov closed 5 months ago

atanasdinov commented 9 months ago

The following example is a completely valid desired state for nmstate:

interfaces:
- name: eth0
  type: ethernet
  state: up
  ipv4:
    address:
    - ip: 192.168.122.250
      prefix-length: 24
    enabled: true
  ipv6:
    address:
    - ip: 2001:db8::1:1
      prefix-length: 64
    enabled: true

However, since it is missing a MAC address for the interface, host mapping will not be properly generated which in turn would make applying the configuration fail:

$ cat _out/host_config.yaml
- hostname: node1
  interfaces: []
atanasdinov commented 9 months ago

Consider adding --dry-run option to nmc generate as a validation step before running NMC.

atanasdinov commented 8 months ago

Investigate whether interface names can contain dots since we're currently replacing the file extension when applying the .nmconnection files.

Involves https://github.com/suse-edge/nm-configurator/issues/19 as part of the research.