Software Development Kit (SDK) and API Discussions

.NET bug with max-constituent-size

Steve-Horbachuk
1,748 Views

I am using the netapp-manageability-sdk-5.7-dotnet-bindings (with ontapp-9-2.dll). I am trying to resize a volume:

 

                var volumeAttributes = new VolumeAttributes
                {
                    VolumeIdAttributes = new VolumeIdAttributes { Name = volume.VolumeIdAttributes.Name }
                };
                var modify = new VolumeModifyIter
                {
                    Attributes = new VolumeAttributes
                    {
                        VolumeSpaceAttributes = new VolumeSpaceAttributes { Size = 201326592000M }
                    },
                    Query = volumeAttributes
                };
                var result = modify.Invoke(server);

However, the XML that is sent to the controller looks like this (captured using log4net):

 

<volume-modify-iter>
  <attributes>
    <volume-space-attributes>
      <max-constituent-size>0</max-constituent-size>
      <size>201326592000</size>
    </volume-space-attributes>
  </attributes>
  <query>
    <volume-id-attributes>
      <name>volumeXXXX</name>
    </volume-id-attributes>
  </query>
</volume-modify-iter>

 

The volume is not resized and the API returns "Modification of the following fields: max-constituent-size not allowed for volumes of the type \"Flexible Volume - Read-Write volume\"." in the failure details. Obviously none of my code is modifying the value for MaxConsituentSize, which is what the API is complaining about. 

 

I beleive the problem is VolumeSpaceAttributes.MaxConstituentSize is a decimal instead of a nullable decimal (decimal?).

 

Has anyone found a workaround for this?

 

So far I've tried:

Setting MaxConsistuentSize to -1, 0

Inheriting from VolumeSpaceAttributes and overrriding the property to a nullable decimal (would not serialize)

 

 

0 REPLIES 0
Public