<?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: Trying to figure out how to get properties of properties in Software Development Kit (SDK) and API Discussions</title>
    <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Trying-to-figure-out-how-to-get-properties-of-properties/m-p/144893#M2774</link>
    <description>&lt;P&gt;Matt:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&amp;nbsp; I was trying to figure out the 'sub-object' (sub-properties?).&amp;nbsp; I still don't understand what a sub-object is.&amp;nbsp; What I was trying to do, is to get a listing of a certain set of volumes with the percentagetotalspacesaved for each, in a one-liner.&lt;/P&gt;
&lt;P&gt;I think I may have to assign the volume properties to a variable and run via a foreach on each one to get the actual properties and sub-properties I need;&amp;nbsp; Oh and of course I need to pass them through the 'convertto-formattednumber' scriplet.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tas&lt;/P&gt;</description>
    <pubDate>Mon, 26 Nov 2018 19:49:57 GMT</pubDate>
    <dc:creator>Tas</dc:creator>
    <dc:date>2018-11-26T19:49:57Z</dc:date>
    <item>
      <title>Trying to figure out how to get properties of properties</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Trying-to-figure-out-how-to-get-properties-of-properties/m-p/144810#M2769</link>
      <description>&lt;P&gt;When I look at &lt;STRONG&gt;get-ncvol | gm&lt;/STRONG&gt;, I see the primary properties, then&amp;nbsp; I see what I presume are object-properties.&lt;/P&gt;
&lt;P&gt;i.e. get-ncvol | gm I see a few Property's, but then I see Property's flagged as (DataONTAP.C.Type.Volume...)&lt;/P&gt;
&lt;P&gt;I'd like to get the information on these, for example the volumeSisAttributes;&amp;nbsp; if I run &lt;STRONG&gt;(get-ncvol).volumeSisAttributes | gm&lt;/STRONG&gt; I see the list of additional SIS data I'd like to pull.&amp;nbsp; But I am unsure how to do that.&amp;nbsp; I don't really understand what kind of properties these sub-servient properties are, or how to get them via a PS get-ncvol structure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone help?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;TasP&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 13:06:06 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Trying-to-figure-out-how-to-get-properties-of-properties/m-p/144810#M2769</guid>
      <dc:creator>Tas</dc:creator>
      <dc:date>2025-06-04T13:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to figure out how to get properties of properties</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Trying-to-figure-out-how-to-get-properties-of-properties/m-p/144820#M2770</link>
      <description>&lt;P&gt;Hi Tas,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure i've understood what you are trying to achiving but i hope this helps and makes sense.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;#'------------------------------------------------------------------------------
Import-Module DataONTAP
Connect-NcController -Name cluster1 -HTTPS -Credential $(Get-Credential)
$volume = Get-NcVol -Name volume1 -Vserver vserver1
#'------------------------------------------------------------------------------
&amp;lt;#
If you invoke "$volume | fl" and pipe it to format-list you will see the volumes properties and sub object types. 
EG: DataONTAP.C.Types.Volume.VolumeSisAttributes
If you invoke the sub object type and pipe it to format-list you can enumerate the property names of the sub object.
EG: "$volume.VolumeSisAttributes | fl"
You can then access the volumes sub object property values by name.
EG: "$volume.VolumeSisAttributes.IsSisVolume"
#&amp;gt;
#'------------------------------------------------------------------------------
$volume.VolumeSisAttributes.IsSisVolume
True
#'------------------------------------------------------------------------------&lt;/PRE&gt;
&lt;P&gt;/Matt&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2018 23:12:37 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Trying-to-figure-out-how-to-get-properties-of-properties/m-p/144820#M2770</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2018-11-21T23:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to figure out how to get properties of properties</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Trying-to-figure-out-how-to-get-properties-of-properties/m-p/144893#M2774</link>
      <description>&lt;P&gt;Matt:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&amp;nbsp; I was trying to figure out the 'sub-object' (sub-properties?).&amp;nbsp; I still don't understand what a sub-object is.&amp;nbsp; What I was trying to do, is to get a listing of a certain set of volumes with the percentagetotalspacesaved for each, in a one-liner.&lt;/P&gt;
&lt;P&gt;I think I may have to assign the volume properties to a variable and run via a foreach on each one to get the actual properties and sub-properties I need;&amp;nbsp; Oh and of course I need to pass them through the 'convertto-formattednumber' scriplet.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tas&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2018 19:49:57 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Trying-to-figure-out-how-to-get-properties-of-properties/m-p/144893#M2774</guid>
      <dc:creator>Tas</dc:creator>
      <dc:date>2018-11-26T19:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to figure out how to get properties of properties</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Trying-to-figure-out-how-to-get-properties-of-properties/m-p/144917#M2775</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.netapp.com/t5/user/viewprofilepage/user-id/49710"&gt;@Tas&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;if I run &lt;STRONG&gt;(get-ncvol).volumeSisAttributes | gm&lt;/STRONG&gt; I see the list of additional SIS data I'd like to pull.&amp;nbsp; But I am unsure how to do that. &lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You're looking to select custom properties.&amp;nbsp; This should get you in the right direction...&lt;/P&gt;
&lt;PRE&gt;Get-NcVol -Name vol1 | Select-Object -Property Name,State,TotalSize,used,Available,Dedupe,@{n="PercentSpaceSaved";e={$_.VolumeSisAttributes.PercentageTotalSpaceSaved}}&lt;/PRE&gt;
&lt;P&gt;To include the ConvertTo-FormattedNumber scriplet you referenced and a pretty percent sign...&lt;/P&gt;
&lt;PRE&gt;Get-NcVol -Name vol1 | Select-Object -Property Name,State,@{n="TotalSize";e={try { ConvertTo-FormattedNumber $_.TotalSize DataSize "0.0" } catch [Exception] { $null }}},@{n="Used";e={try { ConvertTo-FormattedNumber $_.Used Percent } catch [Exception] { $null }}},@{n="Available";e={try { ConvertTo-FormattedNumber $_.Available DataSize "0.0" } catch [Exception] { $null }}},@{n="PercentSpaceSaved";e={ConvertTo-FormattedNumber $_.VolumeSisAttributes.PercentageTotalSpaceSaved Percent}}&lt;/PRE&gt;
&lt;P&gt;&lt;A title="Building Objects with Custom Properties with Select-Object" href="https://www.petri.com/understanding-powershell-custom-properties-with-select-object-cmdlet" target="_blank"&gt;Here is a primer on using Select-Object to view custom properties&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2018 17:33:47 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Trying-to-figure-out-how-to-get-properties-of-properties/m-p/144917#M2775</guid>
      <dc:creator>Semicolon</dc:creator>
      <dc:date>2018-11-27T17:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to figure out how to get properties of properties</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Trying-to-figure-out-how-to-get-properties-of-properties/m-p/145052#M2782</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.netapp.com/t5/user/viewprofilepage/user-id/33746"&gt;@Semicolon&lt;/a&gt;;&amp;nbsp; I will try out your suggestions.&amp;nbsp; I've been deperately looking for something like this.&lt;/P&gt;
&lt;P&gt;Tas&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 21:08:07 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Trying-to-figure-out-how-to-get-properties-of-properties/m-p/145052#M2782</guid>
      <dc:creator>Tas</dc:creator>
      <dc:date>2018-11-30T21:08:07Z</dc:date>
    </item>
  </channel>
</rss>

