Esempio n. 1
0
    def send_msg_func(self, cmd):
        """Send a command message to the remote Spec server using the new 'func' feature

        Arguments:
        cmd -- command string
        """
        if self.serverVersion < 3:
            logging.getLogger('SpecClient').error('Cannot execute command in Spec : feature is available since Spec server v3 only')
        else:
            if self.isSpecConnected():
                self.__send_msg_no_reply(SpecMessage.msg_func(cmd, version = self.serverVersion))
            else:
                raise SpecClientNotConnectedError
Esempio n. 2
0
    def send_msg_func(self, cmd):
        """Send a command message to the remote Spec server using the new 'func' feature

        Arguments:
        cmd -- command string
        """
        if self.server_version < 3:
            raise SpecClientVersionError("need spec server minimum version 3")

        if not self.is_connected():
            raise SpecClientNotConnectedError

        msg = SpecMessage.msg_func(cmd, version=self.server_version)
        self.__send_msg_no_reply(msg)
Esempio n. 3
0
    def send_msg_func(self, cmd):
        """Send a command message to the remote Spec server using the new 'func' feature

        Arguments:
        cmd -- command string
        """
        if self.serverVersion < 3:
            log.error(
                'Cannot execute command in Spec : feature is available since Spec server v3 only'
            )
        else:
            if self.isSpecConnected():
                self.__send_msg_no_reply(
                    SpecMessage.msg_func(cmd, version=self.serverVersion))
            else:
                raise SpecClientNotConnectedError