kmip/core/messages/payloads/query.py
def write(self, output_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0):
        """
        Write the data encoding the QueryRequestPayload object to a stream.

        Args:
            output_buffer (Stream): A data stream in which to encode object
                data, supporting a write method; usually a BytearrayStream
                object.
            kmip_version (KMIPVersion): An enumeration defining the KMIP
                version with which the object will be encoded. Optional,
                defaults to KMIP 1.0.

        Raises:
            InvalidField: Raised if the query functions are not defined.
        """
        local_buffer = utils.BytearrayStream()

        if self._query_functions:
            for query_function in self._query_functions:
                query_function.write(local_buffer, kmip_version=kmip_version)
        else:
            raise exceptions.InvalidField(
                "The Query request payload is missing the query functions "
                "field."
            )

        self.length = local_buffer.length()
        super(QueryRequestPayload, self).write(
            output_buffer,
            kmip_version=kmip_version
        )
        output_buffer.write(local_buffer.buffer)
def write(self, output_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0):
        local_buffer = utils.BytearrayStream()

        if self._query_functions:
            for query_function in self._query_functions:
                query_function.write(local_buffer, kmip_version=kmip_version)
        else:
            raise exceptions.InvalidField(
                "The Query request payload is missing the query functions "
                "field."
            )

        self.length = local_buffer.length()
        super(QueryRequestPayload, self).write(
            output_buffer,
            kmip_version=kmip_version
        )
        output_buffer.write(local_buffer.buffer)
def write ( self , output_buffer , kmip_version = enums . KMIPVersion . KMIP_1_0 ) : local_buffer = utils . BytearrayStream ( ) if self . _query_functions : for query_function in self . _query_functions : query_function . write ( local_buffer , kmip_version = kmip_version ) else : raise exceptions . InvalidField ( "The Query request payload is missing the query functions " "field." ) self . length = local_buffer . length ( ) super ( QueryRequestPayload , self ) . write ( output_buffer , kmip_version = kmip_version ) output_buffer . write ( local_buffer . buffer )
Write the data encoding the QueryRequestPayload object to a stream.

        Args:
            output_buffer (Stream): A data stream in which to encode object
                data, supporting a write method; usually a BytearrayStream
                object.
            kmip_version (KMIPVersion): An enumeration defining the KMIP
                version with which the object will be encoded. Optional,
                defaults to KMIP 1.0.

        Raises:
            InvalidField: Raised if the query functions are not defined.
Write the data encoding the QueryRequestPayload object to a stream .