跳转到主内容

如何使用API获取与SVM关联的聚合列表?

Views:
Visibility:
Public
Votes:
0
Category:
ontap-9
Specialty:
CORE
Last Updated:

适用场景

  • ONTAP 9
  • API

问题解答

可以、我们可以列出与SVM关联的聚合:

  • 从API:

卷曲:
curl -X GET "https://<Cluster-IP>/api/svm/svms?fields=aggregates&return_records=true&return_timeout=15" -H  "accept: application/json" -H  "authorization: Basic YWRxxxxxxxxx546gfnfda"

请求URL:
https://<Cluster-IP>/api/svm/svms?fields=aggregates&return_records=true&return_timeout=15

示例:

{
 "records": [
   {
   "uuid": "c537a90a-85eb-11ef-8fe0-00a098daafd4",
   "name": "svm1",
   "aggregates": [
     {
     "name": "aggr1",
     "uuid": "68feeb17-657a-422c-b80a-4987963ce002"
     }
    ]
   },
   {
   "uuid": "eb403c17-89e7-11ef-8fe0-00a098daafd4",
   "name": "test",
   "aggregates": [
     {
     "name": "aggr2",
     "uuid": "cd757222-0dba-49fe-ab15-b541cf9abe83"
     },
     {
     "name": "aggr1",
     "uuid": "68feeb17-657a-422c-b80a-4987963ce002"
     }
    ]
   }
  ],
 "num_records": 2
}

 

  • 从命令行界面:

::*> vserver show -fields aggr-list                                               
vserver aggr-list
------- ---------
Cluster -
fas8200-2n-rtp-5 -
fas8200-rtp-12a -
fas8200-rtp-12b -
svm1  aggr1
test   aggr2,aggr1
6 entries were displayed.

 

在上面的示例中、我们可以看到Vserver "vm1" 有一个 聚合 、即aggr1、 而Vserver "test"有两个聚合 、即aggr1和aggr2。

追加信息

 

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.