Skip to content

Commit

Permalink
[meta] Add create only oid attribute check on switch object (sonic-ne…
Browse files Browse the repository at this point in the history
…t#1170)

Signed-off-by: kcudnik <kcudnik@gmail.com>
  • Loading branch information
kcudnik committed Dec 8, 2020
1 parent 14cf507 commit 8a0e82c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions meta/saisanitycheck.c
Original file line number Diff line number Diff line change
Expand Up @@ -4136,6 +4136,11 @@ void check_switch_attributes()
{
META_MD_ASSERT_FAIL(md, "Mandatroy on create can't be object id on SWITCH");
}

if (md->isoidattribute && md->iscreateonly)
{
META_MD_ASSERT_FAIL(md, "Create only can't be object id on SWITCH");
}
}
}

Expand Down

0 comments on commit 8a0e82c

Please sign in to comment.