Skip to content

Commit

Permalink
[yang]: Update AAA yang models (#9724)
Browse files Browse the repository at this point in the history
#### Why I did it
AAA yang model is not up to date.

#### How I did it
Add fallback and trace field, and replace boolean_type

#### How to verify it
Run UT for sonic_yang_models.
Follow the steps from #9710
  • Loading branch information
ganglyu authored Jan 12, 2022
1 parent c11ab02 commit c69d376
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/sonic-yang-models/tests/yang_model_tests/tests/aaa.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
},
"AAA_TEST_WRONG_FAILTHROUGH": {
"desc": "Configure a wrong failthrough in AAA table.",
"eStrKey": "InvalidValue"
"eStrKey": "Pattern",
"eStr": ["false|true|False|True"]
},
"AAA_AUTHORIZATION_TEST": {
"desc": "Configure an authorization type in AAA table."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
"AAA_LIST": [{
"type": "authentication",
"login": "tacacs+,local",
"failthrough": "true",
"debug": "true"
"failthrough": "True",
"fallback": "True",
"trace": "True",
"debug": "True"
}]
}
}
Expand Down
23 changes: 19 additions & 4 deletions src/sonic-yang-models/yang-models/sonic-system-aaa.yang
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ module sonic-system-aaa {
prefix ssys;
yang-version 1.1;

import sonic-types {
prefix stypes;
}

revision 2021-10-12 {
description "Add AAA authorization/accounting support.";
}
Expand Down Expand Up @@ -32,17 +36,28 @@ module sonic-system-aaa {
}

leaf failthrough {
type boolean;
type stypes:boolean_type;
description "When set to true, authentication is attempted on next configured server/local in the list upon failure.";
default false;
default False;
}

leaf fallback {
type stypes:boolean_type;
description "Allow AAA fallback";
default False;
}

leaf debug {
type boolean;
type stypes:boolean_type;
description "Enable/disable AAA debugging";
default false;
default False;
}

leaf trace {
type stypes:boolean_type;
description "AAA packet trace";
default False;
}
}
}
}
Expand Down

0 comments on commit c69d376

Please sign in to comment.