The transition to NetApp MS Azure AD B2C is complete. If you missed the pre-registration, you will be invited to reigister at next log in.
Please note that access to your NetApp data may take up to 1 hour.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

Software Development Kit (SDK) and API Discussions

.NET bug with max-constituent-size

Steve-Horbachuk

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
Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public