/// <summary>
        /// Method removes DPC from powered on servers
        /// </summary>
        private static void RemoveAllBladeDpc()
        {
            for (int bladeIndex = 0; bladeIndex < ConfigLoaded.Population; bladeIndex++)
            {
                byte bladeId = (byte)(bladeIndex + 1);

                if (ChassisState.BladePower[bladeIndex].GetCachedBladePowerState().BladePowerState == 0x01) // PowerState.On
                {
                    // Spec 1.86 adds optimization there by current state of PsuAlert
                    // does not need to be queried to disable
                    PsuAlert psuAlert = WcsBladeFacade.GetPsuAlert(bladeId);

                    if (psuAlert.CompletionCode == 0x00)
                    {
                        BmcPsuAlertAction bmcAction = BmcPsuAlertAction.DpcOnly;

                        if (psuAlert.BmcProchotEnabled)
                        {
                            bmcAction = BmcPsuAlertAction.ProcHotAndDpc;
                        }

                        // disable DPC.
                        WcsBladeFacade.ActivatePsuAlert(bladeId, psuAlert.AutoProchotEnabled, bmcAction, true);
                    }
                }
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Activate/Deactivate Psu Alert
 /// </summary>
 public static bool ActivatePsuAlert(byte deviceId, bool enableAutoProcHot, BmcPsuAlertAction bmcAction, bool removeCap)
 {
     if (clients.ContainsKey(deviceId))
     {
         return(clients[deviceId].ActivatePsuAlert(enableAutoProcHot, bmcAction, removeCap));
     }
     else
     {
         return(false);
     }
 }
        /// <summary>
        /// Initialize instance of the class.
        /// </summary>
        /// <param name="enableAutoProcHot">Enables Automatic ProcHot</param>
        /// <param name="bmcAction">Bmc Action on PSU_Alert GPI</param>
        /// <param name="removeCap">Removes Default Power Cap</param>
        internal ActivePsuAlertRequest(bool enableAutoProcHot, BmcPsuAlertAction bmcAction, bool removeCap)
        {
            if (enableAutoProcHot)
                autoProcHot = 0x01;

            // Bmc Action is bit shifed in the enum
            autoProcHot = (byte)(autoProcHot | (byte)bmcAction);

            if (removeCap)
                removeDpc = 0x01;
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Activate/Deactivate Psu Alert
        /// </summary>
        public virtual bool ActivatePsuAlert(bool enableAutoProcHot, BmcPsuAlertAction bmcAction, bool removeCap)
        {
            ActivePsuAlertResponse psuAlert = (ActivePsuAlertResponse)this.IpmiSendReceive(
                new ActivePsuAlertRequest(enableAutoProcHot, bmcAction, removeCap), typeof(ActivePsuAlertResponse));

            if (psuAlert.CompletionCode == 0x00)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// Initialize instance of the class.
        /// </summary>
        /// <param name="enableAutoProcHot">Enables Automatic ProcHot</param>
        /// <param name="bmcAction">Bmc Action on PSU_Alert GPI</param>
        /// <param name="removeCap">Removes Default Power Cap</param>
        internal ActivePsuAlertRequest(bool enableAutoProcHot, BmcPsuAlertAction bmcAction, bool removeCap)
        {
            if (enableAutoProcHot)
            {
                autoProcHot = 0x01;
            }

            // Bmc Action is bit shifed in the enum
            autoProcHot = (byte)(autoProcHot | (byte)bmcAction);

            if (removeCap)
            {
                removeDpc = 0x01;
            }
        }