Search code examples
apiibm-cloud-infrastructurenas

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


I tried this code but it doesn't return status.

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

And is this related to the volume status? This is the only data that I can see about "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>

Solution

  • Not all storage volumes will have a "volumeStatus" property. This property will generally only be set if an active transaction is going on with the storage volume.