Software Development Kit (SDK) and API Discussions

Use of Templates in NMSDK

nitish
2,443 Views

Unlike Powershell, is there a functionality to use "Templates" in NMSDK using Perl?

 

Sample poweshell code below to pull the disk model numbers for a node. This pulls only the Disk Model numbers.

            $diskAttributes = Get-NcDisk -Template
            $diskAttributes.Model = ""
            $diskQuery = Get-NcDisk -Template
            Initialize-NcObjectProperty -object $diskQuery -name DiskOwnershipInfo
            $diskQuery.DiskOwnershipInfo.HomeNodeName = $node
            $disks = (Get-NcDisk -Query $diskQuery -attributes $diskAttributes).Model.substring(0,4)

 

I am building a similar code in Perl using API "disk-list-info", however, it pulls lot of data for each disk.

0 REPLIES 0
Public