Software Development Kit (SDK) and API Discussions

Creating a thin volumes python / Rest api

paulo2
1,068 Views

Hi All! 

 

I am creating a bulk number of volumes with python / Rest api. 

 

The problem is how to create a volume where a thin provisioning is enabled by default?

 

I am using python / rest api / ontap library. Could you share the code snippets?

 

Here is my code snippet:

 

        volume = Volume()
         volume.name = x["volname"]
         volume.aggregates = [{"name": self.data["aggr"]}]
         volume.size = x["size"]
         volume.svm = {"name": self.data["svm"]}
         pather = "/" + x["volname"]
         volume.nas = {"security_style": "ntfs", "path": pather}
         volume.efficiency = {"compression": "both"}

 

 

 

BR:
Pal

1 ACCEPTED SOLUTION

Ontapforrum
1,011 Views

Check this:
https://library.netapp.com/ecmdocs/ECMLP2858435/html/resources/volume.html#netapp_ontap.resources.volume.VolumeSchema.guarantee

 


Try this (Rest API):
resource.guarantee="none"

 

Or, (Python client)
Volume.guarantee="none" (Give it a try, sorry I am not a python user)


On the side note:
For AFF storage systems, the value of thin provisioning is “Default”, and for other storage systems, the value of thick provisioning is “Default”.
For FabricPool-enabled aggregates, the value of thin provisioning is “Default”.


In case you are lost, just reach out to this link: (Look under Support)
https://github.com/NetApp/ontap-rest-python

 

View solution in original post

1 REPLY 1

Ontapforrum
1,012 Views

Check this:
https://library.netapp.com/ecmdocs/ECMLP2858435/html/resources/volume.html#netapp_ontap.resources.volume.VolumeSchema.guarantee

 


Try this (Rest API):
resource.guarantee="none"

 

Or, (Python client)
Volume.guarantee="none" (Give it a try, sorry I am not a python user)


On the side note:
For AFF storage systems, the value of thin provisioning is “Default”, and for other storage systems, the value of thick provisioning is “Default”.
For FabricPool-enabled aggregates, the value of thin provisioning is “Default”.


In case you are lost, just reach out to this link: (Look under Support)
https://github.com/NetApp/ontap-rest-python

 

Public