forked from bottlerocket-os/bottlerocket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmod.rs
36 lines (34 loc) · 1.36 KB
/
mod.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
use crate::modeled_types::Identifier;
use crate::{
AutoScalingSettings, AwsSettings, BootSettings, BootstrapContainer, CloudFormationSettings,
ContainerRuntimeSettings, DnsSettings, HostContainer, KernelSettings, KubernetesSettings,
MetricsSettings, NetworkSettings, NtpSettings, OciDefaults, OciHooks, PemCertificate,
RegistrySettings, UpdatesSettings,
};
use model_derive::model;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
// Note: we have to use 'rename' here because the top-level Settings structure is the only one
// that uses its name in serialization; internal structures use the field name that points to it
#[model(rename = "settings", impl_default = true)]
struct Settings {
motd: String,
kubernetes: KubernetesSettings,
updates: UpdatesSettings,
host_containers: HashMap<Identifier, HostContainer>,
bootstrap_containers: HashMap<Identifier, BootstrapContainer>,
ntp: NtpSettings,
network: NetworkSettings,
kernel: KernelSettings,
boot: BootSettings,
aws: AwsSettings,
metrics: MetricsSettings,
pki: HashMap<Identifier, PemCertificate>,
container_registry: RegistrySettings,
oci_defaults: OciDefaults,
oci_hooks: OciHooks,
cloudformation: CloudFormationSettings,
dns: DnsSettings,
container_runtime: ContainerRuntimeSettings,
autoscaling: AutoScalingSettings,
}