Set the SNMP Mode and Alerts Enabled value
 @param [String, Symbol] snmp_mode
 @param [Boolean] snmp_alerts
 @raise [RuntimeError] if the request failed
 @return true
323700
def set_snmp(snmp_mode, snmp_alerts)
      new_action = { 'Mode' => snmp_mode, 'AlertsEnabled' => snmp_alerts }
      response = rest_patch('/redfish/v1/Managers/1/SnmpService/', body: new_action)
      response_handler(response)
      true
    end
346773
def set(msg_id, suffix, value)
      with_failover { redis.set(key(msg_id, suffix), value) }
    end
835634
def do_start_alerts(self, _):
        
        if self._alerter_thread.is_alive():
            print("The alert thread is already started")
        else:
            self._stop_thread = False
            self._alerter_thread = threading.Thread(name='alerter', target=self._alerter_thread_func)
            self._alerter_thread.start()
866855
public void setAppServerDefaultDeploymentScanEnabled(boolean enabled) throws Exception {
        final String[] addressArr = { SUBSYSTEM, DEPLOYMENT_SCANNER, SCANNER, "default" };
        final Address address = Address.root().add(addressArr);
        final ModelNode req = createWriteAttributeRequest("scan-enabled", Boolean.toString(enabled), address);
        final ModelNode response = execute(req);

        if (!isSuccess(response)) {
            throw new FailureException(response);
        }
        return;
    }
876264
def setnx(msg_id, suffix, value)
      with_failover { redis.setnx(key(msg_id, suffix), value) }
    end
800290
def alert_type(self, alert_type):
        
        allowed_values = ["CLASSIC", "THRESHOLD"]  # noqa: E501
        if alert_type not in allowed_values:
            raise ValueError(
                "Invalid value for `alert_type` ({0}), must be one of {1}"  # noqa: E501
                .format(alert_type, allowed_values)
            )

        self._alert_type = alert_type
706903
def set_warning(type, enabled, pattern=nil, params=[])
      begin
        @warnings.set(type, enabled, pattern, params)
      rescue Warning::WarnException => e
        warn(nil, e.message)
      end
    end
78851
def turn_on(options = {})
      _check_server!
      return unless enabled?

      fail "Already active!" if active?

      _turn_on_notifiers(options)
      _env.notify_active = true
    end
201050
def enable_alarm_actions(self, alarm_names):
        
        params = {}
        self.build_list_params(params, alarm_names, 'AlarmNames.member.%s')
        return self.get_status('EnableAlarmActions', params)
1350492
def current_mode=(id)
      @current_mode = id.is_a?(ChipMode) ? id.id : id
      Origen.app.listeners_for(:on_mode_changed).each do |listener|
        listener.on_mode_changed(mode: @current_mode, instance: self)
      end
      @current_mode
    end
1309515
def enable_messaging(message_viewer, sender=dispatcher.Any):
    
    # Set up dispatcher for dynamic messages
    # Dynamic messages will not clear the message queue so will be appended
    # to existing user messages
    LOGGER.debug('enable_messaging %s %s' % (message_viewer, sender))
    # noinspection PyArgumentEqualDefault
    dispatcher.connect(
        message_viewer.dynamic_message_event,
        signal=DYNAMIC_MESSAGE_SIGNAL,
        sender=sender)
    # Set up dispatcher for static messages
    # Static messages clear the message queue and so the display is 'reset'
    # noinspection PyArgumentEqualDefault
    dispatcher.connect(
        message_viewer.static_message_event,
        signal=STATIC_MESSAGE_SIGNAL,
        sender=sender)
    # Set up dispatcher for error messages
    # Error messages clear the message queue and so the display is 'reset'
    # noinspection PyArgumentEqualDefault
    dispatcher.connect(
        message_viewer.static_message_event,
        signal=ERROR_MESSAGE_SIGNAL,
        sender=sender)
682960
def set_mode_by_name(self, zone_name, mode):
        
        zone = self.get_zone(zone_name)
        if zone is None:
            raise RuntimeError("Unknown zone")

        return self.set_mode_by_id(zone["zoneId"], mode)
545975
async def set_mode(self, target, *modes):
        
        if self.is_channel(target) and not self.in_channel(target):
            raise NotInChannel(target)

        await self.rawmsg('MODE', target, *modes)
805830
def update_active_breakpoint_flag(cls):
        
        cls.any_active_breakpoint=any([bp.enabled for bp in cls.breakpoints_by_number if bp])
902973
def set_send_enable(self, setting):
        
        self._pebble.send_packet(DataLogging(data=DataLoggingSetSendEnable(enabled=setting)))
799962
def enable_lldp(self, port_name, is_ncb=True, is_nb=False):
        
        reply = None
        if is_ncb:
            reply = self.run_lldptool(["-L", "-i", port_name, "-g", "ncb",
                                       "adminStatus=rxtx"])
        elif is_nb:
            reply = self.run_lldptool(["-L", "-i", port_name, "-g", "nb",
                                       "adminStatus=rxtx"])
        else:
            LOG.error("Both NCB and NB are not selected to "
                      "enable LLDP")
            return False
        if reply is None:
            return False
        exp_str = "adminstatus=rxtx"
        if exp_str in reply.replace(" ", "").lower():
            return True
        else:
            return False
1019407
def set(self, oid, value):
        
        try:
            results = self.cmd_gen.setCmd(self._get_auth(),
                                          self._get_transport(),
                                          (oid, value))
        except snmp_error.PySnmpError as e:
            raise SNMPFailure(SNMP_FAILURE_MSG % ("SET", e))

        error_indication, error_status, error_index, var_binds = results

        if error_indication:
            # SNMP engine-level error.
            raise SNMPFailure(SNMP_FAILURE_MSG % ("SET", error_indication))

        if error_status:
            # SNMP PDU error.
            raise SNMPFailure(
                "SNMP operation '%(operation)s' failed: %(error)s at"
                " %(index)s" %
                {'operation': "SET", 'error': error_status.prettyPrint(),
                 'index':
                     error_index and var_binds[int(error_index) - 1]
                     or '?'})