#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; using System.Linq; using System.ComponentModel; using System.Management.Automation; using SolidFire.Core; using SolidFire.Element.Api; #endregion namespace SolidFire.StatsAndInfo { /// /// GetHardwareInfo allows you to return hardware information and status for a single node. This generally includes manufacturers, vendors, versions, drives, and other associated hardware identification information. /// [Cmdlet(VerbsCommon.Get, "SFHardwareInfo")] public class GetSFHardwareInfo : SFCmdlet { #region Private Data #endregion #region Parameters #endregion #region Cmdlet Overrides protected override void BeginProcessing() { base.BeginProcessing(); CheckConnection(9, endPoint: Core.Helpers.SolidFireUtilities.SFEndPoint.Node); } protected override void ProcessRecord() { base.ProcessRecord(); var objsFromAPI = SendRequest("GetHardwareInfo"); WriteObject(objsFromAPI.Select(obj => obj.Result.HardwareInfo), true); } #endregion } }