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

时间:2016-05-10 08:08:34

标签: api ibm-cloud-infrastructure nas

我尝试了这段代码,但它没有返回状态。

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>

2 个答案:

答案 0 :(得分:0)

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

答案 1 :(得分:0)

以下表格可以帮助您根据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

我希望它可以帮到你。