Skip to content

Commit

Permalink
settings: use oci defaults settings extension in models
Browse files Browse the repository at this point in the history
  • Loading branch information
mgsharm committed Jun 11, 2024
1 parent 903a43f commit a73c328
Show file tree
Hide file tree
Showing 16 changed files with 28 additions and 30 deletions.
1 change: 1 addition & 0 deletions sources/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions sources/models/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ settings-extension-metrics = { path = "../settings-extensions/metrics", version
settings-extension-motd = { path = "../settings-extensions/motd", version = "0.1" }
settings-extension-network = { path = "../settings-extensions/network", version = "0.1" }
settings-extension-ntp = { path = "../settings-extensions/ntp", version = "0.1" }
settings-extension-oci-defaults = { path = "../settings-extensions/oci-defaults", version = "0.1" }
settings-extension-oci-hooks = { path = "../settings-extensions/oci-hooks", version = "0.1" }
settings-extension-pki = { path = "../settings-extensions/pki", version = "0.1" }
settings-extension-updates = { path = "../settings-extensions/updates", version = "0.1" }
Expand Down
4 changes: 1 addition & 3 deletions sources/models/src/aws-ecs-1-nvidia/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
use model_derive::model;

use crate::OciDefaults;

// 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)]
Expand All @@ -18,7 +16,7 @@ struct Settings {
metrics: settings_extension_metrics::MetricsSettingsV1,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_defaults: settings_extension_oci_defaults::OciDefaultsV1,
oci_hooks: settings_extension_oci_hooks::OciHooksSettingsV1,
cloudformation: settings_extension_cloudformation::CloudFormationSettingsV1,
autoscaling: settings_extension_autoscaling::AutoScalingSettingsV1,
Expand Down
4 changes: 1 addition & 3 deletions sources/models/src/aws-ecs-1/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
use model_derive::model;

use crate::OciDefaults;

// 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)]
Expand All @@ -18,7 +16,7 @@ struct Settings {
metrics: settings_extension_metrics::MetricsSettingsV1,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_defaults: settings_extension_oci_defaults::OciDefaultsV1,
oci_hooks: settings_extension_oci_hooks::OciHooksSettingsV1,
cloudformation: settings_extension_cloudformation::CloudFormationSettingsV1,
autoscaling: settings_extension_autoscaling::AutoScalingSettingsV1,
Expand Down
4 changes: 2 additions & 2 deletions sources/models/src/aws-ecs-2-nvidia/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use model_derive::model;

use crate::{BootSettings, OciDefaults};
use crate::BootSettings;

// 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
Expand All @@ -19,7 +19,7 @@ struct Settings {
metrics: settings_extension_metrics::MetricsSettingsV1,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_defaults: settings_extension_oci_defaults::OciDefaultsV1,
oci_hooks: settings_extension_oci_hooks::OciHooksSettingsV1,
cloudformation: settings_extension_cloudformation::CloudFormationSettingsV1,
autoscaling: settings_extension_autoscaling::AutoScalingSettingsV1,
Expand Down
4 changes: 2 additions & 2 deletions sources/models/src/aws-ecs-2/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use model_derive::model;

use crate::{BootSettings, OciDefaults};
use crate::BootSettings;

// 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
Expand All @@ -19,7 +19,7 @@ struct Settings {
metrics: settings_extension_metrics::MetricsSettingsV1,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_defaults: settings_extension_oci_defaults::OciDefaultsV1,
oci_hooks: settings_extension_oci_hooks::OciHooksSettingsV1,
cloudformation: settings_extension_cloudformation::CloudFormationSettingsV1,
autoscaling: settings_extension_autoscaling::AutoScalingSettingsV1,
Expand Down
4 changes: 2 additions & 2 deletions sources/models/src/aws-k8s-1.24-nvidia/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{BootSettings, KubernetesSettings, OciDefaults};
use crate::{BootSettings, KubernetesSettings};

use model_derive::model;

Expand All @@ -19,7 +19,7 @@ struct Settings {
metrics: settings_extension_metrics::MetricsSettingsV1,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_defaults: settings_extension_oci_defaults::OciDefaultsV1,
oci_hooks: settings_extension_oci_hooks::OciHooksSettingsV1,
cloudformation: settings_extension_cloudformation::CloudFormationSettingsV1,
dns: settings_extension_dns::DnsSettingsV1,
Expand Down
4 changes: 2 additions & 2 deletions sources/models/src/aws-k8s-1.24/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{BootSettings, KubernetesSettings, OciDefaults};
use crate::{BootSettings, KubernetesSettings};

use model_derive::model;

Expand All @@ -19,7 +19,7 @@ struct Settings {
metrics: settings_extension_metrics::MetricsSettingsV1,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_defaults: settings_extension_oci_defaults::OciDefaultsV1,
oci_hooks: settings_extension_oci_hooks::OciHooksSettingsV1,
cloudformation: settings_extension_cloudformation::CloudFormationSettingsV1,
dns: settings_extension_dns::DnsSettingsV1,
Expand Down
4 changes: 2 additions & 2 deletions sources/models/src/aws-k8s-1.25-nvidia/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{BootSettings, KubernetesSettings, OciDefaults};
use crate::{BootSettings, KubernetesSettings};

use model_derive::model;

Expand All @@ -19,7 +19,7 @@ struct Settings {
metrics: settings_extension_metrics::MetricsSettingsV1,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_defaults: settings_extension_oci_defaults::OciDefaultsV1,
oci_hooks: settings_extension_oci_hooks::OciHooksSettingsV1,
cloudformation: settings_extension_cloudformation::CloudFormationSettingsV1,
dns: settings_extension_dns::DnsSettingsV1,
Expand Down
4 changes: 2 additions & 2 deletions sources/models/src/aws-k8s-1.25/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{BootSettings, KubernetesSettings, OciDefaults};
use crate::{BootSettings, KubernetesSettings};

use model_derive::model;

Expand All @@ -19,7 +19,7 @@ struct Settings {
metrics: settings_extension_metrics::MetricsSettingsV1,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_defaults: settings_extension_oci_defaults::OciDefaultsV1,
oci_hooks: settings_extension_oci_hooks::OciHooksSettingsV1,
cloudformation: settings_extension_cloudformation::CloudFormationSettingsV1,
dns: settings_extension_dns::DnsSettingsV1,
Expand Down
4 changes: 2 additions & 2 deletions sources/models/src/aws-k8s-1.26-nvidia/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{BootSettings, KubernetesSettings, OciDefaults};
use crate::{BootSettings, KubernetesSettings};

use model_derive::model;

Expand All @@ -19,7 +19,7 @@ struct Settings {
metrics: settings_extension_metrics::MetricsSettingsV1,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_defaults: settings_extension_oci_defaults::OciDefaultsV1,
oci_hooks: settings_extension_oci_hooks::OciHooksSettingsV1,
cloudformation: settings_extension_cloudformation::CloudFormationSettingsV1,
dns: settings_extension_dns::DnsSettingsV1,
Expand Down
4 changes: 2 additions & 2 deletions sources/models/src/aws-k8s-1.26/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{BootSettings, KubernetesSettings, OciDefaults};
use crate::{BootSettings, KubernetesSettings};

use model_derive::model;

Expand All @@ -19,7 +19,7 @@ struct Settings {
metrics: settings_extension_metrics::MetricsSettingsV1,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_defaults: settings_extension_oci_defaults::OciDefaultsV1,
oci_hooks: settings_extension_oci_hooks::OciHooksSettingsV1,
cloudformation: settings_extension_cloudformation::CloudFormationSettingsV1,
dns: settings_extension_dns::DnsSettingsV1,
Expand Down
4 changes: 2 additions & 2 deletions sources/models/src/aws-k8s-1.30-nvidia/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{BootSettings, KubernetesSettings, OciDefaults};
use crate::{BootSettings, KubernetesSettings};

use model_derive::model;

Expand All @@ -19,7 +19,7 @@ struct Settings {
metrics: settings_extension_metrics::MetricsSettingsV1,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_defaults: settings_extension_oci_defaults::OciDefaultsV1,
oci_hooks: settings_extension_oci_hooks::OciHooksSettingsV1,
cloudformation: settings_extension_cloudformation::CloudFormationSettingsV1,
dns: settings_extension_dns::DnsSettingsV1,
Expand Down
4 changes: 2 additions & 2 deletions sources/models/src/aws-k8s-1.30/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{BootSettings, KubernetesSettings, OciDefaults};
use crate::{BootSettings, KubernetesSettings};

use model_derive::model;

Expand All @@ -19,7 +19,7 @@ struct Settings {
metrics: settings_extension_metrics::MetricsSettingsV1,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_defaults: settings_extension_oci_defaults::OciDefaultsV1,
oci_hooks: settings_extension_oci_hooks::OciHooksSettingsV1,
cloudformation: settings_extension_cloudformation::CloudFormationSettingsV1,
dns: settings_extension_dns::DnsSettingsV1,
Expand Down
4 changes: 2 additions & 2 deletions sources/models/src/metal-k8s-1.29/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use model_derive::model;

use crate::{BootSettings, KubernetesSettings, OciDefaults};
use crate::{BootSettings, KubernetesSettings};

// 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
Expand All @@ -19,7 +19,7 @@ struct Settings {
metrics: settings_extension_metrics::MetricsSettingsV1,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_defaults: settings_extension_oci_defaults::OciDefaultsV1,
oci_hooks: settings_extension_oci_hooks::OciHooksSettingsV1,
dns: settings_extension_dns::DnsSettingsV1,
container_runtime: settings_extension_container_runtime::ContainerRuntimeSettingsV1,
Expand Down
4 changes: 2 additions & 2 deletions sources/models/src/vmware-k8s-1.30/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use model_derive::model;

use crate::{BootSettings, KubernetesSettings, OciDefaults};
use crate::{BootSettings, KubernetesSettings};

// 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
Expand All @@ -19,7 +19,7 @@ struct Settings {
metrics: settings_extension_metrics::MetricsSettingsV1,
pki: settings_extension_pki::PkiSettingsV1,
container_registry: settings_extension_container_registry::RegistrySettingsV1,
oci_defaults: OciDefaults,
oci_defaults: settings_extension_oci_defaults::OciDefaultsV1,
oci_hooks: settings_extension_oci_hooks::OciHooksSettingsV1,
dns: settings_extension_dns::DnsSettingsV1,
container_runtime: settings_extension_container_runtime::ContainerRuntimeSettingsV1,
Expand Down

0 comments on commit a73c328

Please sign in to comment.