(Softlayer API) 如何在 softlayer 中获取 NAS 存储的卷状态?

(Softlayer API) How can I get volume status for NAS Storage in softlayer?

我试过这段代码,但它没有 return 状态。

Storage.Service service = Nas.service(client, storageId);
service.withMask().volumeStatus();
service.withMask().parentVolume().volumeStatus();

这与音量状态有关吗?这是我能看到的关于 "status"

的唯一数据
<networkDevice>
    <complexType>SoftLayer_Hardware_Router_Backend</complexType>
        <bareMetalInstanceFlag>0</bareMetalInstanceFlag>
        <domain>softlayer.com</domain>
        <fullyQualifiedDomainName>bcr01.dal01.softlayer.com</fullyQualifiedDomainName>
        <hostname>bcr01.dal01</hostname>
        <id>1</id>
        <notes></notes>
        <provisionDate />
        <serviceProviderId>1</serviceProviderId>
        <serviceProviderResourceId />
        <datacenter>
            <complexType>SoftLayer_Location_Datacenter</complexType>
            <id>3</id>
            <longName>Dallas 1</longName>
            <name>dal01</name>
            <statusId>2</statusId>
        </datacenter>
    </networkDevice>

并非所有存储卷都有 "volumeStatus" 属性。此 属性 通常仅在存储卷正在进行活动事务时才会设置。

下面是一个table可以帮助你得到status作为传送门根据replication status:

Volume Type          Replication Status    Status displayed in Portal
Non Endurance         N/A                   Active
Endurance – replica   FAILOVER_COMPLETED    Active
Endurance - primary   FAILOVER_COMPLETED    Inactive
Endurance - Replica   FAILBACK_COMPLETED    Inactive
Endurance - primary   FAILBACK_COMPLETED    Active
Endurance – replica   Null                  Inactive
Endurance – primary   Null                  Active

希望对你有所帮助