Hello
I am trying to get Metrocluster diagnostics information via netapp_ontap python library as shown below but the python code returns {'additional_info': {'_schema': ['Invalid input type.']}} error but API (https://<cluster ip>/docs/api/#/cluster/metrocluster_diagnostics_get) shows the output without any issue.
Has anyone had the same issue and the resolution?
try:
config.CONNECTION = HostConnection(cluster_ip, username=cluster_username, password=cluster_password, verify=False)
resource = MetroclusterDiagnostics()
resource.get(fields="cluster.details")
print(resource)
except Exception as e:
logging.error(e)
Python code Error :
ERROR Caused by ValidationError({'cluster': {'details': {0: {'checks': {0: {'additional_info': {'_schema': ['Invalid input type.']}}, 1: {'additional_info': {'_schema': ['Invalid input type.']}}}}, 1: {'checks': {0: {'additional_info': {'_schema': ['Invalid input type.']}}, 1: {'additional_info': {'_schema': ['Invalid input type.']}}}}}}})
API output (https://<cluster ip>/docs/api/#/cluster/metrocluster_diagnostics_get) :
{
"cluster": {
"details": [
{
"cluster": {
"uuid": "xxxxxxxxxx",
"name": "netapp2-1-util-np"
},
"timestamp": "2024-06-28T09:47:00+00:00",
"checks": [
{
"name": "negotiated_switchover_ready",
"result": "not_applicable",
"additional_info": "Disaster recovery readiness checks are not performed as part of periodic metrocluster check. To run these checks, use the \"metrocluster check run\" command."
},
{
"name": "switchback_ready",
"result": "not_applicable",
"additional_info": "Disaster recovery readiness checks are not performed as part of periodic metrocluster check. To run these checks, use the \"metrocluster check run\" command."
},
{
"name": "job_schedules",
"result": "ok"
},
{
"name": "licenses",
"result": "ok"
},
{
"name": "periodic_check_enabled",
"result": "ok"
},
{
"name": "onboard_key_management",
"result": "ok"
},
{
"name": "external_key_management",
"result": "ok"
}
]
},
{
"cluster": {
"uuid": "xxxxxxx",
"name": "netapp1-1-util-np"
},
"timestamp": "2024-06-28T09:47:00+00:00",
"checks": [
{
"name": "negotiated_switchover_ready",
"result": "not_applicable",
"additional_info": "Disaster recovery readiness checks are not performed as part of periodic metrocluster check. To run these checks, use the \"metrocluster check run\" command."
},
{
"name": "switchback_ready",
"result": "not_applicable",
"additional_info": "Disaster recovery readiness checks are not performed as part of periodic metrocluster check. To run these checks, use the \"metrocluster check run\" command."
},
{
"name": "job_schedules",
"result": "ok"
},
{
"name": "licenses",
"result": "ok"
},
{
"name": "periodic_check_enabled",
"result": "ok"
},
{
"name": "onboard_key_management",
"result": "ok"
},
{
"name": "external_key_management",
"result": "ok"
}
]
}
]
}
}
Regards
Moon