Skip to content

[DPB][YANG] Fix cases when boolean is used in different literal cases #9418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/sonic-yang-models/yang-models/sonic-feature.yang
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,22 @@ module sonic-feature{
leaf has_timer {
description "This configuration identicates if there is
timer associated to this feature";
type boolean;
default false;
type stypes:boolean_type;
default "false";
}

leaf has_global_scope {
description "This configuration identicates there will only one service
spawned for the device";
type boolean;
default false;
type stypes:boolean_type;
default "false";
}

leaf has_per_asic_scope {
description "This configuration identicates there will only one service
spawned per asic";
type boolean;
default false;
type stypes:boolean_type;
default "false";
}

leaf high_mem_alert {
Expand Down
6 changes: 5 additions & 1 deletion src/sonic-yang-models/yang-models/sonic-flex_counter.yang
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ module sonic-flex_counter {
namespace "http://github.com/Azure/sonic-flex_counter";
prefix flex_counter;

import sonic-types {
prefix stypes;
}

description "FLEX COUNTER YANG Module for SONiC OS";

revision 2020-04-10 {
Expand All @@ -24,7 +28,7 @@ module sonic-flex_counter {
}

typedef flex_delay_status {
type boolean;
type stypes:boolean_type;
}

description "FLEX_COUNTER_TABLE part of config_db.json";
Expand Down
5 changes: 5 additions & 0 deletions src/sonic-yang-models/yang-templates/sonic-types.yang.j2
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,11 @@ module sonic-types {
}
}

typedef boolean_type {
type string {
pattern "false|true|False|True";
}
}


/* Required for CVL */
Expand Down