#region Copyright /* * Copyright © 2014-2016 NetApp, Inc. All Rights Reserved. * * CONFIDENTIALITY NOTICE: THIS SOFTWARE CONTAINS CONFIDENTIAL INFORMATION OF * NETAPP, INC. USE, DISCLOSURE OR REPRODUCTION IS PROHIBITED WITHOUT THE PRIOR * EXPRESS WRITTEN PERMISSION OF NETAPP, INC. */ #endregion #region Using Directives using System.ComponentModel; using System.Management.Automation; using SolidFire.Core; using SolidFire.Element.Api; #endregion namespace SolidFire.Cluster.Get { /// GetClusterCapacity is used to return the high-level capacity measurements for an entire cluster. /// The fields returned from this method can be used to calculate the efficiency rates that are displayed in the Element User Interface. /// The following calculations can be used in scripts to return the efficiency rates for Thin Provisioning, Deduplication, Compression and overall efficiency. /// The Efficiency measurements are displayed in the SolidFire UI on the "Reporting" tab. The following equations are used to calculate "Thin Provisioning", "De-Duplication", and "Compression". /// The "Overall Efficiency" is calculated using the results of the "Thin Provisioning", "De-Duplication", and "Compression" calculations shown above. /// The "Overall Efficiency" measurement is displayed along with the efficiency calculations in the SolidFire UI on the "Reporting" tab. [Cmdlet(VerbsCommon.Get, "SFClusterCapacity")] public class GetSFClusterCapacity : SFCmdlet { #region Private Data #endregion #region Parameters #endregion #region Cmdlet Overrides protected override void BeginProcessing() { base.BeginProcessing(); CheckConnection(); } /// /// /// protected override void ProcessRecord() { base.ProcessRecord(); var objsFromAPI = SendRequest("GetClusterCapacity"); foreach (var obj in objsFromAPI) { WriteObject(obj.Result.ClusterCapacity, true); } } #endregion } }