Set channel access

    :param channel: number [1:7]

    :param access_update_mode:
        - 'dont_change'  = don't set or change Channel Access
        - 'non_volatile' = set non-volatile Channel Access
        - 'volatile'     = set volatile (active) setting of Channel Access

    :param alerting:
        PEF Alerting Enable/Disable

        - True  = enable PEF Alerting
        - False = disable PEF Alerting on this channel
          (Alert Immediate command can still be used to generate alerts)

    :param per_msg_auth:
        Per-message Authentication

        - True  = enable
        - False = disable Per-message Authentication. [Authentication required to
          activate any session on this channel, but authentication not
          used on subsequent packets for the session.]

    :param user_level_auth:
        User Level Authentication Enable/Disable

        - True  = enable User Level Authentication. All User Level commands are
          to be authenticated per the Authentication Type that was
          negotiated when the session was activated.
        - False = disable User Level Authentication. Allow User Level commands to
          be executed without being authenticated.
          If the option to disable User Level Command authentication is
          accepted, the BMC will accept packets with Authentication Type
          set to None if they contain user level commands.
          For outgoing packets, the BMC returns responses with the same
          Authentication Type that was used for the request.

    :param access_mode:
        Access Mode for IPMI messaging (PEF Alerting is enabled/disabled
        separately from IPMI messaging)

        - disabled = disabled for IPMI messaging
        - pre_boot = pre-boot only channel only available when system is
          in a powered down state or in BIOS prior to start of boot.
        - always   = channel always available regardless of system mode.
          BIOS typically dedicates the serial connection to the BMC.
        - shared   = same as always available, but BIOS typically leaves the
          serial port available for software use.

    :param privilege_update_mode:
        Channel Privilege Level Limit. This value sets the maximum privilege
        level that can be accepted on the specified channel.

        - dont_change  = don't set or change channel Privilege Level Limit
        - non_volatile = non-volatile Privilege Level Limit according
        - volatile     = volatile setting of Privilege Level Limit

    :param privilege_level:
        Channel Privilege Level Limit

        - reserved      = unused
        - callback
        - user
        - operator
        - administrator
        - proprietary   = used by OEM

    :param kwargs:
        - api_host=127.0.0.1
        - api_user=admin
        - api_pass=example
        - api_port=623
        - api_kg=None

    CLI Examples:

    .. code-block:: bash

        salt-call ipmi.set_channel_access privilege_level='administrator'

def set_channel_access(channel=14, access_update_mode='non_volatile',
                       alerting=False, per_msg_auth=False, user_level_auth=False,
                       access_mode='always', privilege_update_mode='non_volatile',
                       privilege_level='administrator', **kwargs):
    '''
    Set channel access

    :param channel: number [1:7]

    :param access_update_mode:
        - 'dont_change'  = don't set or change Channel Access
        - 'non_volatile' = set non-volatile Channel Access
        - 'volatile'     = set volatile (active) setting of Channel Access

    :param alerting:
        PEF Alerting Enable/Disable

        - True  = enable PEF Alerting
        - False = disable PEF Alerting on this channel
          (Alert Immediate command can still be used to generate alerts)

    :param per_msg_auth:
        Per-message Authentication

        - True  = enable
        - False = disable Per-message Authentication. [Authentication required to
          activate any session on this channel, but authentication not
          used on subsequent packets for the session.]

    :param user_level_auth:
        User Level Authentication Enable/Disable

        - True  = enable User Level Authentication. All User Level commands are
          to be authenticated per the Authentication Type that was
          negotiated when the session was activated.
        - False = disable User Level Authentication. Allow User Level commands to
          be executed without being authenticated.
          If the option to disable User Level Command authentication is
          accepted, the BMC will accept packets with Authentication Type
          set to None if they contain user level commands.
          For outgoing packets, the BMC returns responses with the same
          Authentication Type that was used for the request.

    :param access_mode:
        Access Mode for IPMI messaging (PEF Alerting is enabled/disabled
        separately from IPMI messaging)

        - disabled = disabled for IPMI messaging
        - pre_boot = pre-boot only channel only available when system is
          in a powered down state or in BIOS prior to start of boot.
        - always   = channel always available regardless of system mode.
          BIOS typically dedicates the serial connection to the BMC.
        - shared   = same as always available, but BIOS typically leaves the
          serial port available for software use.

    :param privilege_update_mode:
        Channel Privilege Level Limit. This value sets the maximum privilege
        level that can be accepted on the specified channel.

        - dont_change  = don't set or change channel Privilege Level Limit
        - non_volatile = non-volatile Privilege Level Limit according
        - volatile     = volatile setting of Privilege Level Limit

    :param privilege_level:
        Channel Privilege Level Limit

        - reserved      = unused
        - callback
        - user
        - operator
        - administrator
        - proprietary   = used by OEM

    :param kwargs:
        - api_host=127.0.0.1
        - api_user=admin
        - api_pass=example
        - api_port=623
        - api_kg=None

    CLI Examples:

    .. code-block:: bash

        salt-call ipmi.set_channel_access privilege_level='administrator'
    '''
    with _IpmiCommand(**kwargs) as s:
        return s.set_channel_access(channel, access_update_mode, alerting, per_msg_auth, user_level_auth,
                                    access_mode, privilege_update_mode, privilege_level)