<?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 Re: How to pull the snapshot size using PYTHON in Python Discussions</title>
    <link>https://community.netapp.com/t5/Python-Discussions/How-to-pull-the-snapshot-size-using-PYTHON/m-p/455949#M72</link>
    <description>&lt;P&gt;hey is this feature available now? I am lookng to get snapshot size via API. Please advice&lt;/P&gt;</description>
    <pubDate>Mon, 21 Oct 2024 06:43:07 GMT</pubDate>
    <dc:creator>ABisht</dc:creator>
    <dc:date>2024-10-21T06:43:07Z</dc:date>
    <item>
      <title>How to pull the snapshot size using PYTHON</title>
      <link>https://community.netapp.com/t5/Python-Discussions/How-to-pull-the-snapshot-size-using-PYTHON/m-p/163996#M50</link>
      <description>&lt;P&gt;Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to pull the size of the snapshot of a specific volume.&lt;/P&gt;&lt;P&gt;============ code ==========================================&lt;/P&gt;&lt;P&gt;##S1 and V1 are Snapshot and Volume objects&amp;nbsp; which are already initialized before the below code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;S11=Snapshot.from_dict({'uuid':S1.uuid,'volume.uuid': V1.uuid})&lt;BR /&gt;S11.get()&lt;BR /&gt;print ("final snap==================")&lt;BR /&gt;print (S11)&lt;BR /&gt;print ("final snap==================")&lt;/P&gt;&lt;P&gt;==========================================================&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Returns the below:&lt;/P&gt;&lt;P&gt;**********************************************************************************************************&lt;/P&gt;&lt;P&gt;final snap==================&lt;BR /&gt;Snapshot({'volume': {'uuid': '0207959e-b04b-11ea-b611-d039ea073d7a', '_links': {'self': {'href': '/api/storage/volumes/0207959e-b04b-11ea-b611-d039ea073d7a'}}, 'name': 'XXXXXX'}, 'name': 'weekly.2021-02-07_0015', 'create_time': '2021-02-07T00:15:01+00:00', '_links': {'self': {'href': '/api/storage/volumes/0207959e-b04b-11ea-b611-d039ea073d7a/snapshots/15891d63-214a-4e7b-86da-942612280b39'}}, 'svm': {'uuid': '01a0b7f6-b04b-11ea-b611-d039ea073d7a', '_links': {'self': {'href': '/api/svm/svms/01a0b7f6-b04b-11ea-b611-d039ea073d7a'}}, 'name': 'XXXXX'}, 'uuid': '15891d63-214a-4e7b-86da-942612280b39'})&lt;BR /&gt;final snap==================&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not able to get the size of the snapshot but getting all other details [ like name, creation_time etc].&lt;/P&gt;&lt;P&gt;Appreciate your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Suneel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate if you&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2021 11:17:14 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Python-Discussions/How-to-pull-the-snapshot-size-using-PYTHON/m-p/163996#M50</guid>
      <dc:creator>SuneelT</dc:creator>
      <dc:date>2021-02-15T11:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to pull the snapshot size using PYTHON</title>
      <link>https://community.netapp.com/t5/Python-Discussions/How-to-pull-the-snapshot-size-using-PYTHON/m-p/164036#M51</link>
      <description>&lt;P&gt;The size property is not present in the 9.8 or prior versions of the API. It may come in a later release.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One thing you can do as a workaround is to use the CLI passthrough to get the information. Here's an example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from netapp_ontap.resources import CLI

response = CLI().execute("snapshot show", snapshot=S1.name, volume=V1.name)
snapshot_size = response.http_response.json()["records"][0]["size"]&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 16 Feb 2021 11:23:00 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Python-Discussions/How-to-pull-the-snapshot-size-using-PYTHON/m-p/164036#M51</guid>
      <dc:creator>RobertBlackhart</dc:creator>
      <dc:date>2021-02-16T11:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to pull the snapshot size using PYTHON</title>
      <link>https://community.netapp.com/t5/Python-Discussions/How-to-pull-the-snapshot-size-using-PYTHON/m-p/164037#M52</link>
      <description>&lt;P&gt;Thank you for the workaround, I will test it.&lt;/P&gt;&lt;P&gt;Atleast I now know that this is not available in current python modules, I have been trying different options &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2021 11:43:41 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Python-Discussions/How-to-pull-the-snapshot-size-using-PYTHON/m-p/164037#M52</guid>
      <dc:creator>SuneelT</dc:creator>
      <dc:date>2021-02-16T11:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to pull the snapshot size using PYTHON</title>
      <link>https://community.netapp.com/t5/Python-Discussions/How-to-pull-the-snapshot-size-using-PYTHON/m-p/455949#M72</link>
      <description>&lt;P&gt;hey is this feature available now? I am lookng to get snapshot size via API. Please advice&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 06:43:07 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Python-Discussions/How-to-pull-the-snapshot-size-using-PYTHON/m-p/455949#M72</guid>
      <dc:creator>ABisht</dc:creator>
      <dc:date>2024-10-21T06:43:07Z</dc:date>
    </item>
  </channel>
</rss>

