ignition_config/v3_2/mod.rs
1// Copyright 2021 Red Hat, Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// schemafy doesn't derive Eq on structs, and we don't do it either because
16// any floating point value added to a struct in a future schema version
17// would cause cascading Eq removals. PartialEq is good enough for now.
18// https://github.com/Marwes/schemafy/issues/61
19#![allow(clippy::derive_partial_eq_without_eq)]
20
21use semver::Version;
22use serde::{Deserialize, Serialize};
23
24pub(crate) const VERSION: Version = Version::new(3, 2, 0);
25
26include!("schema.rs");
27
28impl Default for Config {
29 fn default() -> Self {
30 Self {
31 ignition: Ignition {
32 version: Some(VERSION.to_string()),
33 ..Default::default()
34 },
35 passwd: None,
36 storage: None,
37 systemd: None,
38 }
39 }
40}