Set command received and acknowledged.
341561
def _property_set(self, msg):
        """"""
        prop = self._sent_property.get('prop')
        if prop and hasattr(self, prop):
            setattr(self, prop, self._sent_property.get('val'))
        self._sent_property = {}
1109584
def send_config_set(
        self,
        config_commands=None,
        exit_config_mode=False,
        delay_factor=1,
        max_loops=150,
        strip_prompt=False,
        strip_command=False,
        config_mode_command=None,
    ):
        """"""
        return super(VyOSSSH, self).send_config_set(
            config_commands=config_commands,
            exit_config_mode=exit_config_mode,
            delay_factor=delay_factor,
            max_loops=max_loops,
            strip_prompt=strip_prompt,
            strip_command=strip_command,
            config_mode_command=config_mode_command,
        )
714990
def set_level(self, val):
        """"""
        if val == 0:
            self.off()
        else:
            setlevel = 255
            if val < 1:
                setlevel = val * 100
            elif val <= 0xff:
                setlevel = val
            set_command = StandardSend(
                self._address, COMMAND_LIGHT_ON_0X11_NONE, cmd2=setlevel)
            self._send_method(set_command, self._on_message_received)
811961
def _call_set(self, command, value, *args, **kwargs):
        
        if self.indexable:
            current = self.proxy_get()
            if normalize(current) != normalize(value):
                if current is not None:
                    self.deindex(current)
                if value is not None:
                    self.index(value)
        return self._traverse_command(command, value, *args, **kwargs)
424006
def set(self, timestamp, status, value):
        """"""
        received_timestamp = self._manager.time()
        reading = KATCPSensorReading(received_timestamp, timestamp, status, value)
        self._reading = reading
        self.call_listeners(reading)
845802
def setCmdline(self,value=1):
        """"""
        # set through dictionary to avoid extra calls to __setattr__
        if value:
            self.__dict__['flags'] = self.flags | _cmdlineFlag
        else:
            self.__dict__['flags'] = self.flags & ~_cmdlineFlag
6033
private void updateState(CmsShellCommandResult result) {

        m_errorCode = result.getErrorCode();
        m_prompt = result.getPrompt();
        m_exitCalled = result.isExitCalled();
        m_hasError = result.hasError();
        m_echo = result.hasEcho();
    }
716980
def _set_result_from_operation(self):
        """"""
        # This must be done in a lock to prevent the polling thread
        # and main thread from both executing the completion logic
        # at the same time.
        with self._completion_lock:
            # If the operation isn't complete or if the result has already been
            # set, do not call set_result/set_exception again.
            # Note: self._result_set is set to True in set_result and
            # set_exception, in case those methods are invoked directly.
            if not self._operation.done or self._result_set:
                return

            if self._operation.HasField("response"):
                response = protobuf_helpers.from_any_pb(
                    self._result_type, self._operation.response
                )
                self.set_result(response)
            elif self._operation.HasField("error"):
                exception = exceptions.GoogleAPICallError(
                    self._operation.error.message,
                    errors=(self._operation.error,),
                    response=self._operation,
                )
                self.set_exception(exception)
            else:
                exception = exceptions.GoogleAPICallError(
                    "Unexpected state: Long-running operation had neither "
                    "response nor error set."
                )
                self.set_exception(exception)
657389
def __setLock(self, command):
        """"""
        if command in (TURN_ON, TURN_OFF):
            self._operation = command
        elif command in INV_SOURCES:
            self._operation = SOURCE
        else:
            self._operation = ALL
        self._isLocked = True
        self._timer = time.time()
836572
def sendcommand(self, cmd, opt=None):
        ""
        if cmd in [DO, DONT]:
            if not self.DOOPTS.has_key(opt):
                self.DOOPTS[opt] = None
            if (((cmd == DO) and (self.DOOPTS[opt] != True))
            or ((cmd == DONT) and (self.DOOPTS[opt] != False))):
                self.DOOPTS[opt] = (cmd == DO)
                self.writecooked(IAC + cmd + opt)
        elif cmd in [WILL, WONT]:
            if not self.WILLOPTS.has_key(opt):
                self.WILLOPTS[opt] = ''
            if (((cmd == WILL) and (self.WILLOPTS[opt] != True))
            or ((cmd == WONT) and (self.WILLOPTS[opt] != False))):
                self.WILLOPTS[opt] = (cmd == WILL)
                self.writecooked(IAC + cmd + opt)
        else:
            self.writecooked(IAC + cmd)
650797
def handle_set_command_list(self, line: str, position: int, tokens: ParseResults) -> ParseResults:
        """"""
        key, values = tokens['key'], tokens['values']
        for value in values:
            self.raise_for_invalid_annotation_value(line, position, key, value)
        self.annotations[key] = set(values)
        return tokens
313385
def post_command(self, sender, name, result, args, kwargs):
        
        return self._instance.post_command(
                   sender=self,
                   name=name,
                   result=result,
                   args=args,
                   kwargs=kwargs
               )
1124448
def set_command(value, parameter):
    
    conf = get_config_obj()

    section = "cli"
    if "." in parameter:
        section, parameter = parameter.split(".", 1)

    # ensure that the section exists
    if section not in conf:
        conf[section] = {}
    # set the value for the given parameter
    conf[section][parameter] = value

    # write to disk
    safeprint("Writing updated config to {}".format(conf.filename))
    conf.write()
886592
def add_command_set(self, command_set):
        
        for command in command_set.get_commands():
            self.add_command(command)

        for event in command_set.get_events():
            self.add_event(event)
691979
def set_prompt(self):
        """"""
        # No right prompt
        command_line = b'PS2=;RPS1=;RPROMPT=;'
        command_line += b'PROMPT_COMMAND=;'
        command_line += b'TERM=ansi;'
        command_line += b'unset HISTFILE;'
        prompt1, prompt2 = callbacks.add(b'prompt', self.seen_prompt_cb, True)
        command_line += b'PS1="' + prompt1 + b'""' + prompt2 + b'\n"\n'
        return command_line
1282691
def _simple_command(self, command, arg=None, **kwargs):
    """"""
    self._protocol.send_command(command, arg)
    return self._protocol.handle_simple_responses(**kwargs)
1335053
def set_cmd(name, accepts_value=False):
    
    def decorator(func):
        SET_COMMANDS[name] = func
        if accepts_value:
            SET_COMMANDS_TAKING_VALUE.add(name)
        return func
    return decorator