Enum PrivilegeLevel

java.lang.Object
java.lang.Enum<PrivilegeLevel>
org.metricshub.ipmi.core.coding.commands.PrivilegeLevel
All Implemented Interfaces:
Serializable, Comparable<PrivilegeLevel>

public enum PrivilegeLevel extends Enum<PrivilegeLevel>
The privilege level of a session (IPMI 2.0 section 6.8), declared from the lowest to the highest: Callback, User, Operator, Administrator. MaximumAvailable, declared last, is not a level but a request for the highest level the account is allowed.
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Every command, the configuration of the BMC included; Serial over LAN needs this level on most BMCs.
    The lowest level: only the commands that initiate a callback.
    The highest level the account is allowed.
    The User commands and the commands that change the state of the system, such as Chassis Control and Chassis Identify, but not the configuration commands that change the behavior of the out-of-band interfaces.
    The level every session but a Callback one starts at (IPMI 2.0 section 22.18): the commands that read the BMC, such as the chassis status, the sensors, the FRUs and the SEL.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this type with the specified name.
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • Callback

      public static final PrivilegeLevel Callback
      The lowest level: only the commands that initiate a callback. The client refuses it (IpmiClient.Builder.privilege(PrivilegeLevel)), as none of its operations works at this level.
    • User

      public static final PrivilegeLevel User
      The level every session but a Callback one starts at (IPMI 2.0 section 22.18): the commands that read the BMC, such as the chassis status, the sensors, the FRUs and the SEL. On most BMCs, it is not enough for the sensors and FRUs of the controllers other than the BMC, which the BMC reaches with Send Message.
    • Operator

      public static final PrivilegeLevel Operator
      The User commands and the commands that change the state of the system, such as Chassis Control and Chassis Identify, but not the configuration commands that change the behavior of the out-of-band interfaces. Most BMCs accept Send Message at this level, some at the Administrator level only.
    • Administrator

      public static final PrivilegeLevel Administrator
      Every command, the configuration of the BMC included; Serial over LAN needs this level on most BMCs.
    • MaximumAvailable

      public static final PrivilegeLevel MaximumAvailable
      The highest level the account is allowed. openSession() of IpmiConnector and IpmiAsyncConnector requests Administrator at Open Session and RAKP Message 1, then Operator, then User when the BMC refuses the role to the account, and sets the session to User with Set Session Privilege Level: the caller raises it when a command needs more, as IpmiClient and SerialOverLan do. Encoded by a command itself, this value is role 0h: in Open Session and RAKP Message 1, the highest level that matches the proposed algorithms (IPMI 2.0 section 13.17); in Set Session Privilege Level, a request for the present level of the session, which stays unchanged.
  • Method Details

    • values

      public static PrivilegeLevel[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static PrivilegeLevel valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null