-
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.
89 newvalidation mini aci upgrade to 602+ (#93)
* Added check for mini aci ugprade to 6.0.2 * Modified mini aci check data on failure * Modified test case to use parameterized pytest format * Added documentation to valiations.md
- Loading branch information
Showing
5 changed files
with
483 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,71 @@ | ||
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 | ||
topSystems = 'topSystem.json?query-target-filter=wcard(topSystem.role,"controller")' | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"icurl_outputs, cversion, tversion, expected_result", | ||
[ | ||
( | ||
{topSystems: read_data(dir, "topSystem_controller_neg.json")}, | ||
"3.2(1a)", | ||
"5.2(6a)", | ||
script.PASS, | ||
), | ||
( | ||
{topSystems: read_data(dir, "topSystem_controller_neg.json")}, | ||
"6.0(2e)", | ||
"6.0(5d)", | ||
script.PASS, | ||
), | ||
( | ||
{topSystems: read_data(dir, "topSystem_controller_neg.json")}, | ||
"5.2(3a)", | ||
"6.0(3d)", | ||
script.PASS, | ||
), | ||
( | ||
{topSystems: read_data(dir, "topSystem_controller_pos.json")}, | ||
"4.1(1a)", | ||
"5.2(7f)", | ||
script.PASS, | ||
), | ||
( | ||
{topSystems: read_data(dir, "topSystem_controller_pos.json")}, | ||
"4.2(2a)", | ||
"6.0(2c)", | ||
script.FAIL_UF, | ||
), | ||
( | ||
{topSystems: read_data(dir, "topSystem_controller_pos.json")}, | ||
"6.0(1a)", | ||
"6.0(2c)", | ||
script.FAIL_UF, | ||
), | ||
( | ||
{topSystems: read_data(dir, "topSystem_controller_pos.json")}, | ||
"6.0(2c)", | ||
"6.0(5c)", | ||
script.PASS, | ||
), | ||
], | ||
) | ||
def test_logic(mock_icurl, cversion, tversion, expected_result): | ||
result = script.mini_aci_6_0_2_check( | ||
1, | ||
1, | ||
script.AciVersion(cversion), | ||
script.AciVersion(tversion) if tversion else None, | ||
) | ||
assert result == expected_result |
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,176 @@ | ||
[ | ||
{ | ||
"topSystem": { | ||
"attributes": { | ||
"address": "10.0.0.1", | ||
"bootstrapState": "none", | ||
"childAction": "", | ||
"clusterTimeDiff": "8185177", | ||
"configIssues": "", | ||
"controlPlaneMTU": "1500", | ||
"currentTime": "2024-04-11T12:41:19.198-04:00", | ||
"dn": "topology/pod-1/node-1/sys", | ||
"enforceSubnetCheck": "no", | ||
"etepAddr": "0.0.0.0", | ||
"fabricDomain": "fab5", | ||
"fabricId": "1", | ||
"fabricMAC": "00:22:BD:F8:19:FF", | ||
"id": "1", | ||
"inbMgmtAddr": "40.5.5.1", | ||
"inbMgmtAddr6": "fc00::1", | ||
"inbMgmtAddr6Mask": "0", | ||
"inbMgmtAddrMask": "24", | ||
"inbMgmtGateway": "40.5.5.254", | ||
"inbMgmtGateway6": "::", | ||
"lastRebootTime": "2024-01-03T20:49:19.892-04:00", | ||
"lastResetReason": "unknown", | ||
"lcOwn": "local", | ||
"modTs": "2024-02-01T15:14:43.241-04:00", | ||
"mode": "unspecified", | ||
"monPolDn": "uni/fabric/monfab-default", | ||
"name": "fab5-apic1", | ||
"nameAlias": "", | ||
"nodeType": "unspecified", | ||
"oobMgmtAddr": "192.168.4.84", | ||
"oobMgmtAddr6": "fe80::2aac:9eff:fe41:fb0e", | ||
"oobMgmtAddr6Mask": "0", | ||
"oobMgmtAddrMask": "24", | ||
"oobMgmtGateway": "192.168.4.1", | ||
"oobMgmtGateway6": "::", | ||
"podId": "1", | ||
"remoteNetworkId": "0", | ||
"remoteNode": "no", | ||
"rlOperPodId": "0", | ||
"rlRoutableMode": "no", | ||
"rldirectMode": "no", | ||
"role": "controller", | ||
"serial": "FCH2209V0FW", | ||
"serverType": "unspecified", | ||
"siteId": "0", | ||
"state": "in-service", | ||
"status": "", | ||
"systemUpTime": "98:18:08:25.000", | ||
"tepPool": "0.0.0.0", | ||
"unicastXrEpLearnDisable": "no", | ||
"version": "6.0(4c)", | ||
"virtualMode": "no" | ||
} | ||
} | ||
}, | ||
{ | ||
"topSystem": { | ||
"attributes": { | ||
"address": "10.0.0.2", | ||
"bootstrapState": "none", | ||
"childAction": "", | ||
"clusterTimeDiff": "8397050", | ||
"configIssues": "", | ||
"controlPlaneMTU": "1500", | ||
"currentTime": "2024-04-11T12:41:19.203-04:00", | ||
"dn": "topology/pod-1/node-2/sys", | ||
"enforceSubnetCheck": "no", | ||
"etepAddr": "0.0.0.0", | ||
"fabricDomain": "fab5", | ||
"fabricId": "1", | ||
"fabricMAC": "00:22:BD:F8:19:FF", | ||
"id": "2", | ||
"inbMgmtAddr": "0.0.0.0", | ||
"inbMgmtAddr6": "fc00::1", | ||
"inbMgmtAddr6Mask": "0", | ||
"inbMgmtAddrMask": "0", | ||
"inbMgmtGateway": "0.0.0.0", | ||
"inbMgmtGateway6": "::", | ||
"lastRebootTime": "2024-02-13T12:59:46.015-04:00", | ||
"lastResetReason": "unknown", | ||
"lcOwn": "local", | ||
"modTs": "2024-02-13T15:26:21.281-04:00", | ||
"mode": "unspecified", | ||
"monPolDn": "uni/fabric/monfab-default", | ||
"name": "fab5-apic2", | ||
"nameAlias": "", | ||
"nodeType": "unspecified", | ||
"oobMgmtAddr": "192.168.4.32", | ||
"oobMgmtAddr6": "fe80::e6aa:5dff:fe13:b5bc", | ||
"oobMgmtAddr6Mask": "0", | ||
"oobMgmtAddrMask": "24", | ||
"oobMgmtGateway": "192.168.4.1", | ||
"oobMgmtGateway6": "::", | ||
"podId": "1", | ||
"remoteNetworkId": "0", | ||
"remoteNode": "no", | ||
"rlOperPodId": "0", | ||
"rlRoutableMode": "no", | ||
"rldirectMode": "no", | ||
"role": "controller", | ||
"serial": "FCH1937V0ZD", | ||
"serverType": "unspecified", | ||
"siteId": "0", | ||
"state": "in-service", | ||
"status": "", | ||
"systemUpTime": "57:23:38:01.000", | ||
"tepPool": "0.0.0.0", | ||
"unicastXrEpLearnDisable": "no", | ||
"version": "6.0(4c)", | ||
"virtualMode": "no" | ||
} | ||
} | ||
}, | ||
{ | ||
"topSystem": { | ||
"attributes": { | ||
"address": "10.0.0.3", | ||
"bootstrapState": "none", | ||
"childAction": "", | ||
"clusterTimeDiff": "8270412", | ||
"configIssues": "", | ||
"controlPlaneMTU": "1500", | ||
"currentTime": "2024-04-11T12:41:19.204-04:00", | ||
"dn": "topology/pod-1/node-3/sys", | ||
"enforceSubnetCheck": "no", | ||
"etepAddr": "0.0.0.0", | ||
"fabricDomain": "fab5", | ||
"fabricId": "1", | ||
"fabricMAC": "00:22:BD:F8:19:FF", | ||
"id": "3", | ||
"inbMgmtAddr": "0.0.0.0", | ||
"inbMgmtAddr6": "fc00::1", | ||
"inbMgmtAddr6Mask": "0", | ||
"inbMgmtAddrMask": "0", | ||
"inbMgmtGateway": "0.0.0.0", | ||
"inbMgmtGateway6": "::", | ||
"lastRebootTime": "2024-02-13T13:01:50.077-04:00", | ||
"lastResetReason": "unknown", | ||
"lcOwn": "local", | ||
"modTs": "2024-02-13T15:27:15.193-04:00", | ||
"mode": "unspecified", | ||
"monPolDn": "uni/fabric/monfab-default", | ||
"name": "fab5-apic3", | ||
"nameAlias": "", | ||
"nodeType": "unspecified", | ||
"oobMgmtAddr": "192.168.4.34", | ||
"oobMgmtAddr6": "fe80::e6aa:5dff:fe13:efea", | ||
"oobMgmtAddr6Mask": "0", | ||
"oobMgmtAddrMask": "24", | ||
"oobMgmtGateway": "192.168.4.1", | ||
"oobMgmtGateway6": "::", | ||
"podId": "1", | ||
"remoteNetworkId": "0", | ||
"remoteNode": "no", | ||
"rlOperPodId": "0", | ||
"rlRoutableMode": "no", | ||
"rldirectMode": "no", | ||
"role": "controller", | ||
"serial": "FCH1937V0Z9", | ||
"serverType": "unspecified", | ||
"siteId": "0", | ||
"state": "in-service", | ||
"status": "", | ||
"systemUpTime": "57:23:38:04.000", | ||
"tepPool": "0.0.0.0", | ||
"unicastXrEpLearnDisable": "no", | ||
"version": "6.0(4c)", | ||
"virtualMode": "no" | ||
} | ||
} | ||
} | ||
] |
Oops, something went wrong.