简体   繁体   English

OnTap API:如何获取卷属性?

[英]OnTap API: How can I get volume attributes?

I am using OnTap API and I am talking to 7-Mode NetApp filer. 我正在使用OnTap API,并且正在与7模式NetApp文件管理器通信。 I am able to get a list of volumes, but I cannot figure out how to get volume attributes. 我可以获取卷列表,但无法弄清楚如何获取卷属性。 I tried to use VolumeGetIterResponse class, here is a code snippet: 我尝试使用VolumeGetIterResponse类,这是一个代码片段:

VolumeGetIterRequest volumeGetIter = new VolumeGetIterRequest();
volumeGetIter.setMaxRecords(100);
List<VolumeAttributes> volAttributes = volumeGetIterResponse.getAttributesList();

for (VolumeAttributes vas : volAttributes) {
    VolumeExportAttributes vs = vas.getVolumeExportAttributes();
}

When running this code, I get an error: 运行此代码时,出现错误:

Unable to find API: volume-get-iter 找不到API:volume-get-iter

Please help me figure out where I am going wrong. 请帮助我找出问题所在。 Your help is greatly appreciated. 非常感谢您的帮助。

From your error, it appears you're using the "volume-get-iter" API. 从您的错误看来,您似乎正在使用“ volume-get-iter” API。 This is a Cluster-Mode API. 这是一个群集模式API。 Since you're talking to a 7-mode, you will need "volume-list-info". 由于您正在使用7模式,因此需要“ volume-list-info”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM