<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic .NET bug with max-constituent-size in Software Development Kit (SDK) and API Discussions</title>
    <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/NET-bug-with-max-constituent-size/m-p/137186#M2535</link>
    <description>&lt;P&gt;I am using the netapp-manageability-sdk-5.7-dotnet-bindings (with ontapp-9-2.dll). I am trying to resize a volume:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;                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);&lt;/PRE&gt;&lt;P&gt;However, the XML that is sent to the controller looks like this (captured using log4net):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;volume-modify-iter&amp;gt;
  &amp;lt;attributes&amp;gt;
    &amp;lt;volume-space-attributes&amp;gt;
      &amp;lt;max-constituent-size&amp;gt;0&amp;lt;/max-constituent-size&amp;gt;
      &amp;lt;size&amp;gt;201326592000&amp;lt;/size&amp;gt;
    &amp;lt;/volume-space-attributes&amp;gt;
  &amp;lt;/attributes&amp;gt;
  &amp;lt;query&amp;gt;
    &amp;lt;volume-id-attributes&amp;gt;
      &amp;lt;name&amp;gt;volumeXXXX&amp;lt;/name&amp;gt;
    &amp;lt;/volume-id-attributes&amp;gt;
  &amp;lt;/query&amp;gt;
&amp;lt;/volume-modify-iter&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I beleive the problem is VolumeSpaceAttributes.MaxConstituentSize is a decimal instead of a nullable decimal (decimal?).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has anyone found a workaround for this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far I've tried:&lt;/P&gt;&lt;P&gt;Setting MaxConsistuentSize to -1, 0&lt;/P&gt;&lt;P&gt;Inheriting from VolumeSpaceAttributes and overrriding the property to a nullable decimal (would not serialize)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jun 2025 14:10:09 GMT</pubDate>
    <dc:creator>Steve-Horbachuk</dc:creator>
    <dc:date>2025-06-04T14:10:09Z</dc:date>
    <item>
      <title>.NET bug with max-constituent-size</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/NET-bug-with-max-constituent-size/m-p/137186#M2535</link>
      <description>&lt;P&gt;I am using the netapp-manageability-sdk-5.7-dotnet-bindings (with ontapp-9-2.dll). I am trying to resize a volume:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;                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);&lt;/PRE&gt;&lt;P&gt;However, the XML that is sent to the controller looks like this (captured using log4net):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;volume-modify-iter&amp;gt;
  &amp;lt;attributes&amp;gt;
    &amp;lt;volume-space-attributes&amp;gt;
      &amp;lt;max-constituent-size&amp;gt;0&amp;lt;/max-constituent-size&amp;gt;
      &amp;lt;size&amp;gt;201326592000&amp;lt;/size&amp;gt;
    &amp;lt;/volume-space-attributes&amp;gt;
  &amp;lt;/attributes&amp;gt;
  &amp;lt;query&amp;gt;
    &amp;lt;volume-id-attributes&amp;gt;
      &amp;lt;name&amp;gt;volumeXXXX&amp;lt;/name&amp;gt;
    &amp;lt;/volume-id-attributes&amp;gt;
  &amp;lt;/query&amp;gt;
&amp;lt;/volume-modify-iter&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I beleive the problem is VolumeSpaceAttributes.MaxConstituentSize is a decimal instead of a nullable decimal (decimal?).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has anyone found a workaround for this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far I've tried:&lt;/P&gt;&lt;P&gt;Setting MaxConsistuentSize to -1, 0&lt;/P&gt;&lt;P&gt;Inheriting from VolumeSpaceAttributes and overrriding the property to a nullable decimal (would not serialize)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 14:10:09 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/NET-bug-with-max-constituent-size/m-p/137186#M2535</guid>
      <dc:creator>Steve-Horbachuk</dc:creator>
      <dc:date>2025-06-04T14:10:09Z</dc:date>
    </item>
  </channel>
</rss>

