kmip/core/objects.py
def write(self, ostream, kmip_version=enums.KMIPVersion.KMIP_1_0):
        """
        Write the data encoding the RevocationReason object to a stream.

        Args:
            ostream (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.
        """
        tstream = BytearrayStream()

        self.revocation_code.write(tstream, kmip_version=kmip_version)
        if self.revocation_message is not None:
            self.revocation_message.write(tstream, kmip_version=kmip_version)

        # Write the length and value
        self.length = tstream.length()
        super(RevocationReason, self).write(ostream, kmip_version=kmip_version)
        ostream.write(tstream.buffer)
def write(self, ostream, kmip_version=enums.KMIPVersion.KMIP_1_0):
        """
        Write the data encoding the RevocationReason object to a stream.

        Args:
            ostream (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.
        """
        tstream = BytearrayStream()

        self.revocation_code.write(tstream, kmip_version=kmip_version)
        if self.revocation_message is not None:
            self.revocation_message.write(tstream, kmip_version=kmip_version)

        # Write the length and value
        self.length = tstream.length()
        super(RevocationReason, self).write(ostream, kmip_version=kmip_version)
        ostream.write(tstream.buffer)
Write the data encoding the RevocationReason object to a stream.

        Args:
            ostream (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.