NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

Software Development Kit (SDK) and API Discussions

{'additional_info': {'_schema': ['Invalid input type.']}} on MetroclusterDiagnostics()

Moon
914 Views

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?

 

 Python code:

 

        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

 

0 REPLIES 0
Public