types.go 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. package netconf
  2. type NetworkConfig struct {
  3. PreCmds []string `yaml:"pre_cmds,omitempty"`
  4. DNS DNSConfig `yaml:"dns,omitempty"`
  5. Interfaces map[string]InterfaceConfig `yaml:"interfaces,omitempty"`
  6. PostCmds []string `yaml:"post_cmds,omitempty"`
  7. HTTPProxy string `yaml:"http_proxy,omitempty"`
  8. HTTPSProxy string `yaml:"https_proxy,omitempty"`
  9. NoProxy string `yaml:"no_proxy,omitempty"`
  10. }
  11. type InterfaceConfig struct {
  12. Match string `yaml:"match,omitempty"`
  13. DHCP bool `yaml:"dhcp,omitempty"`
  14. DHCPArgs string `yaml:"dhcp_args,omitempty"`
  15. Address string `yaml:"address,omitempty"`
  16. Addresses []string `yaml:"addresses,omitempty"`
  17. IPV4LL bool `yaml:"ipv4ll,omitempty"`
  18. Gateway string `yaml:"gateway,omitempty"`
  19. GatewayIpv6 string `yaml:"gateway_ipv6,omitempty"`
  20. MTU int `yaml:"mtu,omitempty"`
  21. Bridge string `yaml:"bridge,omitempty"`
  22. Bond string `yaml:"bond,omitempty"`
  23. BondOpts map[string]string `yaml:"bond_opts,omitempty"`
  24. PostUp []string `yaml:"post_up,omitempty"`
  25. PreUp []string `yaml:"pre_up,omitempty"`
  26. Vlans string `yaml:"vlans,omitempty"`
  27. }
  28. type DNSConfig struct {
  29. Nameservers []string `yaml:"nameservers,flow,omitempty"`
  30. Search []string `yaml:"search,flow,omitempty"`
  31. }