Skip to content

Commit 3d07f6c

Browse files
committed
AVE check + pytest + doc
1 parent 8f50787 commit 3d07f6c

4 files changed

Lines changed: 103 additions & 3 deletions

File tree

aci-preupgrade-validation-script.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5062,6 +5062,35 @@ def observer_db_size_check(index, total_checks, username, password, **kwargs):
50625062
return result
50635063

50645064

5065+
def ave_eol_check(index, total_checks, tversion, **kwargs):
5066+
title = 'AVE End-of-Life'
5067+
result = PASS
5068+
msg = ''
5069+
headers = ["AVE Domain Name"]
5070+
data = []
5071+
recommended_action = 'AVE domain(s) must be migrated to supported domain types prior to 6.0+ upgrade'
5072+
doc_url = 'https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#ave-end-of-life'
5073+
print_title(title, index, total_checks)
5074+
5075+
ave_api = 'vmmDomP.json'
5076+
ave_api += '?query-target-filter=eq(vmmDomP.enableAVE,"true")'
5077+
5078+
if not tversion:
5079+
print_result(title, MANUAL, "Target version not supplied. Skipping.")
5080+
return MANUAL
5081+
5082+
if tversion.newer_than("6.0(1a)"):
5083+
ave = icurl('class', ave_api)
5084+
for domain in ave:
5085+
name = domain['vmmDomP']['attributes']['name']
5086+
data.append([name])
5087+
if data:
5088+
result = FAIL_O
5089+
5090+
print_result(title, result, msg, headers, data, recommended_action=recommended_action, doc_url=doc_url)
5091+
return result
5092+
5093+
50655094
if __name__ == "__main__":
50665095
prints(' ==== %s%s, Script Version %s ====\n' % (ts, tz, SCRIPT_VERSION))
50675096
prints('!!!! Check https://github.com/datacenter/ACI-Pre-Upgrade-Validation-Script for Latest Release !!!!\n')
@@ -5149,6 +5178,7 @@ def observer_db_size_check(index, total_checks, username, password, **kwargs):
51495178
https_throttle_rate_check,
51505179
aes_encryption_check,
51515180
service_bd_forceful_routing_check,
5181+
ave_eol_check,
51525182

51535183
# Bugs
51545184
ep_announce_check,

docs/docs/validations.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ Items | Faults | This Script
128128
[HTTPS Request Throttle Rate][c20] | :white_check_mark: | :no_entry_sign: | :no_entry_sign:
129129
[Global AES Encryption][c21] | :white_check_mark: | :white_check_mark: 6.1(2) | :no_entry_sign:
130130
[Service Graph BD Forceful Routing][c22] | :white_check_mark: | :no_entry_sign: | :no_entry_sign:
131+
[AVE End-of-life][c23] | :white_check_mark: | :no_entry_sign: | :no_entry_sign:
132+
131133

132134
[c1]: #vpc-paired-leaf-switches
133135
[c2]: #overlapping-vlan-pool
@@ -151,6 +153,7 @@ Items | Faults | This Script
151153
[c20]: #https-request-throttle-rate
152154
[c21]: #global-aes-encryption
153155
[c22]: #service-graph-bd-forceful-routing
156+
[c23]: #ave-end-of-life
154157

155158
### Defect Condition Checks
156159

@@ -1384,7 +1387,7 @@ Failure to do so may lead to outages during switch upgrades due to leaf nodes no
13841387
```
13851388

13861389

1387-
## Equipment Disk Limits Exceeded
1390+
### Equipment Disk Limits Exceeded
13881391

13891392
This fault occurs when the disk usage of a partiton increases beyond its threshold.
13901393

@@ -2088,7 +2091,8 @@ When **Global AES Encryption** is not enabled, this script alerts users in two d
20882091
* When it is not enabled and the target version is older than 6.1(2), this check is flagged as `MANUAL CHECK REQUIRED` to encourage users to follow the best practice to enable it (and take a configuration back again before the upgrade).
20892092

20902093

2091-
## Service Graph BD Forceful Routing
2094+
2095+
### Service Graph BD Forceful Routing
20922096

20932097
Starting from ACI 6.0(2), a bridge domain containing an L4-L7 service graph device (a.k.a service BD) starts to forward packets based on their IP headers even for bridging traffic which used to be forwarded based on their MAC addresses in their ethernet headers and ignored their IP headers. This "forceful routing" is to support IP-based selectors in ESG or microsegement EPG (uSeg EPG) when service graph is configured between those ESGs/uSeg EPGs and they are in the same bridge domain as the service graph device.
20942098

@@ -2138,6 +2142,12 @@ See below for the workaround and examples of traffic that will stop working afte
21382142
See [SNAT Traffic for Kubernetes with Cisco ACI CNI][52] for details about ACI CNI with SNAT.
21392143

21402144

2145+
### AVE End-of-life
2146+
As outlined in the [End-of-Sale and End-of-Life Announcement for Cisco Application Centric Infrastructure Virtual Edge and Virtual Pod][55], the Cisco ACI Virtual Edge (AVE) Domain is end-of-life and end-of-support for ACI releases 6.0 and above.
2147+
2148+
If planning an upgrade to 6.0+, review the [Cisco ACI Virtual Edge Migration Guide][56] and complete a domain migration prior to performing the upgrade.
2149+
2150+
21412151
## Defect Check Details
21422152

21432153
### EP Announce Compatibility
@@ -2536,4 +2546,6 @@ This check logs in to each APIC, checks the contents of the `/data2/dbstats/` di
25362546
[51]: https://www.cisco.com/c/en/us/solutions/collateral/data-center-virtualization/application-centric-infrastructure/white-paper-c11-739971.html
25372547
[52]: https://www.cisco.com/c/en/us/td/docs/switches/datacenter/aci/apic/sw/kb/cisco-aci-plug-in-snat-on-egress.html
25382548
[53]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvw45531
2539-
[54]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvt47850
2549+
[54]: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvt47850
2550+
[55]: https://www.cisco.com/c/en/us/products/collateral/cloud-systems-management/application-policy-infrastructure-controller-apic/eol-apic-virtual-edge-pod-pb.html
2551+
[56]: https://www.cisco.com/c/en/us/td/docs/dcn/whitepapers/cisco-aci-virtual-edge-migration.html
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import os
2+
import pytest
3+
import logging
4+
import importlib
5+
from helpers.utils import read_data
6+
7+
script = importlib.import_module("aci-preupgrade-validation-script")
8+
9+
log = logging.getLogger(__name__)
10+
dir = os.path.dirname(os.path.abspath(__file__))
11+
12+
13+
# icurl queries
14+
15+
ave_api = 'vmmDomP.json'
16+
ave_api += '?query-target-filter=eq(vmmDomP.enableAVE,"true")'
17+
18+
@pytest.mark.parametrize(
19+
"icurl_outputs, tversion, expected_result",
20+
[
21+
# FABRIC HAS AVE and going to affected tversion
22+
(
23+
{ave_api: read_data(dir, "vmmDomP_POS.json")},
24+
"6.1(3b)",
25+
script.FAIL_O,
26+
),
27+
# FABRIC HAS AVE and going to NOT-affected tversion
28+
(
29+
{ave_api: read_data(dir, "vmmDomP_POS.json")},
30+
"5.2(7e)",
31+
script.PASS,
32+
),
33+
# NO AVE
34+
(
35+
{ave_api: []},
36+
"6.1(3b)",
37+
script.PASS,
38+
),
39+
# NO TVERSION
40+
(
41+
{ave_api: []},
42+
None,
43+
script.MANUAL,
44+
),
45+
],
46+
)
47+
def test_logic(mock_icurl, tversion, expected_result):
48+
result = script.ave_eol_check(1, 1, script.AciVersion(tversion) if tversion else None)
49+
assert result == expected_result
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[{
2+
"vmmDomP": {
3+
"attributes": {
4+
"dn": "uni/vmmp-VMware/dom-my-ave",
5+
"enableAVE": "yes",
6+
"name": "my-ave"
7+
}
8+
}
9+
}]

0 commit comments

Comments
 (0)