Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions aci-preupgrade-validation-script.py
Original file line number Diff line number Diff line change
Expand Up @@ -1816,6 +1816,8 @@ def _icurl_error_handler(imdata):
raise error
elif "unresolved class for" in imdata[0]['error']['attributes']['text']:
raise OldVerClassNotFound('Your current ACI version does not have requested class')
elif "Unknown class" in imdata[0]['error']['attributes']['text']:
raise OldVerClassNotFound('Your current ACI version does not have requested class')
elif "not found" in imdata[0]['error']['attributes']['text']:
raise OldVerClassNotFound('Your current ACI version does not have requested class')
elif "Unable to deliver the message, Resolve timeout" in imdata[0]['error']['attributes']['text']:
Expand Down Expand Up @@ -6999,9 +7001,7 @@ def make_query(dn_batch):
candidate_context_dns.add(ldev_dns[0] + "/lIfCtx-c-Any")
ctx_items, oversized_contexts = query_dns(
"vnsLIfCtx", candidate_context_dns,
"&query-target=self&rsp-subtree=children"
"&rsp-subtree-class=vnsRsLIfCtxToBD,"
"vnsRsLIfCtxToSvcRedirectPol,vnsRsLIfCtxToRemoteSvcRedirectPol")
"&query-target=self&rsp-subtree=children")
contexts = {}
for item in ctx_items:
ctx = item.get("vnsLIfCtx", {})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ def fake_icurl(api_type, query, page_size=100000):
return [item for item in payload["node_relations"]
if item["vnsRsNodeInstToLDevCtx"]["attributes"]["dn"] in dns]
if query.startswith("vnsLIfCtx.json?"):
assert "rsp-subtree-class=" in query
assert "rsp-subtree=children" in query
assert "rsp-subtree-class=" not in query
dns = requested_dns(query)
return [item for item in payload["contexts"]
if item["vnsLIfCtx"]["attributes"]["dn"] in dns]
Expand Down
14 changes: 14 additions & 0 deletions tests/test_icurl.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,20 @@ def test_icurl(mock_icurl, apitype, query, expected_result):
],
script.OldVerClassNotFound,
),
# Unsupported rsp-subtree-class on APIC 5.2.
(
[
{
"error": {
"attributes": {
"code": "12",
"text": "Unknown class vnsRsLIfCtxToRemoteSvcRedirectPol",
}
}
}
],
script.OldVerClassNotFound,
),
# Query timeout (90 sec) - pre-4.1
(
[
Expand Down
Loading