-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* new validation for CSCwf05073 * cosmetic change * Update aci-preupgrade-validation-script.py Co-authored-by: takishida <[email protected]> * Update aci-preupgrade-validation-script.py Co-authored-by: takishida <[email protected]> * Update docs/docs/validations.md Co-authored-by: takishida <[email protected]> * Update docs/docs/validations.md Co-authored-by: takishida <[email protected]> * Update docs/docs/validations.md Co-authored-by: takishida <[email protected]> * Update docs/docs/validations.md Co-authored-by: takishida <[email protected]> * modify affected versions * query for dpp on + update tests --------- Co-authored-by: takishida <[email protected]> Co-authored-by: gmonroy <[email protected]>
- Loading branch information
1 parent
80bc006
commit e1de09f
Showing
5 changed files
with
124 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[ | ||
{ | ||
"lbpPol": { | ||
"attributes": { | ||
"dlbMode": "off", | ||
"dn": "uni/fabric/lbp-default", | ||
"hashGtp": "no", | ||
"mode": "traditional", | ||
"name": "default", | ||
"pri": "on" | ||
} | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import os | ||
import pytest | ||
import logging | ||
import importlib | ||
from helpers.utils import read_data | ||
|
||
script = importlib.import_module("aci-preupgrade-validation-script") | ||
|
||
log = logging.getLogger(__name__) | ||
dir = os.path.dirname(os.path.abspath(__file__)) | ||
|
||
|
||
# icurl queries | ||
lbpPol = 'lbpPol.json' | ||
lbpPol += '?query-target-filter=eq(lbpPol.pri,"on")' | ||
|
||
@pytest.mark.parametrize( | ||
"icurl_outputs, tversion, expected_result", | ||
[ | ||
# DPP is on | ||
( | ||
{lbpPol: read_data(dir, "lbpPol_POS.json")}, | ||
"5.2(2h)", | ||
script.FAIL_O, | ||
), | ||
( | ||
{lbpPol: read_data(dir, "lbpPol_POS.json")}, | ||
"5.2(8e)", | ||
script.PASS, | ||
), | ||
( | ||
{lbpPol: read_data(dir, "lbpPol_POS.json")}, | ||
"6.0(2h)", | ||
script.FAIL_O, | ||
), | ||
( | ||
{lbpPol: read_data(dir, "lbpPol_POS.json")}, | ||
"6.0(3d)", | ||
script.PASS, | ||
), | ||
# DPP is off | ||
( | ||
{lbpPol: read_data(dir, "lbpPol_NEG.json")}, | ||
"5.0(2h)", | ||
script.PASS, | ||
), | ||
( | ||
{lbpPol: read_data(dir, "lbpPol_NEG.json")}, | ||
"5.2(8e)", | ||
script.PASS, | ||
), | ||
( | ||
{lbpPol: read_data(dir, "lbpPol_NEG.json")}, | ||
"6.0(2h)", | ||
script.PASS, | ||
), | ||
( | ||
{lbpPol: read_data(dir, "lbpPol_NEG.json")}, | ||
"6.0(3d)", | ||
script.PASS, | ||
), | ||
], | ||
) | ||
def test_logic(mock_icurl, tversion, expected_result): | ||
result = script.fabric_dpp_check( | ||
1, 1, script.AciVersion(tversion) | ||
) | ||
assert result == expected_result |