Software Development Kit (SDK) and API Discussions

Disabling automatic snapshots on volume over API

ilmarkerm
2,381 Views

I'd like to use API function volume-modify-iter to disable automatic snapshots for a volume, but when I set auto-snapshots-enabled attribute to false using this function no error is returned, but automatic snapshots are not disabled. Anyone know how to disable automatic snapshots over API?

 

When using the XML example below, the call successfully disable snapdir access and volume autosize is also set to grow successfully, but automatic snapshots are still enabled.

 

ONTAP 9.1P2

Hardware: AFF8080-R6

SDK in use: netapp-manageability-sdk-5.6, python

 

XML call:

 

<volume-modify-iter>
        <attributes>
                <volume-attributes>
                        <volume-snapshot-attributes>
                                <auto-snapshots-enabled>false</auto-snapshots-enabled>
                                <snapdir-access-enabled>false</snapdir-access-enabled>
                        </volume-snapshot-attributes>
                        <volume-autosize-attributes>
                                <mode>grow</mode>
                        </volume-autosize-attributes>
                </volume-attributes>
        </attributes>
        <query>
                <volume-attributes>
                        <volume-id-attributes>
                                <name>oc1swe1_qadb01rac</name>
                        </volume-id-attributes>
                </volume-attributes>
        </query>
        <max-records>1</max-records>
</volume-modify-iter>

Response:

<results status="passed">
        <success-list>
                <volume-modify-iter-info>
                        <volume-key>
                                <volume-attributes>
                                        <volume-id-attributes>
                                                <name>oc1swe1_qadb01rac</name>
                                                <owning-vserver-name>oracle_backup</owning-vserver-name>
                                        </volume-id-attributes>
                                </volume-attributes>
                        </volume-key>
                </volume-modify-iter-info>
        </success-list>
        <failure-list></failure-list>
        <next-tag>&lt;volume-modify-iter-key-td&gt;
        &lt;key-0&gt;oracle_backup&lt;/key-0&gt;
        &lt;key-1&gt;oc1swe1_qadb01rac&lt;/key-1&gt;
&lt;/volume-modify-iter-key-td&gt;
</next-tag>
        <num-failed>0</num-failed>
        <num-succeeded>1</num-succeeded>
</results>
1 REPLY 1

mjschneider
2,284 Views

It appears that auto-snapshots-enable is "non-modifiable".

 

        <volume-snapshot-attributes>
          <!--If true, enable automatic snapshots on the volume. <p> The default value is true. <p> Attributes: non-creatable, non-modifiable-->
          <auto-snapshots-enabled></auto-snapshots-enabled>
          <!--If true, enable the visible '.snapshot' directory that is normally present at system internal mount points. This value also turns on access to all other '.snapshot' directories in the volume. <p> The default value is true. <p> Attributes: non-creatable, modifiable-->
          <snapdir-access-enabled></snapdir-access-enabled>
        </volume-snapshot-attributes>

That at least explains why it didnt change it, not sure if there is an alternate api call for it though.

Public