Skip to content

Commit

Permalink
kubelet: Add aliases for ValidCpuManagerPolicy
Browse files Browse the repository at this point in the history
Signed-off-by: Sean McGinnis <stmcg@amazon.com>
  • Loading branch information
stmcginnis committed May 4, 2023
1 parent ac1e6e9 commit 9f93779
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sources/models/src/modeled_types/kubernetes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,9 @@ pub struct CpuManagerPolicy {
#[derive(Debug, Clone, Eq, PartialEq, Hash, Deserialize)]
#[serde(rename_all = "lowercase")]
enum ValidCpuManagerPolicy {
#[serde(alias = "Static")]
Static,
#[serde(alias = "None")]
None,
}

Expand All @@ -802,7 +804,7 @@ mod test_cpu_manager_policy {

#[test]
fn good_cpu_manager_policy() {
for ok in &["static", "none"] {
for ok in &["Static", "static", "None", "none"] {
CpuManagerPolicy::try_from(*ok).unwrap();
}
}
Expand Down

0 comments on commit 9f93779

Please sign in to comment.